diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-17 13:36:08 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-17 13:36:08 +0200 |
commit | 1e99b19616f102b57f52dfc01ea3ccdb6a24a607 (patch) | |
tree | 120672a1635e3bc2110b780d93afbfe0a9f30216 /lib | |
parent | Address bar searches work again (diff) | |
download | smolbote-1e99b19616f102b57f52dfc01ea3ccdb6a24a607.tar.xz |
Add loading progess bar to the address bar
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bookmarks/bookmarkswidget.cpp | 4 | ||||
-rw-r--r-- | lib/bookmarks/bookmarkswidget.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/bookmarks/bookmarkswidget.cpp b/lib/bookmarks/bookmarkswidget.cpp index b5bf471..339e913 100644 --- a/lib/bookmarks/bookmarkswidget.cpp +++ b/lib/bookmarks/bookmarkswidget.cpp @@ -129,7 +129,7 @@ void BookmarksWidget::save() } } -QStringList BookmarksWidget::search(const QString& term) const +void BookmarksWidget::search(const QString& term, std::function<void(QStringList&)> callback) const { QStringList ret; const QList<QTreeWidgetItem *> res = ui->treeWidget->findItems(term, Qt::MatchContains | Qt::MatchRecursive, 1); @@ -138,5 +138,5 @@ QStringList BookmarksWidget::search(const QString& term) const ret.append(i->text(1)); } - return ret; + callback(ret); } diff --git a/lib/bookmarks/bookmarkswidget.h b/lib/bookmarks/bookmarkswidget.h index f0cd73d..6322918 100644 --- a/lib/bookmarks/bookmarkswidget.h +++ b/lib/bookmarks/bookmarkswidget.h @@ -35,7 +35,7 @@ signals: void openUrl(const QUrl &url); public slots: - QStringList search(const QString &term) const; + void search(const QString &term, std::function<void(QStringList&)> callback) const; private: Ui::BookmarksDialog *ui; |