1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

[Cookie Manager] Reset search text on refresh.

This commit is contained in:
S. Razi Alavizadeh 2013-02-14 22:20:29 +03:30
parent e934af92bf
commit c41e17611a
3 changed files with 6 additions and 2 deletions

View File

@ -158,6 +158,10 @@ void CookieManager::currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem
void CookieManager::refreshTable() void CookieManager::refreshTable()
{ {
disconnect(ui->search, SIGNAL(textChanged(QString)), ui->cookieTree, SLOT(filterString(QString)));
ui->search->clear();
connect(ui->search, SIGNAL(textChanged(QString)), ui->cookieTree, SLOT(filterString(QString)));
QTimer::singleShot(0, this, SLOT(slotRefreshTable())); QTimer::singleShot(0, this, SLOT(slotRefreshTable()));
QTimer::singleShot(0, this, SLOT(slotRefreshFilters())); QTimer::singleShot(0, this, SLOT(slotRefreshFilters()));
} }

View File

@ -326,7 +326,7 @@ QList<QTreeWidgetItem*> TreeWidget::allItems()
return m_allTreeItems; return m_allTreeItems;
} }
void TreeWidget::filterString(QString string) void TreeWidget::filterString(const QString &string)
{ {
expandAll(); expandAll();
QList<QTreeWidgetItem*> _allItems = allItems(); QList<QTreeWidgetItem*> _allItems = allItems();

View File

@ -55,7 +55,7 @@ signals:
void folderParentChanged(const QString &name, bool isSubfolder, bool* ok); void folderParentChanged(const QString &name, bool isSubfolder, bool* ok);
public slots: public slots:
void filterString(QString string); void filterString(const QString &string);
void clear(); void clear();
private slots: private slots: