Suspend use of qt_ntfs_permission_lookup. QTBUG-101168
This commit is contained in:
parent
0644122345
commit
191cf7e25f
|
@ -4,6 +4,7 @@
|
|||
- Fix issue with tile font size.
|
||||
- [smart-pattern/valentina#171] System identifies two of the same curve.
|
||||
- [smart-pattern/valentina#170] Incorrect work with curves.
|
||||
- Suspend use of qt_ntfs_permission_lookup. QTBUG-101168
|
||||
|
||||
# Valentina 0.7.50 February 14, 2022
|
||||
- Fix regression. Minimal seam allowance width is less than the point accuracy values.
|
||||
|
|
|
@ -1864,15 +1864,15 @@ auto VPMainWindow::IsLayoutReadOnly() const -> bool
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup++; // turn checking on
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup++; // turn checking on
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
bool fileWritable = f.isWritable();
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup--; // turn it off again
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
return not fileWritable;
|
||||
}
|
||||
|
|
|
@ -3383,13 +3383,13 @@ 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*/
|
||||
//#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*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
showName = StrippedName(curFile);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -6809,13 +6809,13 @@ void MainWindow::UpdateWindowTitle()
|
|||
bool isFileWritable = true;
|
||||
if (not VAbstractValApplication::VApp()->GetPatternPath().isEmpty())
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup++; // turn checking on
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup++; // turn checking on
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
isFileWritable = QFileInfo(VAbstractValApplication::VApp()->GetPatternPath()).isWritable();
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup--; // turn it off again
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
}
|
||||
|
||||
if (not patternReadOnly && isFileWritable)
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include <QtGlobal>
|
||||
#ifdef Q_OS_WIN
|
||||
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||
// extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||
# include <qt_windows.h>
|
||||
#endif /*Q_OS_WIN*/
|
||||
|
||||
|
|
|
@ -162,13 +162,13 @@ 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*/
|
||||
//#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*/
|
||||
//#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));
|
||||
|
|
|
@ -986,9 +986,9 @@ bool VDomDocument::SafeCopy(const QString &source, const QString &destination, Q
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup++; // turn checking on
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup++; // turn checking on
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
QTemporaryFile destFile(destination + QLatin1String(".XXXXXX"));
|
||||
destFile.setAutoRemove(false);// Will be renamed to be destination file
|
||||
|
@ -1042,9 +1042,9 @@ bool VDomDocument::SafeCopy(const QString &source, const QString &destination, Q
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup--; // turn off check permission again
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn off check permission again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -387,13 +387,13 @@ bool WatermarkWindow::on_actionSave_triggered()
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup++; // turn checking on
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#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*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
if (not isFileWritable)
|
||||
{
|
||||
QMessageBox messageBox(this);
|
||||
|
@ -405,14 +405,14 @@ bool WatermarkWindow::on_actionSave_triggered()
|
|||
|
||||
if (messageBox.exec() == QMessageBox::Yes)
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup++; // turn checking on
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup++; // turn checking on
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
bool changed = QFile::setPermissions(m_curFile,
|
||||
QFileInfo(m_curFile).permissions() | QFileDevice::WriteUser);
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup--; // turn it off again
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
if (not changed)
|
||||
{
|
||||
|
@ -523,13 +523,13 @@ 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*/
|
||||
//#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*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
}
|
||||
|
||||
if (isFileWritable)
|
||||
|
|
|
@ -42,9 +42,9 @@
|
|||
#include <QLockFile>
|
||||
#include <QMessageBox>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||
#endif /*Q_OS_WIN*/
|
||||
//#ifdef Q_OS_WIN
|
||||
//extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||
//#endif /*Q_OS_WIN*/
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
#include <QStyleFactory>
|
||||
|
@ -259,9 +259,9 @@ auto VAbstractMainWindow::CheckFilePermissions(const QString &path, QWidget *mes
|
|||
{
|
||||
QFileInfo info(path);
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup++; // turn checking on
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup++; // turn checking on
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
if (not info.exists())
|
||||
{
|
||||
|
@ -271,9 +271,9 @@ auto VAbstractMainWindow::CheckFilePermissions(const QString &path, QWidget *mes
|
|||
// cppcheck-suppress unreadVariable
|
||||
const bool isFileWritable = info.isWritable();
|
||||
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup--; // turn it off again
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
if (not isFileWritable)
|
||||
{
|
||||
|
@ -286,13 +286,13 @@ auto VAbstractMainWindow::CheckFilePermissions(const QString &path, QWidget *mes
|
|||
|
||||
if (messageBox.exec() == QMessageBox::Yes)
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup++; // turn checking on
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup++; // turn checking on
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
bool changed = QFile::setPermissions(path, QFileInfo(path).permissions() | QFileDevice::WriteUser);
|
||||
#ifdef Q_OS_WIN32
|
||||
qt_ntfs_permission_lookup--; // turn it off again
|
||||
#endif /*Q_OS_WIN32*/
|
||||
//#ifdef Q_OS_WIN32
|
||||
// qt_ntfs_permission_lookup--; // turn it off again
|
||||
//#endif /*Q_OS_WIN32*/
|
||||
|
||||
if (not changed)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user