From 86abda20b0d5dc83a8949ad96e3453054a5ce024 Mon Sep 17 00:00:00 2001 From: Shrief Gabr Date: Wed, 24 Jul 2024 10:52:14 +0300 Subject: [PATCH] QmlDesigner: Prompt to restart only if Insight Tracker status is changed Fixes: QDS-13262 Change-Id: Ia295cb13752077366ec13cb2b9b5b76825ea2acf Reviewed-by: Mahmoud Badri --- src/plugins/studiowelcome/studiowelcomeplugin.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp index 0094dace5d2..0a856fcccf2 100644 --- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp +++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp @@ -214,6 +214,11 @@ public: Q_INVOKABLE void setInsightEnabled(bool b) { + bool currentTrackingStatus = Core::ICore::settings()->value("InsightTracking", false).toBool(); + + if (currentTrackingStatus == b) + return; + Core::ICore::settings()->setValue("InsightTracking", b); Core::ICore::askForRestart(tr("The change will take effect after restart.")); }