diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-06-09 13:59:07 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-06-09 13:59:07 +0200 |
commit | 0963be63ce741ef6c7585358c3f3b1cb806b66e8 (patch) | |
tree | 6f4964c196b8a52cb15e9efc0388b6a549574460 /src/corelib/thread | |
parent | 9e6a1351823b3ee3d7e380248f6ef42ff383b014 (diff) | |
parent | eacfbbf64ef90dad8c5cb6b2c812ad64c1100779 (diff) |
Merge remote-tracking branch 'qt/dev' into dev-highdpi
Conflicts:
src/gui/kernel/qsimpledrag.cpp
src/gui/kernel/qwindowsysteminterface.cpp
src/gui/kernel/qwindowsysteminterface_p.h
src/plugins/platforms/xcb/qxcbwindow.cpp
Change-Id: Icd887552ade61d6a2b2527383970f7145aa00faf
Diffstat (limited to 'src/corelib/thread')
-rw-r--r-- | src/corelib/thread/qexception.cpp | 16 | ||||
-rw-r--r-- | src/corelib/thread/qexception.h | 10 | ||||
-rw-r--r-- | src/corelib/thread/qrunnable.cpp | 11 | ||||
-rw-r--r-- | src/corelib/thread/qrunnable.h | 9 | ||||
-rw-r--r-- | src/corelib/thread/qthread_p.h | 14 |
5 files changed, 52 insertions, 8 deletions
diff --git a/src/corelib/thread/qexception.cpp b/src/corelib/thread/qexception.cpp index acc3663936..01bbe70c88 100644 --- a/src/corelib/thread/qexception.cpp +++ b/src/corelib/thread/qexception.cpp @@ -107,6 +107,14 @@ QT_BEGIN_NAMESPACE \internal */ +QException::~QException() +#ifndef Q_COMPILER_NOEXCEPT + throw() +#endif +{ + // must stay empty until ### Qt 6 +} + void QException::raise() const { QException e = *this; @@ -118,6 +126,14 @@ QException *QException::clone() const return new QException(*this); } +QUnhandledException::~QUnhandledException() +#ifndef Q_COMPILER_NOEXCEPT + throw() +#endif +{ + // must stay empty until ### Qt 6 +} + void QUnhandledException::raise() const { QUnhandledException e = *this; diff --git a/src/corelib/thread/qexception.h b/src/corelib/thread/qexception.h index 55fc441020..edf361ebd3 100644 --- a/src/corelib/thread/qexception.h +++ b/src/corelib/thread/qexception.h @@ -53,6 +53,11 @@ QT_BEGIN_NAMESPACE class Q_CORE_EXPORT QException : public std::exception { public: + ~QException() +#ifndef Q_COMPILER_NOEXCEPT + throw() +#endif + ; virtual void raise() const; virtual QException *clone() const; }; @@ -60,6 +65,11 @@ public: class Q_CORE_EXPORT QUnhandledException : public QException { public: + ~QUnhandledException() +#ifndef Q_COMPILER_NOEXCEPT + throw() +#endif +; void raise() const Q_DECL_OVERRIDE; QUnhandledException *clone() const Q_DECL_OVERRIDE; }; diff --git a/src/corelib/thread/qrunnable.cpp b/src/corelib/thread/qrunnable.cpp index 64a2613d27..04aa39a81e 100644 --- a/src/corelib/thread/qrunnable.cpp +++ b/src/corelib/thread/qrunnable.cpp @@ -31,6 +31,15 @@ ** ****************************************************************************/ +#include "qrunnable.h" + +QT_BEGIN_NAMESPACE + +QRunnable::~QRunnable() +{ + // Must be empty until ### Qt 6 +} + /*! \class QRunnable \inmodule QtCore @@ -98,3 +107,5 @@ \sa autoDelete(), QThreadPool */ + +QT_END_NAMESPACE diff --git a/src/corelib/thread/qrunnable.h b/src/corelib/thread/qrunnable.h index f00c58d51d..28d14a46c0 100644 --- a/src/corelib/thread/qrunnable.h +++ b/src/corelib/thread/qrunnable.h @@ -38,20 +38,21 @@ QT_BEGIN_NAMESPACE - -class QRunnable +class Q_CORE_EXPORT QRunnable { int ref; friend class QThreadPool; friend class QThreadPoolPrivate; friend class QThreadPoolThread; - +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + Q_DISABLE_COPY(QRunnable) +#endif public: virtual void run() = 0; QRunnable() : ref(0) { } - virtual ~QRunnable() { } + virtual ~QRunnable(); bool autoDelete() const { return ref != -1; } void setAutoDelete(bool _autoDelete) { ref = _autoDelete ? 0 : -1; } diff --git a/src/corelib/thread/qthread_p.h b/src/corelib/thread/qthread_p.h index b8544b1f0a..2008f76621 100644 --- a/src/corelib/thread/qthread_p.h +++ b/src/corelib/thread/qthread_p.h @@ -57,6 +57,16 @@ #include <algorithm> +#ifdef Q_OS_WINRT +namespace ABI { + namespace Windows { + namespace Foundation { + struct IAsyncAction; + } + } +} +#endif // Q_OS_WINRT + QT_BEGIN_NAMESPACE class QAbstractEventDispatcher; @@ -125,10 +135,6 @@ private: #ifndef QT_NO_THREAD -#ifdef Q_OS_WINRT -namespace ABI { namespace Windows { namespace Foundation { struct IAsyncAction; } } } -#endif - class QThreadPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QThread) |