From 32d0da0ba3c17281c4a69ee84b42e98246eb3c5d Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 15 Sep 2009 12:58:56 +0200 Subject: First adjustments and code about it (it's really simple, anyway..Qt rocks!!!) --- src/homepage.cpp | 18 ++++++------------ src/mainview.cpp | 21 --------------------- src/mainview.h | 2 -- src/webpage.cpp | 3 +++ 4 files changed, 9 insertions(+), 35 deletions(-) diff --git a/src/homepage.cpp b/src/homepage.cpp index 52668036..0cd966f4 100644 --- a/src/homepage.cpp +++ b/src/homepage.cpp @@ -95,20 +95,14 @@ QString HomePage::speedDial() QString speed = QString(); for(int i = 0; i< urls.count(); ++i) { - QString fileName = QString("thumb") + QString::number(i) + QString(".png"); - QString path = KStandardDirs::locateLocal("cache", QString("thumbs/") + fileName, true); - if( !QFile::exists(path) ) - { - kDebug() << "websnap" << i << "========================================================="; - WebSnap *ws = new WebSnap(urls.at(i), fileName); - - // we need polish being in an extant object!! - connect(ws, SIGNAL(finished()), Application::instance()->mainWindow()->mainView(), SLOT(polish())); - } - + QString pageName = QString("page") + QString::number(i); + speed += "
"; speed += ""; - speed += "\"""; + speed += ""; + speed += ""; + speed += ""; +// speed += "\"""; speed += "
"; speed += names.at(i) + "
"; } diff --git a/src/mainview.cpp b/src/mainview.cpp index 2a3545b4..038562e8 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -594,24 +594,3 @@ KUrl::List MainView::recentlyClosedTabs() { return m_recentlyClosedTabs; } - - -void MainView::polish() -{ - static int i = 0; - WebSnap *ws = qobject_cast(sender()); - delete ws; - - i++; - if(i<9) - { - WebView *w = currentWebView(); - HomePage p(w); - w->setHtml( p.rekonqHomePage() ); - kDebug() << "ciao---------------------------------------------____"; - } - else - { - kDebug() << "EROORORORORORORORORORO"; - } -} diff --git a/src/mainview.h b/src/mainview.h index 1ba4a63d..8a5c5cfa 100644 --- a/src/mainview.h +++ b/src/mainview.h @@ -124,8 +124,6 @@ public slots: void slotWebReload(); void slotWebStop(); - void polish(); - private slots: void slotCurrentChanged(int index); diff --git a/src/webpage.cpp b/src/webpage.cpp index b33d2cce..ea902932 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -73,6 +73,9 @@ WebPage::WebPage(QObject *parent) , m_pressedButtons(Qt::NoButton) , m_requestedUrl() { + // Enable plugin support + settings()->setAttribute(QWebSettings::PluginsEnabled, true); + setForwardUnsupportedContent(true); setNetworkAccessManager(Application::networkAccessManager()); -- cgit v1.2.1