fix build for no feature future
This amends afd7460aff
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>
This commit is contained in:
parent
a8a38f7caa
commit
35396e12eb
@ -98,6 +98,7 @@
|
||||
#define QT_FEATURE_journald -1
|
||||
#define QT_FEATURE_futimens -1
|
||||
#define QT_FEATURE_futimes -1
|
||||
#define QT_FEATURE_future -1
|
||||
#define QT_FEATURE_itemmodel -1
|
||||
#define QT_FEATURE_library -1
|
||||
#ifdef __linux__
|
||||
|
@ -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
|
||||
|
||||
|
@ -45,9 +45,11 @@
|
||||
#ifndef QT_NO_QOBJECT
|
||||
#include <QtCore/qcoreevent.h>
|
||||
#include <QtCore/qeventloop.h>
|
||||
#if QT_CONFIG(future)
|
||||
#include <QtCore/qfuture.h>
|
||||
#include <QtCore/qobject.h>
|
||||
#include <QtCore/qpermission.h>
|
||||
#endif
|
||||
#include <QtCore/qobject.h>
|
||||
#else
|
||||
#include <QtCore/qscopedpointer.h>
|
||||
#endif
|
||||
@ -158,6 +160,7 @@ public:
|
||||
int n = -1);
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
#if QT_CONFIG(future)
|
||||
static QFuture<QPermission::PermissionResult> requestPermission(
|
||||
QPermission::PermisionType permission);
|
||||
static QFuture<QPermission::PermissionResult> requestPermission(const QString &permission);
|
||||
@ -165,7 +168,7 @@ public:
|
||||
static QFuture<QPermission::PermissionResult> checkPermission(
|
||||
QPermission::PermisionType permission);
|
||||
static QFuture<QPermission::PermissionResult> checkPermission(const QString &permission);
|
||||
|
||||
#endif
|
||||
void installNativeEventFilter(QAbstractNativeEventFilter *filterObj);
|
||||
void removeNativeEventFilter(QAbstractNativeEventFilter *filterObj);
|
||||
|
||||
|
@ -62,9 +62,11 @@
|
||||
#ifndef QT_NO_QOBJECT
|
||||
#include "private/qobject_p.h"
|
||||
#include "private/qlocking_p.h"
|
||||
#if QT_CONFIG(future)
|
||||
#include <QtCore/qpermission.h>
|
||||
#include <QtCore/qfuture.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MACOS
|
||||
#include "private/qcore_mac_p.h"
|
||||
@ -201,8 +203,7 @@ public:
|
||||
void processCommandLineArguments();
|
||||
QString qmljs_debug_arguments; // a string containing arguments for js/qml debugging.
|
||||
inline QString qmljsDebugArgumentsString() const { return qmljs_debug_arguments; }
|
||||
|
||||
#ifndef QT_NO_QOBJECT
|
||||
#if QT_CONFIG(future) && !defined QT_NO_QOBJECT
|
||||
static QFuture<QPermission::PermissionResult> requestPermission(
|
||||
QPermission::PermisionType permission);
|
||||
static QFuture<QPermission::PermissionResult> requestPermission(const QString &permission);
|
||||
|
Loading…
Reference in New Issue
Block a user