mirror of https://github.com/cutefishos/core
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
653 B
C++
26 lines
653 B
C++
#include "appruntime.h"
|
|
#include "appruntimeadaptor.h"
|
|
|
|
#include <QCoreApplication>
|
|
#include <QDBusConnection>
|
|
#include <QDebug>
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QCoreApplication app(argc, argv);
|
|
app.setApplicationName(QStringLiteral("cutefish-appruntime"));
|
|
|
|
AppRuntime runtime;
|
|
new AppRuntimeAdaptor(&runtime);
|
|
|
|
QDBusConnection bus = QDBusConnection::sessionBus();
|
|
if (!bus.registerService(QStringLiteral("com.cutefish.AppRuntime"))) {
|
|
qWarning() << "Another application runtime is already running";
|
|
return 1;
|
|
}
|
|
|
|
bus.registerObject(QStringLiteral("/AppRuntime"), &runtime);
|
|
|
|
return app.exec();
|
|
}
|