diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2010-01-23 23:23:51 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2010-01-23 23:23:51 +0100 |
commit | ade414e7ec17d267ba2382fadd6be2ed9ea89a45 (patch) | |
tree | 465388204a3fdf507df263f3c58e8d67e58be637 /src/previewimage.cpp | |
parent | Be sure you need to resolv url... (diff) | |
download | rekonq-ade414e7ec17d267ba2382fadd6be2ed9ea89a45.tar.xz |
Here we are, with this commit I removed a lot of direct calls to
Application::loadUrl slot and changed it to signals emitted there.
This to let rekonq managing them and faster return to the main event
loop (and hopefully don't freeze).
Next step here is change loadUrl slot to a multithreaded one.
Diffstat (limited to 'src/previewimage.cpp')
-rw-r--r-- | src/previewimage.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp index 80757ca2..9c8bb194 100644 --- a/src/previewimage.cpp +++ b/src/previewimage.cpp @@ -29,7 +29,6 @@ #include "previewimage.moc" // Local Includes -#include "application.h" #include "historymanager.h" #include "rekonq.h" #include "mainwindow.h" @@ -103,6 +102,9 @@ PreviewImage::PreviewImage(const QUrl &url, const QString &title, int index, boo layout()->setAlignment(Qt::AlignCenter); layout()->addWidget(m_previewLabel); + connect(this, SIGNAL(loadUrl(const KUrl &, const Rekonq::OpenType &)), + Application::instance(), SLOT(loadUrl(const KUrl &, const Rekonq::OpenType &))); + loadUrlPreview(url); } @@ -260,12 +262,12 @@ void PreviewImage::mousePressEvent(QMouseEvent *event) { if(event->button() == Qt::LeftButton) { - Application::instance()->loadUrl(m_url); + emit loadUrl(m_url, Rekonq::CurrentTab); return; } else if(event->button() == Qt::MidButton) { - Application::instance()->loadUrl(m_url, Rekonq::SettingOpenTab); + emit loadUrl(m_url, Rekonq::SettingOpenTab); return; } |