From 3dbfc06247db3c62a73f1f3022b648197ae24a00 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Wed, 12 Jan 2011 04:01:02 +0530 Subject: Krazy Fixes!! Add #rekonq_define.h to files that now use QL1C --- src/adblock/adblockrulefallbackimpl.cpp | 2 +- src/opensearch/opensearchengine.cpp | 2 +- src/urlbar/webshortcutwidget.cpp | 5 +++-- src/webtab.cpp | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/adblock/adblockrulefallbackimpl.cpp b/src/adblock/adblockrulefallbackimpl.cpp index 127421fc..ae0e14d1 100644 --- a/src/adblock/adblockrulefallbackimpl.cpp +++ b/src/adblock/adblockrulefallbackimpl.cpp @@ -150,4 +150,4 @@ QString AdBlockRuleFallbackImpl::ruleString() const QString AdBlockRuleFallbackImpl::ruleType() const { return QL1S("AdBlockRuleFallbackImpl"); -} \ No newline at end of file +} diff --git a/src/opensearch/opensearchengine.cpp b/src/opensearch/opensearchengine.cpp index 37685fb5..ef0f3f74 100644 --- a/src/opensearch/opensearchengine.cpp +++ b/src/opensearch/opensearchengine.cpp @@ -58,7 +58,7 @@ QString OpenSearchEngine::parseTemplate(const QString &searchTerm, const QString // Simple conversion to RFC 3066. language = language.replace(QL1C('_'), QL1C('-')); QString country = language; - country = (country.replace(0, country.indexOf("-")+1, "")).toLower(); + country = (country.remove(0, country.indexOf(QL1C('-'))+1)).toLower(); const int firstDashPosition = country.indexOf(QL1C('-')); if (firstDashPosition >= 0) country = country.mid(firstDashPosition+1); diff --git a/src/urlbar/webshortcutwidget.cpp b/src/urlbar/webshortcutwidget.cpp index 843d528b..c687108a 100644 --- a/src/urlbar/webshortcutwidget.cpp +++ b/src/urlbar/webshortcutwidget.cpp @@ -18,6 +18,7 @@ * Boston, MA 02110-1301, USA. */ +#include "rekonq_defines.h" #include "webshortcutwidget.h" #include @@ -138,11 +139,11 @@ void WebShortcutWidget::cancelClicked() void WebShortcutWidget::shortcutsChanged(const QString& newShorthands) { int savedCursorPosition = m_wsLineEdit->cursorPosition(); - QString normalizedShorthands = QString(newShorthands).replace(" ", ","); + QString normalizedShorthands = QString(newShorthands).replace(QL1C(' '), QL1C(',')); m_wsLineEdit->setText(normalizedShorthands); m_wsLineEdit->setCursorPosition(savedCursorPosition); - QSet shorthands = normalizedShorthands.split(",").toSet(); + QSet shorthands = normalizedShorthands.split(QL1C(',')).toSet(); QString contenderName = ""; QString contenderWS = ""; diff --git a/src/webtab.cpp b/src/webtab.cpp index 2641f9c9..7b741bf2 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -26,6 +26,7 @@ // Self Includes +#include "rekonq_defines.h" #include "webtab.h" #include "webtab.moc" // Auto Includes @@ -254,7 +255,7 @@ KUrl WebTab::extractOpensearchUrl(QWebElement e) QString host = docUrl.scheme() + "://" + docUrl.host(); if (docUrl.port() != -1) { - host += ":" + QString::number(docUrl.port()); + host += QL1C(':') + QString::number(docUrl.port()); } url = KUrl(docUrl, href); } -- cgit v1.2.1