summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-15 21:19:48 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-15 21:19:48 +0100
commitb24bd0e87891d9f61e0121cbdcbbe0797863f316 (patch)
tree311986cf156ad671ac984765035f2d3b311ff19f /src
parent1f4c37adfacadec463884f4c22850c74a0c5893f (diff)
parenta8d103a05bc195dd045779f3aebdf67bd0140df1 (diff)
downloadqtxmlpatterns-b24bd0e87891d9f61e0121cbdcbbe0797863f316.tar.gz
Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1
Conflicts: .qmake.conf Change-Id: I1c0ac322f30448a64b55b1ef60f60326ca0171a6
Diffstat (limited to 'src')
-rw-r--r--src/xmlpatterns/api/qabstractmessagehandler.cpp18
-rw-r--r--src/xmlpatterns/doc/src/xml-patterns.qdoc2
2 files changed, 5 insertions, 15 deletions
diff --git a/src/xmlpatterns/api/qabstractmessagehandler.cpp b/src/xmlpatterns/api/qabstractmessagehandler.cpp
index 2c13e4e..b2c53bb 100644
--- a/src/xmlpatterns/api/qabstractmessagehandler.cpp
+++ b/src/xmlpatterns/api/qabstractmessagehandler.cpp
@@ -37,22 +37,13 @@
**
****************************************************************************/
-#include <QMutex>
-
#include "private/qobject_p.h"
#include "qabstractmessagehandler.h"
QT_BEGIN_NAMESPACE
-class QAbstractMessageHandlerPrivate : public QObjectPrivate
-{
-public:
- QMutex mutex;
-};
-
/*!
\class QAbstractMessageHandler
- \threadsafe
\since 4.4
\ingroup xml-tools
\inmodule QtXmlPatterns
@@ -71,8 +62,6 @@ public:
instance of your subclass to any classes that must generate
messages. The messages are sent to the message handler via the
message() function, which forwards them to your handleMessge().
- The effect is to serialize the handling of all messages, which
- means your QAbstractMessageHandler subclass is thread safe.
A single instance of QAbstractMessageHandler can be called on to
handle messages from multiple sources. Hence, the content of a
@@ -87,7 +76,7 @@ public:
Constructs a QAbstractMessageHandler. The \a parent is passed
to the QObject base class constructor.
*/
-QAbstractMessageHandler::QAbstractMessageHandler(QObject *parent) : QObject(*new QAbstractMessageHandlerPrivate(), parent)
+QAbstractMessageHandler::QAbstractMessageHandler(QObject *parent) : QObject(parent)
{
}
@@ -127,8 +116,6 @@ void QAbstractMessageHandler::message(QtMsgType type,
const QUrl &identifier,
const QSourceLocation &sourceLocation)
{
- Q_D(QAbstractMessageHandler);
- QMutexLocker(&d->mutex);
handleMessage(type, description, identifier, sourceLocation);
}
@@ -141,6 +128,9 @@ void QAbstractMessageHandler::message(QtMsgType type,
This function must be implemented by the sub-class. message() will
call this function, passing in its parameters, \a type,
\a description, \a identifier and \a sourceLocation unmodified.
+
+ This function can potentially be called from multiple threads. It's the reimplementation's
+ responsibility to ensure thread safety.
*/
QT_END_NAMESPACE
diff --git a/src/xmlpatterns/doc/src/xml-patterns.qdoc b/src/xmlpatterns/doc/src/xml-patterns.qdoc
index ae1ed3b..407e2d1 100644
--- a/src/xmlpatterns/doc/src/xml-patterns.qdoc
+++ b/src/xmlpatterns/doc/src/xml-patterns.qdoc
@@ -538,7 +538,7 @@
\li The set of D-Bus interfaces available in a system
- \li A QObject hierarchy, as seen in the \l{QObject XML Model Example}.
+ \li A QObject hierarchy.
\endlist