diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-04-14 11:59:43 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-04-14 11:59:43 +0200 |
commit | c05b14ad0f8358171f4dc199e61dc0a259d0aa65 (patch) | |
tree | 37679c4f73129cb88d69ae09329ab8fb9ee25af0 | |
parent | Set default background to white (diff) | |
download | rekonq-c05b14ad0f8358171f4dc199e61dc0a259d0aa65.tar.xz |
Proper solutions are always the best ones :)
Fix duplicated right icons.
CCBUG: 234320
-rw-r--r-- | src/protocolhandler.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/lineedit.h | 7 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 6 |
3 files changed, 6 insertions, 9 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 1458bdf5..c97bc475 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -146,8 +146,6 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra break; } } - - Application::instance()->mainWindow()->mainView()->urlBar()->clearRightIcons(); NewTabPage p(frame); p.generate(_url); diff --git a/src/urlbar/lineedit.h b/src/urlbar/lineedit.h index 5b8ff2a3..68cdc7d1 100644 --- a/src/urlbar/lineedit.h +++ b/src/urlbar/lineedit.h @@ -77,9 +77,7 @@ public: virtual ~LineEdit(); IconButton *iconButton() const; - - void clearRightIcons(); - + protected: virtual void keyPressEvent(QKeyEvent *); virtual void mouseDoubleClickEvent(QMouseEvent *); @@ -88,6 +86,9 @@ protected: IconButton *addRightIcon(LineEdit::icon ); +private slots: + void clearRightIcons(); + private: IconButton *_icon; IconButtonPointerList _rightIconsList; diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index dcdda533..051277e2 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -67,7 +67,8 @@ UrlBar::UrlBar(QWidget *parent) connect(_tab->view(), SIGNAL(urlChanged(const QUrl &)), this, SLOT(setQUrl(const QUrl &))); connect(_tab->view(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished())); - + connect(_tab->view(), SIGNAL(loadStarted()), this, SLOT(clearRightIcons())); + // suggestions installEventFilter(_box); connect(_box, SIGNAL(chosenUrl(const KUrl &, Rekonq::OpenType)), SLOT(activated(const KUrl &, Rekonq::OpenType))); @@ -83,9 +84,6 @@ UrlBar::~UrlBar() void UrlBar::setQUrl(const QUrl& url) { - // find a better place? Ideally a loadStarted connected slot.. - clearRightIcons(); - if(url.scheme() == QL1S("about") ) { iconButton()->setIcon( KIcon("arrow-right") ); |