summaryrefslogtreecommitdiff
path: root/src/urlbar/completionwidget.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-04-16 03:14:48 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-04-16 03:14:48 +0200
commit72e0446fbc7017e7703102f733568a4f2e3c5195 (patch)
tree597f9ae450fc7e751688d1b060cd558b59aa2884 /src/urlbar/completionwidget.cpp
parentMerge commit 'refs/merge-requests/77' of git://gitorious.org/rekonq/mainline ... (diff)
downloadrekonq-72e0446fbc7017e7703102f733568a4f2e3c5195.tar.xz
Fixing Lionel's merge request:
- clean/fix APIs - removed no more used methods/signals from CompletionWidget - use item->url() (as it has been defined) - Change the "pointing out text" from underline to bold (better, IMO) - QString --> Q/K url, as needed - Restore UrlFromUserInput engine: why it has been deleted? - Comment out the isHttp() check. That way I cannot in any way connect to localhost or to my home server. Apart from typing their IPs.. - Partially fixed the switch search engine implementation. Btw, I have to say I really don't like rekonq switch my default engine just because one time I decided to give a try to another... Not sure about. - Something more coming.. But tomorrow! Now it's 3:20 am here. Good night!
Diffstat (limited to 'src/urlbar/completionwidget.cpp')
-rw-r--r--src/urlbar/completionwidget.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index 42824af9..83e99f9d 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -45,8 +45,8 @@
#include <QKeyEvent>
-CompletionWidget::CompletionWidget( QWidget *parent)
- :QFrame( parent, Qt::ToolTip)
+CompletionWidget::CompletionWidget(QWidget *parent)
+ : QFrame( parent, Qt::ToolTip)
, _parent(parent)
, _currentIndex(-1)
{
@@ -206,12 +206,12 @@ bool CompletionWidget::eventFilter( QObject *o, QEvent *e )
case Qt::Key_Enter:
case Qt::Key_Return:
- hide();
- if(_currentIndex >= 0)
- emit chosenUrl(_list.at(_currentIndex).url, Rekonq::CurrentTab);
- else
- emit loadTypedUrl();
+
+ // need this to let ListItem magic work..
+ ListItem *child = findChild<ListItem *>( QString::number(_currentIndex) );
+ emit chosenUrl( child->url(), Rekonq::CurrentTab);
ev->accept();
+ hide();
return true;
break;
}
@@ -233,6 +233,7 @@ void CompletionWidget::setVisible( bool visible )
Application::instance()->removeEventFilter(this);
}
+
QFrame::setVisible(visible);
}
@@ -240,8 +241,8 @@ void CompletionWidget::setVisible( bool visible )
void CompletionWidget::itemChosen(ListItem *item, Qt::MouseButton button)
{
if(button == Qt::MidButton)
- emit chosenUrl(_list.at(layout()->indexOf(item)).url, Rekonq::NewCurrentTab);
+ emit chosenUrl( item->url(), Rekonq::NewCurrentTab);
else
- emit chosenUrl(_list.at(layout()->indexOf(item)).url, Rekonq::CurrentTab);
+ emit chosenUrl( item->url(), Rekonq::CurrentTab);
hide();
}