-
Notifications
You must be signed in to change notification settings - Fork 40
/
dbusinterface.cpp
39 lines (30 loc) · 1.13 KB
/
dbusinterface.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "dbusinterface.h"
#include <QProcess>
#include <QDBusConnection>
#include <QDBusInterface>
#include <QDBusConnectionInterface>
DBusInterface::DBusInterface()
{
QDBusConnection::sessionBus().registerObject("/org/freedesktop/FileManager1", this,
QDBusConnection::ExportScriptableContents | QDBusConnection::ExportAdaptors);
QDBusConnectionInterface *sessionInterface = QDBusConnection::sessionBus().interface();
if (sessionInterface) {
sessionInterface->registerService(QStringLiteral("org.freedesktop.FileManager1"), QDBusConnectionInterface::QueueService);
}
}
void DBusInterface::ShowFolders(const QStringList &uriList, const QString &startUpId)
{
Q_UNUSED(startUpId);
QProcess::startDetached("cutefish-filemanager", uriList);
}
void DBusInterface::ShowItems(const QStringList &uriList, const QString &startUpId)
{
Q_UNUSED(startUpId);
QProcess::startDetached("cutefish-filemanager", uriList);
}
void DBusInterface::ShowItemProperties(const QStringList &uriList, const QString &startUpId)
{
Q_UNUSED(uriList);
Q_UNUSED(startUpId);
// TODO
}