[cmake-commits] clinton committed CMakeSetupDialog.cxx 1.6 1.7
CMakeSetupDialog.h 1.7 1.8 CMakeSetupDialog.ui 1.4 1.5
QCMakeCacheView.cxx 1.7 1.8
cmake-commits at cmake.org
cmake-commits at cmake.org
Tue Nov 6 00:02:11 EST 2007
Update of /cvsroot/CMake/CMake/Source/QtDialog
In directory public:/mounts/ram/cvs-serv12147
Modified Files:
CMakeSetupDialog.cxx CMakeSetupDialog.h CMakeSetupDialog.ui
QCMakeCacheView.cxx
Log Message:
ENH: search is case insensitive
ENH: put back prompt for generator, and change combo to label
showing current generator.
Index: CMakeSetupDialog.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- CMakeSetupDialog.cxx 6 Nov 2007 00:26:18 -0000 1.6
+++ CMakeSetupDialog.cxx 6 Nov 2007 05:02:08 -0000 1.7
@@ -155,9 +155,11 @@
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 @@
}
}
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 @@
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 @@
this->CancelButton->setEnabled(enabled);
}
-/*
void CMakeSetupDialog::promptForGenerator()
{
QStringList gens = this->CMakeThread->cmakeInstance()->availableGenerators();
@@ -428,5 +419,19 @@
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);
+}
+
Index: CMakeSetupDialog.ui
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.ui,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CMakeSetupDialog.ui 6 Nov 2007 00:26:18 -0000 1.4
+++ CMakeSetupDialog.ui 6 Nov 2007 05:02:08 -0000 1.5
@@ -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>
Index: CMakeSetupDialog.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/CMakeSetupDialog.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CMakeSetupDialog.h 6 Nov 2007 00:26:18 -0000 1.7
+++ CMakeSetupDialog.h 6 Nov 2007 05:02:08 -0000 1.8
@@ -52,7 +52,8 @@
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*);
Index: QCMakeCacheView.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/QtDialog/QCMakeCacheView.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- QCMakeCacheView.cxx 6 Nov 2007 00:26:18 -0000 1.7
+++ QCMakeCacheView.cxx 6 Nov 2007 05:02:08 -0000 1.8
@@ -39,6 +39,7 @@
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
More information about the Cmake-commits
mailing list