add error message when can't connect to daemon

This commit is contained in:
Jussi Kuokkanen 2023-10-25 16:09:55 +03:00
parent 7be571a94f
commit 232cb70378

View File

@ -51,6 +51,10 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
auto conn = QDBusConnection::systemBus();
QDBusInterface tuxclockerd("org.tuxclocker", "/", "org.tuxclocker", conn);
if (tuxclockerd.lastError().isValid())
qDebug() << "Couldn't connect to TuxClocker daemon:"
<< tuxclockerd.lastError().message();
QDBusReply<QVector<TCDBus::FlatTreeNode<TCDBus::DeviceNode>>> reply =
tuxclockerd.call("flatDeviceTree");