aboutsummaryrefslogtreecommitdiff
path: root/src/addressbar/completer.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-04-17 01:38:07 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-04-17 01:38:07 +0200
commit74a7ea3732853f954fcab7088acaa2413fc3e7c1 (patch)
tree02ca9dd6f0dd4ea1b18346d4c6004c74c504d04f /src/addressbar/completer.cpp
parentMultiple subwindows interface (diff)
downloadsmolbote-74a7ea3732853f954fcab7088acaa2413fc3e7c1.tar.xz
Enabled address bar suggestions
Also fixed occasional bug when showing the completer.
Diffstat (limited to 'src/addressbar/completer.cpp')
-rw-r--r--src/addressbar/completer.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/addressbar/completer.cpp b/src/addressbar/completer.cpp
index 5d64dd7..e02610a 100644
--- a/src/addressbar/completer.cpp
+++ b/src/addressbar/completer.cpp
@@ -15,19 +15,12 @@ Completer::Completer(QWidget *parent)
setWindowFlags(Qt::ToolTip);
}
-bool Completer::updateItems(const QList<QTreeWidgetItem *> &list)
+bool Completer::updateItems(QStringList &list)
{
if(list.isEmpty())
return false;
- // list is not empty
- QStringList l;
- for(QTreeWidgetItem *item : list) {
- if(!item->text(1).isEmpty())
- l.append(item->text(1));
- }
-
- auto *model = new QStringListModel(l, this);
+ auto *model = new QStringListModel(list, this);
setModel(model);
delete completionModel;