7#include <QtGui/QGuiApplication>
8#include <QtCore/QJniObject>
30 listenersLock.lockForRead();
31 for (
auto listener : std::as_const(listeners)) {
34 listenersLock.unlock();
40 static bool firstListener =
true;
43 if (intent.isValid()) {
48 firstListener =
false;
49 listenersLock.lockForWrite();
52 listenersLock.unlock();
59 listenersLock.lockForWrite();
61 listenersLock.unlock();
78void QMainNfcNewIntentListener::updateReceiveState()
90 listenersLock.lockForRead();
92 if (!listeners.
isEmpty() && !receiving)
96 if (listeners.
isEmpty() && receiving) {
100 listenersLock.unlock();
virtual void newIntent(QJniObject intent)=0
static QCoreApplication * instance() noexcept
Returns a pointer to the application's QCoreApplication (or QGuiApplication/QApplication) instance.
bool isEmpty() const noexcept
bool removeOne(const AT &t)
void push_back(parameter_type t)
bool registerListener(QAndroidNfcListenerInterface *listener)
bool unregisterListener(QAndroidNfcListenerInterface *listener)
~QMainNfcNewIntentListener()
bool handleNewIntent(JNIEnv *env, jobject intent)
QMainNfcNewIntentListener()
Combined button and popup list for selecting options.
Q_CORE_EXPORT void unregisterNewIntentListener(NewIntentListener *listener)
Q_CORE_EXPORT void registerNewIntentListener(NewIntentListener *listener)
Q_CORE_EXPORT void unregisterResumePauseListener(ResumePauseListener *listener)
Q_CORE_EXPORT void registerResumePauseListener(ResumePauseListener *listener)
QJniObject getStartIntent()
QJniObject getTag(const QJniObject &intent)
bool contains(const AT &t) const noexcept