From 831704f3b2cb1232c8e82e3b832ca2769800ea78 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Mon, 6 Jan 2025 07:16:52 -0500 Subject: [PATCH] Trim file path settings fields prior to save * Fixes #11630 --- src/browser/BrowserSettingsWidget.cpp | 2 +- src/sshagent/AgentSettingsWidget.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/browser/BrowserSettingsWidget.cpp b/src/browser/BrowserSettingsWidget.cpp index 5233cf2ac..5a4ccce8d 100644 --- a/src/browser/BrowserSettingsWidget.cpp +++ b/src/browser/BrowserSettingsWidget.cpp @@ -178,7 +178,7 @@ void BrowserSettingsWidget::loadSettings() QString BrowserSettingsWidget::resolveCustomProxyLocation() { auto settings = browserSettings(); - auto proxyLocation = m_ui->customProxyLocation->text(); + auto proxyLocation = m_ui->customProxyLocation->text().trimmed(); proxyLocation = settings->replaceTildeHomePath(proxyLocation); return proxyLocation; } diff --git a/src/sshagent/AgentSettingsWidget.cpp b/src/sshagent/AgentSettingsWidget.cpp index 1a55e14fa..bdad6e30e 100644 --- a/src/sshagent/AgentSettingsWidget.cpp +++ b/src/sshagent/AgentSettingsWidget.cpp @@ -90,9 +90,9 @@ void AgentSettingsWidget::loadSettings() void AgentSettingsWidget::saveSettings() { - auto sshAuthSockOverride = m_ui->sshAuthSockOverrideEdit->text(); + auto sshAuthSockOverride = m_ui->sshAuthSockOverrideEdit->text().trimmed(); sshAgent()->setAuthSockOverride(sshAuthSockOverride); - auto sshSecurityKeyProviderOverride = m_ui->sshSecurityKeyProviderOverrideEdit->text(); + auto sshSecurityKeyProviderOverride = m_ui->sshSecurityKeyProviderOverrideEdit->text().trimmed(); sshAgent()->setSecurityKeyProviderOverride(sshSecurityKeyProviderOverride); #ifdef Q_OS_WIN sshAgent()->setUsePageant(m_ui->usePageantRadioButton->isChecked() || m_ui->useBothRadioButton->isChecked());