Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ximi1970:Toolchains:Qt:MinGW:latest:win64
mingw64-libqt4
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.txt of Package mingw64-libqt4
From 26237a656c3be8a6113cff009ff40394b63aadd8 Mon Sep 17 00:00:00 2001 From: Ralf Habacker <ralf.habacker@freenet.de> Date: Wed, 25 Oct 2017 13:14:30 +0200 Subject: [PATCH] Only show system bus tab if system bus is present This is useful on windows where the system bus is not available. Signed-off-by: Ralf Habacker <ralf.habacker@freenet.de> --- tools/qdbus/qdbusviewer/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/qdbus/qdbusviewer/main.cpp b/tools/qdbus/qdbusviewer/main.cpp index 48e88968b3..a49c496f49 100644 --- a/tools/qdbus/qdbusviewer/main.cpp +++ b/tools/qdbus/qdbusviewer/main.cpp @@ -61,9 +61,11 @@ int main(int argc, char *argv[]) QTabWidget *mainWidget = new QTabWidget; mw.setCentralWidget(mainWidget); QDBusViewer *sessionBusViewer = new QDBusViewer(QDBusConnection::sessionBus()); - QDBusViewer *systemBusViewer = new QDBusViewer(QDBusConnection::systemBus()); mainWidget->addTab(sessionBusViewer, QObject::tr("Session Bus")); - mainWidget->addTab(systemBusViewer, QObject::tr("System Bus")); + if (QDBusConnection::systemBus().isConnected()) { + QDBusViewer *systemBusViewer = new QDBusViewer(QDBusConnection::systemBus()); + mainWidget->addTab(systemBusViewer, QObject::tr("System Bus")); + } QMenu *fileMenu = mw.menuBar()->addMenu(QObject::tr("&File")); QAction *quitAction = fileMenu->addAction(QObject::tr("&Quit"), &mw, SLOT(close())); -- 2.12.3
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