forked from qt-creator/qt-creator
Fix build with namespaced Qt
Reviewed-by: Thorbjorn Lindeijer
This commit is contained in:
@@ -47,7 +47,11 @@
|
|||||||
|
|
||||||
using namespace TextEditor;
|
using namespace TextEditor;
|
||||||
|
|
||||||
|
#if defined (Q_OS_WIN)
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
extern Q_CORE_EXPORT int qt_ntfs_permission_lookup;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined (Q_OS_WIN)
|
#if defined (Q_OS_WIN)
|
||||||
# define NATIVE_LINE_TERMINATOR CRLFLineTerminator
|
# define NATIVE_LINE_TERMINATOR CRLFLineTerminator
|
||||||
@@ -145,14 +149,14 @@ bool BaseTextDocument::isReadOnly() const
|
|||||||
|
|
||||||
const QFileInfo fi(m_fileName);
|
const QFileInfo fi(m_fileName);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN
|
||||||
// Check for permissions on NTFS file systems
|
// Check for permissions on NTFS file systems
|
||||||
qt_ntfs_permission_lookup++;
|
qt_ntfs_permission_lookup++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const bool ro = !fi.isWritable();
|
const bool ro = !fi.isWritable();
|
||||||
|
|
||||||
#ifdef Q_OS_WIN32
|
#ifdef Q_OS_WIN
|
||||||
qt_ntfs_permission_lookup--;
|
qt_ntfs_permission_lookup--;
|
||||||
#endif
|
#endif
|
||||||
return ro;
|
return ro;
|
||||||
|
Reference in New Issue
Block a user