mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-05 05:38:45 +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)
|
wiimotedev_buttons_(0)
|
||||||
{
|
{
|
||||||
ui_->setupUi(this);
|
ui_->setupUi(this);
|
||||||
|
|
||||||
|
if (QDBusConnection::systemBus().isConnected()) {
|
||||||
wiimotedev_iface_ = new DBusDeviceEventsInterface(WIIMOTEDEV_DBUS_SERVICE_NAME,
|
wiimotedev_iface_ = new DBusDeviceEventsInterface(WIIMOTEDEV_DBUS_SERVICE_NAME,
|
||||||
WIIMOTEDEV_DBUS_EVENTS_OBJECT,
|
WIIMOTEDEV_DBUS_EVENTS_OBJECT,
|
||||||
|
|
||||||
QDBusConnection::systemBus(),
|
QDBusConnection::systemBus(),
|
||||||
this);
|
this);
|
||||||
|
|
||||||
connect(wiimotedev_iface_, SIGNAL(dbusWiimoteGeneralButtons(quint32,quint64)),
|
connect(wiimotedev_iface_, SIGNAL(dbusWiimoteGeneralButtons(quint32,quint64)),
|
||||||
this, SLOT(DbusWiimoteGeneralButtons(quint32, quint64)));
|
this, SLOT(DbusWiimoteGeneralButtons(quint32, quint64)));
|
||||||
|
}
|
||||||
|
|
||||||
foreach (const QString& name, config_->text_actions_.values())
|
foreach (const QString& name, config_->text_actions_.values())
|
||||||
ui_->comboBox->addItem(name);
|
ui_->comboBox->addItem(name);
|
||||||
|
@ -34,6 +34,8 @@ WiimotedevShortcuts::WiimotedevShortcuts(Player* player, QObject* parent)
|
|||||||
wiimotedev_notification_(true)
|
wiimotedev_notification_(true)
|
||||||
{
|
{
|
||||||
ReloadSettings();
|
ReloadSettings();
|
||||||
|
|
||||||
|
if (QDBusConnection::systemBus().isConnected()) {
|
||||||
wiimotedev_iface_ = new DBusDeviceEventsInterface(WIIMOTEDEV_DBUS_SERVICE_NAME,
|
wiimotedev_iface_ = new DBusDeviceEventsInterface(WIIMOTEDEV_DBUS_SERVICE_NAME,
|
||||||
WIIMOTEDEV_DBUS_EVENTS_OBJECT,
|
WIIMOTEDEV_DBUS_EVENTS_OBJECT,
|
||||||
QDBusConnection::systemBus(),
|
QDBusConnection::systemBus(),
|
||||||
@ -42,6 +44,7 @@ WiimotedevShortcuts::WiimotedevShortcuts(Player* player, QObject* parent)
|
|||||||
connect(wiimotedev_iface_, SIGNAL(dbusWiimoteGeneralButtons(quint32,quint64)),
|
connect(wiimotedev_iface_, SIGNAL(dbusWiimoteGeneralButtons(quint32,quint64)),
|
||||||
this, SLOT(DbusWiimoteGeneralButtons(quint32, quint64)));
|
this, SLOT(DbusWiimoteGeneralButtons(quint32, quint64)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WiimotedevShortcuts::ReloadSettings() {
|
void WiimotedevShortcuts::ReloadSettings() {
|
||||||
settings_.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
settings_.beginGroup(WiimotedevShortcuts::kActionsGroup);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user