diff options
| author | Eike Ziller <eike.ziller@qt.io> | 2025-11-21 15:12:48 +0100 |
|---|---|---|
| committer | Eike Ziller <eike.ziller@qt.io> | 2025-12-04 08:04:23 +0000 |
| commit | 29ea533b3cdbfa1c31499a0ac0413ea7f8c25413 (patch) | |
| tree | 5215678d5fa98afbb2aa33c14a6955d4283a89c9 | |
| parent | fc38f9e5c31d997e0a053c27aa813838d224212e (diff) | |
Add to the event which of the design sub-modes was switched to.
Change-Id: I815a66ff187f412d5a7a60b5c9de695f045646f5
Reviewed-by: hjk <hjk@qt.io>
| -rw-r--r-- | src/usagestatisticplugin.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/usagestatisticplugin.cpp b/src/usagestatisticplugin.cpp index 6bad188..e76536a 100644 --- a/src/usagestatisticplugin.cpp +++ b/src/usagestatisticplugin.cpp @@ -19,6 +19,7 @@ #include <utils/temporaryfile.h> #include <utils/theme/theme.h> +#include <coreplugin/designmode.h> #include <coreplugin/dialogs/ioptionspage.h> #include <coreplugin/helpmanager.h> #include <coreplugin/icore.h> @@ -91,7 +92,10 @@ public: ModeChanges(QInsightTracker *tracker) { const auto id = [](const Id &modeId) -> QString { - return ":MODE:" + QString::fromUtf8(modeId.name()); + QString ret = ":MODE:" + QString::fromUtf8(modeId.name()); + if (modeId == Core::Constants::MODE_DESIGN) + ret += ":" + QString::fromUtf8(DesignMode::currentDesignWidget().name()); + return ret; }; connect(ModeManager::instance(), &ModeManager::currentModeChanged, this, [=](const Id &modeId) { tracker->transition(id(modeId)); |
