]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Don't focus the URL line edit when switching tabs if it is blank but a new page is...
authorSoren Stoutner <soren@stoutner.com>
Tue, 24 Jun 2025 18:42:17 +0000 (11:42 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 24 Jun 2025 18:42:17 +0000 (11:42 -0700)
src/dialogs/SettingsDialog.cpp
src/widgets/TabWidget.cpp
src/windows/BrowserWindow.cpp

index 0e4d5f7b7b78595ebe9cfd7822f14e41c7fb3a4a..154fc7f2c1c65d5f9f59f760c66c90addd885a65 100644 (file)
@@ -71,8 +71,8 @@ SettingsDialog::SettingsDialog(QWidget *parentWidgetPointer, KCoreConfigSkeleton
     };
 
     // Update the status of the DOM storage check box when either JavaScript or local storage are changed.
-    connect(javaScriptCheckBoxPointer, &QCheckBox::stateChanged, this, updateCheckBoxes);
-    connect(localStorageCheckBoxPointer, &QCheckBox::stateChanged, this, updateCheckBoxes);
+    connect(javaScriptCheckBoxPointer, &QCheckBox::checkStateChanged, this, updateCheckBoxes);
+    connect(localStorageCheckBoxPointer, &QCheckBox::checkStateChanged, this, updateCheckBoxes);
 
     // Populate the combo box labels.
     updateUserAgentLabel(userAgentComboBoxPointer->currentText());
index 4ce9b8297d5436864086700e0ad33a9cab246265..ce8978b6ca46f11016090175d137f1b22af01667 100644 (file)
@@ -1356,11 +1356,6 @@ void TabWidget::updateUiWithTabSettings()
     Q_EMIT updateUserAgentActions(currentWebEngineProfilePointer->httpUserAgent(), true);
     Q_EMIT updateZoomActions(currentPrivacyWebEngineViewPointer->zoomFactor());
 
-    // Update the URL.
-    Q_EMIT updateWindowTitle(currentPrivacyWebEngineViewPointer->title());
-    Q_EMIT updateDomainSettingsIndicator(currentPrivacyWebEngineViewPointer->domainSettingsName != QLatin1String(""));
-    Q_EMIT updateUrlLineEdit(QUrl(currentPrivacyWebEngineViewPointer->currentUrlText));
-
     // Update the find text.
     Q_EMIT updateFindText(currentPrivacyWebEngineViewPointer->findString, currentPrivacyWebEngineViewPointer->findCaseSensitive);
     Q_EMIT updateFindTextResults(currentPrivacyWebEngineViewPointer->findTextResult);
@@ -1370,6 +1365,11 @@ void TabWidget::updateUiWithTabSettings()
         Q_EMIT showProgressBar(currentPrivacyWebEngineViewPointer->loadProgressInt);
     else
         Q_EMIT hideProgressBar();
+
+    // Update the URL.
+    Q_EMIT updateWindowTitle(currentPrivacyWebEngineViewPointer->title());
+    Q_EMIT updateDomainSettingsIndicator(currentPrivacyWebEngineViewPointer->domainSettingsName != QLatin1String(""));
+    Q_EMIT updateUrlLineEdit(QUrl(currentPrivacyWebEngineViewPointer->currentUrlText));
 }
 
 void TabWidget::useNativeKdeDownloader(QUrl &downloadUrl, QString &suggestedFileName)
index dcc884d69d586a883dabb02a44d5c34724bed4f6..2ff9a11b94a13ead9438d91b55671df32295eff9 100644 (file)
@@ -2130,8 +2130,8 @@ void BrowserWindow::updateUrlLineEdit(const QUrl &newUrl)
         // Update the bookmarked action.
         updateBookmarkedAction();
 
-        // Set the focus if the new URL is blank.
-        if (newUrlString == QStringLiteral(""))
+        // Set the focus if the new URL is blank and a website is not currently loading.  <https://redmine.stoutner.com/issues/1281>
+        if (newUrlString == QStringLiteral("") && progressBarPointer->isHidden())
             urlLineEditPointer->setFocus();
     }