summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-19 23:00:41 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-19 23:00:41 +0200
commit1d1a6867589a8e71755624e1e9d9e8b95a5a1156 (patch)
tree35f54c5ad7edfb58af4c3a1db3e0dc8a83da9af6 /src
parentAdded UI option to configure the "Do Not Track" feature (diff)
downloadrekonq-1d1a6867589a8e71755624e1e9d9e8b95a5a1156.tar.xz
Calm down kDebug messages
Diffstat (limited to 'src')
-rw-r--r--src/adblock/adblockmanager.cpp2
-rw-r--r--src/application.cpp3
-rw-r--r--src/bookmarks/bookmarkprovider.cpp2
-rw-r--r--src/bookmarks/bookmarkspanel.cpp1
-rw-r--r--src/bookmarks/bookmarkstoolbar.cpp4
-rw-r--r--src/clicktoflash.cpp4
-rw-r--r--src/history/historymodels.cpp3
-rw-r--r--src/history/historypanel.cpp1
-rw-r--r--src/iconmanager.cpp6
-rw-r--r--src/mainview.cpp2
-rw-r--r--src/mainwindow.cpp3
-rw-r--r--src/opensearch/opensearchmanager.cpp8
-rw-r--r--src/opensearch/searchengine.cpp1
-rw-r--r--src/opensearch/suggestionparser.cpp8
-rw-r--r--src/protocolhandler.cpp7
-rw-r--r--src/settings/generalwidget.cpp1
-rw-r--r--src/sslinfodialog.cpp2
-rw-r--r--src/urlbar/completionwidget.cpp4
-rw-r--r--src/urlbar/listitem.cpp10
-rw-r--r--src/urlbar/urlbar.cpp5
-rw-r--r--src/urlbar/urlresolver.cpp30
-rw-r--r--src/urlbar/urlresolver.h1
-rw-r--r--src/urlpanel.cpp2
-rw-r--r--src/useragent/useragentwidget.cpp5
-rw-r--r--src/webpage.cpp16
-rw-r--r--src/websnap.cpp48
26 files changed, 14 insertions, 165 deletions
diff --git a/src/adblock/adblockmanager.cpp b/src/adblock/adblockmanager.cpp
index d3af2722..c41ff2eb 100644
--- a/src/adblock/adblockmanager.cpp
+++ b/src/adblock/adblockmanager.cpp
@@ -274,7 +274,6 @@ void AdBlockManager::updateNextSubscription()
if(_index < locations.size())
{
QString urlString = locations.at(_index);
- kDebug() << "DOWNLOADING FROM " << urlString;
KUrl subUrl = KUrl(urlString);
KIO::TransferJob* job = KIO::get(subUrl , KIO::Reload , KIO::HideProgressInfo);
@@ -300,7 +299,6 @@ void AdBlockManager::slotResult(KJob *job)
if(job->error())
return;
- kDebug() << "SAVING RULES..";
QList<QByteArray> list = _buffer.split('\n');
QStringList ruleList;
foreach(const QByteArray & ba, list)
diff --git a/src/application.cpp b/src/application.cpp
index 69a3b0c9..8bca4f63 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -223,7 +223,6 @@ int Application::newInstance()
break;
case 2: // restore session
sessionManager()->restoreSession();
- kDebug() << "session restored following settings";
break;
default:
newMainWindow()->homePage();
@@ -549,8 +548,6 @@ void Application::updateConfiguration()
int minimumFontSize = ReKonfig::minFontSize();
int logDpiY = mainWindow()->currentTab()->view()->logicalDpiY();
- kDebug() << "Logical Dot per Inch Y: " << logDpiY;
-
float toPix = (logDpiY < 96.0)
? 96.0 / 72.0
: logDpiY / 72.0 ;
diff --git a/src/bookmarks/bookmarkprovider.cpp b/src/bookmarks/bookmarkprovider.cpp
index 0d1b1ada..62f2433b 100644
--- a/src/bookmarks/bookmarkprovider.cpp
+++ b/src/bookmarks/bookmarkprovider.cpp
@@ -90,8 +90,6 @@ BookmarkProvider::~BookmarkProvider()
KActionMenu* BookmarkProvider::bookmarkActionMenu(QWidget *parent)
{
- kDebug() << "creating a bookmarks action menu...";
-
KMenu *menu = new KMenu(parent);
KActionMenu *bookmarkActionMenu = new KActionMenu(menu);
bookmarkActionMenu->setMenu(menu);
diff --git a/src/bookmarks/bookmarkspanel.cpp b/src/bookmarks/bookmarkspanel.cpp
index 8ad15309..fcd62f6c 100644
--- a/src/bookmarks/bookmarkspanel.cpp
+++ b/src/bookmarks/bookmarkspanel.cpp
@@ -116,7 +116,6 @@ void BookmarksPanel::onExpand(const QModelIndex &index)
void BookmarksPanel::setup()
{
UrlPanel::setup();
- kDebug() << "Bookmarks panel...";
connect(panelTreeView(), SIGNAL(delKeyPressed()), this, SLOT(deleteBookmark()));
connect(panelTreeView(), SIGNAL(collapsed(const QModelIndex &)), this, SLOT(onCollapse(const QModelIndex &)));
diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp
index ec91ad3a..efa1e1cc 100644
--- a/src/bookmarks/bookmarkstoolbar.cpp
+++ b/src/bookmarks/bookmarkstoolbar.cpp
@@ -403,7 +403,7 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
}
else if(dropEvent->mimeData()->hasFormat("text/uri-list"))
{
- kDebug() << "DROP is URL";
+ // DROP is URL
QString url = dropEvent->mimeData()->urls().at(0).toString();
QString title = url.contains(rApp->mainWindow()->currentTab()->url().url())
? rApp->mainWindow()->currentTab()->view()->title()
@@ -412,7 +412,7 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
}
else if(dropEvent->mimeData()->hasFormat("text/plain"))
{
- kDebug() << "DROP is TEXT";
+ // DROP is TEXT
QString url = dropEvent->mimeData()->text();
KUrl u(url);
if(u.isValid())
diff --git a/src/clicktoflash.cpp b/src/clicktoflash.cpp
index 982c8143..70825685 100644
--- a/src/clicktoflash.cpp
+++ b/src/clicktoflash.cpp
@@ -106,10 +106,6 @@ void ClickToFlash::load()
bool ClickToFlash::checkElement(QWebElement el)
{
- // check these two values..
- kDebug() << "src: " << QUrl(el.attribute("src"));
- kDebug() << "url: " << m_url;
-
QString checkString;
QString urlString;
diff --git a/src/history/historymodels.cpp b/src/history/historymodels.cpp
index c43a06d9..bddc34be 100644
--- a/src/history/historymodels.cpp
+++ b/src/history/historymodels.cpp
@@ -356,7 +356,6 @@ void HistoryFilterModel::load() const
void HistoryFilterModel::sourceRowsInserted(const QModelIndex &parent, int start, int end)
{
- //Q_ASSERT(start == end && start == 0);
Q_UNUSED(end);
if(start != 0)
@@ -420,7 +419,7 @@ bool HistoryFilterModel::removeRows(int row, int count, const QModelIndex &paren
}
-// -------------------------------------------------------------------------------------------------------------------------------------------
+// ----------------------------------------------------------------------------------------------------------
HistoryTreeModel::HistoryTreeModel(QAbstractItemModel *sourceModel, QObject *parent)
diff --git a/src/history/historypanel.cpp b/src/history/historypanel.cpp
index d9a1afa9..e792783c 100644
--- a/src/history/historypanel.cpp
+++ b/src/history/historypanel.cpp
@@ -135,7 +135,6 @@ void HistoryPanel::openAll()
void HistoryPanel::setup()
{
UrlPanel::setup();
- kDebug() << "History panel...";
panelTreeView()->header()->hideSection(1);
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp
index 18e31f6e..a96962c7 100644
--- a/src/iconmanager.cpp
+++ b/src/iconmanager.cpp
@@ -99,7 +99,6 @@ void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify)
// provide icons just for http/https sites
if(!url.scheme().startsWith(QL1S("http")))
{
- kDebug() << "No http/https site...";
if(notify)
emit iconChanged();
return;
@@ -108,7 +107,6 @@ void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify)
// do not load new icons in private browsing..
if(QWebSettings::globalSettings()->testAttribute(QWebSettings::PrivateBrowsingEnabled))
{
- kDebug() << "Private browsing, private icon...";
if(notify)
emit iconChanged();
return;
@@ -117,7 +115,6 @@ void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify)
// check if icon exists
if(!KMimeType::favIconForUrl(url).isEmpty())
{
- kDebug() << "icon JUST present. Aborting...";
if(notify)
emit iconChanged();
return;
@@ -145,11 +142,8 @@ void IconManager::provideIcon(QWebPage *page, const KUrl &url, bool notify)
: KUrl(rootUrlString + QL1C('/') + relUrlString) ;
}
- kDebug() << "ICON URL: " << faviconUrl;
-
// dest url
KUrl destUrl(_faviconsDir + url.host() + QL1S(".png"));
- kDebug() << "DEST URL: " << destUrl;
// download icon
KIO::FileCopyJob *job = KIO::file_copy(faviconUrl, destUrl, -1, KIO::HideProgressInfo);
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 587717f1..14b86704 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -395,7 +395,6 @@ void MainView::windowCloseRequested()
}
return;
}
- kDebug() << "Invalid tab index" << "line:" << __LINE__;
}
@@ -730,7 +729,6 @@ void MainView::detachTab(int index, MainWindow *toWindow)
WebTab *tab = webTab(index);
KUrl u = tab->url();
- kDebug() << "detaching tab with url: " << u;
if(u.scheme() == QL1S("about"))
{
closeTab(index);
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b21e7f0e..e4bddd1a 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -710,7 +710,6 @@ void MainWindow::preferences()
void MainWindow::updateActions()
{
- kDebug() << "updating actions..";
bool rekonqPage = currentTab()->page()->isOnRekonqPage();
QAction *historyBackAction = actionByName(KStandardAction::name(KStandardAction::Back));
@@ -1462,7 +1461,6 @@ void MainWindow::setUserAgent()
KUrl url = currentTab()->url();
UserAgentInfo uaInfo;
- kDebug() << "SETTING USER AGENT";
uaInfo.setUserAgentForHost(uaIndex, url.host());
currentTab()->page()->triggerAction(QWebPage::Reload);
}
@@ -1470,7 +1468,6 @@ void MainWindow::setUserAgent()
void MainWindow::populateUserAgentMenu()
{
- kDebug() << "populating user agent menu...";
bool defaultUA = true;
KUrl url = currentTab()->url();
diff --git a/src/opensearch/opensearchmanager.cpp b/src/opensearch/opensearchmanager.cpp
index 35716d9a..ea2ace32 100644
--- a/src/opensearch/opensearchmanager.cpp
+++ b/src/opensearch/opensearchmanager.cpp
@@ -53,6 +53,7 @@
#include <QDBusMessage>
#include <QDBusConnection>
+
OpenSearchManager::OpenSearchManager(QObject *parent)
: QObject(parent)
, m_activeEngine(0)
@@ -81,14 +82,12 @@ void OpenSearchManager::setSearchProvider(const QString &searchProvider)
kDebug() << searchProvider << " trimmed name: " << trimmedEngineName(searchProvider) << " file name path: " << fileName;
if(fileName.isEmpty())
{
- kDebug() << "OpenSearch file name empty";
return;
}
QFile file(fileName);
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
- kDebug() << "Cannot open opensearch description file: " + fileName;
return;
}
@@ -154,7 +153,6 @@ void OpenSearchManager::requestSuggestion(const QString &searchText)
else
{
KUrl url = m_activeEngine->suggestionsUrl(searchText);
- kDebug() << "Requesting for suggestions: " << url.url();
_typedText = searchText;
m_currentJob = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo);
m_state = REQ_SUGGESTION;
@@ -184,7 +182,6 @@ void OpenSearchManager::jobFinished(KJob *job)
if(m_state == REQ_SUGGESTION)
{
const ResponseList suggestionsList = m_activeEngine->parseSuggestion(_typedText, m_jobData);
- kDebug() << "Received suggestions in " << _typedText << " from " << m_activeEngine->name() << ": ";
Q_FOREACH(const Response & r, suggestionsList)
{
kDebug() << r.title;
@@ -251,7 +248,6 @@ void OpenSearchManager::loadEngines()
QFile file(KStandardDirs::locate("appdata", "opensearch/db_opensearch.json"));
if(!file.open(QIODevice::ReadOnly | QIODevice::Text))
{
- kDebug() << "opensearch db cannot be read";
return;
}
@@ -259,7 +255,6 @@ void OpenSearchManager::loadEngines()
QScriptEngine reader;
if(!reader.canEvaluate(fileContent))
{
- kDebug() << "opensearch db cannot be read";
return;
}
@@ -281,7 +276,6 @@ void OpenSearchManager::saveEngines()
QFile file(KStandardDirs::locateLocal("appdata", "opensearch/db_opensearch.json"));
if(!file.open(QIODevice::WriteOnly))
{
- kDebug() << "opensearch db cannot be writen";
return;
}
QTextStream out(&file);
diff --git a/src/opensearch/searchengine.cpp b/src/opensearch/searchengine.cpp
index 09eb5891..224a8d56 100644
--- a/src/opensearch/searchengine.cpp
+++ b/src/opensearch/searchengine.cpp
@@ -67,7 +67,6 @@ void SearchEngine::reload()
if(service)
{
QUrl url = service->property("Query").toUrl();
- kDebug() << "ENGINE URL: " << url;
rApp->iconManager()->downloadIconFromUrl(url);
favorites << service;
diff --git a/src/opensearch/suggestionparser.cpp b/src/opensearch/suggestionparser.cpp
index 0e390d99..6b467353 100644
--- a/src/opensearch/suggestionparser.cpp
+++ b/src/opensearch/suggestionparser.cpp
@@ -107,7 +107,7 @@ ResponseList JSONParser::parse(const QByteArray &resp)
if(response.isEmpty())
{
- kDebug() << "RESPONSE IS EMPTY";
+ // RESPONSE IS EMPTY
return ResponseList();
}
@@ -115,14 +115,14 @@ ResponseList JSONParser::parse(const QByteArray &resp)
|| !response.endsWith(QL1C(']'))
)
{
- kDebug() << "RESPONSE is NOT well FORMED";
+ // RESPONSE is NOT well FORMED
return ResponseList();
}
// Evaluate the JSON response using QtScript.
if(!m_reader.canEvaluate(response))
{
- kDebug() << "m_reader cannot evaluate the response";
+ // m_reader cannot evaluate the response
return ResponseList();
}
@@ -130,7 +130,7 @@ ResponseList JSONParser::parse(const QByteArray &resp)
if(!responseParts.property(1).isArray())
{
- kDebug() << "RESPONSE is not an array";
+ // RESPONSE is not an array
return ResponseList();
}
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp
index 7274a250..1fe62d73 100644
--- a/src/protocolhandler.cpp
+++ b/src/protocolhandler.cpp
@@ -119,7 +119,6 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra
return false;
}
- kDebug() << "EVALUATING JAVASCRIPT...";
QVariant result = frame->evaluateJavaScript(scriptSource);
return true;
}
@@ -189,8 +188,6 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr
_url = request.url();
_frame = frame;
- kDebug() << "URL PROTOCOL: " << _url;
-
// "http(s)" (fast) handling
if(_url.protocol() == QL1S("http") || _url.protocol() == QL1S("https"))
return false;
@@ -232,7 +229,6 @@ bool ProtocolHandler::postHandling(const QNetworkRequest &request, QWebFrame *fr
// Try KRunning it...
if(KProtocolInfo::isKnownProtocol(_url))
{
- kDebug() << "WARNING: launching a new app...";
(void)new KRun(_url, rApp->mainWindow(), 0, _url.isLocalFile());
return true;
}
@@ -342,7 +338,6 @@ void ProtocolHandler::slotMostLocalUrlResult(KJob *job)
if(job->error())
{
// TODO
- kDebug() << "error";
}
else
{
@@ -367,8 +362,6 @@ void ProtocolHandler::slotMostLocalUrlResult(KJob *job)
*/
void ProtocolHandler::abpHandling()
{
- kDebug() << "handling abp url: " << _url;
-
QString path = _url.path();
if(path != QL1S("subscribe"))
return;
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp
index 0b11c3f5..98d0d708 100644
--- a/src/settings/generalwidget.cpp
+++ b/src/settings/generalwidget.cpp
@@ -65,7 +65,6 @@ void GeneralWidget::save()
KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
cg.writeEntry("DoNotTrack", doNotTrackCheckBox->isChecked());
cg.sync();
- kDebug() << "-------------------------------------" << doNotTrackCheckBox->isChecked();
}
diff --git a/src/sslinfodialog.cpp b/src/sslinfodialog.cpp
index 5bcdd39a..b9668fd1 100644
--- a/src/sslinfodialog.cpp
+++ b/src/sslinfodialog.cpp
@@ -132,8 +132,6 @@ void SslInfoDialog::exportCert()
QString certPath = KFileDialog::getSaveFileName(name, QString(), this);
- kDebug() << certPath;
-
QFile file(certPath);
if(!file.open(QIODevice::WriteOnly | QIODevice::Text))
return;
diff --git a/src/urlbar/completionwidget.cpp b/src/urlbar/completionwidget.cpp
index 1f697b19..00a04bda 100644
--- a/src/urlbar/completionwidget.cpp
+++ b/src/urlbar/completionwidget.cpp
@@ -299,9 +299,6 @@ bool CompletionWidget::eventFilter(QObject *obj, QEvent *ev)
child = findChild<ListItem *>(QString::number(_currentIndex));
if(child && _currentIndex != 0) //the completionwidget is visible and the user had press down
{
- kDebug() << "USING LISTITEM URL: " << child->url();
- kDebug() << "USING LISTITEM TITLE: " << child->text();
-
//we can use the url of the listitem
emit chosenUrl(child->url(), Rekonq::CurrentTab);
}
@@ -311,7 +308,6 @@ bool CompletionWidget::eventFilter(QObject *obj, QEvent *ev)
UrlSearchList list = res.orderedSearchItems();
if(list.isEmpty())
{
- kDebug() << "Url Search List EMPTY!!!";
emit chosenUrl(KUrl(_typedString), Rekonq::CurrentTab);
}
else
diff --git a/src/urlbar/listitem.cpp b/src/urlbar/listitem.cpp
index f268442f..150cc0a9 100644
--- a/src/urlbar/listitem.cpp
+++ b/src/urlbar/listitem.cpp
@@ -150,7 +150,7 @@ QString ListItem::text()
void ListItem::nextItemSubChoice()
{
- //will be override
+ // will be override
}
@@ -629,41 +629,33 @@ ListItem *ListItemFactory::create(const UrlSearchItem &item, const QString &text
{
if(item.type & UrlSearchItem::Search)
{
- kDebug() << "Search";
return new SearchListItem(item, text, parent);
}
if(item.type & UrlSearchItem::Browse)
{
- kDebug() << "Browse";
return new BrowseListItem(item, text, parent);
}
if(item.type & UrlSearchItem::History)
{
- kDebug() << "History";
return new PreviewListItem(item, text, parent);
}
if(item.type & UrlSearchItem::Bookmark)
{
- kDebug() << "Bookmark";
return new PreviewListItem(item, text, parent);
}
if(item.type & UrlSearchItem::Suggestion)
{
- kDebug() << "ITEM URL: " << item.url;
if(item.description.isEmpty())
{
- kDebug() << "Suggestion";
return new SuggestionListItem(item, text, parent);
}
- kDebug() << "Visual Suggestion";
return new VisualSuggestionListItem(item, text, parent);
}
- kDebug() << "Undefined";
return new PreviewListItem(item, text, parent);
}
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index ea60f474..37c085e6 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -308,7 +308,7 @@ void UrlBar::focusInEvent(QFocusEvent *event)
void UrlBar::dropEvent(QDropEvent *event)
{
- //handles only plain-text with url format
+ // handles only plain-text with url format
if(event->mimeData()->hasFormat("text/plain") && event->source() != this)
{
QUrl url = QUrl::fromUserInput(event->mimeData()->data("text/plain"));
@@ -321,7 +321,7 @@ void UrlBar::dropEvent(QDropEvent *event)
}
}
- //handles everything else
+ // handles everything else
KLineEdit::dropEvent(event);
activated(text());
}
@@ -371,7 +371,6 @@ void UrlBar::loadFinished()
// we need to update urlbar after the right icon settings
// removing this code (where setStyleSheet automatically calls update) needs adding again
// an update call
- kDebug() << "resetting stylesheet";
int rightIconWidth = 25 * (_rightIconsList.count());
setStyleSheet(QString("UrlBar { padding: 0 %2px 0 %1px;} ").arg(_icon->sizeHint().width()).arg(rightIconWidth));
}
diff --git a/src/urlbar/urlresolver.cpp b/src/urlbar/urlresolver.cpp
index 0d8ecc12..0ff00bba 100644
--- a/src/urlbar/urlresolver.cpp
+++ b/src/urlbar/urlresolver.cpp
@@ -76,8 +76,8 @@ UrlResolver::UrlResolver(const QString &typedUrl)
if(_browseRegexp.isEmpty())
{
- kDebug() << "browse regexp empty. Setting value..";
-
+ // FIXME move to use QL1S here!!!
+
QString protocol = QString("^(%1)").arg(KProtocolInfo::protocols().join("|"));
QString localhost = "^localhost";
@@ -253,8 +253,6 @@ UrlSearchList UrlResolver::orderLists()
bookmarksCount = _bookmarks.count();
commonCount = common.count();
- kDebug() << "HISTORY COUNT: " << historyCount;
-
//now fill the list to MAX_ELEMENTS
if(availableEntries > 0)
{
@@ -291,8 +289,6 @@ UrlSearchList UrlResolver::orderLists()
}
list = list + _history + common + _bookmarks + _suggestions;
- qWarning() << "orderedSearchItems leave: " << " elapsed: " << myTime.elapsed();
-
return list;
}
@@ -357,7 +353,6 @@ void UrlResolver::computeHistory()
void UrlResolver::computeBookmarks()
{
QList<KBookmark> found = rApp->bookmarkProvider()->find(_typedString);
- kDebug() << "FOUND: " << found.count();
Q_FOREACH(const KBookmark & b, found)
{
UrlSearchItem gItem(UrlSearchItem::Bookmark, b.url().url(), b.fullText());
@@ -417,24 +412,3 @@ void UrlResolver::suggestionsReceived(const QString &text, const ResponseList &s
emit suggestionsReady(sugList, _typedString);
this->deleteLater();
}
-
-
-// UrlSearchItem UrlResolver::privilegedItem(UrlSearchList* list)
-// {
-// UrlSearchItem item;
-// QString dot = QString(QL1C('.'));
-// QString test1 = QString(QL1C('/')) + _typedString + dot;
-// QString test2 = dot + _typedString + dot;
-//
-// for (int i = 0; i < list->count(); i++)
-// {
-// item = list->at(i);
-// //TODO: move this to AwesomeUrlCompletion::substringCompletion and add a priviledged flag to UrlSearchItem
-// if (item.url.contains(test1) || item.url.contains(test2))
-// {
-// list->removeAt(i);
-// return item;
-// }
-// }
-// return UrlSearchItem();
-// }
diff --git a/src/urlbar/urlresolver.h b/src/urlbar/urlresolver.h
index 48ffece0..510ab328 100644
--- a/src/urlbar/urlresolver.h
+++ b/src/urlbar/urlresolver.h
@@ -150,7 +150,6 @@ private:
void computeQurlFromUserInput();
void computeBookmarks();
-// UrlSearchItem privilegedItem(UrlSearchList* list);
UrlSearchList orderLists();
QString _typedString;
diff --git a/src/urlpanel.cpp b/src/urlpanel.cpp
index ea645716..8d88eddd 100644
--- a/src/urlpanel.cpp
+++ b/src/urlpanel.cpp
@@ -66,8 +66,6 @@ void UrlPanel::showing(bool b)
void UrlPanel::setup()
{
- kDebug() << "Loading panel setup...";
-
QWidget *ui = new QWidget(this);
// setup search bar
diff --git a/src/useragent/useragentwidget.cpp b/src/useragent/useragentwidget.cpp
index f5862544..031a387f 100644
--- a/src/useragent/useragentwidget.cpp
+++ b/src/useragent/useragentwidget.cpp
@@ -43,7 +43,6 @@ UserAgentWidget::UserAgentWidget(QWidget *parent)
KConfig config("kio_httprc", KConfig::NoGlobals);
QStringList hosts = config.groupList();
- kDebug() << "HOSTS" << hosts;
Q_FOREACH(const QString & host, hosts)
{
QStringList tmp;
@@ -52,7 +51,6 @@ UserAgentWidget::UserAgentWidget(QWidget *parent)
KConfigGroup hostGroup(&config, host);
tmp << hostGroup.readEntry(QL1S("UserAgent"), QString());
- kDebug() << "TMP: " << tmp;
QTreeWidgetItem *item = new QTreeWidgetItem(sitePolicyTreeWidget, tmp);
sitePolicyTreeWidget->addTopLevelItem(item);
}
@@ -68,7 +66,6 @@ void UserAgentWidget::deleteUserAgent()
sitePolicyTreeWidget->takeTopLevelItem(sitePolicyTreeWidget->indexOfTopLevelItem(item));
QString host = item->text(0);
- kDebug() << "HOST: " << host;
KConfig config("kio_httprc", KConfig::NoGlobals);
KConfigGroup group(&config, host);
@@ -89,8 +86,6 @@ void UserAgentWidget::deleteAll()
QStringList list = config.groupList();
Q_FOREACH(const QString & groupName, list)
{
- kDebug() << "HOST: " << groupName;
-
KConfigGroup group(&config, groupName);
group.deleteGroup();
}
diff --git a/src/webpage.cpp b/src/webpage.cpp
index 35c1eb54..93e41944 100644
--- a/src/webpage.cpp
+++ b/src/webpage.cpp
@@ -399,7 +399,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
// handle protocols WebKit cannot handle...
if(_protHandler.postHandling(reply->request(), mainFrame()))
{
- kDebug() << "POST HANDLING the unsupported...";
return;
}
@@ -429,8 +428,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
if(appService.isNull()) // no service can handle this. We can just download it..
{
- kDebug() << "no service can handle this. We can just download it..";
-
isLocal
? KMessageBox::sorry(view(), i18n("No service can handle this file."))
: downloadReply(reply, _suggestedFileName);
@@ -447,7 +444,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
switch(dlg.askEmbedOrSave())
{
case KParts::BrowserOpenOrSaveQuestion::Save:
- kDebug() << "user choice: no services, just download!";
downloadReply(reply, _suggestedFileName);
return;
@@ -470,7 +466,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
tempFile.open();
KUrl destUrl;
destUrl.setPath(tempFile.fileName());
- kDebug() << "First save content to" << destUrl;
KIO::Job *job = KIO::file_copy(_loadingUrl, destUrl, 0600, KIO::Overwrite);
job->ui()->setWindow(rApp->mainWindow());
connect(job, SIGNAL(result(KJob *)), this, SLOT(copyToTempFileResult(KJob*)));
@@ -481,8 +476,6 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
KParts::ReadOnlyPart *pa = KMimeTypeTrader::createPartInstanceFromQuery<KParts::ReadOnlyPart>(_mimeType, view(), this, QString());
if(pa)
{
- kDebug() << "EMBEDDING CONTENT...";
-
_isOnRekonqPage = true;
WebView *view = qobject_cast<WebView *>(parent());
@@ -522,7 +515,6 @@ void WebPage::loadFinished(bool ok)
val = group.readEntry(_loadingUrl.host(), QString("10"));
int value = val.toInt();
- kDebug() << "ZOOM VALUE: " << _loadingUrl.host() << value;
mainFrame()->setZoomFactor(QVariant(value).toReal() / 10); // Don't allox max +1 values
// Provide site icon. Can this be moved to loadStarted??
@@ -552,11 +544,7 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply)
QWebFrame* frame = qobject_cast<QWebFrame *>(reply->request().originatingObject());
const bool isMainFrameRequest = (frame == mainFrame());
- const bool isUrlFrameLoading = (_loadingUrl == frame->url());
- kDebug() << "FRAME URL : " << frame->url();
- kDebug() << "IS MAIN FRAME? " << isMainFrameRequest;
- kDebug() << "LOADING URL: " << _loadingUrl;
- kDebug() << "IS URL FRAME LOADING " << isUrlFrameLoading;
+ //const bool isUrlFrameLoading = (_loadingUrl == frame->url());
if(isMainFrameRequest
&& _sslInfo.isValid()
@@ -575,8 +563,6 @@ void WebPage::manageNetworkErrors(QNetworkReply *reply)
case QNetworkReply::NoError: // no error. Simple :)
if(isMainFrameRequest && !_sslInfo.isValid())
{
- kDebug() << " ---------------------------- ";
- kDebug() << "Setting SSL INFOS per URL = " << reply->url();
// Obtain and set the SSL information if any...
_sslInfo.restoreFrom(reply->attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)), reply->url());
_sslInfo.setUrl(reply->url());
diff --git a/src/websnap.cpp b/src/websnap.cpp
index 19b10506..e7050f87 100644
--- a/src/websnap.cpp
+++ b/src/websnap.cpp
@@ -66,7 +66,6 @@ WebSnap::WebSnap(const KUrl& url, QObject *parent)
WebSnap::~WebSnap()
{
- kDebug() << "oh oh..";
m_page.action(QWebPage::Stop)->trigger();
m_page.deleteLater();
}
@@ -104,52 +103,6 @@ QPixmap WebSnap::renderTabPreview(const QWebPage &page, int w, int h)
return pageImage.scaled(w, h, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
}
-/*
-// This code is an attempt to render a page currently displayed in a tab without alterate it.
-// It currently does not work but can give ideas:
-// - activate/disable scrollbars of a webview causes problems => this method try to not do that
-// - the viewport and the scroll position must be modified an restored
-// - page.setViewportSize(size); does not seem to work when the page is currently displayed in a webview
-
-QPixmap WebSnap::renderVisiblePagePreview(const QWebPage &page, int w, int h)
-{
- // save page settings
- QSize oldSize = page.viewportSize();
- QPoint oldScrollPosition = page.mainFrame()->scrollPosition();
-
- // minimum width
- int width = 640;
-
- // find best width
- QSize size;
- while(page.mainFrame()->scrollBarMaximum(Qt::Horizontal) && width<1920)
- {
- width+=5;
- size = QSize(width, width * ((0.0 + h) / w));
- page.setViewportSize(size);
- }
-
- // scroll to top
- page.mainFrame()->setScrollBarValue(Qt::Vertical, 0);
-
- // render
- QPixmap pageImage = WebSnap::render(page, page.viewportSize().width(), page.viewportSize().height());
-
- // detect scrollbar size
- int scrollbarWidth = (page.mainFrame()->scrollBarMaximum(Qt::Horizontal) ? 17 : 0); //TODO: detect QStyle size for scrollbars
- int scrollbarHeight = (page.mainFrame()->scrollBarMaximum(Qt::Vertical) ? 17 : 0);
-
- // resize image
- pageImage = pageImage.copy(0, 0, width - scrollbarWidth, size.height() - scrollbarHeight);
- pageImage = pageImage.scaled(w, h, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
-
- // restore page settings
- page.setViewportSize(oldSize);
- page.mainFrame()->setScrollPosition(oldScrollPosition);
-
- return pageImage;
-}
-*/
QPixmap WebSnap::renderClosingPagePreview(const QWebPage &page, int w, int h)
{
@@ -200,7 +153,6 @@ void WebSnap::saveResult(bool ok)
}
emit snapDone(ok);
- kDebug() << "SAVE RESULTS: " << ok << " URL: " << m_url;
this->deleteLater();
}