diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 2d6188849..889f2e3b8 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -728,14 +728,7 @@ bool TMainWindow::FileSave() return false; } -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup++; // turn checking on -#endif /*Q_OS_WIN32*/ const bool isFileWritable = QFileInfo(curFile).isWritable(); -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup--; // turn it off again -#endif /*Q_OS_WIN32*/ - if (not isFileWritable) { QMessageBox messageBox(this); @@ -2593,13 +2586,7 @@ void TMainWindow::UpdateWindowTitle() bool isFileWritable = true; if (not curFile.isEmpty()) { -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup++; // turn checking on -#endif /*Q_OS_WIN32*/ isFileWritable = QFileInfo(curFile).isWritable(); -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup--; // turn it off again -#endif /*Q_OS_WIN32*/ showName = StrippedName(curFile); } else diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 30e40475d..24e4c5bea 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -3049,14 +3049,8 @@ bool MainWindow::on_actionSave_triggered() { return false; } -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup++; // turn checking on -#endif /*Q_OS_WIN32*/ - const bool isFileWritable = QFileInfo(qApp->GetPatternPath()).isWritable(); -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup--; // turn it off again -#endif /*Q_OS_WIN32*/ + const bool isFileWritable = QFileInfo(qApp->GetPatternPath()).isWritable(); if (not isFileWritable) { QMessageBox messageBox(this); @@ -5862,13 +5856,7 @@ void MainWindow::UpdateWindowTitle() bool isFileWritable = true; if (not qApp->GetPatternPath().isEmpty()) { -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup++; // turn checking on -#endif /*Q_OS_WIN32*/ isFileWritable = QFileInfo(qApp->GetPatternPath()).isWritable(); -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup--; // turn it off again -#endif /*Q_OS_WIN32*/ } if (not patternReadOnly && isFileWritable) diff --git a/src/app/valentina/watermarkwindow.cpp b/src/app/valentina/watermarkwindow.cpp index 487ba1cca..484009b50 100644 --- a/src/app/valentina/watermarkwindow.cpp +++ b/src/app/valentina/watermarkwindow.cpp @@ -358,14 +358,8 @@ bool WatermarkWindow::on_actionSave_triggered() { return false; } -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup++; // turn checking on -#endif /*Q_OS_WIN32*/ - const bool isFileWritable = QFileInfo(m_curFile).isWritable(); -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup--; // turn it off again -#endif /*Q_OS_WIN32*/ + const bool isFileWritable = QFileInfo(m_curFile).isWritable(); if (not isFileWritable) { QMessageBox messageBox(this); @@ -494,13 +488,7 @@ void WatermarkWindow::UpdateWindowTitle() bool isFileWritable = true; if (not m_curFile.isEmpty()) { -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup++; // turn checking on -#endif /*Q_OS_WIN32*/ isFileWritable = QFileInfo(m_curFile).isWritable(); -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup--; // turn it off again -#endif /*Q_OS_WIN32*/ } if (isFileWritable) diff --git a/src/libs/ifc/xml/vabstractconverter.cpp b/src/libs/ifc/xml/vabstractconverter.cpp index e1f69026d..b655fd52b 100644 --- a/src/libs/ifc/xml/vabstractconverter.cpp +++ b/src/libs/ifc/xml/vabstractconverter.cpp @@ -165,14 +165,7 @@ void VAbstractConverter::ReserveFile() const .arg(info.absoluteDir().absolutePath(), info.baseName(), GetFormatVersionStr(), info.completeSuffix()); if (not SafeCopy(m_convertedFileName, reserveFileName, error)) { -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup++; // turn checking on -#endif /*Q_OS_WIN32*/ const bool isFileWritable = info.isWritable(); -#ifdef Q_OS_WIN32 - qt_ntfs_permission_lookup--; // turn it off again -#endif /*Q_OS_WIN32*/ - if (not IsReadOnly() && isFileWritable) { const QString errorMsg(tr("Error creating a reserv copy: %1.").arg(error));