diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2007-11-06 05:02:08 (GMT) |
---|---|---|
committer | Clinton Stimpson <clinton@elemtech.com> | 2007-11-06 05:02:08 (GMT) |
commit | b61e5ff0f2dd231813af7a157e042682aae69fb6 (patch) | |
tree | e960d3fb48d6bb5815342e048751d3a4dccd3f37 /Source/QtDialog/CMakeSetupDialog.cxx | |
parent | d0a7608bb1e7c5e722cb7d4cdfac73c0de7e572e (diff) | |
download | CMake-b61e5ff0f2dd231813af7a157e042682aae69fb6.zip CMake-b61e5ff0f2dd231813af7a157e042682aae69fb6.tar.gz CMake-b61e5ff0f2dd231813af7a157e042682aae69fb6.tar.bz2 |
ENH: search is case insensitive
ENH: put back prompt for generator, and change combo to label
showing current generator.
Diffstat (limited to 'Source/QtDialog/CMakeSetupDialog.cxx')
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/Source/QtDialog/CMakeSetupDialog.cxx b/Source/QtDialog/CMakeSetupDialog.cxx index 36adc33..fab0b13 100644 --- a/Source/QtDialog/CMakeSetupDialog.cxx +++ b/Source/QtDialog/CMakeSetupDialog.cxx @@ -155,9 +155,11 @@ void CMakeSetupDialog::initialize() this->CacheValues, SLOT(setShowAdvanced(bool))); QObject::connect(this->Search, SIGNAL(textChanged(QString)), this->CacheValues, SLOT(setSearchFilter(QString))); - - QStringList gens = this->CMakeThread->cmakeInstance()->availableGenerators(); - this->Generators->addItems(gens); + + QObject::connect(this->CMakeThread->cmakeInstance(), + SIGNAL(generatorChanged(QString)), + this, SLOT(updateGeneratorLabel(QString))); + this->updateGeneratorLabel(QString()); // get the saved binary directories QSettings settings; @@ -172,13 +174,6 @@ void CMakeSetupDialog::initialize() } } this->BinaryDirectory->addItems(buildPaths); - - QString lastGen = settings.value("LastGenerator").toString(); - int idx = this->Generators->findText(lastGen); - if(idx != -1) - { - this->Generators->setCurrentIndex(idx); - } } CMakeSetupDialog::~CMakeSetupDialog() @@ -213,14 +208,11 @@ void CMakeSetupDialog::doConfigure() dir.mkpath("."); } - /* // prompt for generator if one doesn't exist if(this->CMakeThread->cmakeInstance()->generator().isEmpty()) { this->promptForGenerator(); } - */ - this->CMakeThread->cmakeInstance()->setGenerator(this->Generators->currentText()); this->InterruptButton->setEnabled(true); this->setEnabledState(false); @@ -405,7 +397,6 @@ void CMakeSetupDialog::setEnabledState(bool enabled) this->CancelButton->setEnabled(enabled); } -/* void CMakeSetupDialog::promptForGenerator() { QStringList gens = this->CMakeThread->cmakeInstance()->availableGenerators(); @@ -428,5 +419,19 @@ void CMakeSetupDialog::promptForGenerator() dialog.exec(); this->CMakeThread->cmakeInstance()->setGenerator(combo->currentText()); } -*/ + +void CMakeSetupDialog::updateGeneratorLabel(const QString& gen) +{ + QString str = tr("Build for: "); + if(gen.isEmpty()) + { + str += tr("None"); + } + else + { + str += gen; + } + this->Generator->setText(str); +} + |