From d1a15906b58e18ad814778e9bd68805bf06e993a Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 6 Nov 2015 17:44:33 +0100 Subject: [PATCH] LocationBar: Drop "Add .co.uk when pressing ALT" feature It doesn't work when completer popup is displayed and also it was weird feature that could confuse users (Why was .co.uk added to the text when I pressed ALT?). --- src/lib/navigation/locationbar.cpp | 13 ------------- src/lib/navigation/locationbar.h | 1 - src/lib/other/qzsettings.cpp | 1 - src/lib/other/qzsettings.h | 1 - src/lib/preferences/preferences.cpp | 2 -- src/lib/preferences/preferences.ui | 15 ++++----------- 6 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/lib/navigation/locationbar.cpp b/src/lib/navigation/locationbar.cpp index 49b623051..bb697cd77 100644 --- a/src/lib/navigation/locationbar.cpp +++ b/src/lib/navigation/locationbar.cpp @@ -523,19 +523,6 @@ void LocationBar::keyPressEvent(QKeyEvent* event) LineEdit::keyPressEvent(event); } -void LocationBar::keyReleaseEvent(QKeyEvent* event) -{ - QString localDomain = tr(".co.uk", "Append domain name on ALT + Enter = Should be different for every country"); - - if (event->key() == Qt::Key_Alt && m_holdingAlt && qzSettings->addCountryWithAlt && - !text().endsWith(localDomain) && !text().endsWith(QLatin1Char('/')) - ) { - LineEdit::setText(text().append(localDomain)); - } - - LineEdit::keyReleaseEvent(event); -} - void LocationBar::loadStarted() { m_progressVisible = true; diff --git a/src/lib/navigation/locationbar.h b/src/lib/navigation/locationbar.h index 30e2d8309..1ce5669ed 100644 --- a/src/lib/navigation/locationbar.h +++ b/src/lib/navigation/locationbar.h @@ -83,7 +83,6 @@ private: void focusInEvent(QFocusEvent* event); void focusOutEvent(QFocusEvent* event); void keyPressEvent(QKeyEvent* event); - void keyReleaseEvent(QKeyEvent* event); void dropEvent(QDropEvent* event); void paintEvent(QPaintEvent* event); diff --git a/src/lib/other/qzsettings.cpp b/src/lib/other/qzsettings.cpp index 6e293c665..97362e21c 100644 --- a/src/lib/other/qzsettings.cpp +++ b/src/lib/other/qzsettings.cpp @@ -30,7 +30,6 @@ void QzSettings::loadSettings() settings.beginGroup("AddressBar"); selectAllOnDoubleClick = settings.value("SelectAllTextOnDoubleClick", true).toBool(); selectAllOnClick = settings.value("SelectAllTextOnClick", false).toBool(); - addCountryWithAlt = settings.value("AddCountryDomainWithAltKey", true).toBool(); showLoadingProgress = settings.value("ShowLoadingProgress", false).toBool(); showLocationSuggestions = settings.value("showSuggestions", 0).toInt(); showSwitchTab = settings.value("showSwitchTab", true).toBool(); diff --git a/src/lib/other/qzsettings.h b/src/lib/other/qzsettings.h index c435a6992..f9134726f 100644 --- a/src/lib/other/qzsettings.h +++ b/src/lib/other/qzsettings.h @@ -34,7 +34,6 @@ public: // AddressBar bool selectAllOnDoubleClick; bool selectAllOnClick; - bool addCountryWithAlt; bool showLoadingProgress; int showLocationSuggestions; bool showSwitchTab; diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp index 41ab1496f..124d06ce8 100644 --- a/src/lib/preferences/preferences.cpp +++ b/src/lib/preferences/preferences.cpp @@ -246,7 +246,6 @@ Preferences::Preferences(BrowserWindow* window) ui->alwaysShowGoIcon->setChecked(settings.value("alwaysShowGoIcon", false).toBool()); ui->selectAllOnFocus->setChecked(settings.value("SelectAllTextOnDoubleClick", true).toBool()); ui->selectAllOnClick->setChecked(settings.value("SelectAllTextOnClick", false).toBool()); - ui->addCountryWithAlt->setChecked(settings.value("AddCountryDomainWithAltKey", true).toBool()); bool showPBinAB = settings.value("ShowLoadingProgress", false).toBool(); ui->showLoadingInAddressBar->setChecked(showPBinAB); ui->adressProgressSettings->setEnabled(showPBinAB); @@ -943,7 +942,6 @@ void Preferences::saveSettings() settings.setValue("showSwitchTab", ui->completionShowSwitchTab->isChecked()); settings.setValue("SelectAllTextOnDoubleClick", ui->selectAllOnFocus->isChecked()); settings.setValue("SelectAllTextOnClick", ui->selectAllOnClick->isChecked()); - settings.setValue("AddCountryDomainWithAltKey", ui->addCountryWithAlt->isChecked()); settings.setValue("ShowLoadingProgress", ui->showLoadingInAddressBar->isChecked()); settings.setValue("ProgressStyle", ui->progressStyleSelector->currentIndex()); settings.setValue("UseCustomProgressColor", ui->checkBoxCustomProgressColor->isChecked()); diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui index 70704cd48..120324bb2 100644 --- a/src/lib/preferences/preferences.ui +++ b/src/lib/preferences/preferences.ui @@ -140,8 +140,8 @@ 0 0 - 596 - 470 + 582 + 489 @@ -1698,13 +1698,6 @@ - - - Add .co.uk domain by pressing ALT key in address bar - - - - Existing shortcuts:<br/><b>1</b> - previous tab<br/><b>2</b> - next tab<br/><b>/</b> - search on page @@ -1714,7 +1707,7 @@ - + If unchecked, prevents accidental exit from the application if the Ctrl-W shortcut was intended. @@ -1724,7 +1717,7 @@ - + Qt::Vertical