QCoreApplication: implement the ### Qt7 to rename requestPermission
Amends commit 207aae5560aa2865ec55ddb9ecbb50048060c0c0. Change-Id: Iff0d62fb157087299faafffd6e14a2b95c2bc1de Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
d2efb6faba
commit
cb382450aa
@ -1380,6 +1380,16 @@ QUuid::Version QUuid::version() const noexcept
|
|||||||
|
|
||||||
#if QT_CORE_REMOVED_SINCE(6, 10)
|
#if QT_CORE_REMOVED_SINCE(6, 10)
|
||||||
|
|
||||||
|
#include "qcoreapplication.h"
|
||||||
|
|
||||||
|
#if QT_CONFIG(permissions)
|
||||||
|
void QCoreApplication::requestPermission(const QPermission &requestedPermission,
|
||||||
|
QtPrivate::QSlotObjectBase *slotObjRaw, const QObject *context)
|
||||||
|
{
|
||||||
|
return requestPermissionImpl(requestedPermission, slotObjRaw, context);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "qdir.h"
|
#include "qdir.h"
|
||||||
|
|
||||||
bool QDir::mkdir(const QString &dirName) const
|
bool QDir::mkdir(const QString &dirName) const
|
||||||
|
@ -2862,7 +2862,7 @@ Qt::PermissionStatus QCoreApplication::checkPermission(const QPermission &permis
|
|||||||
Calls the functor encapsulated in the \a slotObjRaw in the given \a context
|
Calls the functor encapsulated in the \a slotObjRaw in the given \a context
|
||||||
(which may be \c nullptr).
|
(which may be \c nullptr).
|
||||||
*/
|
*/
|
||||||
void QCoreApplication::requestPermission(const QPermission &requestedPermission,
|
void QCoreApplication::requestPermissionImpl(const QPermission &requestedPermission,
|
||||||
QtPrivate::QSlotObjectBase *slotObjRaw, const QObject *context)
|
QtPrivate::QSlotObjectBase *slotObjRaw, const QObject *context)
|
||||||
{
|
{
|
||||||
QtPrivate::SlotObjUniquePtr slotObj{slotObjRaw}; // adopts
|
QtPrivate::SlotObjUniquePtr slotObj{slotObjRaw}; // adopts
|
||||||
|
@ -24,23 +24,19 @@ typedef struct tagMSG MSG;
|
|||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
class QAbstractEventDispatcher;
|
||||||
class QCoreApplicationPrivate;
|
class QAbstractNativeEventFilter;
|
||||||
class QDebug;
|
class QDebug;
|
||||||
class QTranslator;
|
class QEventLoopLocker;
|
||||||
|
class QPermission;
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
|
#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0)
|
||||||
class QPostEventList;
|
class QPostEventList;
|
||||||
#endif
|
#endif
|
||||||
class QAbstractEventDispatcher;
|
class QTranslator;
|
||||||
class QAbstractNativeEventFilter;
|
|
||||||
class QEventLoopLocker;
|
|
||||||
|
|
||||||
#if QT_CONFIG(permissions) || defined(Q_QDOC)
|
|
||||||
class QPermission;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define qApp QCoreApplication::instance()
|
#define qApp QCoreApplication::instance()
|
||||||
|
|
||||||
|
class QCoreApplicationPrivate;
|
||||||
class Q_CORE_EXPORT QCoreApplication
|
class Q_CORE_EXPORT QCoreApplication
|
||||||
#ifndef QT_NO_QOBJECT
|
#ifndef QT_NO_QOBJECT
|
||||||
: public QObject
|
: public QObject
|
||||||
@ -142,7 +138,7 @@ public:
|
|||||||
const typename QtPrivate::ContextTypeForFunctor<Functor>::ContextType *receiver,
|
const typename QtPrivate::ContextTypeForFunctor<Functor>::ContextType *receiver,
|
||||||
Functor &&func)
|
Functor &&func)
|
||||||
{
|
{
|
||||||
requestPermission(permission,
|
requestPermissionImpl(permission,
|
||||||
QtPrivate::makeCallableObject<RequestPermissionPrototype>(std::forward<Functor>(func)),
|
QtPrivate::makeCallableObject<RequestPermissionPrototype>(std::forward<Functor>(func)),
|
||||||
receiver);
|
receiver);
|
||||||
}
|
}
|
||||||
@ -164,11 +160,12 @@ public:
|
|||||||
}
|
}
|
||||||
#endif // QT_NO_CONTEXTLESS_CONNECT
|
#endif // QT_NO_CONTEXTLESS_CONNECT
|
||||||
|
|
||||||
|
#if QT_CORE_REMOVED_SINCE(6, 10)
|
||||||
private:
|
private:
|
||||||
// ### Qt 7: rename to requestPermissionImpl to avoid ambiguity
|
|
||||||
void requestPermission(const QPermission &permission,
|
void requestPermission(const QPermission &permission,
|
||||||
QtPrivate::QSlotObjectBase *slotObj, const QObject *context);
|
QtPrivate::QSlotObjectBase *slotObj, const QObject *context);
|
||||||
public:
|
public:
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // QT_CONFIG(permission)
|
#endif // QT_CONFIG(permission)
|
||||||
|
|
||||||
@ -230,6 +227,9 @@ private:
|
|||||||
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event);
|
static bool sendSpontaneousEvent(QObject *receiver, QEvent *event);
|
||||||
static bool notifyInternal2(QObject *receiver, QEvent *);
|
static bool notifyInternal2(QObject *receiver, QEvent *);
|
||||||
static bool forwardEvent(QObject *receiver, QEvent *event, QEvent *originatingEvent = nullptr);
|
static bool forwardEvent(QObject *receiver, QEvent *event, QEvent *originatingEvent = nullptr);
|
||||||
|
|
||||||
|
void requestPermissionImpl(const QPermission &permission, QtPrivate::QSlotObjectBase *slotObj,
|
||||||
|
const QObject *context);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(7, 0, 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user