summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcoreapplication.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2021-05-08 13:50:49 +1000
committerLorn Potter <lorn.potter@gmail.com>2021-05-12 22:49:45 +1000
commit35396e12eb73c5d7d45e903a1d617e76ad0aca3f (patch)
treeee5d5a22593557654cac6dc330b8f316a03abf48 /src/corelib/kernel/qcoreapplication.cpp
parenta8a38f7caabb90113a229629c6fe463acdecd10f (diff)
fix build for no feature future
This amends afd7460affa17b5f8aac9034b1b9c3b13dd115f7 Add new app permissions API under QCoreApplication Which added QFuture use without protection for platforms with no real future. Change-Id: Iac50a71c9821255621d7582481270b2023610405 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/kernel/qcoreapplication.cpp')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 676614f6d6..5500d14d18 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -60,7 +60,9 @@
#ifndef QT_NO_QOBJECT
#include <qthread.h>
#include <qthreadstorage.h>
+#if QT_CONFIG(future)
#include <QtCore/qpromise.h>
+#endif
#include <private/qthread_p.h>
#if QT_CONFIG(thread)
#include <qthreadpool.h>
@@ -995,7 +997,6 @@ bool QCoreApplication::testAttribute(Qt::ApplicationAttribute attribute)
return QCoreApplicationPrivate::testAttribute(attribute);
}
-
#ifndef QT_NO_QOBJECT
/*!
@@ -3076,8 +3077,7 @@ void QCoreApplication::setEventDispatcher(QAbstractEventDispatcher *eventDispatc
\sa Q_OBJECT, QObject::tr()
*/
-
-#ifndef QT_NO_QOBJECT
+#if QT_CONFIG(future) && !defined(QT_NO_QOBJECT)
#if !defined(Q_OS_ANDROID)
QFuture<QPermission::PermissionResult> defaultPermissionFuture()
@@ -3225,7 +3225,7 @@ QCoreApplication::checkPermission(const QString &permission)
{
return QCoreApplicationPrivate::checkPermission(permission);
}
-#endif
+#endif // future && QT_NO_QOBJECT
QT_END_NAMESPACE