aboutsummaryrefslogtreecommitdiff
path: root/src/lib/bookmarks
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-12-29 17:33:47 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-12-29 17:33:47 +0100
commit62a6f626620b46a8649f2ebbaa4748afeb558e48 (patch)
tree4515ba1d3c24fecf7507bfaefb1ad64f6a685404 /src/lib/bookmarks
parentOff-the-record profile settings (diff)
downloadsmolbote-62a6f626620b46a8649f2ebbaa4748afeb558e48.tar.xz
Using QCompleter to provide address bar completions
- known issue: it doesn't search trees well
Diffstat (limited to 'src/lib/bookmarks')
-rw-r--r--src/lib/bookmarks/bookmarkswidget.cpp5
-rw-r--r--src/lib/bookmarks/bookmarkswidget.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/bookmarks/bookmarkswidget.cpp b/src/lib/bookmarks/bookmarkswidget.cpp
index 10a5424..cb191c7 100644
--- a/src/lib/bookmarks/bookmarkswidget.cpp
+++ b/src/lib/bookmarks/bookmarkswidget.cpp
@@ -75,6 +75,11 @@ QStringList BookmarksWidget::bookmarksFor(const QString &term)
return ret;
}
+QAbstractItemModel *BookmarksWidget::model() const
+{
+ return ui->treeWidget->model();
+}
+
QStringList BookmarksWidget::searchItem(QTreeWidgetItem *item, const QString &term)
{
if(item->text(1).contains(term)) {
diff --git a/src/lib/bookmarks/bookmarkswidget.h b/src/lib/bookmarks/bookmarkswidget.h
index 5e5af12..aa188b2 100644
--- a/src/lib/bookmarks/bookmarkswidget.h
+++ b/src/lib/bookmarks/bookmarkswidget.h
@@ -11,6 +11,7 @@
#include <QWidget>
#include "xbel.h"
+#include <QAbstractItemModel>
namespace Ui {
class BookmarksDialog;
@@ -31,6 +32,7 @@ signals:
public slots:
QStringList bookmarksFor(const QString &term);
+ QAbstractItemModel *model() const;
private slots:
void openItem(QTreeWidgetItem *item, int column);