summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-05-22 11:20:10 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-05-22 12:40:07 (GMT)
commit8b2a16bd7f434a159e34e93dbffc983927a0a143 (patch)
tree366d7fe340ceaa512b292f25a23d4496ac903d8f /src
parenta0396c8c68aca446e68434e516bd46d749093b0f (diff)
downloadQt-8b2a16bd7f434a159e34e93dbffc983927a0a143.zip
Qt-8b2a16bd7f434a159e34e93dbffc983927a0a143.tar.gz
Qt-8b2a16bd7f434a159e34e93dbffc983927a0a143.tar.bz2
Fixed compilation with -qtnamespace
Task-number: 254333 Reviewed-by: Andy Shaw <qt-info@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qtemporaryfile.cpp4
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp4
-rw-r--r--src/corelib/kernel/qsystemsemaphore_p.h4
-rw-r--r--src/corelib/kernel/qtranslator.cpp4
-rw-r--r--src/network/access/qhttp.cpp4
-rw-r--r--src/network/kernel/qnetworkproxy.cpp4
-rw-r--r--src/network/kernel/qurlinfo.cpp4
-rw-r--r--src/network/socket/qhttpsocketengine.cpp4
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp13
9 files changed, 27 insertions, 18 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 7c0b018..b4d8a48 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -766,6 +766,8 @@ bool QTemporaryFile::open(OpenMode flags)
return false;
}
+QT_END_NAMESPACE
+
#endif // QT_NO_TEMPORARYFILE
-QT_END_NAMESPACE
+
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index 487c653..61d56f4 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -49,10 +49,10 @@
#include <errno.h>
-QT_BEGIN_NAMESPACE
-
#ifndef QT_NO_SHAREDMEMORY
+QT_BEGIN_NAMESPACE
+
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
diff --git a/src/corelib/kernel/qsystemsemaphore_p.h b/src/corelib/kernel/qsystemsemaphore_p.h
index 81d4f10..a4a7389 100644
--- a/src/corelib/kernel/qsystemsemaphore_p.h
+++ b/src/corelib/kernel/qsystemsemaphore_p.h
@@ -101,9 +101,9 @@ public:
QSystemSemaphore::SystemSemaphoreError error;
};
-#endif // QT_NO_SYSTEMSEMAPHORE
+QT_END_NAMESPACE
+#endif // QT_NO_SYSTEMSEMAPHORE
-QT_END_NAMESPACE
#endif // QSYSTEMSEMAPHORE_P_H
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 77d6599..3e4b467 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -819,6 +819,6 @@ bool QTranslator::isEmpty() const
Use translate(\a context, \a sourceText, \a comment) instead.
*/
-#endif // QT_NO_TRANSLATION
-
QT_END_NAMESPACE
+
+#endif // QT_NO_TRANSLATION
diff --git a/src/network/access/qhttp.cpp b/src/network/access/qhttp.cpp
index 7d14ab6..30befb3 100644
--- a/src/network/access/qhttp.cpp
+++ b/src/network/access/qhttp.cpp
@@ -64,10 +64,10 @@
# include "qtimer.h"
#endif
-QT_BEGIN_NAMESPACE
-
#ifndef QT_NO_HTTP
+QT_BEGIN_NAMESPACE
+
class QHttpNormalRequest;
class QHttpRequest
{
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 62bdfc7..fd3a85a 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -1258,6 +1258,6 @@ QList<QNetworkProxy> QNetworkProxyFactory::proxyForQuery(const QNetworkProxyQuer
return globalNetworkProxy()->proxyForQuery(query);
}
-#endif // QT_NO_NETWORKPROXY
-
QT_END_NAMESPACE
+
+#endif // QT_NO_NETWORKPROXY
diff --git a/src/network/kernel/qurlinfo.cpp b/src/network/kernel/qurlinfo.cpp
index 255c9ea..d90c480 100644
--- a/src/network/kernel/qurlinfo.cpp
+++ b/src/network/kernel/qurlinfo.cpp
@@ -726,6 +726,6 @@ bool QUrlInfo::isValid() const
return d != 0;
}
-#endif // QT_NO_URLINFO
-
QT_END_NAMESPACE
+
+#endif // QT_NO_URLINFO
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index 540c443..5a2a746 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -768,6 +768,6 @@ QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(int, QObject
return 0;
}
-#endif
-
QT_END_NAMESPACE
+
+#endif
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index e35bd1d..0f8b600 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -63,16 +63,23 @@
#include <QtGui/qtoolbar.h>
#include <QtGui/qboxlayout.h>
+// this has to be outside the namespace
+static void initScriptEngineDebuggerResources()
+{
+ Q_INIT_RESOURCE(scripttools_debugging);
+}
+
+QT_BEGIN_NAMESPACE
+
class QtScriptDebuggerResourceInitializer
{
public:
QtScriptDebuggerResourceInitializer() {
- Q_INIT_RESOURCE(scripttools_debugging);
+ // call outside-the-namespace function
+ initScriptEngineDebuggerResources();
}
};
-QT_BEGIN_NAMESPACE
-
/*!
\since 4.5
\class QScriptEngineDebugger