summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <msmith@trolltech.com>2010-04-09 13:16:09 (GMT)
committerMartin Smith <msmith@trolltech.com>2010-04-09 13:16:09 (GMT)
commit0bd75b67bc23d51670822305a31e19a74ca7134e (patch)
tree41b37d4e21ffd4b7bb7974e6b2bf9aa6494b5781
parent5e5836702662783a4fba5f95a487948e5c6d2a4e (diff)
parente4cae397e3737551752487000e152162d0878f88 (diff)
downloadQt-0bd75b67bc23d51670822305a31e19a74ca7134e.zip
Qt-0bd75b67bc23d51670822305a31e19a74ca7134e.tar.gz
Qt-0bd75b67bc23d51670822305a31e19a74ca7134e.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
-rw-r--r--doc/src/development/developing-on-mac.qdoc81
-rw-r--r--src/corelib/global/qfeatures.h5
-rw-r--r--src/corelib/global/qfeatures.txt9
-rw-r--r--src/corelib/thread/qthread_unix.cpp6
-rw-r--r--src/dbus/qdbus_symbols.cpp6
-rw-r--r--src/dbus/qdbus_symbols_p.h5
-rw-r--r--src/dbus/qdbusabstractadaptor.cpp4
-rw-r--r--src/dbus/qdbusabstractadaptor.h4
-rw-r--r--src/dbus/qdbusabstractadaptor_p.h3
-rw-r--r--src/dbus/qdbusabstractinterface.cpp4
-rw-r--r--src/dbus/qdbusabstractinterface.h3
-rw-r--r--src/dbus/qdbusabstractinterface_p.h3
-rw-r--r--src/dbus/qdbusargument.cpp4
-rw-r--r--src/dbus/qdbusargument.h3
-rw-r--r--src/dbus/qdbusargument_p.h3
-rw-r--r--src/dbus/qdbusconnection.cpp4
-rw-r--r--src/dbus/qdbusconnection.h3
-rw-r--r--src/dbus/qdbusconnection_p.h3
-rw-r--r--src/dbus/qdbusconnectioninterface.cpp4
-rw-r--r--src/dbus/qdbusconnectioninterface.h3
-rw-r--r--src/dbus/qdbuscontext.cpp4
-rw-r--r--src/dbus/qdbuscontext.h3
-rw-r--r--src/dbus/qdbuscontext_p.h5
-rw-r--r--src/dbus/qdbuserror.cpp4
-rw-r--r--src/dbus/qdbuserror.h3
-rw-r--r--src/dbus/qdbusextratypes.cpp3
-rw-r--r--src/dbus/qdbusextratypes.h3
-rw-r--r--src/dbus/qdbusintegrator.cpp7
-rw-r--r--src/dbus/qdbusintegrator_p.h3
-rw-r--r--src/dbus/qdbusinterface.cpp4
-rw-r--r--src/dbus/qdbusinterface.h3
-rw-r--r--src/dbus/qdbusinterface_p.h3
-rw-r--r--src/dbus/qdbusinternalfilters.cpp4
-rw-r--r--src/dbus/qdbusintrospection.cpp4
-rw-r--r--src/dbus/qdbusmacros.h3
-rw-r--r--src/dbus/qdbusmarshaller.cpp4
-rw-r--r--src/dbus/qdbusmessage.cpp3
-rw-r--r--src/dbus/qdbusmessage.h3
-rw-r--r--src/dbus/qdbusmessage_p.h3
-rw-r--r--src/dbus/qdbusmetaobject.cpp3
-rw-r--r--src/dbus/qdbusmetatype.cpp4
-rw-r--r--src/dbus/qdbusmetatype.h3
-rw-r--r--src/dbus/qdbusmisc.cpp4
-rw-r--r--src/dbus/qdbuspendingcall.cpp4
-rw-r--r--src/dbus/qdbuspendingcall.h3
-rw-r--r--src/dbus/qdbuspendingcall_p.h3
-rw-r--r--src/dbus/qdbuspendingreply.cpp3
-rw-r--r--src/dbus/qdbuspendingreply.h3
-rw-r--r--src/dbus/qdbusreply.cpp4
-rw-r--r--src/dbus/qdbusreply.h3
-rw-r--r--src/dbus/qdbusserver.cpp4
-rw-r--r--src/dbus/qdbusserver.h3
-rw-r--r--src/dbus/qdbusservicewatcher.cpp4
-rw-r--r--src/dbus/qdbusservicewatcher.h3
-rw-r--r--src/dbus/qdbusthreaddebug_p.h5
-rw-r--r--src/dbus/qdbusutil.cpp4
-rw-r--r--src/dbus/qdbusutil_p.h3
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp4
-rw-r--r--src/dbus/qdbusxmlparser.cpp4
-rw-r--r--src/dbus/qdbusxmlparser_p.h3
-rw-r--r--src/gui/kernel/qwidget_mac.mm5
-rw-r--r--src/plugins/bearer/networkmanager/main.cpp4
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp3
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerengine.h4
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp4
-rw-r--r--src/plugins/bearer/networkmanager/qnetworkmanagerservice.h3
-rw-r--r--src/plugins/bearer/networkmanager/qnmdbushelper.cpp4
-rw-r--r--src/plugins/bearer/networkmanager/qnmdbushelper.h4
-rw-r--r--src/plugins/script/qtdbus/main.cpp4
-rw-r--r--src/plugins/script/qtdbus/main.h3
-rw-r--r--tests/auto/qhelpgenerator/data/test.qhp2
-rw-r--r--tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp2
-rw-r--r--tests/auto/qhelpprojectdata/data/test.qhp4
-rw-r--r--tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp2
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp2
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp12
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp1
-rw-r--r--tests/auto/qxmlquery/tst_qxmlquery.cpp12
-rw-r--r--tools/assistant/lib/qhelpprojectdata.cpp28
-rw-r--r--tools/linguist/linguist.pro1
-rw-r--r--tools/linguist/shared/translator.cpp9
-rw-r--r--tools/tools.pro3
82 files changed, 366 insertions, 53 deletions
diff --git a/doc/src/development/developing-on-mac.qdoc b/doc/src/development/developing-on-mac.qdoc
index 6845d67..785858f 100644
--- a/doc/src/development/developing-on-mac.qdoc
+++ b/doc/src/development/developing-on-mac.qdoc
@@ -67,26 +67,25 @@
\section2 Carbon or Cocoa?
- Qt supports building in two flavors, using either the Carbon or Cocoa APIs.
- Using the Cocoa toolkit, Qt requires 10.5 and provides 64-bit support. With
- Carbon Qt can be developed on and deployed to 10.4, but there is no 64-bit
+ Qt supports building in two flavors, using either the Carbon or Cocoa API.
+ Using the Cocoa API, Qt requires 10.5 and provides both 32-bit and 64-bit support. With
+ Carbon, Qt can be developed on and deployed to 10.4, but there is no 64-bit
support.
Note: There is no accessibility support in the Cocoa version. This is planned
for Qt 4.8.
- With Qt 4.7 we now recommend using the Cocoa version of Qt for development,
- unless you want to target the 10.4 platform. Qt now uses Cocoa by default,
- both for the binary package and when configuring from source. Download the
- Carbon binary packages or configure with "-carbon" to use that version.
+ With Qt 4.7 we recommend using the Cocoa version of Qt for development,
+ unless you want to target the 10.4 platform. Qt uses Cocoa by default,
+ both for the binary package and when configuring Qt from source (using the \c{configure}
+ script). To build Qt for Carbon, specify the \c{-carbon} flag to configure.
There are two versions of the Qt binary, one with x86 and x86_64
Cocoa and another with x86 and ppc Carbon. If you want a different setup
- you must build from source. Carbon or Cocoa is chosen when
- configuring the package for building. The configure process selects Carbon
- by default, to specify Cocoa use the \c{-cocoa} flag. configure for a
- 64-bit architecture using one of the \c{-arch} flags (see \l{universal
- binaries}{Universal Binaries}).
+ you must build Qt yourself using the source package. To explicitly configure
+ Qt to build for 34-bit or 64-bit architectures (or both), use
+ the \c{-arch} flags (see \l{universal binaries}{Universal Binaries}).
+ For the Cocoa version, 64 bit is chosen by default.
Currently, Apple's default GCC compiler is used by default (GCC 4.0.1 on
10.4 and 10.5, GCC 4.2 on 10.6). You can specify alternate compilers
@@ -164,12 +163,15 @@
to follow this advice, there is only one choice, 64-bit Cocoa.
- \section2 Build Types
+ \section2 Building Qt statically
- We recommend building Qt as shared frameworks. Static builds are supported as far as
- "make sub-src" takes you. For Cocoa configurations, both static and no-framework
- builds requires manually copying the src/gui/mac/qt_menu.nib/ directory into the
- "Resources" directory in the application bundle.
+ We recommend building Qt as shared frameworks. Static builds are only partially
+ supported, meaning that you can build most of Qt statically, but some modules,
+ like web-kit and Designer, will fail. You can specify which modules to build
+ from configure (e.g. -no-webkit -nomake tools). For Cocoa configurations, both
+ static and no-framework builds requires manually copying the
+ 'src/gui/mac/qt_menu.nib/ directory into the " Resources" directory in
+ the application bundle.
\target universal binaries
\section1 Universal Binaries
@@ -205,8 +207,9 @@
\o \c{-arch ppc64}
\endtable
- If there are no \c{-arch} flags specified, configure builds for the 32-bit
- architecture, if you are currently on one. Universal binaries were initially
+ If there are no \c{-arch} flags specified, configure builds Qt for a 32-bit
+ architecture when using Carbon, and a 64-bit architecture when using Cocoa. Universal
+ binaries were initially
used to simplify the PPC to Intel migration. You can use \c{-universal} to
build for both the 32-bit Intel and PPC architectures.
@@ -219,6 +222,46 @@
CONFIG += x86 ppc x86_64 ppc64
\endcode
+ \section2 Working with several versions of Qt
+ You can only install one version of Qt at a time when using the binary
+ package. The reason for this is that a binary installation will install different parts of Qt
+ (frameworks, documentation, examples, tools, etc) to different
+ predefined locations on the OS, as described by Apple. If you want
+ to work against other versions at the same time, you need
+ to build the other versions explicitly from source. When doing so, you can
+ provide \c{-prefix} to configure to set install location.
+ The binary package will install Qt to the following locations:
+
+ \table
+ \header
+ \o Qt
+ \o Location
+ \row
+ \o Designer, Linguist ...
+ \o /Developer/Applications/Qt
+ \row
+ \o Documentation
+ \o /Developer/Documentation/Qt
+ \row
+ \o Examples
+ \o /Developer/Examples/Qt
+ \row
+ \o Plugins
+ \o /Developer/Applications/Qt/Plugins
+ \row
+ \o Frameworks
+ \o /Library/Frameworks
+ \row
+ \o Libraries
+ \o /usr/lib
+ \row
+ \o qmake, moc, uic ...
+ \o /Developer/Tools/Qt (symlink to /usr/bin)
+ \row
+ \o uninstall-qt.py, uninstall-qtsdk.py
+ \o /Developer/Tools
+ \endtable
+
\section1 Day-to-Day Application Development on OS X
On the command-line, applications can be built using \c qmake and \c make.
diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h
index acb3a00..74fa8ee 100644
--- a/src/corelib/global/qfeatures.h
+++ b/src/corelib/global/qfeatures.h
@@ -335,6 +335,11 @@
#define QT_NO_DATESTRING
#endif
+// QtDBus module
+#if !defined(QT_NO_DBUS) && (defined(QT_NO_PROPERTIES))
+#define QT_NO_DBUS
+#endif
+
// QDial
#if !defined(QT_NO_DIAL) && (defined(QT_NO_SLIDER))
#define QT_NO_DIAL
diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt
index 251391e..0053556 100644
--- a/src/corelib/global/qfeatures.txt
+++ b/src/corelib/global/qfeatures.txt
@@ -1360,6 +1360,15 @@ Requires: PROPERTIES
Name: ActiveQt
SeeAlso: ???
+# D-Bus
+
+Feature: DBUS
+Description: Provides classes for D-Bus.
+Section: D-Bus
+Requires: PROPERTIES
+Name: QtDBus module
+SeeAlso: ???
+
# Phonon
Feature: PHONON_PLATFORMPLUGIN
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 5a50646..6b34b5f 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -136,6 +136,12 @@ static void create_current_thread_data_key()
pthread_key_create(&current_thread_data_key, destroy_current_thread_data);
}
+static void destroy_current_thread_data_key()
+{
+ pthread_key_delete(current_thread_data_key);
+}
+Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key)
+
QThreadData *QThreadData::current()
{
pthread_once(&current_thread_data_once, create_current_thread_data_key);
diff --git a/src/dbus/qdbus_symbols.cpp b/src/dbus/qdbus_symbols.cpp
index b5cbbf2..97b6cb6 100644
--- a/src/dbus/qdbus_symbols.cpp
+++ b/src/dbus/qdbus_symbols.cpp
@@ -44,6 +44,8 @@
#include <QtCore/qmutex.h>
#include <private/qmutexpool_p.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
void *qdbus_resolve_me(const char *name);
@@ -109,6 +111,8 @@ void *qdbus_resolve_me(const char *name)
Q_DESTRUCTOR_FUNCTION(qdbus_unloadLibDBus)
+#endif // QT_LINKED_LIBDBUS
+
QT_END_NAMESPACE
-#endif
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h
index 7168e05..5b6b5fb 100644
--- a/src/dbus/qdbus_symbols_p.h
+++ b/src/dbus/qdbus_symbols_p.h
@@ -57,6 +57,8 @@
#include <QtCore/qglobal.h>
#include <dbus/dbus.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
#if !defined QT_LINKED_LIBDBUS
@@ -367,4 +369,5 @@ DEFINEFUNC(dbus_bool_t , dbus_threads_init_default, (), (), return)
QT_END_NAMESPACE
-#endif
+#endif // QT_NO_DBUS
+#endif // QDBUS_SYMBOLS_P_H
diff --git a/src/dbus/qdbusabstractadaptor.cpp b/src/dbus/qdbusabstractadaptor.cpp
index 4f54570..98670d1 100644
--- a/src/dbus/qdbusabstractadaptor.cpp
+++ b/src/dbus/qdbusabstractadaptor.cpp
@@ -53,6 +53,8 @@
#include "qdbusabstractadaptor_p.h"
#include "qdbusmetatype_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
QDBusAdaptorConnector *qDBusFindAdaptorConnector(QObject *obj)
@@ -378,3 +380,5 @@ void QDBusAdaptorConnector::relaySignal(QObject * _t1, const QMetaObject * _t2,
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusabstractadaptor.h b/src/dbus/qdbusabstractadaptor.h
index ad40933..fa64aef 100644
--- a/src/dbus/qdbusabstractadaptor.h
+++ b/src/dbus/qdbusabstractadaptor.h
@@ -45,6 +45,8 @@
#include <QtCore/qobject.h>
#include <QtDBus/qdbusmacros.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -73,4 +75,6 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
+
#endif
diff --git a/src/dbus/qdbusabstractadaptor_p.h b/src/dbus/qdbusabstractadaptor_p.h
index 539f26c..312197f 100644
--- a/src/dbus/qdbusabstractadaptor_p.h
+++ b/src/dbus/qdbusabstractadaptor_p.h
@@ -67,6 +67,8 @@
#define QCLASSINFO_DBUS_INTERFACE "D-Bus Interface"
#define QCLASSINFO_DBUS_INTROSPECTION "D-Bus Introspection"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusAbstractAdaptor;
@@ -132,4 +134,5 @@ extern QDBusAdaptorConnector *qDBusCreateAdaptorConnector(QObject *object);
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif // QDBUSABSTRACTADAPTORPRIVATE_H
diff --git a/src/dbus/qdbusabstractinterface.cpp b/src/dbus/qdbusabstractinterface.cpp
index 48ec3b6..1a7c417 100644
--- a/src/dbus/qdbusabstractinterface.cpp
+++ b/src/dbus/qdbusabstractinterface.cpp
@@ -51,6 +51,8 @@
#include <qdebug.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static QDBusError checkIfValid(const QString &service, const QString &path,
@@ -765,4 +767,6 @@ QDBusMessage QDBusAbstractInterface::internalConstCall(QDBus::CallMode mode,
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
+
#include "moc_qdbusabstractinterface.cpp"
diff --git a/src/dbus/qdbusabstractinterface.h b/src/dbus/qdbusabstractinterface.h
index 149fdd3..44f79a1 100644
--- a/src/dbus/qdbusabstractinterface.h
+++ b/src/dbus/qdbusabstractinterface.h
@@ -51,6 +51,8 @@
#include <QtDBus/qdbusextratypes.h>
#include <QtDBus/qdbusconnection.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -159,4 +161,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusabstractinterface_p.h b/src/dbus/qdbusabstractinterface_p.h
index 21e01b3..7e59ec7 100644
--- a/src/dbus/qdbusabstractinterface_p.h
+++ b/src/dbus/qdbusabstractinterface_p.h
@@ -62,6 +62,8 @@
#define ANNOTATION_NO_WAIT "org.freedesktop.DBus.Method.NoReply"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusAbstractInterfacePrivate : public QObjectPrivate
@@ -98,4 +100,5 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusargument.cpp b/src/dbus/qdbusargument.cpp
index 7defc9a..fbbc6a2 100644
--- a/src/dbus/qdbusargument.cpp
+++ b/src/dbus/qdbusargument.cpp
@@ -56,6 +56,8 @@
#include "qdbusmetatype_p.h"
#include "qdbusutil_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
QDBusArgumentPrivate::~QDBusArgumentPrivate()
@@ -1328,3 +1330,5 @@ QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line)
#endif
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index 2c4b4ea..73558b6 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -53,6 +53,8 @@
#include <QtDBus/qdbusextratypes.h>
#include <QtDBus/qdbusmacros.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -380,4 +382,5 @@ Q_DECLARE_METATYPE(QDBusArgument)
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusargument_p.h b/src/dbus/qdbusargument_p.h
index faa68ca..c401e9b 100644
--- a/src/dbus/qdbusargument_p.h
+++ b/src/dbus/qdbusargument_p.h
@@ -56,6 +56,8 @@
#include <qdbusargument.h>
#include "qdbus_symbols_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusMarshaller;
@@ -206,4 +208,5 @@ inline QDBusDemarshaller *QDBusArgumentPrivate::demarshaller()
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index abaa486..abb3224 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -54,6 +54,8 @@
#include "qdbusthreaddebug_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusConnectionManager
@@ -1048,3 +1050,5 @@ void QDBusConnectionPrivate::setBusService(const QDBusConnection &connection)
*/
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index 6246cae..a8ca551 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -45,6 +45,8 @@
#include <QtDBus/qdbusmacros.h>
#include <QtCore/qstring.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -181,4 +183,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusconnection_p.h b/src/dbus/qdbusconnection_p.h
index 5a5fe9b..34bb6b3 100644
--- a/src/dbus/qdbusconnection_p.h
+++ b/src/dbus/qdbusconnection_p.h
@@ -71,6 +71,8 @@
#include <qdbusmessage.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusMessage;
@@ -331,4 +333,5 @@ extern QDBusMessage qDBusPropertyGetAll(const QDBusConnectionPrivate::ObjectTree
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusconnectioninterface.cpp b/src/dbus/qdbusconnectioninterface.cpp
index b8e248a..c507ce7 100644
--- a/src/dbus/qdbusconnectioninterface.cpp
+++ b/src/dbus/qdbusconnectioninterface.cpp
@@ -51,6 +51,8 @@
#include "qdbus_symbols_p.h" // for the DBUS_* constants
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
/*
@@ -413,3 +415,5 @@ void QDBusConnectionInterface::disconnectNotify(const char *signalName)
*/
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusconnectioninterface.h b/src/dbus/qdbusconnectioninterface.h
index c174192..1a020b7 100644
--- a/src/dbus/qdbusconnectioninterface.h
+++ b/src/dbus/qdbusconnectioninterface.h
@@ -47,6 +47,8 @@
#include <QtDBus/qdbusabstractinterface.h>
#include <QtDBus/qdbusreply.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -126,4 +128,5 @@ Q_DECLARE_BUILTIN_METATYPE(QDBusConnectionInterface::RegisterServiceReply, UInt)
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbuscontext.cpp b/src/dbus/qdbuscontext.cpp
index 13c696c..b9a660a 100644
--- a/src/dbus/qdbuscontext.cpp
+++ b/src/dbus/qdbuscontext.cpp
@@ -46,6 +46,8 @@
#include "qdbuscontext.h"
#include "qdbuscontext_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
QDBusContextPrivate *QDBusContextPrivate::set(QObject *obj, QDBusContextPrivate *newContext)
@@ -202,3 +204,5 @@ void QDBusContext::sendErrorReply(QDBusError::ErrorType type, const QString &msg
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbuscontext.h b/src/dbus/qdbuscontext.h
index efaa79f..13fbe4b 100644
--- a/src/dbus/qdbuscontext.h
+++ b/src/dbus/qdbuscontext.h
@@ -45,6 +45,8 @@
#include <QtCore/qstring.h>
#include <QtDBus/qdbuserror.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -81,4 +83,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbuscontext_p.h b/src/dbus/qdbuscontext_p.h
index 29c8975..94fe071 100644
--- a/src/dbus/qdbuscontext_p.h
+++ b/src/dbus/qdbuscontext_p.h
@@ -54,6 +54,10 @@
#ifndef QDBUSCONTEXT_P_H
#define QDBUSCONTEXT_P_H
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusMessage;
@@ -74,5 +78,6 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbuserror.cpp b/src/dbus/qdbuserror.cpp
index 50a5c73..f4b1523 100644
--- a/src/dbus/qdbuserror.cpp
+++ b/src/dbus/qdbuserror.cpp
@@ -48,6 +48,8 @@
#include "qdbusmessage.h"
#include "qdbusmessage_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
/*
@@ -363,4 +365,4 @@ QDebug operator<<(QDebug dbg, const QDBusError &msg)
QT_END_NAMESPACE
-
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h
index 777a688..ff9d1df 100644
--- a/src/dbus/qdbuserror.h
+++ b/src/dbus/qdbuserror.h
@@ -45,6 +45,8 @@
#include <QtDBus/qdbusmacros.h>
#include <QtCore/qstring.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
struct DBusError;
@@ -120,4 +122,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusextratypes.cpp b/src/dbus/qdbusextratypes.cpp
index e6ece92..0141c6c 100644
--- a/src/dbus/qdbusextratypes.cpp
+++ b/src/dbus/qdbusextratypes.cpp
@@ -42,6 +42,8 @@
#include "qdbusextratypes.h"
#include "qdbusutil_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
void QDBusObjectPath::check()
@@ -237,3 +239,4 @@ void QDBusSignature::check()
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusextratypes.h b/src/dbus/qdbusextratypes.h
index 2303dc6..205baff 100644
--- a/src/dbus/qdbusextratypes.h
+++ b/src/dbus/qdbusextratypes.h
@@ -48,6 +48,8 @@
#include <QtCore/qstring.h>
#include <QtDBus/qdbusmacros.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -187,4 +189,5 @@ Q_DECLARE_METATYPE(QList<QDBusSignature>)
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 6cb4924..b4598ae 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -64,6 +64,8 @@
#include "qdbusthreaddebug_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static bool isDebugging;
@@ -758,6 +760,7 @@ bool QDBusConnectionPrivate::activateCall(QObject* object, int flags, const QDBu
if (!object)
return false;
+#ifndef QT_NO_PROPERTIES
Q_ASSERT_X(QThread::currentThread() == object->thread(),
"QDBusConnection: internal threading error",
"function called for an object that is in another thread!!");
@@ -816,6 +819,8 @@ bool QDBusConnectionPrivate::activateCall(QObject* object, int flags, const QDBu
deliverCall(object, flags, msg, cacheIt->metaTypes, cacheIt->slotIdx);
return true;
}
+#endif // QT_NO_PROPERTIES
+ return false;
}
void QDBusConnectionPrivate::deliverCall(QObject *object, int /*flags*/, const QDBusMessage &msg,
@@ -2327,3 +2332,5 @@ void QDBusConnectionPrivate::postEventToThread(int action, QObject *object, QEve
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusintegrator_p.h b/src/dbus/qdbusintegrator_p.h
index 2661713..02e60bc 100644
--- a/src/dbus/qdbusintegrator_p.h
+++ b/src/dbus/qdbusintegrator_p.h
@@ -69,6 +69,8 @@
#include "qdbusmessage.h"
#include "qdbusconnection_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusConnectionPrivate;
@@ -157,4 +159,5 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QDBusSlotCache)
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index 300f425..7cc43ed 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -49,6 +49,8 @@
#include "qdbusinterface_p.h"
#include "qdbusconnection_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static void copyArgument(void *to, int id, const QVariant &arg)
@@ -322,3 +324,5 @@ int QDBusInterfacePrivate::metacall(QMetaObject::Call c, int id, void **argv)
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusinterface.h b/src/dbus/qdbusinterface.h
index 98d5e1b..02a9059 100644
--- a/src/dbus/qdbusinterface.h
+++ b/src/dbus/qdbusinterface.h
@@ -45,6 +45,8 @@
#include <QtDBus/qdbusabstractinterface.h>
#include <QtDBus/qdbusconnection.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -76,4 +78,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusinterface_p.h b/src/dbus/qdbusinterface_p.h
index 0fe6c02..53de522 100644
--- a/src/dbus/qdbusinterface_p.h
+++ b/src/dbus/qdbusinterface_p.h
@@ -58,6 +58,8 @@
#include "qdbusmetaobject_p.h"
#include <qdbusinterface.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusInterfacePrivate: public QDBusAbstractInterfacePrivate
@@ -76,4 +78,5 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusinternalfilters.cpp b/src/dbus/qdbusinternalfilters.cpp
index 42d895f..8fc219a 100644
--- a/src/dbus/qdbusinternalfilters.cpp
+++ b/src/dbus/qdbusinternalfilters.cpp
@@ -57,6 +57,8 @@
#include "qdbusmessage_p.h"
#include "qdbusutil_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
// defined in qdbusxmlgenerator.cpp
@@ -497,3 +499,5 @@ QDBusMessage qDBusPropertyGetAll(const QDBusConnectionPrivate::ObjectTreeNode &n
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusintrospection.cpp b/src/dbus/qdbusintrospection.cpp
index c6c0787..74845d0 100644
--- a/src/dbus/qdbusintrospection.cpp
+++ b/src/dbus/qdbusintrospection.cpp
@@ -42,6 +42,8 @@
#include "qdbusintrospection_p.h"
#include "qdbusxmlparser_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
/*!
@@ -423,3 +425,5 @@ QDBusIntrospection::parseObjectTree(const QString &xml, const QString &service,
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusmacros.h b/src/dbus/qdbusmacros.h
index 5447c33..77122fc 100644
--- a/src/dbus/qdbusmacros.h
+++ b/src/dbus/qdbusmacros.h
@@ -64,10 +64,13 @@
#endif
// prevent syncqt complaints
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusmarshaller.cpp b/src/dbus/qdbusmarshaller.cpp
index 60b3c09..8b174a1 100644
--- a/src/dbus/qdbusmarshaller.cpp
+++ b/src/dbus/qdbusmarshaller.cpp
@@ -43,6 +43,8 @@
#include "qdbusmetatype_p.h"
#include "qdbusutil_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static void qIterAppend(DBusMessageIter *it, QByteArray *ba, int type, const void *arg)
@@ -548,3 +550,5 @@ bool QDBusMarshaller::appendCrossMarshalling(QDBusDemarshaller *demarshaller)
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusmessage.cpp b/src/dbus/qdbusmessage.cpp
index 30ddc61..d838e37 100644
--- a/src/dbus/qdbusmessage.cpp
+++ b/src/dbus/qdbusmessage.cpp
@@ -53,6 +53,8 @@
#include "qdbusconnection_p.h"
#include "qdbusutil_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static inline const char *data(const QByteArray &arr)
@@ -799,3 +801,4 @@ QDebug operator<<(QDebug dbg, const QDBusMessage &msg)
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index 6df5215..f2e64b9 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -47,6 +47,8 @@
#include <QtCore/qlist.h>
#include <QtCore/qvariant.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -125,5 +127,6 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusmessage_p.h b/src/dbus/qdbusmessage_p.h
index b6da4a5..867a660 100644
--- a/src/dbus/qdbusmessage_p.h
+++ b/src/dbus/qdbusmessage_p.h
@@ -59,6 +59,8 @@
struct DBusMessage;
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusConnectionPrivate;
@@ -102,4 +104,5 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusmetaobject.cpp b/src/dbus/qdbusmetaobject.cpp
index 295b1ae..bde8997 100644
--- a/src/dbus/qdbusmetaobject.cpp
+++ b/src/dbus/qdbusmetaobject.cpp
@@ -53,6 +53,8 @@
#include "qdbusintrospection_p.h"
#include "qdbusabstractinterface_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusMetaObjectGenerator
@@ -677,3 +679,4 @@ int QDBusMetaObject::propertyMetaType(int id) const
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusmetatype.cpp b/src/dbus/qdbusmetatype.cpp
index 7f60cf2..cb377cb 100644
--- a/src/dbus/qdbusmetatype.cpp
+++ b/src/dbus/qdbusmetatype.cpp
@@ -54,6 +54,8 @@
#include "qdbusmetatype_p.h"
#include "qdbusargument_p.h"
+#ifndef QT_NO_DBUS
+
Q_DECLARE_METATYPE(QList<bool>)
Q_DECLARE_METATYPE(QList<short>)
Q_DECLARE_METATYPE(QList<ushort>)
@@ -462,3 +464,5 @@ const char *QDBusMetaType::typeToSignature(int type)
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusmetatype.h b/src/dbus/qdbusmetatype.h
index f72d2c5..b487e23 100644
--- a/src/dbus/qdbusmetatype.h
+++ b/src/dbus/qdbusmetatype.h
@@ -45,6 +45,8 @@
#include "QtCore/qmetatype.h"
#include <QtDBus/qdbusargument.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -94,4 +96,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusmisc.cpp b/src/dbus/qdbusmisc.cpp
index e10534e..dff4dad 100644
--- a/src/dbus/qdbusmisc.cpp
+++ b/src/dbus/qdbusmisc.cpp
@@ -50,6 +50,8 @@
#include "qdbusmetatype_p.h"
#include "qdbusabstractadaptor_p.h" // for QCLASSINFO_DBUS_*
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
bool qDBusCheckAsyncTag(const char *tag)
@@ -195,3 +197,5 @@ int qDBusParametersForMethod(const QMetaMethod &mm, QList<int>& metaTypes)
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbuspendingcall.cpp b/src/dbus/qdbuspendingcall.cpp
index 3db5d9f..dac7a92 100644
--- a/src/dbus/qdbuspendingcall.cpp
+++ b/src/dbus/qdbuspendingcall.cpp
@@ -48,6 +48,8 @@
#include "qcoreevent.h"
#include <private/qobject_p.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
/*!
@@ -513,4 +515,6 @@ void QDBusPendingCallWatcher::waitForFinished()
}
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
+
#include "moc_qdbuspendingcall.cpp"
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index e8c7d4a..ca0eaaa 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -49,6 +49,8 @@
#include <QtDBus/qdbusmacros.h>
#include <QtDBus/qdbusmessage.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -119,4 +121,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbuspendingcall_p.h b/src/dbus/qdbuspendingcall_p.h
index 641c397..f1f6dc2 100644
--- a/src/dbus/qdbuspendingcall_p.h
+++ b/src/dbus/qdbuspendingcall_p.h
@@ -61,6 +61,8 @@
#include "qdbusmessage.h"
#include "qdbus_symbols_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QDBusPendingCall;
@@ -122,4 +124,5 @@ Q_SIGNALS:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbuspendingreply.cpp b/src/dbus/qdbuspendingreply.cpp
index b492660..40cf6e3 100644
--- a/src/dbus/qdbuspendingreply.cpp
+++ b/src/dbus/qdbuspendingreply.cpp
@@ -43,6 +43,8 @@
#include "qdbuspendingcall_p.h"
#include "qdbusmetatype.h"
+#ifndef QT_NO_DBUS
+
/*!
\class QDBusPendingReply
\inmodule QtDBus
@@ -275,3 +277,4 @@ void QDBusPendingReplyData::setMetaTypes(int count, const int *types)
d->checkReceivedSignature();
}
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index 958c8d5..4757115 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -47,6 +47,8 @@
#include <QtDBus/qdbusargument.h>
#include <QtDBus/qdbuspendingcall.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -211,4 +213,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusreply.cpp b/src/dbus/qdbusreply.cpp
index 257d1b6..81b5d0a 100644
--- a/src/dbus/qdbusreply.cpp
+++ b/src/dbus/qdbusreply.cpp
@@ -44,6 +44,8 @@
#include "qdbusmetatype_p.h"
#include <QDebug>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
/*!
@@ -242,3 +244,5 @@ void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusreply.h b/src/dbus/qdbusreply.h
index 092ffcb..fbe7459 100644
--- a/src/dbus/qdbusreply.h
+++ b/src/dbus/qdbusreply.h
@@ -51,6 +51,8 @@
#include <QtDBus/qdbusextratypes.h>
#include <QtDBus/qdbuspendingreply.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -193,4 +195,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
index 13b18a6..2377795 100644
--- a/src/dbus/qdbusserver.cpp
+++ b/src/dbus/qdbusserver.cpp
@@ -42,6 +42,8 @@
#include "qdbusserver.h"
#include "qdbusconnection_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
/*!
@@ -119,3 +121,5 @@ QString QDBusServer::address() const
*/
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusserver.h b/src/dbus/qdbusserver.h
index 12c910d..90d40f5 100644
--- a/src/dbus/qdbusserver.h
+++ b/src/dbus/qdbusserver.h
@@ -45,6 +45,8 @@
#include <QtCore/qstring.h>
#include <QtDBus/qdbusmacros.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -77,4 +79,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusservicewatcher.cpp b/src/dbus/qdbusservicewatcher.cpp
index 3d5bc0b..426c3b0 100644
--- a/src/dbus/qdbusservicewatcher.cpp
+++ b/src/dbus/qdbusservicewatcher.cpp
@@ -47,6 +47,8 @@
#include <private/qobject_p.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC_WITH_ARGS(QString, busService, (QLatin1String(DBUS_SERVICE_DBUS)))
@@ -374,4 +376,6 @@ void QDBusServiceWatcher::setConnection(const QDBusConnection &connection)
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
+
#include "moc_qdbusservicewatcher.cpp"
diff --git a/src/dbus/qdbusservicewatcher.h b/src/dbus/qdbusservicewatcher.h
index 5f2934a..c7609a8 100644
--- a/src/dbus/qdbusservicewatcher.h
+++ b/src/dbus/qdbusservicewatcher.h
@@ -45,6 +45,8 @@
#include <QtCore/qobject.h>
#include <QtDBus/qdbusmacros.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -100,4 +102,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif // QDBUSSERVICEWATCHER_H
diff --git a/src/dbus/qdbusthreaddebug_p.h b/src/dbus/qdbusthreaddebug_p.h
index 2748dcd..e8d90c5 100644
--- a/src/dbus/qdbusthreaddebug_p.h
+++ b/src/dbus/qdbusthreaddebug_p.h
@@ -52,6 +52,10 @@
// We mean it.
//
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_DBUS
+
#if !defined(QDBUS_THREAD_DEBUG) && defined(QT_BUILD_INTERNAL)
# define QDBUS_THREAD_DEBUG 1
#endif
@@ -227,4 +231,5 @@ struct QDBusWatchAndTimeoutLocker: QDBusMutexLocker
# define SEM_RELEASE(action, sem) sem.release()
#endif
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusutil.cpp b/src/dbus/qdbusutil.cpp
index 33017fe..2fcdc73 100644
--- a/src/dbus/qdbusutil.cpp
+++ b/src/dbus/qdbusutil.cpp
@@ -47,6 +47,8 @@
#include "qdbusargument.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static inline bool isValidCharacterNoDash(const QChar &c)
@@ -466,3 +468,5 @@ namespace QDBusUtil
} // namespace QDBusUtil
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 710acac..8a1846a 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -59,6 +59,8 @@
#include <QtDBus/qdbusmacros.h>
#include <QtDBus/qdbuserror.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -157,4 +159,5 @@ QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_DBUS
#endif
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 81eaa33..9c25d82 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -49,6 +49,8 @@
#include "qdbusmetatype.h"
#include "qdbusutil_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
@@ -302,3 +304,5 @@ QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo, con
#endif
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusxmlparser.cpp b/src/dbus/qdbusxmlparser.cpp
index ac8109f..05e2b11d 100644
--- a/src/dbus/qdbusxmlparser.cpp
+++ b/src/dbus/qdbusxmlparser.cpp
@@ -50,6 +50,8 @@
#include <QtCore/qvariant.h>
#include <QtCore/qtextstream.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static QDBusIntrospection::Annotations
@@ -367,3 +369,5 @@ QDBusXmlParser::objectTree() const
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/dbus/qdbusxmlparser_p.h b/src/dbus/qdbusxmlparser_p.h
index 9144d35..9d58e2a 100644
--- a/src/dbus/qdbusxmlparser_p.h
+++ b/src/dbus/qdbusxmlparser_p.h
@@ -58,6 +58,8 @@
#include <qdbusmacros.h>
#include "qdbusintrospection_p.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
/*!
@@ -82,4 +84,5 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 3d86936..d7cd2eb 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4267,6 +4267,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
QMacCocoaAutoReleasePool pool;
bool realWindow = isRealWindow();
+ BOOL needDisplay = realWindow ? YES : NO;
if (realWindow && !q->testAttribute(Qt::WA_DontShowOnScreen)){
adjustWithinMaxAndMinSize(w, h);
@@ -4314,7 +4315,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
if (currTopLeft.x() == x && currTopLeft.y() == y
&& cocoaFrameRect.size.width != 0
&& cocoaFrameRect.size.height != 0) {
- [window setFrame:cocoaFrameRect display:NO];
+ [window setFrame:cocoaFrameRect display:needDisplay];
} else {
// The window is moved and resized (or resized to zero).
// Since Cocoa usually only sends us a resize callback after
@@ -4323,7 +4324,7 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
// would have the same origin as the setFrame call) we shift the
// window back and forth inbetween.
cocoaFrameRect.origin.y += 1;
- [window setFrame:cocoaFrameRect display:NO];
+ [window setFrame:cocoaFrameRect display:needDisplay];
cocoaFrameRect.origin.y -= 1;
[window setFrameOrigin:cocoaFrameRect.origin];
}
diff --git a/src/plugins/bearer/networkmanager/main.cpp b/src/plugins/bearer/networkmanager/main.cpp
index 6c97a22..88068fc 100644
--- a/src/plugins/bearer/networkmanager/main.cpp
+++ b/src/plugins/bearer/networkmanager/main.cpp
@@ -45,6 +45,8 @@
#include <QtCore/qdebug.h>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QNetworkManagerEnginePlugin : public QBearerEnginePlugin
@@ -87,3 +89,5 @@ Q_EXPORT_STATIC_PLUGIN(QNetworkManagerEnginePlugin)
Q_EXPORT_PLUGIN2(qnmbearer, QNetworkManagerEnginePlugin)
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
index 72d6838..06533a1 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp
@@ -56,6 +56,8 @@
#include <QDBusMessage>
#include <QDBusReply>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent)
@@ -915,3 +917,4 @@ QNetworkConfigurationPrivatePointer QNetworkManagerEngine::defaultConfiguration(
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
index af3f450..964726e 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.h
@@ -60,6 +60,8 @@
#include <QMap>
#include <QVariant>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QNetworkManagerEngine : public QBearerEngineImpl
@@ -137,5 +139,7 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
+
#endif
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
index a20370b..31a9aa1 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp
@@ -54,6 +54,8 @@
#include "qnetworkmanagerservice.h"
#include "qnmdbushelper.h"
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
static QDBusConnection dbusConnection = QDBusConnection::systemBus();
@@ -993,3 +995,5 @@ QStringList QNetworkManagerIp4Config::domains() const
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
index 95f5b4a..f006a20 100644
--- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
+++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.h
@@ -66,6 +66,8 @@
#include <QMap>
#include "qnmdbushelper.h"
+#ifndef QT_NO_DBUS
+
#ifndef NETWORK_MANAGER_H
typedef enum NMDeviceType
{
@@ -442,4 +444,5 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
#endif //QNETWORKMANAGERSERVICE_H
diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
index e195eeb..68dde6e 100644
--- a/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
+++ b/src/plugins/bearer/networkmanager/qnmdbushelper.cpp
@@ -52,6 +52,8 @@
#include <QDebug>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
QNmDBusHelper::QNmDBusHelper(QObject * parent)
@@ -124,3 +126,5 @@ void QNmDBusHelper::slotSettingsRemoved()
}
QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
diff --git a/src/plugins/bearer/networkmanager/qnmdbushelper.h b/src/plugins/bearer/networkmanager/qnmdbushelper.h
index 933d55a..7a9563d 100644
--- a/src/plugins/bearer/networkmanager/qnmdbushelper.h
+++ b/src/plugins/bearer/networkmanager/qnmdbushelper.h
@@ -46,6 +46,8 @@
#include <QDBusContext>
#include <QMap>
+#ifndef QT_NO_DBUS
+
QT_BEGIN_NAMESPACE
class QNmDBusHelper: public QObject, protected QDBusContext
@@ -72,4 +74,6 @@ Q_SIGNALS:
QT_END_NAMESPACE
+#endif // QT_NO_DBUS
+
#endif// QNMDBUSHELPERPRIVATE_H
diff --git a/src/plugins/script/qtdbus/main.cpp b/src/plugins/script/qtdbus/main.cpp
index 6f09326..452f0e9 100644
--- a/src/plugins/script/qtdbus/main.cpp
+++ b/src/plugins/script/qtdbus/main.cpp
@@ -44,6 +44,8 @@
#include <QMetaMethod>
#include <QScriptExtensionPlugin>
+#ifndef QT_NO_DBUS
+
QT_USE_NAMESPACE
static QScriptValue setupDBusInterface(QScriptEngine *engine, QDBusAbstractInterface *iface);
@@ -394,3 +396,5 @@ void QtDBusScriptPlugin::initialize(const QString &key, QScriptEngine *engine)
Q_EXPORT_STATIC_PLUGIN(QtDBusScriptPlugin)
Q_EXPORT_PLUGIN2(qtscriptdbus, QtDBusScriptPlugin)
+
+#endif // QT_NO_DBUS
diff --git a/src/plugins/script/qtdbus/main.h b/src/plugins/script/qtdbus/main.h
index 8544247..bc2d8a3 100644
--- a/src/plugins/script/qtdbus/main.h
+++ b/src/plugins/script/qtdbus/main.h
@@ -46,6 +46,8 @@
#include <QtScript/qscriptable.h>
#include <QtScript/qscriptengine.h>
+#ifndef QT_NO_DBUS
+
class QDBusConnectionConstructor : public QObject,
public QScriptable
{
@@ -173,4 +175,5 @@ private:
QScriptValue proto;
};
+#endif // QT_NO_DBUS
#endif // QDBUSBINDING_H
diff --git a/tests/auto/qhelpgenerator/data/test.qhp b/tests/auto/qhelpgenerator/data/test.qhp
index a97c00d..2c3f128 100644
--- a/tests/auto/qhelpgenerator/data/test.qhp
+++ b/tests/auto/qhelpgenerator/data/test.qhp
@@ -3,7 +3,7 @@
<metaData name="author" value="Nokia Corporation and/or its subsidiary(-ies)" />
<metaData name="language" value="en" />
<virtualFolder>testFolder</virtualFolder>
- <namespace>trolltech.com.1_0_0.test</namespace>
+ <namespace>trolltech.com.1.0.0.test</namespace>
<customFilter name="Custom Filter 1">
<filterAttribute>test</filterAttribute>
<filterAttribute>filter1</filterAttribute>
diff --git a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp
index 34ee7c6..a190081 100644
--- a/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp
+++ b/tests/auto/qhelpgenerator/tst_qhelpgenerator.cpp
@@ -119,7 +119,7 @@ void tst_QHelpGenerator::checkNamespace()
{
m_query->exec("SELECT Id, Name FROM NamespaceTable");
if (m_query->next()
- && m_query->value(1).toString() == QLatin1String("trolltech.com.1_0_0.test"))
+ && m_query->value(1).toString() == QLatin1String("trolltech.com.1.0.0.test"))
return;
QFAIL("Namespace Error!");
}
diff --git a/tests/auto/qhelpprojectdata/data/test.qhp b/tests/auto/qhelpprojectdata/data/test.qhp
index e9ac7f2..1e9074a 100644
--- a/tests/auto/qhelpprojectdata/data/test.qhp
+++ b/tests/auto/qhelpprojectdata/data/test.qhp
@@ -3,7 +3,7 @@
<metaData name="author" value="Nokia Corporation and/or its subsidiary(-ies)" />
<metaData name="language" value="en" />
<virtualFolder>testFolder</virtualFolder>
- <namespace>trolltech.com.1_0_0.test</namespace>
+ <namespace>trolltech.com.1.0.0.test</namespace>
<customFilter name="Custom Filter 1">
<filterAttribute>test</filterAttribute>
<filterAttribute>filter1</filterAttribute>
@@ -69,4 +69,4 @@
<file>cars.html</file>
</files>
</filterSection>
-</QtHelpProject> \ No newline at end of file
+</QtHelpProject>
diff --git a/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp b/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp
index 929cab5..9c458f7 100644
--- a/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp
+++ b/tests/auto/qhelpprojectdata/tst_qhelpprojectdata.cpp
@@ -83,7 +83,7 @@ void tst_QHelpProjectData::namespaceName()
QHelpProjectData data;
if (!data.readData(m_inputFile))
QFAIL("Cannot read qhp file!");
- QCOMPARE(data.namespaceName(), QString("trolltech.com.1_0_0.test"));
+ QCOMPARE(data.namespaceName(), QString("trolltech.com.1.0.0.test"));
}
void tst_QHelpProjectData::virtualFolder()
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index f27f469..35ebbd9 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -385,7 +385,7 @@ void tst_QHttpNetworkConnection::post_data()
QTest::addColumn<int>("contentLength");
QTest::addColumn<int>("downloadSize");
- QTest::newRow("success-internal") << "http://" << QtNetworkSettings::serverName() << "/cgi-bin/echo.cgi" << ushort(80) << false << "7 bytes" << 200 << "OK" << 7 << 7;
+ QTest::newRow("success-internal") << "http://" << QtNetworkSettings::serverName() << "/qtest/cgi-bin/echo.cgi" << ushort(80) << false << "7 bytes" << 200 << "OK" << 7 << 7;
QTest::newRow("failure-internal") << "http://" << QtNetworkSettings::serverName() << "/t" << ushort(80) << false << "Hello World" << 404 << "Not Found" << -1 << 997 + QtNetworkSettings::serverName().size();
}
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index e269092..c238f59 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -1410,10 +1410,10 @@ void tst_QNetworkReply::deleteFromHttp_data()
// for status codes to expect, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
QTest::newRow("405-method-not-allowed") << QUrl("http://" + QtNetworkSettings::serverName() + "/index.html") << 405 << QNetworkReply::ContentOperationNotPermittedError;
- QTest::newRow("200-ok") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?200-ok") << 200 << QNetworkReply::NoError;
- QTest::newRow("202-accepted") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?202-accepted") << 202 << QNetworkReply::NoError;
- QTest::newRow("204-no-content") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?204-no-content") << 204 << QNetworkReply::NoError;
- QTest::newRow("404-not-found") << QUrl("http://" + QtNetworkSettings::serverName() + "/cgi-bin/http-delete.cgi?404-not-found") << 404 << QNetworkReply::ContentNotFoundError;
+ QTest::newRow("200-ok") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?200-ok") << 200 << QNetworkReply::NoError;
+ QTest::newRow("202-accepted") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?202-accepted") << 202 << QNetworkReply::NoError;
+ QTest::newRow("204-no-content") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?204-no-content") << 204 << QNetworkReply::NoError;
+ QTest::newRow("404-not-found") << QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/cgi-bin/http-delete.cgi?404-not-found") << 404 << QNetworkReply::ContentNotFoundError;
}
void tst_QNetworkReply::deleteFromHttp()
@@ -3886,10 +3886,10 @@ void tst_QNetworkReply::authorizationError_data()
QTest::addColumn<QString>("httpBody");
QTest::newRow("unknown-authorization-method") << "http://" + QtNetworkSettings::serverName() +
- "/cgi-bin/http-unknown-authentication-method.cgi?401-authorization-required" << 1 << 1
+ "/qtest/cgi-bin/http-unknown-authentication-method.cgi?401-authorization-required" << 1 << 1
<< int(QNetworkReply::AuthenticationRequiredError) << 401 << "authorization required";
QTest::newRow("unknown-proxy-authorization-method") << "http://" + QtNetworkSettings::serverName() +
- "/cgi-bin/http-unknown-authentication-method.cgi?407-proxy-authorization-required" << 1 << 1
+ "/qtest/cgi-bin/http-unknown-authentication-method.cgi?407-proxy-authorization-required" << 1 << 1
<< int(QNetworkReply::ProxyAuthenticationRequiredError) << 407
<< "authorization required";
}
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 4397ab1..2bfce74 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -1535,6 +1535,7 @@ void tst_QSslSocket::verifyMode()
loop.exec();
QVERIFY(clientSocket.isEncrypted());
+ qDebug() << server.socket->sslErrors();
QVERIFY(server.socket->sslErrors().isEmpty());
}
diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp
index a6c0d35..be0d708 100644
--- a/tests/auto/qxmlquery/tst_qxmlquery.cpp
+++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp
@@ -2040,7 +2040,7 @@ void tst_QXmlQuery::fnDocNetworkAccessSuccess_data() const
return;
QTest::newRow("http scheme")
- << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qxmlquery/wellFormed.xml"))
+ << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/wellFormed.xml"))
<< QByteArray("<!-- a comment --><e from=\"http\">Some Text</e>");
QTest::newRow("ftp scheme")
@@ -2103,10 +2103,10 @@ void tst_QXmlQuery::fnDocNetworkAccessFailure_data() const
return;
QTest::newRow("http scheme, not well-formed")
- << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qxmlquery/notWellformed.xml"));
+ << QUrl(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/notWellformed.xml"));
QTest::newRow("https scheme, not well-formed")
- << QUrl(QString("https://" + QtNetworkSettings::serverName() + "/qxmlquery/notWellformedViaHttps.xml"));
+ << QUrl(QString("https://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/notWellformedViaHttps.xml"));
QTest::newRow("https scheme, nonexistent host")
<< QUrl(QLatin1String("https://this.host.does.not.exist.I.SWear"));
@@ -2564,7 +2564,7 @@ void tst_QXmlQuery::setQueryQUrlSuccess_data() const
<< QByteArray("This was received via FTP");
QTest::newRow("A valid query via the http scheme")
- << QUrl::fromEncoded(QString("http://" + QtNetworkSettings::serverName() + "/qxmlquery/viaHttp.xq").toLatin1())
+ << QUrl::fromEncoded(QString("http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/viaHttp.xq").toLatin1())
<< QByteArray("This was received via HTTP.");
}
@@ -2630,11 +2630,11 @@ void tst_QXmlQuery::setQueryQUrlFailure_data() const
QTest::newRow("A query via http:// that is completely empty, but readable.")
<< QUrl::fromEncoded(QString(
- "http://" + QtNetworkSettings::serverName() + "/qxmlquery/completelyEmptyQuery.xq").toLatin1());
+ "http://" + QtNetworkSettings::serverName() + "/qtest/qxmlquery/completelyEmptyQuery.xq").toLatin1());
QTest::newRow("A query via ftp:// that is completely empty, but readable.")
<< QUrl::fromEncoded(QString(
- "ftp://" + QtNetworkSettings::serverName() + "qxmlquery/completelyEmptyQuery.xq").toLatin1());
+ "ftp://" + QtNetworkSettings::serverName() + "/pub/qxmlquery/completelyEmptyQuery.xq").toLatin1());
}
diff --git a/tools/assistant/lib/qhelpprojectdata.cpp b/tools/assistant/lib/qhelpprojectdata.cpp
index 83491a0..b0faf0c 100644
--- a/tools/assistant/lib/qhelpprojectdata.cpp
+++ b/tools/assistant/lib/qhelpprojectdata.cpp
@@ -47,6 +47,7 @@
#include <QtCore/QStack>
#include <QtCore/QMap>
#include <QtCore/QRegExp>
+#include <QtCore/QUrl>
#include <QtCore/QVariant>
#include <QtXml/QXmlStreamReader>
@@ -77,6 +78,7 @@ private:
void readFiles();
void raiseUnknownTokenError();
void addMatchingFiles(const QString &pattern);
+ bool hasValidSyntax(const QString &nameSpace, const QString &vFolder) const;
QMap<QString, QStringList> dirEntriesCache;
};
@@ -115,16 +117,14 @@ void QHelpProjectDataPrivate::readProject()
if (isStartElement()) {
if (name() == QLatin1String("virtualFolder")) {
virtualFolder = readElementText();
- if (virtualFolder.contains(QLatin1String("/")))
+ if (!hasValidSyntax(QLatin1String("test"), virtualFolder))
raiseError(QCoreApplication::translate("QHelpProject",
- "A virtual folder must not contain "
- "a \'/\' character!"));
+ "Virtual folder has invalid syntax."));
} else if (name() == QLatin1String("namespace")) {
namespaceName = readElementText();
- if (namespaceName.contains(QLatin1String("/")))
+ if (!hasValidSyntax(namespaceName, QLatin1String("test")))
raiseError(QCoreApplication::translate("QHelpProject",
- "A namespace must not contain a "
- "\'/\' character!"));
+ "Namespace has invalid syntax."));
} else if (name() == QLatin1String("customFilter")) {
readCustomFilter();
} else if (name() == QLatin1String("filterSection")) {
@@ -318,6 +318,22 @@ void QHelpProjectDataPrivate::addMatchingFiles(const QString &pattern)
filterSectionList.last().addFile(pattern);
}
+bool QHelpProjectDataPrivate::hasValidSyntax(const QString &nameSpace,
+ const QString &vFolder) const
+{
+ const QLatin1Char slash('/');
+ if (nameSpace.contains(slash) || vFolder.contains(slash))
+ return false;
+ QUrl url;
+ const QLatin1String scheme("qthelp");
+ url.setScheme(scheme);
+ url.setHost(nameSpace);
+ url.setPath(vFolder);
+
+ const QString expectedUrl(scheme + QLatin1String("://") + nameSpace + slash + vFolder);
+ return url.isValid() && url.toString() == expectedUrl;
+}
+
/*!
\internal
\class QHelpProjectData
diff --git a/tools/linguist/linguist.pro b/tools/linguist/linguist.pro
index c4b7c29..248c89e 100644
--- a/tools/linguist/linguist.pro
+++ b/tools/linguist/linguist.pro
@@ -4,4 +4,3 @@ SUBDIRS = \
lupdate \
lconvert
!no-png:!contains(QT_CONFIG, no-gui):SUBDIRS += linguist
-CONFIG += ordered
diff --git a/tools/linguist/shared/translator.cpp b/tools/linguist/shared/translator.cpp
index 465355d..ae7728e 100644
--- a/tools/linguist/shared/translator.cpp
+++ b/tools/linguist/shared/translator.cpp
@@ -45,8 +45,13 @@
#include <stdio.h>
#ifdef Q_OS_WIN
-#include <io.h> // required for _setmode, to avoid _O_TEXT streams...
-#include <fcntl.h> // for _O_BINARY
+// required for _setmode, to avoid _O_TEXT streams...
+# ifdef Q_OS_WINCE
+# include <stdlib.h>
+# else
+# include <io.h> // for _setmode
+# include <fcntl.h> // for _O_BINARY
+# endif
#endif
#include <QtCore/QDebug>
diff --git a/tools/tools.pro b/tools/tools.pro
index cfa202e..99a965d 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -19,7 +19,7 @@ TEMPLATE = subdirs
unix:!mac:!embedded:contains(QT_CONFIG, qt3support):SUBDIRS += qtconfig
win32:!wince*:SUBDIRS += activeqt
}
- contains(QT_CONFIG, declarative):SUBDIRS += qmlviewer qmldebugger
+ contains(QT_CONFIG, declarative):SUBDIRS += qml
}
SUBDIRS += linguist
@@ -30,7 +30,6 @@ mac {
embedded:SUBDIRS += kmap2qmap
-contains(QT_CONFIG, declarative):SUBDIRS += qml
contains(QT_CONFIG, dbus):SUBDIRS += qdbus
!wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns xmlpatternsvalidator
embedded: SUBDIRS += makeqpf