ENH: search is case insensitive
ENH: put back prompt for generator, and change combo to label showing current generator.
This commit is contained in:
parent
d0a7608bb1
commit
b61e5ff0f2
|
@ -155,9 +155,11 @@ void CMakeSetupDialog::initialize()
|
||||||
this->CacheValues, SLOT(setShowAdvanced(bool)));
|
this->CacheValues, SLOT(setShowAdvanced(bool)));
|
||||||
QObject::connect(this->Search, SIGNAL(textChanged(QString)),
|
QObject::connect(this->Search, SIGNAL(textChanged(QString)),
|
||||||
this->CacheValues, SLOT(setSearchFilter(QString)));
|
this->CacheValues, SLOT(setSearchFilter(QString)));
|
||||||
|
|
||||||
QStringList gens = this->CMakeThread->cmakeInstance()->availableGenerators();
|
QObject::connect(this->CMakeThread->cmakeInstance(),
|
||||||
this->Generators->addItems(gens);
|
SIGNAL(generatorChanged(QString)),
|
||||||
|
this, SLOT(updateGeneratorLabel(QString)));
|
||||||
|
this->updateGeneratorLabel(QString());
|
||||||
|
|
||||||
// get the saved binary directories
|
// get the saved binary directories
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
|
@ -172,13 +174,6 @@ void CMakeSetupDialog::initialize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this->BinaryDirectory->addItems(buildPaths);
|
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()
|
CMakeSetupDialog::~CMakeSetupDialog()
|
||||||
|
@ -213,14 +208,11 @@ void CMakeSetupDialog::doConfigure()
|
||||||
dir.mkpath(".");
|
dir.mkpath(".");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// prompt for generator if one doesn't exist
|
// prompt for generator if one doesn't exist
|
||||||
if(this->CMakeThread->cmakeInstance()->generator().isEmpty())
|
if(this->CMakeThread->cmakeInstance()->generator().isEmpty())
|
||||||
{
|
{
|
||||||
this->promptForGenerator();
|
this->promptForGenerator();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
this->CMakeThread->cmakeInstance()->setGenerator(this->Generators->currentText());
|
|
||||||
|
|
||||||
this->InterruptButton->setEnabled(true);
|
this->InterruptButton->setEnabled(true);
|
||||||
this->setEnabledState(false);
|
this->setEnabledState(false);
|
||||||
|
@ -405,7 +397,6 @@ void CMakeSetupDialog::setEnabledState(bool enabled)
|
||||||
this->CancelButton->setEnabled(enabled);
|
this->CancelButton->setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void CMakeSetupDialog::promptForGenerator()
|
void CMakeSetupDialog::promptForGenerator()
|
||||||
{
|
{
|
||||||
QStringList gens = this->CMakeThread->cmakeInstance()->availableGenerators();
|
QStringList gens = this->CMakeThread->cmakeInstance()->availableGenerators();
|
||||||
|
@ -428,5 +419,19 @@ void CMakeSetupDialog::promptForGenerator()
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
this->CMakeThread->cmakeInstance()->setGenerator(combo->currentText());
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,8 @@ protected slots:
|
||||||
void setBinaryDirectory(const QString& dir);
|
void setBinaryDirectory(const QString& dir);
|
||||||
void showProgress(const QString& msg, float percent);
|
void showProgress(const QString& msg, float percent);
|
||||||
void setEnabledState(bool);
|
void setEnabledState(bool);
|
||||||
//void promptForGenerator();
|
void promptForGenerator();
|
||||||
|
void updateGeneratorLabel(const QString& gen);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent*);
|
void closeEvent(QCloseEvent*);
|
||||||
|
|
|
@ -91,15 +91,12 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_3" >
|
<widget class="QLabel" name="Generator" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Build For:</string>
|
<string>Build For:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="Generators" />
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<spacer>
|
<spacer>
|
||||||
<property name="orientation" >
|
<property name="orientation" >
|
||||||
|
|
|
@ -39,6 +39,7 @@ QCMakeCacheView::QCMakeCacheView(QWidget* p)
|
||||||
this->AdvancedFilter->setFilterRegExp(AdvancedRegExp[0]);
|
this->AdvancedFilter->setFilterRegExp(AdvancedRegExp[0]);
|
||||||
this->SearchFilter = new QSortFilterProxyModel(this);
|
this->SearchFilter = new QSortFilterProxyModel(this);
|
||||||
this->SearchFilter->setSourceModel(this->AdvancedFilter);
|
this->SearchFilter->setSourceModel(this->AdvancedFilter);
|
||||||
|
this->SearchFilter->setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||||
this->setModel(this->SearchFilter);
|
this->setModel(this->SearchFilter);
|
||||||
|
|
||||||
// our delegate for creating our editors
|
// our delegate for creating our editors
|
||||||
|
|
Loading…
Reference in New Issue