Modify DBus interface name

This commit is contained in:
reionwong 2021-08-29 20:14:31 +08:00
parent 943a02d3e9
commit 5e00e727b6
2 changed files with 5 additions and 3 deletions

View file

@ -35,8 +35,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv); QApplication app(argc, argv);
if (!QDBusConnection::sessionBus().registerService("org.cutefish.Dock")) { if (!QDBusConnection::sessionBus().registerService("org.cutefish.Dock")) {
app.exit(); return -1;
return 0;
} }
qmlRegisterType<DockSettings>("Cutefish.Dock", 1, 0, "DockSettings"); qmlRegisterType<DockSettings>("Cutefish.Dock", 1, 0, "DockSettings");
@ -54,5 +53,9 @@ int main(int argc, char *argv[])
MainWindow w; MainWindow w;
if (!QDBusConnection::sessionBus().registerObject("/Dock", &w)) {
return -1;
}
return app.exec(); return app.exec();
} }

View file

@ -46,7 +46,6 @@ MainWindow::MainWindow(QQuickView *parent)
, m_hideTimer(new QTimer(this)) , m_hideTimer(new QTimer(this))
{ {
new DockAdaptor(this); new DockAdaptor(this);
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Dock"), this);
setDefaultAlphaBuffer(false); setDefaultAlphaBuffer(false);
setColor(Qt::transparent); setColor(Qt::transparent);