forked from qt-creator/qt-creator
Fix crash when filtering in the preferences.
Need to ensure creation of all tabs before even the proxy model is informed. Task-number: QTCREATORBUG-4272 Reviewed-by: Robert Loehning
This commit is contained in:
@@ -318,6 +318,8 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
|
|||||||
|
|
||||||
// The order of the slot connection matters here, the filter slot
|
// The order of the slot connection matters here, the filter slot
|
||||||
// opens the matching page after the model has filtered.
|
// opens the matching page after the model has filtered.
|
||||||
|
connect(m_filterLineEdit, SIGNAL(filterChanged(QString)),
|
||||||
|
this, SLOT(ensureAllCategoryWidgets()));
|
||||||
connect(m_filterLineEdit, SIGNAL(filterChanged(QString)),
|
connect(m_filterLineEdit, SIGNAL(filterChanged(QString)),
|
||||||
m_proxyModel, SLOT(setFilterFixedString(QString)));
|
m_proxyModel, SLOT(setFilterFixedString(QString)));
|
||||||
connect(m_filterLineEdit, SIGNAL(filterChanged(QString)), this, SLOT(filter(QString)));
|
connect(m_filterLineEdit, SIGNAL(filterChanged(QString)), this, SLOT(filter(QString)));
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ private slots:
|
|||||||
void currentChanged(const QModelIndex ¤t);
|
void currentChanged(const QModelIndex ¤t);
|
||||||
void currentTabChanged(int);
|
void currentTabChanged(int);
|
||||||
void filter(const QString &text);
|
void filter(const QString &text);
|
||||||
|
void ensureAllCategoryWidgets();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SettingsDialog(QWidget *parent);
|
SettingsDialog(QWidget *parent);
|
||||||
@@ -98,7 +99,6 @@ private:
|
|||||||
void showPage(const QString &categoryId, const QString &pageId);
|
void showPage(const QString &categoryId, const QString &pageId);
|
||||||
void updateEnabledTabs(Category *category, const QString &searchText);
|
void updateEnabledTabs(Category *category, const QString &searchText);
|
||||||
void ensureCategoryWidget(Category *category);
|
void ensureCategoryWidget(Category *category);
|
||||||
void ensureAllCategoryWidgets();
|
|
||||||
void disconnectTabWidgets();
|
void disconnectTabWidgets();
|
||||||
|
|
||||||
const QList<Core::IOptionsPage*> m_pages;
|
const QList<Core::IOptionsPage*> m_pages;
|
||||||
|
|||||||
Reference in New Issue
Block a user