From 370d5677ba15c4e41ba2513bbeed266fe69cbe41 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 22 May 2010 23:43:46 +0200 Subject: Cleaning some kDebug calls --- src/adblock/adblockmanager.cpp | 5 ++--- src/clicktoflash.cpp | 2 +- src/history/historymanager.cpp | 4 ++-- src/mainwindow.cpp | 4 +--- src/protocolhandler.cpp | 9 +------- src/sessionmanager.cpp | 47 +++++++++++++++++++++--------------------- src/webpage.cpp | 15 +++----------- 7 files changed, 34 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp index 48e2369d..39432f88 100644 --- a/src/adblock/adblockmanager.cpp +++ b/src/adblock/adblockmanager.cpp @@ -114,6 +114,7 @@ void AdBlockManager::loadSettings(bool checkUpdateDate) void AdBlockManager::loadRules(const QStringList &rules) { + kDebug() << "LOADING RULES LIST..."; foreach(const QString &stringRule, rules) { // ! rules are comments @@ -259,15 +260,14 @@ void AdBlockManager::updateNextSubscription() void AdBlockManager::slotResult(KJob *job) { - kDebug() << "SLOTRESULT"; if (job->error()) return; + kDebug() << "SAVING RULES.."; QList list = _buffer.split('\n'); QStringList ruleList; foreach(const QByteArray &ba, list) { - kDebug() << ba; ruleList << QString(ba); } loadRules(ruleList); @@ -282,7 +282,6 @@ void AdBlockManager::slotResult(KJob *job) void AdBlockManager::subscriptionData(KIO::Job* job, const QByteArray& data) { - kDebug() << "subscriptionData"; Q_UNUSED(job) if (data.isEmpty()) diff --git a/src/clicktoflash.cpp b/src/clicktoflash.cpp index e9174470..051919fd 100644 --- a/src/clicktoflash.cpp +++ b/src/clicktoflash.cpp @@ -93,7 +93,6 @@ void ClickToFlash::load() { if (checkElement(element)) { - kDebug() << "RETURNED TRUE ..........................."; QWebElement substitute = element.clone(); emit signalLoadClickToFlash(true); element.replace(substitute); @@ -108,6 +107,7 @@ void ClickToFlash::load() bool ClickToFlash::checkElement(QWebElement el) { + // check these two values.. kDebug() << "src: " << QUrl(el.attribute("src")); kDebug() << "url: " << m_url; diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp index 8a29aa90..c0f87935 100644 --- a/src/history/historymanager.cpp +++ b/src/history/historymanager.cpp @@ -468,7 +468,7 @@ void HistoryManager::addDownload(const QString &srcUrl, const QString &destUrl) QFile downloadFile(downloadFilePath); if (!downloadFile.open(QFile::WriteOnly | QFile::Append)) { - kDebug() << "azz..."; + kDebug() << "Unable to open download file (WRITE mode).."; return; } QDataStream out(&downloadFile); @@ -487,7 +487,7 @@ DownloadList HistoryManager::downloads() QFile downloadFile(downloadFilePath); if (!downloadFile.open(QFile::ReadOnly)) { - kDebug() << "azz..."; + kDebug() << "Unable to open download file (READ mode).."; return list; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2287370c..f5be73ee 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -634,7 +634,6 @@ void MainWindow::preferences() void MainWindow::updateActions() { bool rekonqPage = currentTab()->page()->isOnRekonqPage(); - kDebug() << "UPDATE ACTIONS: rekonq page = " << rekonqPage; QAction *historyBackAction = actionByName(KStandardAction::name(KStandardAction::Back)); if( rekonqPage ) @@ -1314,7 +1313,7 @@ void MainWindow::setEncoding(QAction *qa) { QString currentCodec = qa->text().toLatin1(); currentCodec = currentCodec.remove('&'); - kDebug() << currentCodec; + kDebug() << "Setting codec: " << currentCodec; currentTab()->page()->settings()->setDefaultTextEncoding(currentCodec); } @@ -1331,7 +1330,6 @@ void MainWindow::populateEncodingMenu() codecs.sort(); QString currentCodec = currentTab()->page()->settings()->defaultTextEncoding(); - kDebug() << "Current Codec: " << currentCodec; m_encodingMenu->clear(); KMenu *isoMenu = new KMenu( QL1S("ISO"), m_encodingMenu); diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 3a9d61ef..568aa400 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -339,7 +339,7 @@ void ProtocolHandler::slotMostLocalUrlResult(KJob *job) */ void ProtocolHandler::abpHandling() { - kDebug() << _url; + kDebug() << "handling abp url: " << _url; QString path = _url.path(); if (path != QL1S("subscribe")) @@ -348,16 +348,9 @@ void ProtocolHandler::abpHandling() QMap map = _url.queryItems(KUrl::CaseInsensitiveKeys); QString location = map.value(QL1S("location")); - kDebug() << location; - QString title = map.value(QL1S("title")); - kDebug() << title; - QString requireslocation = map.value(QL1S("requireslocation")); - kDebug() << requireslocation; - QString requirestitle = map.value(QL1S("requirestitle")); - kDebug() << requirestitle; QString info; if (requirestitle.isEmpty() || requireslocation.isEmpty()) diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp index 97d9bc36..6eb0cb6c 100644 --- a/src/sessionmanager.cpp +++ b/src/sessionmanager.cpp @@ -110,33 +110,34 @@ bool SessionManager::restoreSession() if (line == QString("window")) { line = in.readLine(); - kDebug() << "New Window line: " << line; Application::instance()->loadUrl( KUrl(line), Rekonq::NewWindow); } - else if (line == QString("currenttab")) - { - kDebug() << "Set Current Tab Line" << endl; - line = in.readLine(); - bool ok; - int idx = line.toInt(&ok); - if (ok) - { - kDebug() << "Setting current tab to " << idx << endl; - // Get last mainwindow created which will be first one in mainwindow list - MainWindowList wl = Application::instance()->mainWindowList(); - if (wl.count() > 0) - { - MainView *mv = wl[0].data()->mainView(); - emit mv->tabBar()->setCurrentIndex(idx); - } - } - else - kDebug() << "Failed to convert currenttab index line <" << line << "> to in value" << endl; - } else { - kDebug() << "New Current Tab line: " << line; - Application::instance()->loadUrl( KUrl(line), Rekonq::NewCurrentTab); + if (line == QString("currenttab")) + { + line = in.readLine(); + bool ok; + int idx = line.toInt(&ok); + if (ok) + { + // Get last mainwindow created which will be first one in mainwindow list + MainWindowList wl = Application::instance()->mainWindowList(); + if (wl.count() > 0) + { + MainView *mv = wl[0].data()->mainView(); + emit mv->tabBar()->setCurrentIndex(idx); + } + } + else + { + kDebug() << "Failed to convert currenttab index line <" << line << "> to in value" << endl; + } + } + else + { + Application::instance()->loadUrl( KUrl(line), Rekonq::NewCurrentTab); + } } } while (!line.isEmpty()); diff --git a/src/webpage.cpp b/src/webpage.cpp index 9da75a91..507263cc 100644 --- a/src/webpage.cpp +++ b/src/webpage.cpp @@ -148,8 +148,6 @@ WebPage::~WebPage() bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &request, NavigationType type) { _isOnRekonqPage = false; - kDebug() << "ACCEPT_NAVIGATION false"; - _loadingUrl = request.url(); KIO::AccessManager *manager = qobject_cast(networkAccessManager()); @@ -218,8 +216,6 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r WebPage *WebPage::createWindow(QWebPage::WebWindowType type) { - kDebug() << "WebPage createWindow slot"; - // added to manage web modal dialogs if (type == QWebPage::WebModalDialog) kDebug() << "Modal Dialog"; @@ -261,9 +257,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) QString app = reply->header(QNetworkRequest::ContentTypeHeader).toString(); QStringList headerList = app.split( ';' ); - kDebug() << headerList; - kDebug() << headerList.count(); - if(headerList.count() > 0) { mimeType = headerList.takeFirst().trimmed(); @@ -311,7 +304,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) switch (dlg.askEmbedOrSave()) { case KParts::BrowserOpenOrSaveQuestion::Save: - kDebug() << "service handling: download!"; + kDebug() << "user choice: no services, just download!"; downloadThings(reply->request(), suggestedFileName); return; @@ -347,7 +340,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply) mainFrame()->setHtml(html); _isOnRekonqPage = true; - kDebug() << "EMBED true"; Application::instance()->mainWindow()->mainView()->urlBar()->setQUrl(replyUrl); Application::instance()->mainWindow()->updateActions(); } @@ -392,7 +384,7 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply) && !domainSchemeMatch(reply->url(), _sslInfo.url()) ) { - //kDebug() << "Reseting cached SSL info..."; + // Reseting cached SSL info... _sslInfo = WebSslInfo(); } @@ -432,12 +424,11 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply) { mainFrame()->setHtml(errorPage(reply)); _isOnRekonqPage = true; - kDebug() << "ERROR true"; } break; default: - kDebug() << "Nothing to do here.."; + // Nothing to do here.. break; } -- cgit v1.2.1