diff --git a/qt/widgets/common/src/MessageDisplay.cpp b/qt/widgets/common/src/MessageDisplay.cpp index ee9fa84593a0b7c37f03146ddec4f07327460273..993684a75e9f028ece1e84d2c94e73b0cbb681d4 100644 --- a/qt/widgets/common/src/MessageDisplay.cpp +++ b/qt/widgets/common/src/MessageDisplay.cpp @@ -244,7 +244,7 @@ void MessageDisplay::append(const Message &msg) { if (msg.priority() <= Message::Priority::PRIO_ERROR) { #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) NotificationService::showMessage( - "Mantid Workbench", + parentWidget() ? parentWidget()->windowTitle() : "Mantid", "Sorry, there was an error, please look at the message display for " "details.", NotificationService::MessageIcon::Critical); diff --git a/qt/widgets/common/src/NotificationService.cpp b/qt/widgets/common/src/NotificationService.cpp index 3eaf4822fcf900e25351868ffd05d0f63d335987..7e6986aba3fb0b3b329c32f80837de10b5d1c813 100644 --- a/qt/widgets/common/src/NotificationService.cpp +++ b/qt/widgets/common/src/NotificationService.cpp @@ -27,7 +27,7 @@ void NotificationService::showMessage(const QString &title, if (windowIcon.isNull()) { try { windowIcon = QIcon(":/images/MantidIcon.ico"); - } catch (std::exception) { + } catch (const std::exception &) { // if we cannot use the embedded icon, use a blank one windowIcon = QIcon(QPixmap(32, 32)); } @@ -48,11 +48,11 @@ bool NotificationService::isEnabled() { retVal = Mantid::Kernel::ConfigService::Instance() .getValue<bool>(NOTIFICATIONS_ENABLED_KEY) .get_value_or(true); - } catch (Mantid::Kernel::Exception::FileError) { + } catch (const Mantid::Kernel::Exception::FileError &) { // The Config Service could not find the properties file // Disable notifications retVal = false; - } catch (Poco::ExistsException) { + } catch (const Poco::ExistsException &) { // The Config Service could not find the properties file // Disable notifications retVal = false;