4#include <QtCore/QLoggingCategory>
29 if (!
ok || adapterPath.isEmpty()) {
30 qCWarning(QT_BT_BLUEZ) <<
"Cannot initialize RemoteDeviceManager";
39 for (
const auto& remote : remoteDevices)
40 jobQueue.push_back(std::make_pair(job, remote));
46void RemoteDeviceManager::runQueue()
48 if (jobInProgress || adapterPath.
isEmpty())
55 switch (jobQueue.front().first) {
57 disconnectDevice(jobQueue.front().second);
64void RemoteDeviceManager::prepareNextJob()
69 jobInProgress =
false;
71 qCDebug(QT_BT_BLUEZ) <<
"RemoteDeviceManager job queue status:" << jobQueue.empty();
86 reply.waitForFinished();
87 if (
reply.isError()) {
92 bool jobStarted =
false;
101 if (
path.path().indexOf(adapterPath) != 0)
108 if (foundAddress != remote)
130 qCDebug(QT_BT_BLUEZ) <<
"RemoteDeviceManager JobDisconnectDevice failed";
137#include "moc_remotedevicemanager_p.cpp"
QString findAdapterForAddress(const QBluetoothAddress &wantedAddress, bool *ok=nullptr)
QT_BEGIN_NAMESPACE void initializeBluez5()
QDBusPendingReply Disconnect()
static QDBusConnection systemBus()
Returns a QDBusConnection object opened with the system bus.
void finished(QDBusPendingCallWatcher *self=nullptr)
This signal is emitted when the pending call has finished and its reply is available.
T value(const Key &key, const T &defaultValue=T()) const
const_iterator constBegin() const
const_iterator constEnd() const
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void deleteLater()
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
bool singleShot
whether the timer is a single-shot timer
bool scheduleJob(JobType job, const QList< QBluetoothAddress > &remoteDevices)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
constexpr QBindableInterface iface
#define qCWarning(category,...)
#define qCDebug(category,...)
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLuint GLuint64EXT address
GLsizei const GLchar *const * path
#define QStringLiteral(str)
QFutureWatcher< int > watcher
char * toString(const MyType &t)
[31]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent