1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 18:56:34 +01:00

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?).
This commit is contained in:
David Rosca 2015-11-06 17:44:33 +01:00
parent aa0ec8cbc0
commit d1a15906b5
6 changed files with 4 additions and 29 deletions

View File

@ -523,19 +523,6 @@ void LocationBar::keyPressEvent(QKeyEvent* event)
LineEdit::keyPressEvent(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() void LocationBar::loadStarted()
{ {
m_progressVisible = true; m_progressVisible = true;

View File

@ -83,7 +83,6 @@ private:
void focusInEvent(QFocusEvent* event); void focusInEvent(QFocusEvent* event);
void focusOutEvent(QFocusEvent* event); void focusOutEvent(QFocusEvent* event);
void keyPressEvent(QKeyEvent* event); void keyPressEvent(QKeyEvent* event);
void keyReleaseEvent(QKeyEvent* event);
void dropEvent(QDropEvent* event); void dropEvent(QDropEvent* event);
void paintEvent(QPaintEvent* event); void paintEvent(QPaintEvent* event);

View File

@ -30,7 +30,6 @@ void QzSettings::loadSettings()
settings.beginGroup("AddressBar"); settings.beginGroup("AddressBar");
selectAllOnDoubleClick = settings.value("SelectAllTextOnDoubleClick", true).toBool(); selectAllOnDoubleClick = settings.value("SelectAllTextOnDoubleClick", true).toBool();
selectAllOnClick = settings.value("SelectAllTextOnClick", false).toBool(); selectAllOnClick = settings.value("SelectAllTextOnClick", false).toBool();
addCountryWithAlt = settings.value("AddCountryDomainWithAltKey", true).toBool();
showLoadingProgress = settings.value("ShowLoadingProgress", false).toBool(); showLoadingProgress = settings.value("ShowLoadingProgress", false).toBool();
showLocationSuggestions = settings.value("showSuggestions", 0).toInt(); showLocationSuggestions = settings.value("showSuggestions", 0).toInt();
showSwitchTab = settings.value("showSwitchTab", true).toBool(); showSwitchTab = settings.value("showSwitchTab", true).toBool();

View File

@ -34,7 +34,6 @@ public:
// AddressBar // AddressBar
bool selectAllOnDoubleClick; bool selectAllOnDoubleClick;
bool selectAllOnClick; bool selectAllOnClick;
bool addCountryWithAlt;
bool showLoadingProgress; bool showLoadingProgress;
int showLocationSuggestions; int showLocationSuggestions;
bool showSwitchTab; bool showSwitchTab;

View File

@ -246,7 +246,6 @@ Preferences::Preferences(BrowserWindow* window)
ui->alwaysShowGoIcon->setChecked(settings.value("alwaysShowGoIcon", false).toBool()); ui->alwaysShowGoIcon->setChecked(settings.value("alwaysShowGoIcon", false).toBool());
ui->selectAllOnFocus->setChecked(settings.value("SelectAllTextOnDoubleClick", true).toBool()); ui->selectAllOnFocus->setChecked(settings.value("SelectAllTextOnDoubleClick", true).toBool());
ui->selectAllOnClick->setChecked(settings.value("SelectAllTextOnClick", false).toBool()); ui->selectAllOnClick->setChecked(settings.value("SelectAllTextOnClick", false).toBool());
ui->addCountryWithAlt->setChecked(settings.value("AddCountryDomainWithAltKey", true).toBool());
bool showPBinAB = settings.value("ShowLoadingProgress", false).toBool(); bool showPBinAB = settings.value("ShowLoadingProgress", false).toBool();
ui->showLoadingInAddressBar->setChecked(showPBinAB); ui->showLoadingInAddressBar->setChecked(showPBinAB);
ui->adressProgressSettings->setEnabled(showPBinAB); ui->adressProgressSettings->setEnabled(showPBinAB);
@ -943,7 +942,6 @@ void Preferences::saveSettings()
settings.setValue("showSwitchTab", ui->completionShowSwitchTab->isChecked()); settings.setValue("showSwitchTab", ui->completionShowSwitchTab->isChecked());
settings.setValue("SelectAllTextOnDoubleClick", ui->selectAllOnFocus->isChecked()); settings.setValue("SelectAllTextOnDoubleClick", ui->selectAllOnFocus->isChecked());
settings.setValue("SelectAllTextOnClick", ui->selectAllOnClick->isChecked()); settings.setValue("SelectAllTextOnClick", ui->selectAllOnClick->isChecked());
settings.setValue("AddCountryDomainWithAltKey", ui->addCountryWithAlt->isChecked());
settings.setValue("ShowLoadingProgress", ui->showLoadingInAddressBar->isChecked()); settings.setValue("ShowLoadingProgress", ui->showLoadingInAddressBar->isChecked());
settings.setValue("ProgressStyle", ui->progressStyleSelector->currentIndex()); settings.setValue("ProgressStyle", ui->progressStyleSelector->currentIndex());
settings.setValue("UseCustomProgressColor", ui->checkBoxCustomProgressColor->isChecked()); settings.setValue("UseCustomProgressColor", ui->checkBoxCustomProgressColor->isChecked());

View File

@ -140,8 +140,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>596</width> <width>582</width>
<height>470</height> <height>489</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_4"> <layout class="QVBoxLayout" name="verticalLayout_4">
@ -1698,13 +1698,6 @@
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="addCountryWithAlt">
<property name="text">
<string>Add .co.uk domain by pressing ALT key in address bar</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="singleKeyShortcuts"> <widget class="QCheckBox" name="singleKeyShortcuts">
<property name="toolTip"> <property name="toolTip">
<string>Existing shortcuts:&lt;br/&gt;&lt;b&gt;1&lt;/b&gt; - previous tab&lt;br/&gt;&lt;b&gt;2&lt;/b&gt; - next tab&lt;br/&gt;&lt;b&gt;/&lt;/b&gt; - search on page</string> <string>Existing shortcuts:&lt;br/&gt;&lt;b&gt;1&lt;/b&gt; - previous tab&lt;br/&gt;&lt;b&gt;2&lt;/b&gt; - next tab&lt;br/&gt;&lt;b&gt;/&lt;/b&gt; - search on page</string>
@ -1714,7 +1707,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="5" column="0" colspan="2"> <item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="closeAppWithCtrlQ"> <widget class="QCheckBox" name="closeAppWithCtrlQ">
<property name="toolTip"> <property name="toolTip">
<string>If unchecked, prevents accidental exit from the application if the Ctrl-W shortcut was intended.</string> <string>If unchecked, prevents accidental exit from the application if the Ctrl-W shortcut was intended.</string>
@ -1724,7 +1717,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="6" column="1"> <item row="5" column="1">
<spacer name="verticalSpacer_13"> <spacer name="verticalSpacer_13">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>