summaryrefslogtreecommitdiff
path: root/src/urlbar/completionwidget.cpp
diff options
context:
space:
mode:
authorlionelc <lionelc@lionelc.(none)>2010-04-01 19:53:18 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-02 22:01:33 +0200
commitb18f2e5dfcc17615d73fdbd20cb4e312ea83dfaf (patch)
tree00fb0c3437445658a7eec270b0d5c24ff8e1e22a /src/urlbar/completionwidget.cpp
parentmanage common item of bookmarks and history (diff)
downloadrekonq-b18f2e5dfcc17615d73fdbd20cb4e312ea83dfaf.tar.xz
multiple icons for type of items
display icon of website
Diffstat (limited to 'src/urlbar/completionwidget.cpp')
-rw-r--r--src/urlbar/completionwidget.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index 27fcfbad..740f1471 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -44,9 +44,6 @@
#include <QEvent>
#include <QKeyEvent>
-// Defines
-#define MAX_ELEMENTS 9
-
CompletionWidget::CompletionWidget( QWidget *parent)
:QFrame( parent, Qt::ToolTip)
@@ -68,16 +65,12 @@ CompletionWidget::CompletionWidget( QWidget *parent)
void CompletionWidget::insertSearchList(const UrlSearchList &list)
{
_list = list;
- int min = MAX_ELEMENTS;
- if(list.count() < min)
- min = list.count();
-
- for(int i = 0; i<min ; ++i)
+ int i=0;
+ foreach(UrlSearchItem item, _list)
{
- UrlSearchItem item = list.at(i);
ListItem *suggestion = new ListItem(item);
connect(suggestion, SIGNAL(itemClicked(ListItem *, Qt::MouseButton)), this, SLOT(itemChosen(ListItem *, Qt::MouseButton)));
- suggestion->setObjectName( QString::number(i) );
+ suggestion->setObjectName( QString::number(i++) );
layout()->addWidget( suggestion );
}
}