summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/concurrent/concurrent.pro1
-rw-r--r--src/concurrent/qfuture.h2
-rw-r--r--src/concurrent/qfutureinterface.h3
-rw-r--r--src/concurrent/qfutureinterface_p.h2
-rw-r--r--src/concurrent/qfuturesynchronizer.h2
-rw-r--r--src/concurrent/qfuturewatcher.h2
-rw-r--r--src/concurrent/qfuturewatcher_p.h2
-rw-r--r--src/concurrent/qtconcurrent_global.h84
-rw-r--r--src/concurrent/qtconcurrentcompilertest.h9
-rw-r--r--src/concurrent/qtconcurrentexception.h2
-rw-r--r--src/concurrent/qtconcurrentfilter.h2
-rw-r--r--src/concurrent/qtconcurrentfilterkernel.h2
-rw-r--r--src/concurrent/qtconcurrentfunctionwrappers.h2
-rw-r--r--src/concurrent/qtconcurrentiteratekernel.h2
-rw-r--r--src/concurrent/qtconcurrentmap.h2
-rw-r--r--src/concurrent/qtconcurrentmapkernel.h2
-rw-r--r--src/concurrent/qtconcurrentmedian.h2
-rw-r--r--src/concurrent/qtconcurrentreducekernel.h2
-rw-r--r--src/concurrent/qtconcurrentresultstore.h2
-rw-r--r--src/concurrent/qtconcurrentrun.h2
-rw-r--r--src/concurrent/qtconcurrentrunbase.h2
-rw-r--r--src/concurrent/qtconcurrentstoredfunctioncall.h2
-rw-r--r--src/concurrent/qtconcurrentthreadengine.h2
-rw-r--r--src/corelib/global/qglobal.h19
24 files changed, 111 insertions, 43 deletions
diff --git a/src/concurrent/concurrent.pro b/src/concurrent/concurrent.pro
index 8ef3c5ca59..6bf16e6a0a 100644
--- a/src/concurrent/concurrent.pro
+++ b/src/concurrent/concurrent.pro
@@ -31,6 +31,7 @@ SOURCES += \
qtconcurrentexception.cpp
HEADERS += \
+ qtconcurrent_global.h \
qfuture.h \
qfutureinterface.h \
qfuturesynchronizer.h \
diff --git a/src/concurrent/qfuture.h b/src/concurrent/qfuture.h
index 6e99a6068e..4005fe58fa 100644
--- a/src/concurrent/qfuture.h
+++ b/src/concurrent/qfuture.h
@@ -42,7 +42,7 @@
#ifndef QFUTURE_H
#define QFUTURE_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_QFUTURE
diff --git a/src/concurrent/qfutureinterface.h b/src/concurrent/qfutureinterface.h
index 3f05466cc6..9ae2df5d07 100644
--- a/src/concurrent/qfutureinterface.h
+++ b/src/concurrent/qfutureinterface.h
@@ -42,7 +42,8 @@
#ifndef QFUTUREINTERFACE_H
#define QFUTUREINTERFACE_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
+
#include <QtCore/qrunnable.h>
#ifndef QT_NO_QFUTURE
diff --git a/src/concurrent/qfutureinterface_p.h b/src/concurrent/qfutureinterface_p.h
index ea52621378..3a73f846ac 100644
--- a/src/concurrent/qfutureinterface_p.h
+++ b/src/concurrent/qfutureinterface_p.h
@@ -53,6 +53,8 @@
// We mean it.
//
+#include <QtConcurrent/qtconcurrent_global.h>
+
#include <QtCore/qelapsedtimer.h>
#include <QtCore/qcoreevent.h>
#include <QtCore/qlist.h>
diff --git a/src/concurrent/qfuturesynchronizer.h b/src/concurrent/qfuturesynchronizer.h
index 8b7e710ea9..3106dd44ac 100644
--- a/src/concurrent/qfuturesynchronizer.h
+++ b/src/concurrent/qfuturesynchronizer.h
@@ -42,6 +42,8 @@
#ifndef QFUTRUESYNCHRONIZER_H
#define QFUTRUESYNCHRONIZER_H
+#include <QtConcurrent/qtconcurrent_global.h>
+
#include <QtConcurrent/qfuture.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qfuturewatcher.h b/src/concurrent/qfuturewatcher.h
index 6b4b941621..11dab42174 100644
--- a/src/concurrent/qfuturewatcher.h
+++ b/src/concurrent/qfuturewatcher.h
@@ -42,6 +42,8 @@
#ifndef QFUTUREWATCHER_H
#define QFUTUREWATCHER_H
+#include <QtConcurrent/qtconcurrent_global.h>
+
#include <QtConcurrent/qfuture.h>
#ifndef QT_NO_QFUTURE
diff --git a/src/concurrent/qfuturewatcher_p.h b/src/concurrent/qfuturewatcher_p.h
index 27bc49439a..46486bf571 100644
--- a/src/concurrent/qfuturewatcher_p.h
+++ b/src/concurrent/qfuturewatcher_p.h
@@ -53,6 +53,8 @@
// We mean it.
//
+#include <QtConcurrent/qtconcurrent_global.h>
+
#include "qfutureinterface_p.h"
#include <qlist.h>
diff --git a/src/concurrent/qtconcurrent_global.h b/src/concurrent/qtconcurrent_global.h
new file mode 100644
index 0000000000..1e26c2321d
--- /dev/null
+++ b/src/concurrent/qtconcurrent_global.h
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTCONCURRENT_GLOBAL_H
+#define QTCONCURRENT_GLOBAL_H
+
+#include <QtCore/qglobal.h>
+
+#ifdef QT_NO_CONCURRENT
+# define QT_NO_QFUTURE
+#endif
+
+#if defined(Q_OS_WIN) && !defined(QT_NODLL)
+# if defined(QT_MAKEDLL)
+# if defined(QT_BUILD_CONCURRENT_LIB)
+# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT
+# else
+# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT
+# endif
+# elif defined(QT_DLL)
+# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT
+# endif
+#endif
+
+#if !defined(Q_CONCURRENT_EXPORT)
+# if defined(QT_SHARED)
+# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT
+# else
+# define Q_CONCURRENT_EXPORT
+# endif
+#endif
+
+// gcc 3 version has problems with some of the
+// map/filter overloads.
+#if defined(Q_CC_GNU) && (__GNUC__ < 4)
+# define QT_NO_CONCURRENT_MAP
+# define QT_NO_CONCURRENT_FILTER
+#endif
+
+#if defined (Q_CC_MSVC) && (_MSC_VER < 1300)
+# define QT_TYPENAME
+#else
+# define QT_TYPENAME typename
+#endif
+
+#endif // include guard
diff --git a/src/concurrent/qtconcurrentcompilertest.h b/src/concurrent/qtconcurrentcompilertest.h
index 7818423090..7f3f7d4262 100644
--- a/src/concurrent/qtconcurrentcompilertest.h
+++ b/src/concurrent/qtconcurrentcompilertest.h
@@ -42,20 +42,13 @@
#ifndef QTCONCURRENT_COMPILERTEST_H
#define QTCONCURRENT_COMPILERTEST_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-
-#if defined (Q_CC_MSVC) && (_MSC_VER < 1300)
-# define QT_TYPENAME
-#else
-# define QT_TYPENAME typename
-#endif
-
namespace QtPrivate {
template<class T>
diff --git a/src/concurrent/qtconcurrentexception.h b/src/concurrent/qtconcurrentexception.h
index 2021e7787c..80926c49c1 100644
--- a/src/concurrent/qtconcurrentexception.h
+++ b/src/concurrent/qtconcurrentexception.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_EXCEPTION_H
#define QTCONCURRENT_EXCEPTION_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_QFUTURE
diff --git a/src/concurrent/qtconcurrentfilter.h b/src/concurrent/qtconcurrentfilter.h
index 1de8d230b1..3d4c1d6f57 100644
--- a/src/concurrent/qtconcurrentfilter.h
+++ b/src/concurrent/qtconcurrentfilter.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_FILTER_H
#define QTCONCURRENT_FILTER_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentfilterkernel.h b/src/concurrent/qtconcurrentfilterkernel.h
index 71112cb5a3..9bb4396f41 100644
--- a/src/concurrent/qtconcurrentfilterkernel.h
+++ b/src/concurrent/qtconcurrentfilterkernel.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_FILTERKERNEL_H
#define QTCONCURRENT_FILTERKERNEL_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h
index 9b86b73f6d..c87770f6c0 100644
--- a/src/concurrent/qtconcurrentfunctionwrappers.h
+++ b/src/concurrent/qtconcurrentfunctionwrappers.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_FUNCTIONWRAPPERS_H
#define QTCONCURRENT_FUNCTIONWRAPPERS_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentiteratekernel.h b/src/concurrent/qtconcurrentiteratekernel.h
index 4858053752..6776ff0346 100644
--- a/src/concurrent/qtconcurrentiteratekernel.h
+++ b/src/concurrent/qtconcurrentiteratekernel.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_ITERATEKERNEL_H
#define QTCONCURRENT_ITERATEKERNEL_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentmap.h b/src/concurrent/qtconcurrentmap.h
index 8a5557183d..4e51816b58 100644
--- a/src/concurrent/qtconcurrentmap.h
+++ b/src/concurrent/qtconcurrentmap.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_MAP_H
#define QTCONCURRENT_MAP_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentmapkernel.h b/src/concurrent/qtconcurrentmapkernel.h
index ceeaa6e3b3..a1ca2b60fd 100644
--- a/src/concurrent/qtconcurrentmapkernel.h
+++ b/src/concurrent/qtconcurrentmapkernel.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_MAPKERNEL_H
#define QTCONCURRENT_MAPKERNEL_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentmedian.h b/src/concurrent/qtconcurrentmedian.h
index 78fc3d97c8..9a17ecb3b4 100644
--- a/src/concurrent/qtconcurrentmedian.h
+++ b/src/concurrent/qtconcurrentmedian.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_MEDIAN_H
#define QTCONCURRENT_MEDIAN_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentreducekernel.h b/src/concurrent/qtconcurrentreducekernel.h
index ddf56298ad..4eaa767b1d 100644
--- a/src/concurrent/qtconcurrentreducekernel.h
+++ b/src/concurrent/qtconcurrentreducekernel.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_REDUCEKERNEL_H
#define QTCONCURRENT_REDUCEKERNEL_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentresultstore.h b/src/concurrent/qtconcurrentresultstore.h
index 4be3c20d48..bb7b39311f 100644
--- a/src/concurrent/qtconcurrentresultstore.h
+++ b/src/concurrent/qtconcurrentresultstore.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_RESULTSTORE_H
#define QTCONCURRENT_RESULTSTORE_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_QFUTURE
diff --git a/src/concurrent/qtconcurrentrun.h b/src/concurrent/qtconcurrentrun.h
index d7285388da..0e46db868d 100644
--- a/src/concurrent/qtconcurrentrun.h
+++ b/src/concurrent/qtconcurrentrun.h
@@ -43,7 +43,7 @@
#ifndef QTCONCURRENT_RUN_H
#define QTCONCURRENT_RUN_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentrunbase.h b/src/concurrent/qtconcurrentrunbase.h
index 2105437ede..2637abfc2e 100644
--- a/src/concurrent/qtconcurrentrunbase.h
+++ b/src/concurrent/qtconcurrentrunbase.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_RUNBASE_H
#define QTCONCURRENT_RUNBASE_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/concurrent/qtconcurrentstoredfunctioncall.h b/src/concurrent/qtconcurrentstoredfunctioncall.h
index c311a72427..d980e25623 100644
--- a/src/concurrent/qtconcurrentstoredfunctioncall.h
+++ b/src/concurrent/qtconcurrentstoredfunctioncall.h
@@ -43,7 +43,7 @@
#ifndef QTCONCURRENT_STOREDFUNCTIONCALL_H
#define QTCONCURRENT_STOREDFUNCTIONCALL_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
#include <QtConcurrent/qtconcurrentrunbase.h>
diff --git a/src/concurrent/qtconcurrentthreadengine.h b/src/concurrent/qtconcurrentthreadengine.h
index 679496ce40..3ecdc84600 100644
--- a/src/concurrent/qtconcurrentthreadengine.h
+++ b/src/concurrent/qtconcurrentthreadengine.h
@@ -42,7 +42,7 @@
#ifndef QTCONCURRENT_THREADENGINE_H
#define QTCONCURRENT_THREADENGINE_H
-#include <QtCore/qglobal.h>
+#include <QtConcurrent/qtconcurrent_global.h>
#ifndef QT_NO_CONCURRENT
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 456624071c..91ac4bd41d 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -671,11 +671,6 @@ class QDataStream;
# define Q_DBUS_EXPORT Q_DECL_IMPORT
# endif
# define Q_TEMPLATEDLL
-# if defined(QT_BUILD_CONCURRENT_LIB)
-# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT
-# else
-# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT
-# endif
# elif defined(QT_DLL) /* use a Qt DLL library */
# define Q_CORE_EXPORT Q_DECL_IMPORT
# define Q_GUI_EXPORT Q_DECL_IMPORT
@@ -697,7 +692,6 @@ class QDataStream;
# define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT
# define Q_COMPAT_EXPORT Q_DECL_IMPORT
# define Q_DBUS_EXPORT Q_DECL_IMPORT
-# define Q_CONCURRENT_EXPORT Q_DECL_IMPORT
# define Q_TEMPLATEDLL
# endif
# define Q_NO_DECLARED_NOT_DEFINED
@@ -731,7 +725,6 @@ class QDataStream;
# define Q_SCRIPTTOOLS_EXPORT Q_DECL_EXPORT
# define Q_COMPAT_EXPORT Q_DECL_EXPORT
# define Q_DBUS_EXPORT Q_DECL_EXPORT
-# define Q_CONCURRENT_EXPORT Q_DECL_EXPORT
# else
# define Q_CORE_EXPORT
# define Q_GUI_EXPORT
@@ -752,7 +745,6 @@ class QDataStream;
# define Q_SCRIPTTOOLS_EXPORT
# define Q_COMPAT_EXPORT
# define Q_DBUS_EXPORT
-# define Q_CONCURRENT_EXPORT
# endif
#endif
@@ -1752,17 +1744,6 @@ Q_CORE_EXPORT int qrand();
#define QT_MODULE(x)
-#ifdef QT_NO_CONCURRENT
-# define QT_NO_QFUTURE
-#endif
-
-// gcc 3 version has problems with some of the
-// map/filter overloads.
-#if defined(Q_CC_GNU) && (__GNUC__ < 4)
-# define QT_NO_CONCURRENT_MAP
-# define QT_NO_CONCURRENT_FILTER
-#endif
-
#ifdef Q_OS_QNX
// QNX doesn't have SYSV style shared memory. Multiprocess QWS apps,
// shared fonts and QSystemSemaphore + QSharedMemory are not available