diff options
author | Brad King <brad.king@kitware.com> | 2020-06-02 13:17:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-02 13:17:24 (GMT) |
commit | 961ca77a7a272fb5cde7e07671a51e9110f9ef36 (patch) | |
tree | 86a6f8090aba5c7fd613603db642ce89f2237d8c /Source/QtDialog/CMakeSetupDialog.cxx | |
parent | a432b1075c8808c6e4c925d3f4d4ce94c5477bab (diff) | |
parent | e1b2c0108f84ff6deaae8c4469a871caf4854a9c (diff) | |
download | CMake-961ca77a7a272fb5cde7e07671a51e9110f9ef36.zip CMake-961ca77a7a272fb5cde7e07671a51e9110f9ef36.tar.gz CMake-961ca77a7a272fb5cde7e07671a51e9110f9ef36.tar.bz2 |
Merge topic 'gitlab-ci-ninja-multi'
e1b2c0108f gitlab-ci: add a Ninja Multi-Config test job
1e8ecfccdd gitlab-ci: also build ncurses and Qt code on Linux
95721f0a82 ci: install ncurses and Qt development into the Fedora 31 image
ed2fe558b0 CursesDialog: resolve clang-tidy warnings
44f1744bed QtDialog: avoid using deprecated APIs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4832
Diffstat (limited to 'Source/QtDialog/CMakeSetupDialog.cxx')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 930f300..6dbfe11 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -595,7 +595,11 @@ void CMakeSetupDialog::doHelp() QDialog dialog; QFontMetrics met(this->font()); +#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) + int msgWidth = met.horizontalAdvance(msg); +#else int msgWidth = met.width(msg); +#endif dialog.setMinimumSize(msgWidth / 15, 20); dialog.setWindowTitle(tr("Help")); QVBoxLayout* l = new QVBoxLayout(&dialog); @@ -1056,14 +1060,7 @@ void CMakeSetupDialog::enterState(CMakeSetupDialog::State s) this->GenerateAction->setEnabled(false); this->OpenProjectButton->setEnabled(false); this->GenerateButton->setText(tr("&Stop")); - } else if (s == ReadyConfigure) { - this->setEnabledState(true); - this->GenerateButton->setEnabled(true); - this->GenerateAction->setEnabled(true); - this->ConfigureButton->setEnabled(true); - this->ConfigureButton->setText(tr("&Configure")); - this->GenerateButton->setText(tr("&Generate")); - } else if (s == ReadyGenerate) { + } else if (s == ReadyConfigure || s == ReadyGenerate) { this->setEnabledState(true); this->GenerateButton->setEnabled(true); this->GenerateAction->setEnabled(true); |