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 | |
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.
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.cxx | 35 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.h | 3 | ||||
-rw-r--r-- | Source/QtDialog/CMakeSetupDialog.ui | 5 | ||||
-rw-r--r-- | Source/QtDialog/QCMakeCacheView.cxx | 1 |
4 files changed, 24 insertions, 20 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); +} + diff --git a/Source/QtDialog/CMakeSetupDialog.h b/Source/QtDialog/CMakeSetupDialog.h index e67315a..db69981 100644 --- a/Source/QtDialog/CMakeSetupDialog.h +++ b/Source/QtDialog/CMakeSetupDialog.h @@ -52,7 +52,8 @@ protected slots: void setBinaryDirectory(const QString& dir); void showProgress(const QString& msg, float percent); void setEnabledState(bool); - //void promptForGenerator(); + void promptForGenerator(); + void updateGeneratorLabel(const QString& gen); protected: void closeEvent(QCloseEvent*); diff --git a/Source/QtDialog/CMakeSetupDialog.ui b/Source/QtDialog/CMakeSetupDialog.ui index e06c1ae..e8effac 100644 --- a/Source/QtDialog/CMakeSetupDialog.ui +++ b/Source/QtDialog/CMakeSetupDialog.ui @@ -91,16 +91,13 @@ </widget> </item> <item> - <widget class="QLabel" name="label_3" > + <widget class="QLabel" name="Generator" > <property name="text" > <string>Build For:</string> </property> </widget> </item> <item> - <widget class="QComboBox" name="Generators" /> - </item> - <item> <spacer> <property name="orientation" > <enum>Qt::Horizontal</enum> diff --git a/Source/QtDialog/QCMakeCacheView.cxx b/Source/QtDialog/QCMakeCacheView.cxx index 07b70af..630afb0 100644 --- a/Source/QtDialog/QCMakeCacheView.cxx +++ b/Source/QtDialog/QCMakeCacheView.cxx @@ -39,6 +39,7 @@ QCMakeCacheView::QCMakeCacheView(QWidget* p) this->AdvancedFilter->setFilterRegExp(AdvancedRegExp[0]); this->SearchFilter = new QSortFilterProxyModel(this); this->SearchFilter->setSourceModel(this->AdvancedFilter); + this->SearchFilter->setFilterCaseSensitivity(Qt::CaseInsensitive); this->setModel(this->SearchFilter); // our delegate for creating our editors |