mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-04 21:27:31 +01:00
Insert QDBusConnection::systemBus().isConnected() checks
This commit is contained in:
parent
2881b6b6b2
commit
eae74f6ad8
@ -28,14 +28,16 @@ WiimotedevShortcutGrabber::WiimotedevShortcutGrabber(QWidget *parent)
|
||||
wiimotedev_buttons_(0)
|
||||
{
|
||||
ui_->setupUi(this);
|
||||
|
||||
if (QDBusConnection::systemBus().isConnected()) {
|
||||
wiimotedev_iface_ = new DBusDeviceEventsInterface(WIIMOTEDEV_DBUS_SERVICE_NAME,
|
||||
WIIMOTEDEV_DBUS_EVENTS_OBJECT,
|
||||
|
||||
QDBusConnection::systemBus(),
|
||||
this);
|
||||
|
||||
connect(wiimotedev_iface_, SIGNAL(dbusWiimoteGeneralButtons(quint32,quint64)),
|
||||
this, SLOT(DbusWiimoteGeneralButtons(quint32, quint64)));
|
||||
}
|
||||
|
||||
foreach (const QString& name, config_->text_actions_.values())
|
||||
ui_->comboBox->addItem(name);
|
||||
|
@ -34,6 +34,8 @@ WiimotedevShortcuts::WiimotedevShortcuts(Player* player, QObject* parent)
|
||||
wiimotedev_notification_(true)
|
||||
{
|
||||
ReloadSettings();
|
||||
|
||||
if (QDBusConnection::systemBus().isConnected()) {
|
||||
wiimotedev_iface_ = new DBusDeviceEventsInterface(WIIMOTEDEV_DBUS_SERVICE_NAME,
|
||||
WIIMOTEDEV_DBUS_EVENTS_OBJECT,
|
||||
QDBusConnection::systemBus(),
|
||||
@ -42,6 +44,7 @@ WiimotedevShortcuts::WiimotedevShortcuts(Player* player, QObject* parent)
|
||||
connect(wiimotedev_iface_, SIGNAL(dbusWiimoteGeneralButtons(quint32,quint64)),
|
||||
this, SLOT(DbusWiimoteGeneralButtons(quint32, quint64)));
|
||||
}
|
||||
}
|
||||
|
||||
void WiimotedevShortcuts::ReloadSettings() {
|
||||
settings_.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||
|
Loading…
x
Reference in New Issue
Block a user