Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rhabacker:branches:windows:mingw:win32:Qt515
mingw32-libqt5-qttools
0001-Only-show-system-bus-tab-if-system-bus-is-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Only-show-system-bus-tab-if-system-bus-is-present.patch of Package mingw32-libqt5-qttools
--- a/src/qdbus/qdbusviewer/mainwindow.cpp 2020-07-26 19:42:32.215475717 +0000 +++ b/src/qdbus/qdbusviewer/mainwindow.cpp 2020-07-26 19:42:47.471351997 +0000 @@ -41,7 +41,8 @@ #include <QtCore/QSettings> MainWindow::MainWindow(QWidget *parent) - : QMainWindow(parent) + : QMainWindow(parent), + systemBusViewer(0) { QMenu *fileMenu = menuBar()->addMenu(tr("&File")); QAction *quitAction = fileMenu->addAction(tr("&Quit"), this, &QWidget::close); @@ -61,9 +62,12 @@ setCentralWidget(tabWidget); sessionBusViewer = new QDBusViewer(QDBusConnection::sessionBus()); - systemBusViewer = new QDBusViewer(QDBusConnection::systemBus()); tabWidget->addTab(sessionBusViewer, tr("Session Bus")); + QDBusConnection systemBus = QDBusConnection::systemBus(); + if (systemBus.isConnected()) { + systemBusViewer = new QDBusViewer(systemBus); tabWidget->addTab(systemBusViewer, tr("System Bus")); + } restoreSettings(); } @@ -109,9 +113,11 @@ sessionBusViewer->saveState(&settings); settings.endGroup(); + if (systemBusViewer) { settings.beginGroup(systemTabGroup()); systemBusViewer->saveState(&settings); settings.endGroup(); + } } void MainWindow::restoreSettings() @@ -124,7 +130,9 @@ sessionBusViewer->restoreState(&settings); settings.endGroup(); + if (systemBusViewer) { settings.beginGroup(systemTabGroup()); systemBusViewer->restoreState(&settings); settings.endGroup(); + } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor