From a7d3f9fdba5512d84b0c0db5e5439ecb247d1667 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 28 Jan 2022 15:41:32 +0100 Subject: [PATCH] CMakePM: Display current value in CMake settings as tooltip If you change the value of a CMake parameter in CMake settings the new value was not displayed in the tooltip, the old value was. Change-Id: Ie182ef42f8bf48651d170da8054d7f60f9080088 Reviewed-by: Reviewed-by: Alessandro Portale --- src/plugins/cmakeprojectmanager/configmodel.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/configmodel.cpp b/src/plugins/cmakeprojectmanager/configmodel.cpp index fe11f9367b5..15e2de1f021 100644 --- a/src/plugins/cmakeprojectmanager/configmodel.cpp +++ b/src/plugins/cmakeprojectmanager/configmodel.cpp @@ -526,10 +526,9 @@ QString ConfigModelTreeItem::toolTip() const tooltip << QCoreApplication::translate("CMakeProjectManager", "

Kit: %1

") .arg(dataItem->kitValue); - if (dataItem->value != dataItem->newValue) - tooltip << QCoreApplication::translate("CMakeProjectManager", - "

Initial Configuration: %1

") - .arg(dataItem->value); + tooltip << QCoreApplication::translate("CMakeProjectManager", + "

Initial Configuration: %1

") + .arg(dataItem->currentValue()); } else { if (!dataItem->initialValue.isEmpty()) tooltip << QCoreApplication::translate("CMakeProjectManager", @@ -537,10 +536,9 @@ QString ConfigModelTreeItem::toolTip() const .arg(dataItem->initialValue); if (dataItem->inCMakeCache) { - if (dataItem->value != dataItem->newValue) - tooltip << QCoreApplication::translate("CMakeProjectManager", - "

Current Configuration: %1

") - .arg(dataItem->value); + tooltip << QCoreApplication::translate("CMakeProjectManager", + "

Current Configuration: %1

") + .arg(dataItem->currentValue()); } else { tooltip << QCoreApplication::translate("CMakeProjectManager", "

Not in CMakeCache.txt

");