From fc8485fe58c5f43fc227c6b390c299cfab7823c4 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 14 May 2010 18:58:37 +0200 Subject: Show faster url to load --- src/application.cpp | 4 ++++ src/urlbar/urlbar.cpp | 5 ++--- src/urlbar/urlbar.h | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/application.cpp b/src/application.cpp index b1419d00..e4279da0 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -319,6 +319,10 @@ void Application::loadUrl(const KUrl& url, const Rekonq::OpenType& type) break; }; + + // rapidly show first loading url.. + w->mainView()->urlBar()->setQUrl(url); + WebView *view = tab->view(); if (view) diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index b1bfb1c0..f11cfdeb 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -190,7 +190,7 @@ void UrlBar::paintEvent(QPaintEvent *event) // you need this before our code to draw inside the line edit.. KLineEdit::paintEvent(event); - if (text().isEmpty()) + if( text().isEmpty() && progr == 0 ) { QStyleOptionFrame option; initStyleOption(&option); @@ -305,7 +305,7 @@ void UrlBar::loadFinished() void UrlBar::loadTyped(const QString &text) { - activated(KUrl(text)); + activated( KUrl(text) ); } @@ -392,7 +392,6 @@ void UrlBar::resizeEvent(QResizeEvent *event) } KLineEdit::resizeEvent(event); - } diff --git a/src/urlbar/urlbar.h b/src/urlbar/urlbar.h index cda8a2e1..7fbe8bb4 100644 --- a/src/urlbar/urlbar.h +++ b/src/urlbar/urlbar.h @@ -90,9 +90,11 @@ public: void setPrivateMode(bool on); +public slots: + void setQUrl(const QUrl &url); + private slots: void activated(const KUrl& url, Rekonq::OpenType = Rekonq::CurrentTab); - void setQUrl(const QUrl &url); void loadFinished(); void loadTyped(const QString &); -- cgit v1.2.1