aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/bookmarks/bookmarkswidget.cpp4
-rw-r--r--lib/bookmarks/bookmarkswidget.h2
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;