From d669f7c37044a5b72581a4cbe5c6dbb41982e5dc Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Fri, 25 Jan 2019 20:23:16 +0100 Subject: [PATCH] Style --- src/blackcore/corefacade.cpp | 2 +- src/blackgui/components/audiosetupcomponent.cpp | 3 ++- src/blackgui/components/downloadcomponent.cpp | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/blackcore/corefacade.cpp b/src/blackcore/corefacade.cpp index 66e91134f..deb282c84 100644 --- a/src/blackcore/corefacade.cpp +++ b/src/blackcore/corefacade.cpp @@ -66,7 +66,7 @@ namespace BlackCore if (!CContextApplicationProxy::isContextResponsive(dBusAddress, connectMsg)) { return CStatusMessage(this, CStatusMessage::SeverityError, - "Cannot connect DBus at '" + dBusAddress + "', reason: " + connectMsg); + u"Cannot connect DBus at '" % dBusAddress % u"', reason: " % connectMsg); } // re-init diff --git a/src/blackgui/components/audiosetupcomponent.cpp b/src/blackgui/components/audiosetupcomponent.cpp index 6645d69ea..aa6785303 100644 --- a/src/blackgui/components/audiosetupcomponent.cpp +++ b/src/blackgui/components/audiosetupcomponent.cpp @@ -190,13 +190,14 @@ namespace BlackGui void CAudioSetupComponent::onLoopbackToggled(bool loopback) { - Q_ASSERT(sGui->getIContextAudio()); + if (!sGui || sGui->isShuttingDown() || !sGui->getIContextAudio()) { return; } if (sGui->getIContextAudio()->isAudioLoopbackEnabled() == loopback) { return; } sGui->getIContextAudio()->enableAudioLoopback(loopback); } void CAudioSetupComponent::onNotificationsToggled(bool checked) { + if (!sGui || sGui->isShuttingDown() || !sGui->getIContextAudio()) { return; } CSettings as(m_audioSettings.getThreadLocal()); as.setNotificationFlag(CNotificationSounds::PTTClick, ui->cb_SetupAudioPTTClick->isChecked()); as.setNotificationFlag(CNotificationSounds::NotificationVoiceRoomLeft, ui->cb_SetupAudioNotificationVoiceRoomLeft->isChecked()); diff --git a/src/blackgui/components/downloadcomponent.cpp b/src/blackgui/components/downloadcomponent.cpp index e11f4fba2..0d0896369 100644 --- a/src/blackgui/components/downloadcomponent.cpp +++ b/src/blackgui/components/downloadcomponent.cpp @@ -276,7 +276,10 @@ namespace BlackGui const bool shutdown = ui->cb_Shutdown->isChecked(); if (sGui && shutdown) { - QTimer::singleShot(1000, sGui, [] { CGuiApplication::exit(); }); + QTimer::singleShot(1000, sGui, [] + { + CGuiApplication::exit(); + }); } break; }