diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-10-09 17:15:36 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-10-10 10:06:54 +0000 |
commit | 28e4ed61af30c5ac1e776185c8e28d25a4145aee (patch) | |
tree | f037689fe1ebf3361af6dfdd850c953cf3a0f49e | |
parent | 95eb7943994787d15f24f844ad0d5d7ca9e3e827 (diff) |
CMake: Polish configuration check dialog
Polish "CMakeCache.txt is different from Project" dialog based on suggestions
by Cornelis Bockemühlmade on the Qt Creator mailing list.
Task-number: QTCREATORBUG-17555
Change-Id: I22e616bfef1ffd79590a93335a5e34364e1a4f3f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | src/plugins/cmakeprojectmanager/builddirmanager.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/plugins/cmakeprojectmanager/builddirmanager.cpp b/src/plugins/cmakeprojectmanager/builddirmanager.cpp index 0928b1d8d9..73402574cc 100644 --- a/src/plugins/cmakeprojectmanager/builddirmanager.cpp +++ b/src/plugins/cmakeprojectmanager/builddirmanager.cpp @@ -51,6 +51,8 @@ #include <QPushButton> #include <QSet> +#include <app/app_version.h> + using namespace ProjectExplorer; using namespace Utils; @@ -534,21 +536,27 @@ bool BuildDirManager::checkConfiguration() QStringList keyList = changedKeys.keys(); Utils::sort(keyList); QString table = QString::fromLatin1("<table><tr><th>%1</th><th>%2</th><th>%3</th></tr>") - .arg(tr("Key")).arg(tr("CMakeCache.txt")).arg(tr("Project")); + .arg(tr("Key")) + .arg(tr("%1 Project").arg(Core::Constants::IDE_DISPLAY_NAME)) + .arg(tr("Changed value")); foreach (const QString &k, keyList) { const QPair<QString, QString> data = changedKeys.value(k); table += QString::fromLatin1("\n<tr><td>%1</td><td>%2</td><td>%3</td></tr>") - .arg(k) - .arg(data.first.toHtmlEscaped()) - .arg(data.second.toHtmlEscaped()); + .arg(k) + .arg(data.second.toHtmlEscaped()) + .arg(data.first.toHtmlEscaped()); } table += QLatin1String("\n</table>"); QPointer<QMessageBox> box = new QMessageBox(Core::ICore::mainWindow()); - box->setText(tr("CMake configuration has changed on disk.")); + box->setText(tr("The project has been changed outside of %1.") + .arg(Core::Constants::IDE_DISPLAY_NAME)); box->setInformativeText(table); - auto *defaultButton = box->addButton(tr("Overwrite Changes in CMakeCache.txt"), QMessageBox::RejectRole); - auto *applyButton = box->addButton(tr("Apply Changes to Project"), QMessageBox::ApplyRole); + auto *defaultButton = box->addButton(tr("Discard external changes"), + QMessageBox::RejectRole); + auto *applyButton = box->addButton(tr("Adapt %1 project to changes") + .arg(Core::Constants::IDE_DISPLAY_NAME), + QMessageBox::ApplyRole); box->setDefaultButton(defaultButton); box->exec(); |