Use QDBusMessage::createMethodCall instead of QDBusInterface
Saves one blocking introspection call
This commit is contained in:
parent
ac6bff575f
commit
e690b92d3e
@ -32,7 +32,7 @@
|
|||||||
#include <KDesktopFile>
|
#include <KDesktopFile>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QDBusInterface>
|
#include <QDBusConnection>
|
||||||
#include <QDBusPendingCall>
|
#include <QDBusPendingCall>
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
@ -160,8 +160,9 @@ void PackageStructurePrivate::installPathChanged(const QString &path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QDBusInterface sycoca(QStringLiteral("org.kde.kded5"), QStringLiteral("/kbuildsycoca"));
|
const auto call = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kded5"), QStringLiteral("/kbuildsycoca"),
|
||||||
sycoca.asyncCall(QStringLiteral("recreate"));
|
QStringLiteral("org.kde.kbuildsycoca"), QStringLiteral("recreate"));
|
||||||
|
QDBusConnection::sessionBus().asyncCall(call);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user