mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-26 17:03:08 +00:00
runnermanagerclient: use generated Runner1 proxy
This commit is contained in:
parent
4676b1d9a6
commit
16d4129ede
1 changed files with 22 additions and 21 deletions
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
#include "runnermanagerclient.h"
|
||||
|
||||
#include "runner1interface.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QCryptographicHash>
|
||||
#include <QDBusArgument>
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusConnectionInterface>
|
||||
#include <QDBusInterface>
|
||||
#include <QDBusMetaType>
|
||||
#include <QDBusPendingCall>
|
||||
#include <QDBusPendingCallWatcher>
|
||||
|
|
@ -338,8 +339,8 @@ void RunnerManagerClient::installRunnerFromUrl(const QString &url, const QString
|
|||
auto attempts = QSharedPointer<int>::create(0);
|
||||
auto callPtr = QSharedPointer<std::function<void()>>::create();
|
||||
*callPtr = [this, spec, attempts, callPtr]() {
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("InstallRunnerFromUrl"), spec);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.InstallRunnerFromUrl(spec);
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, spec, attempts, callPtr](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantMap> reply = *w;
|
||||
|
|
@ -397,8 +398,8 @@ void RunnerManagerClient::deletePrefix(const QString &gameId, const QString &pre
|
|||
auto attempts = QSharedPointer<int>::create(0);
|
||||
auto callPtr = QSharedPointer<std::function<void()>>::create();
|
||||
*callPtr = [this, spec, id, attempts, callPtr]() {
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("DeletePrefix"), spec);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.DeletePrefix(spec);
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantMap> reply = *w;
|
||||
|
|
@ -438,8 +439,8 @@ void RunnerManagerClient::cancelCurrentInstall()
|
|||
|
||||
setStatus(QStringLiteral("Cancelling..."));
|
||||
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
iface.asyncCall(QStringLiteral("CancelInstall"), m_installId);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
iface.CancelInstall(m_installId);
|
||||
}
|
||||
|
||||
void RunnerManagerClient::onInstallStarted(const QString &installId, const QVariantMap &)
|
||||
|
|
@ -489,8 +490,8 @@ void RunnerManagerClient::refreshRunners()
|
|||
{
|
||||
ensureRunnerDaemon();
|
||||
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("ListRunners"));
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.ListRunners();
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantList> reply = *w;
|
||||
|
|
@ -544,8 +545,8 @@ void RunnerManagerClient::refreshGameProfiles()
|
|||
{
|
||||
ensureRunnerDaemon();
|
||||
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("ListGameProfiles"));
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.ListGameProfiles();
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantList> reply = *w;
|
||||
|
|
@ -599,8 +600,8 @@ void RunnerManagerClient::requestGameProfile(const QString &gameId)
|
|||
auto attempts = QSharedPointer<int>::create(0);
|
||||
auto callPtr = QSharedPointer<std::function<void()>>::create();
|
||||
*callPtr = [this, id, attempts, callPtr]() {
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("GetGameProfile"), id);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.GetGameProfile(id);
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantMap> reply = *w;
|
||||
|
|
@ -641,8 +642,8 @@ void RunnerManagerClient::setGameProfile(const QVariantMap &spec)
|
|||
auto attempts = QSharedPointer<int>::create(0);
|
||||
auto callPtr = QSharedPointer<std::function<void()>>::create();
|
||||
*callPtr = [this, spec, id, attempts, callPtr]() {
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("SetGameProfile"), spec);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.SetGameProfile(spec);
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantMap> reply = *w;
|
||||
|
|
@ -683,8 +684,8 @@ void RunnerManagerClient::clearGameProfile(const QString &gameId)
|
|||
auto attempts = QSharedPointer<int>::create(0);
|
||||
auto callPtr = QSharedPointer<std::function<void()>>::create();
|
||||
*callPtr = [this, id, attempts, callPtr]() {
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("ClearGameProfile"), id);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.ClearGameProfile(id);
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantMap> reply = *w;
|
||||
|
|
@ -720,8 +721,8 @@ void RunnerManagerClient::uninstallRunner(const QString &runnerId)
|
|||
return;
|
||||
}
|
||||
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("UninstallRunner"), id);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.UninstallRunner(id);
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantMap> reply = *w;
|
||||
|
|
@ -763,8 +764,8 @@ void RunnerManagerClient::ensurePrefix(const QString &gameId, const QString &run
|
|||
auto attempts = QSharedPointer<int>::create(0);
|
||||
auto callPtr = QSharedPointer<std::function<void()>>::create();
|
||||
*callPtr = [this, spec, id, attempts, callPtr]() {
|
||||
QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.asyncCall(QStringLiteral("EnsurePrefix"), spec);
|
||||
org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus());
|
||||
QDBusPendingCall call = iface.EnsurePrefix(spec);
|
||||
auto *watcher = new QDBusPendingCallWatcher(call, this);
|
||||
connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) {
|
||||
QDBusPendingReply<QVariantMap> reply = *w;
|
||||
|
|
|
|||
Loading…
Reference in a new issue