fix metatypes not registered for showguimessage invocation

This commit is contained in:
Martin Rotter 2023-07-27 08:47:46 +02:00
parent 4596dceb8f
commit 3c85ff8d12
2 changed files with 4 additions and 1 deletions

View File

@ -52,6 +52,7 @@ struct ITaskbarList4;
struct GuiMessage { struct GuiMessage {
public: public:
GuiMessage() {}
GuiMessage(QString title, QString message, QSystemTrayIcon::MessageIcon type) GuiMessage(QString title, QString message, QSystemTrayIcon::MessageIcon type)
: m_title(std::move(title)), m_message(std::move(message)), m_type(type) {} : m_title(std::move(title)), m_message(std::move(message)), m_type(type) {}
@ -64,6 +65,7 @@ Q_DECLARE_METATYPE(GuiMessage)
struct GuiMessageDestination { struct GuiMessageDestination {
public: public:
GuiMessageDestination() {}
GuiMessageDestination(bool tray = true, bool message_box = false, bool status_bar = false) GuiMessageDestination(bool tray = true, bool message_box = false, bool status_bar = false)
: m_tray(tray), m_messageBox(message_box), m_statusBar(status_bar) {} : m_tray(tray), m_messageBox(message_box), m_statusBar(status_bar) {}
@ -76,6 +78,7 @@ Q_DECLARE_METATYPE(GuiMessageDestination)
struct GuiAction { struct GuiAction {
public: public:
GuiAction() {}
GuiAction(QString title = {}, const std::function<void()>& action = nullptr) GuiAction(QString title = {}, const std::function<void()>& action = nullptr)
: m_title(std::move(title)), m_action(action) {} : m_title(std::move(title)), m_action(action) {}

View File

@ -148,7 +148,7 @@ QString Notification::nameForEvent(Notification::Event event) {
return QObject::tr("Node.js - package(s) updated"); return QObject::tr("Node.js - package(s) updated");
case Notification::Event::NodePackageFailedToUpdate: case Notification::Event::NodePackageFailedToUpdate:
return QObject::tr("Node.js - package(s) failed to updated"); return QObject::tr("Node.js - package(s) failed to update");
default: default:
return QObject::tr("Unknown event"); return QObject::tr("Unknown event");