-
diff --git a/src/lib/downloads/downloadmanager.cpp b/src/lib/downloads/downloadmanager.cpp
index 70425e0be..789cac5f1 100644
--- a/src/lib/downloads/downloadmanager.cpp
+++ b/src/lib/downloads/downloadmanager.cpp
@@ -67,14 +67,14 @@ void DownloadManager::loadSettings()
{
Settings settings;
settings.beginGroup("DownloadManager");
- m_downloadPath = settings.value("defaultDownloadPath", "").toString();
+ m_downloadPath = settings.value("defaultDownloadPath", QString()).toString();
m_lastDownloadPath = settings.value("lastDownloadPath", QDir::homePath().append("/")).toString();
m_closeOnFinish = settings.value("CloseManagerOnFinish", false).toBool();
m_useNativeDialog = settings.value("useNativeDialog", DEFAULT_DOWNLOAD_USE_NATIVE_DIALOG).toBool();
m_useExternalManager = settings.value("UseExternalManager", false).toBool();
- m_externalExecutable = settings.value("ExternalManagerExecutable", "").toString();
- m_externalArguments = settings.value("ExternalManagerArguments", "").toString();
+ m_externalExecutable = settings.value("ExternalManagerExecutable", QString()).toString();
+ m_externalArguments = settings.value("ExternalManagerArguments", QString()).toString();
settings.endGroup();
}
diff --git a/src/lib/navigation/completer/locationcompleterdelegate.cpp b/src/lib/navigation/completer/locationcompleterdelegate.cpp
index a41bd564b..c5d48ab35 100644
--- a/src/lib/navigation/completer/locationcompleterdelegate.cpp
+++ b/src/lib/navigation/completer/locationcompleterdelegate.cpp
@@ -112,9 +112,11 @@ void LocationCompleterDelegate::paint(QPainter* painter, const QStyleOptionViewI
drawHighlightedTextLine(linkRect, link, searchText, painter, style, opt, colorLinkRole);
- // Draw line at the very bottom of item
- QRect lineRect(opt.rect.left(), opt.rect.bottom(), opt.rect.width(), 1);
- painter->fillRect(lineRect, opt.palette.color(QPalette::AlternateBase));
+ // Draw line at the very bottom of item if the item is not highlighted
+ if (!(opt.state & QStyle::State_Selected)) {
+ QRect lineRect(opt.rect.left(), opt.rect.bottom(), opt.rect.width(), 1);
+ painter->fillRect(lineRect, opt.palette.color(QPalette::AlternateBase));
+ }
}
bool sizeBiggerThan(const QString &s1, const QString &s2)
diff --git a/src/lib/network/networkproxyfactory.cpp b/src/lib/network/networkproxyfactory.cpp
index 87e5e4028..dedab22f6 100644
--- a/src/lib/network/networkproxyfactory.cpp
+++ b/src/lib/network/networkproxyfactory.cpp
@@ -33,15 +33,15 @@ void NetworkProxyFactory::loadSettings()
m_proxyType = QNetworkProxy::ProxyType(settings.value("ProxyType", QNetworkProxy::HttpProxy).toInt());
m_useDifferentProxyForHttps = settings.value("UseDifferentProxyForHttps", false).toBool();
- m_hostName = settings.value("HostName", "").toString();
+ m_hostName = settings.value("HostName", QString()).toString();
m_port = settings.value("Port", 8080).toInt();
- m_username = settings.value("Username", "").toString();
- m_password = settings.value("Password", "").toString();
+ m_username = settings.value("Username", QString()).toString();
+ m_password = settings.value("Password", QString()).toString();
- m_httpsHostName = settings.value("HttpsHostName", "").toString();
+ m_httpsHostName = settings.value("HttpsHostName", QString()).toString();
m_httpsPort = settings.value("HttpsPort", 8080).toInt();
- m_httpsUsername = settings.value("HttpsUsername", "").toString();
- m_httpsPassword = settings.value("HttpsPassword", "").toString();
+ m_httpsUsername = settings.value("HttpsUsername", QString()).toString();
+ m_httpsPassword = settings.value("HttpsPassword", QString()).toString();
m_proxyExceptions = settings.value("ProxyExceptions", QStringList() << "localhost" << "127.0.0.1").toStringList();
settings.endGroup();
diff --git a/src/lib/network/schemehandlers/fileschemehandler.cpp b/src/lib/network/schemehandlers/fileschemehandler.cpp
index 7c2f3fedc..70d6d7486 100644
--- a/src/lib/network/schemehandlers/fileschemehandler.cpp
+++ b/src/lib/network/schemehandlers/fileschemehandler.cpp
@@ -188,7 +188,7 @@ QString FileSchemeReply::loadDirectory()
line += "\">";
line += info.fileName();
line += "
";
- line += info.isDir() ? "" : qz_fileSizeToString(info.size());
+ line += info.isDir() ? QString() : qz_fileSizeToString(info.size());
line += " | ";
line += info.lastModified().toString("dd.MM.yyyy");
line += " | ";
diff --git a/src/lib/network/schemehandlers/qupzillaschemehandler.cpp b/src/lib/network/schemehandlers/qupzillaschemehandler.cpp
index e76496500..582e27b2d 100644
--- a/src/lib/network/schemehandlers/qupzillaschemehandler.cpp
+++ b/src/lib/network/schemehandlers/qupzillaschemehandler.cpp
@@ -176,7 +176,7 @@ QString QupZillaSchemeReply::startPage()
sPage.replace("%SEARCH-BY%", tr("Search results provided by DuckDuckGo"));
sPage.replace("%WWW%", QupZilla::WIKIADDRESS);
sPage.replace("%ABOUT-QUPZILLA%", tr("About QupZilla"));
- sPage.replace("%PRIVATE-BROWSING%", mApp->isPrivateSession() ? tr("Private Browsing") : "");
+ sPage.replace("%PRIVATE-BROWSING%", mApp->isPrivateSession() ? tr("Private Browsing") : QString());
sPage = qz_applyDirectionToPage(sPage);
return sPage;
diff --git a/src/lib/opensearch/searchenginesmanager.cpp b/src/lib/opensearch/searchenginesmanager.cpp
index 30866394d..6659ac7df 100644
--- a/src/lib/opensearch/searchenginesmanager.cpp
+++ b/src/lib/opensearch/searchenginesmanager.cpp
@@ -264,7 +264,7 @@ void SearchEnginesManager::addEngine(OpenSearchEngine* engine)
en.name = engine->name();
en.url = engine->searchUrl("searchstring").toString().replace("searchstring", "%s");
if (engine->image().isNull()) {
- en.icon = iconForSearchEngine(engine->searchUrl(""));
+ en.icon = iconForSearchEngine(engine->searchUrl(QString()));
}
else {
en.icon = QIcon(QPixmap::fromImage(engine->image()));
diff --git a/src/lib/other/statusbarmessage.cpp b/src/lib/other/statusbarmessage.cpp
index 549a64336..e7bd0ffc0 100644
--- a/src/lib/other/statusbarmessage.cpp
+++ b/src/lib/other/statusbarmessage.cpp
@@ -138,7 +138,7 @@ void StatusBarMessage::showMessage(const QString &message)
void StatusBarMessage::clearMessage()
{
if (p_QupZilla->statusBar()->isVisible()) {
- p_QupZilla->statusBar()->showMessage("");
+ p_QupZilla->statusBar()->showMessage(QString());
}
else {
m_statusBarText->hideDelayed();
diff --git a/src/lib/plugins/speeddial.cpp b/src/lib/plugins/speeddial.cpp
index f04b8d719..8707a84f5 100644
--- a/src/lib/plugins/speeddial.cpp
+++ b/src/lib/plugins/speeddial.cpp
@@ -45,8 +45,8 @@ void SpeedDial::loadSettings()
Settings settings;
settings.beginGroup("SpeedDial");
- QString allPages = settings.value("pages", "").toString();
- m_backgroundImage = settings.value("background", "").toString();
+ QString allPages = settings.value("pages", QString()).toString();
+ m_backgroundImage = settings.value("background", QString()).toString();
m_backgroundImageSize = settings.value("backsize", "auto").toString();
m_maxPagesInRow = settings.value("pagesrow", 4).toInt();
m_sizeOfSpeedDials = settings.value("sdsize", 231).toInt();
@@ -217,7 +217,7 @@ QString SpeedDial::initialScript()
imgSource = "qrc:html/loading.gif";
if (page.url.isEmpty()) {
- imgSource = "";
+ imgSource.clear();
}
}
else {
diff --git a/src/lib/popupwindow/popupstatusbarmessage.cpp b/src/lib/popupwindow/popupstatusbarmessage.cpp
index 8141c35d1..17d854529 100644
--- a/src/lib/popupwindow/popupstatusbarmessage.cpp
+++ b/src/lib/popupwindow/popupstatusbarmessage.cpp
@@ -77,7 +77,7 @@ void PopupStatusBarMessage::showMessage(const QString &message)
void PopupStatusBarMessage::clearMessage()
{
if (m_popupWindow->statusBar()->isVisible()) {
- m_popupWindow->statusBar()->showMessage("");
+ m_popupWindow->statusBar()->showMessage(QString());
}
else {
m_statusBarText->hideDelayed();
diff --git a/src/lib/preferences/autofillmanager.ui b/src/lib/preferences/autofillmanager.ui
index 5aa0ca745..298ac3853 100644
--- a/src/lib/preferences/autofillmanager.ui
+++ b/src/lib/preferences/autofillmanager.ui
@@ -10,9 +10,6 @@
348
-
-
-
-
diff --git a/src/lib/preferences/pluginslist.ui b/src/lib/preferences/pluginslist.ui
index 76a865092..2e9648938 100644
--- a/src/lib/preferences/pluginslist.ui
+++ b/src/lib/preferences/pluginslist.ui
@@ -10,9 +10,6 @@
462
-
-
-
0
diff --git a/src/lib/rss/rssnotification.ui b/src/lib/rss/rssnotification.ui
index ffd737100..f0ef9620e 100644
--- a/src/lib/rss/rssnotification.ui
+++ b/src/lib/rss/rssnotification.ui
@@ -10,9 +10,6 @@
36
-
-
-
2
diff --git a/src/lib/rss/rsswidget.ui b/src/lib/rss/rsswidget.ui
index 2bd9fd28f..425f77650 100644
--- a/src/lib/rss/rsswidget.ui
+++ b/src/lib/rss/rsswidget.ui
@@ -10,9 +10,6 @@
70
-
-
-
0
diff --git a/src/lib/sidebar/sidebar.cpp b/src/lib/sidebar/sidebar.cpp
index c9ee47e40..b0b0087f3 100644
--- a/src/lib/sidebar/sidebar.cpp
+++ b/src/lib/sidebar/sidebar.cpp
@@ -41,7 +41,7 @@ SideBar::SideBar(SideBarManager* manager, QupZilla* mainClass)
m_layout->setSpacing(0);
setLayout(m_layout);
- m_titleBar = new DockTitleBarWidget("", this);
+ m_titleBar = new DockTitleBarWidget(QString(), this);
m_layout->addWidget(m_titleBar);
}
diff --git a/src/lib/tools/certificateinfowidget.cpp b/src/lib/tools/certificateinfowidget.cpp
index e5773b8df..c8eeda8c5 100644
--- a/src/lib/tools/certificateinfowidget.cpp
+++ b/src/lib/tools/certificateinfowidget.cpp
@@ -279,8 +279,8 @@ QString CertificateInfoWidget::clearCertSpecialSymbols(const QString &string)
n.replace("\\xC2\\xBD", "1/2"); // one half
n.replace("\\xC2\\xBE", "3/4"); // three quarters
n.replace("\\xCA\\xBF", "\\x27"); // c-single quote
- n.replace("\\xCC\\xA8", ""); // modifier - under curve
- n.replace("\\xCC\\xB1", ""); // modifier - under line
+ n.replace("\\xCC\\xA8", QChar()); // modifier - under curve
+ n.replace("\\xCC\\xB1", QChar()); // modifier - under line
return n;
}
diff --git a/src/lib/tools/docktitlebarwidget.ui b/src/lib/tools/docktitlebarwidget.ui
index 57446347a..05d74d713 100644
--- a/src/lib/tools/docktitlebarwidget.ui
+++ b/src/lib/tools/docktitlebarwidget.ui
@@ -27,11 +27,7 @@
0
-
-
-
-
-
-
+
-
diff --git a/src/lib/webview/jsalert.ui b/src/lib/webview/jsalert.ui
index 9e23ecb70..82c69ae17 100644
--- a/src/lib/webview/jsalert.ui
+++ b/src/lib/webview/jsalert.ui
@@ -10,9 +10,6 @@
374
-
-
-
0
diff --git a/src/lib/webview/jsconfirm.ui b/src/lib/webview/jsconfirm.ui
index d12535cdd..3bf9a9825 100644
--- a/src/lib/webview/jsconfirm.ui
+++ b/src/lib/webview/jsconfirm.ui
@@ -10,9 +10,6 @@
344
-
-
-
0
diff --git a/src/lib/webview/jsprompt.ui b/src/lib/webview/jsprompt.ui
index 4d8b7ffde..465af2046 100644
--- a/src/lib/webview/jsprompt.ui
+++ b/src/lib/webview/jsprompt.ui
@@ -10,9 +10,6 @@
300
-
-
-
0
diff --git a/src/lib/webview/siteinfowidget.ui b/src/lib/webview/siteinfowidget.ui
index 88aa8aa7c..6c9a66247 100644
--- a/src/lib/webview/siteinfowidget.ui
+++ b/src/lib/webview/siteinfowidget.ui
@@ -16,9 +16,6 @@
0
-
-
-
0
diff --git a/src/lib/webview/tabbedwebview.cpp b/src/lib/webview/tabbedwebview.cpp
index 0b9a7d90d..728424860 100644
--- a/src/lib/webview/tabbedwebview.cpp
+++ b/src/lib/webview/tabbedwebview.cpp
@@ -218,11 +218,11 @@ void TabbedWebView::linkHovered(const QString &link, const QString &title, const
Q_UNUSED(content)
if (isCurrent()) {
- if (link != "") {
- p_QupZilla->statusBarMessage()->showMessage(link);
+ if (link.isEmpty()) {
+ p_QupZilla->statusBarMessage()->clearMessage();
}
else {
- p_QupZilla->statusBarMessage()->clearMessage();
+ p_QupZilla->statusBarMessage()->showMessage(link);
}
}
}
diff --git a/src/lib/webview/tabwidget.cpp b/src/lib/webview/tabwidget.cpp
index 576ba9f1f..21dd46be2 100644
--- a/src/lib/webview/tabwidget.cpp
+++ b/src/lib/webview/tabwidget.cpp
@@ -303,10 +303,10 @@ int TabWidget::addView(QNetworkRequest req, const QString &title, const Qz::NewT
int index;
if (position == -1) {
- index = addTab(new WebTab(p_QupZilla, locBar), "");
+ index = addTab(new WebTab(p_QupZilla, locBar), QString());
}
else {
- index = insertTab(position, new WebTab(p_QupZilla, locBar), "");
+ index = insertTab(position, new WebTab(p_QupZilla, locBar), QString());
}
TabbedWebView* webView = weTab(index)->view();
@@ -505,7 +505,7 @@ void TabWidget::setTabText(int index, const QString &text)
if (WebTab* webTab = weTab(index)) {
if (webTab->isPinned()) {
- newtext = "";
+ newtext.clear();
}
}
diff --git a/src/lib/webview/webtab.cpp b/src/lib/webview/webtab.cpp
index 7c513702a..843c9c663 100644
--- a/src/lib/webview/webtab.cpp
+++ b/src/lib/webview/webtab.cpp
@@ -307,7 +307,7 @@ void WebTab::pinTab(int index)
m_pinned = true;
tabWidget->setCurrentIndex(0); // <<-- those 2 lines fixes
tabWidget->getTabBar()->moveTab(index, 0); // | weird behavior with bad
- tabWidget->setTabText(0, ""); // | tabwidget update if we
+ tabWidget->setTabText(0, QString()); // | tabwidget update if we
tabWidget->setCurrentIndex(0); // <<-- are moving current tab
tabWidget->getTabBar()->updateCloseButton(0);
}
diff --git a/src/lib/webview/webview.cpp b/src/lib/webview/webview.cpp
index 9e110ced7..322515a6d 100644
--- a/src/lib/webview/webview.cpp
+++ b/src/lib/webview/webview.cpp
@@ -821,7 +821,7 @@ void WebView::createLinkContextMenu(QMenu* menu, const QWebHitTestResult &hitTes
{
// Workaround for QtWebKit <= 2.0 when selecting link text on right click
if (page()->selectedText() == hitTest.linkText()) {
- findText("");
+ findText(QString());
}
menu->addSeparator();
@@ -882,7 +882,7 @@ void WebView::createSelectedTextContextMenu(QMenu* menu, const QWebHitTestResult
connect(gtwact, SIGNAL(middleClicked()), this, SLOT(openUrlInBackgroundTab()));
menu->addAction(gtwact);
Action* dictact = new Action(QIcon::fromTheme("accessories-dictionary"), tr("Dictionary"));
- dictact->setData(QUrl("http://" + (langCode != "" ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText));
+ dictact->setData(QUrl("http://" + (!langCode.isEmpty() ? langCode + "." : langCode) + "wiktionary.org/wiki/Special:Search?search=" + selectedText));
connect(dictact, SIGNAL(triggered()), this, SLOT(openUrlInSelectedTab()));
connect(dictact, SIGNAL(middleClicked()), this, SLOT(openUrlInBackgroundTab()));
menu->addAction(dictact);
diff --git a/src/plugins/PIM/PIM_handler.cpp b/src/plugins/PIM/PIM_handler.cpp
index bd97f89bb..10b7bb348 100644
--- a/src/plugins/PIM/PIM_handler.cpp
+++ b/src/plugins/PIM/PIM_handler.cpp
@@ -41,20 +41,20 @@ void PIM_Handler::loadSettings()
QSettings settings(m_settingsFile, QSettings::IniFormat);
settings.beginGroup("PIM");
- m_allInfo[PI_LastName] = settings.value("LastName", "").toString();
- m_allInfo[PI_FirstName] = settings.value("FirstName", "").toString();
- m_allInfo[PI_Email] = settings.value("Email", "").toString();
- m_allInfo[PI_Mobile] = settings.value("Mobile", "").toString();
- m_allInfo[PI_Phone] = settings.value("Phone", "").toString();
- m_allInfo[PI_Address] = settings.value("Address", "").toString();
- m_allInfo[PI_City] = settings.value("City", "").toString();
- m_allInfo[PI_Zip] = settings.value("Zip", "").toString();
- m_allInfo[PI_State] = settings.value("State", "").toString();
- m_allInfo[PI_Country] = settings.value("Country", "").toString();
- m_allInfo[PI_HomePage] = settings.value("HomePage", "").toString();
- m_allInfo[PI_Special1] = settings.value("Special1", "").toString();
- m_allInfo[PI_Special2] = settings.value("Special2", "").toString();
- m_allInfo[PI_Special3] = settings.value("Special3", "").toString();
+ m_allInfo[PI_LastName] = settings.value("LastName", QString()).toString();
+ m_allInfo[PI_FirstName] = settings.value("FirstName", QString()).toString();
+ m_allInfo[PI_Email] = settings.value("Email", QString()).toString();
+ m_allInfo[PI_Mobile] = settings.value("Mobile", QString()).toString();
+ m_allInfo[PI_Phone] = settings.value("Phone", QString()).toString();
+ m_allInfo[PI_Address] = settings.value("Address", QString()).toString();
+ m_allInfo[PI_City] = settings.value("City", QString()).toString();
+ m_allInfo[PI_Zip] = settings.value("Zip", QString()).toString();
+ m_allInfo[PI_State] = settings.value("State", QString()).toString();
+ m_allInfo[PI_Country] = settings.value("Country", QString()).toString();
+ m_allInfo[PI_HomePage] = settings.value("HomePage", QString()).toString();
+ m_allInfo[PI_Special1] = settings.value("Special1", QString()).toString();
+ m_allInfo[PI_Special2] = settings.value("Special2", QString()).toString();
+ m_allInfo[PI_Special3] = settings.value("Special3", QString()).toString();
settings.endGroup();
m_translations[PI_LastName] = tr("Last Name");
diff --git a/src/plugins/PIM/PIM_settings.cpp b/src/plugins/PIM/PIM_settings.cpp
index 4af7d8cb8..cb77f55e2 100644
--- a/src/plugins/PIM/PIM_settings.cpp
+++ b/src/plugins/PIM/PIM_settings.cpp
@@ -33,20 +33,20 @@ PIM_Settings::PIM_Settings(const QString &settingsFile, QWidget* parent)
QSettings settings(m_settingsFile, QSettings::IniFormat);
settings.beginGroup("PIM");
- ui->pim_firstname->setText(settings.value("FirstName", "").toString());
- ui->pim_lastname->setText(settings.value("LastName", "").toString());
- ui->pim_email->setText(settings.value("Email", "").toString());
- ui->pim_phone->setText(settings.value("Phone", "").toString());
- ui->pim_mobile->setText(settings.value("Mobile", "").toString());
- ui->pim_address->setText(settings.value("Address", "").toString());
- ui->pim_city->setText(settings.value("City", "").toString());
- ui->pim_zip->setText(settings.value("Zip", "").toString());
- ui->pim_state->setText(settings.value("State", "").toString());
- ui->pim_country->setText(settings.value("Country", "").toString());
- ui->pim_homepage->setText(settings.value("HomePage", "").toString());
- ui->pim_special1->setText(settings.value("Special1", "").toString());
- ui->pim_special2->setText(settings.value("Special2", "").toString());
- ui->pim_special3->setText(settings.value("Special3", "").toString());
+ ui->pim_firstname->setText(settings.value("FirstName", QString()).toString());
+ ui->pim_lastname->setText(settings.value("LastName", QString()).toString());
+ ui->pim_email->setText(settings.value("Email", QString()).toString());
+ ui->pim_phone->setText(settings.value("Phone", QString()).toString());
+ ui->pim_mobile->setText(settings.value("Mobile", QString()).toString());
+ ui->pim_address->setText(settings.value("Address", QString()).toString());
+ ui->pim_city->setText(settings.value("City", QString()).toString());
+ ui->pim_zip->setText(settings.value("Zip", QString()).toString());
+ ui->pim_state->setText(settings.value("State", QString()).toString());
+ ui->pim_country->setText(settings.value("Country", QString()).toString());
+ ui->pim_homepage->setText(settings.value("HomePage", QString()).toString());
+ ui->pim_special1->setText(settings.value("Special1", QString()).toString());
+ ui->pim_special2->setText(settings.value("Special2", QString()).toString());
+ ui->pim_special3->setText(settings.value("Special3", QString()).toString());
settings.endGroup();
connect(this, SIGNAL(accepted()), this, SLOT(dialogAccepted()));
|