mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
Merge topic 'cmake-gui-restore-search' into release-3.20
134d69121e cmake-gui: Restore search bar for cache view and environment dialog
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5845
This commit is contained in:
@@ -110,8 +110,14 @@ EnvironmentDialog::EnvironmentDialog(const QProcessEnvironment& environment,
|
||||
&EnvironmentDialog::addEntry);
|
||||
QObject::connect(this->RemoveEntry, &QAbstractButton::clicked, this,
|
||||
&EnvironmentDialog::removeSelectedEntries);
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
QObject::connect(this->Search, &QLineEdit::textChanged, this->m_filter,
|
||||
QOverload<const QString&>::of(
|
||||
&EnvironmentSearchFilter::setFilterRegularExpression));
|
||||
#else
|
||||
QObject::connect(this->Search, &QLineEdit::textChanged, this->m_filter,
|
||||
&EnvironmentSearchFilter::setFilterFixedString);
|
||||
#endif
|
||||
QObject::connect(this->Environment->selectionModel(),
|
||||
&QItemSelectionModel::selectionChanged, this,
|
||||
&EnvironmentDialog::selectionChanged);
|
||||
|
||||
@@ -170,7 +170,11 @@ bool QCMakeCacheView::showAdvanced() const
|
||||
|
||||
void QCMakeCacheView::setSearchFilter(const QString& s)
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
|
||||
this->SearchFilter->setFilterRegularExpression(s);
|
||||
#else
|
||||
this->SearchFilter->setFilterFixedString(s);
|
||||
#endif
|
||||
}
|
||||
|
||||
QCMakeCacheModel::QCMakeCacheModel(QObject* p)
|
||||
|
||||
Reference in New Issue
Block a user