Commit b1ea36bc authored by kh's avatar kh
Browse files

Fix build with namespaced Qt

Reviewed-by: Thorbjorn Lindeijer
parent 5cb0a3cb
...@@ -47,7 +47,11 @@ ...@@ -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 ...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment