forked from qt-creator/qt-creator
Generic Project: improve filtering.
- When applying filter, always show items which were already in project. - Store the filter string in settings. Change-Id: I5b726ed0bde49d8ac48d4f2f4589b194fc557a95 Reviewed-by: Thorbjørn Lindeijer Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
committed by
Daniel Teske
parent
ccc55a6149
commit
a0605523ae
@@ -33,6 +33,7 @@
|
||||
#include "filesselectionwizardpage.h"
|
||||
|
||||
#include "genericprojectwizard.h"
|
||||
#include "genericprojectconstants.h"
|
||||
#include "selectablefilesmodel.h"
|
||||
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
@@ -56,7 +57,9 @@ FilesSelectionWizardPage::FilesSelectionWizardPage(GenericProjectWizardDialog *g
|
||||
hbox->addWidget(m_filterLabel);
|
||||
m_filterLineEdit = new QLineEdit;
|
||||
|
||||
m_filterLineEdit->setText("Makefile*; *.o; *.obj; *~; *.files; *.config; *.creator; *.user; *.includes");
|
||||
const QString filter = Core::ICore::settings()->value(Constants::FILEFILTER_SETTING,
|
||||
Constants::FILEFILTER_DEFAULT).toString();
|
||||
m_filterLineEdit->setText(filter);
|
||||
m_filterLineEdit->hide();
|
||||
hbox->addWidget(m_filterLineEdit);
|
||||
m_applyFilterButton = new QPushButton(tr("Apply Filter"), this);
|
||||
@@ -140,5 +143,7 @@ QStringList FilesSelectionWizardPage::selectedFiles() const
|
||||
|
||||
void FilesSelectionWizardPage::applyFilter()
|
||||
{
|
||||
m_model->applyFilter(m_filterLineEdit->text());
|
||||
const QString filter = m_filterLineEdit->text();
|
||||
Core::ICore::settings()->setValue(Constants::FILEFILTER_SETTING, filter);
|
||||
m_model->applyFilter(filter);
|
||||
}
|
||||
|
Reference in New Issue
Block a user