From e3cf9424cc09eb0bc98db0cdc141522673d85b31 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Wed, 30 Oct 2024 00:53:08 +0100 Subject: [PATCH] Remove FTP support The sepport was removed from Chromium, QtWebEngine. BUG: 494222 Signed-off-by: Juraj Oravec --- linux/applications/org.kde.falkon.desktop | 2 +- src/lib/app/mainapplication.cpp | 3 --- src/lib/history/history.cpp | 2 +- src/lib/webengine/webpage.cpp | 1 - windows/installer.nsi | 3 --- windows/strings.nsh | 2 +- 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/linux/applications/org.kde.falkon.desktop b/linux/applications/org.kde.falkon.desktop index f491a33f2..5114c3b61 100644 --- a/linux/applications/org.kde.falkon.desktop +++ b/linux/applications/org.kde.falkon.desktop @@ -134,7 +134,7 @@ GenericName[zh_CN]=网页浏览器 GenericName[zh_TW]=網路瀏覽器 Exec=falkon %u StartupWMClass=Falkon -MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;application/x-mimearchive; +MimeType=text/html;application/xhtml+xml;x-scheme-handler/http;x-scheme-handler/https;application/x-mimearchive; Terminal=false Actions=NewTab;NewWindow;PrivateBrowsing; diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index aa9b77327..d604bb1aa 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -281,7 +281,6 @@ MainApplication::MainApplication(int &argc, char** argv) QSettings::setDefaultFormat(QSettings::IniFormat); QDesktopServices::setUrlHandler(QSL("http"), this, "addNewTab"); QDesktopServices::setUrlHandler(QSL("https"), this, "addNewTab"); - QDesktopServices::setUrlHandler(QSL("ftp"), this, "addNewTab"); ProfileManager profileManager; profileManager.initConfigDir(); @@ -394,7 +393,6 @@ MainApplication::~MainApplication() QDesktopServices::unsetUrlHandler(QSL("http")); QDesktopServices::unsetUrlHandler(QSL("https")); - QDesktopServices::unsetUrlHandler(QSL("ftp")); IconProvider::instance()->saveIconsToDatabase(); @@ -1272,7 +1270,6 @@ RegisterQAppAssociation* MainApplication::associationManager() m_registerQAppAssociation->addCapability(QSL(".htm"), QSL("FalkonHTML"), QSL("Falkon HTML Document"), fileIconPath, RegisterQAppAssociation::FileAssociation); m_registerQAppAssociation->addCapability(QSL("http"), QSL("FalkonURL"), QSL("Falkon URL"), appIconPath, RegisterQAppAssociation::UrlAssociation); m_registerQAppAssociation->addCapability(QSL("https"), QSL("FalkonURL"), QSL("Falkon URL"), appIconPath, RegisterQAppAssociation::UrlAssociation); - m_registerQAppAssociation->addCapability(QSL("ftp"), QSL("FalkonURL"), QSL("Falkon URL"), appIconPath, RegisterQAppAssociation::UrlAssociation); } return m_registerQAppAssociation; } diff --git a/src/lib/history/history.cpp b/src/lib/history/history.cpp index 20daefde0..ead1ad120 100644 --- a/src/lib/history/history.cpp +++ b/src/lib/history/history.cpp @@ -72,7 +72,7 @@ void History::addHistoryEntry(const QUrl &url, QString title) } const QStringList schemes = { - QSL("http"), QSL("https"), QSL("ftp"), QSL("file") + QSL("http"), QSL("https"), QSL("file") }; if (!schemes.contains(url.scheme()) && !qzSettings->allowedSchemes.contains(url.scheme())) { diff --git a/src/lib/webengine/webpage.cpp b/src/lib/webengine/webpage.cpp index a9ddaf706..aa62eb7c1 100644 --- a/src/lib/webengine/webpage.cpp +++ b/src/lib/webengine/webpage.cpp @@ -212,7 +212,6 @@ QStringList WebPage::internalSchemes() QSL("http"), QSL("https"), QSL("file"), - QSL("ftp"), QSL("data"), QSL("about"), QSL("view-source"), diff --git a/windows/installer.nsi b/windows/installer.nsi index 2d67bf07a..225c3013c 100644 --- a/windows/installer.nsi +++ b/windows/installer.nsi @@ -242,7 +242,6 @@ SectionGroup "${TITLE_SecSetASDefault}" SecSetASDefault StrCmp $installAsPortable "NO" 0 skipSecProtocols ${RegisterAssociation} "http" "$INSTDIR\falkon.exe" "FalkonURL" "Falkon URL" "$INSTDIR\falkon.exe,0" "protocol" ${RegisterAssociation} "https" "$INSTDIR\falkon.exe" "FalkonURL" "Falkon URL" "$INSTDIR\falkon.exe,0" "protocol" - ${RegisterAssociation} "ftp" "$INSTDIR\falkon.exe" "FalkonURL" "Falkon URL" "$INSTDIR\falkon.exe,0" "protocol" ${UpdateSystemIcons} skipSecProtocols: SectionEnd @@ -362,7 +361,6 @@ notRunning: ${UnRegisterAssociation} ".html" "FalkonHTML" "$INSTDIR\falkon.exe" "file" ${UnRegisterAssociation} "http" "FalkonURL" "$INSTDIR\falkon.exe" "protocol" ${UnRegisterAssociation} "https" "FalkonURL" "$INSTDIR\falkon.exe" "protocol" - ${UnRegisterAssociation} "ftp" "FalkonURL" "$INSTDIR\falkon.exe" "protocol" ${UpdateSystemIcons} SectionEnd @@ -423,7 +421,6 @@ Function RegisterCapabilities WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\FileAssociations" ".html" "FalkonHTML" WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "http" "FalkonURL" WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "https" "FalkonURL" - WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "ftp" "FalkonURL" WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\Startmenu" "StartMenuInternet" "$INSTDIR\falkon.exe" WriteRegStr HKLM "SOFTWARE\RegisteredApplications" "${PRODUCT_NAME}" "${PRODUCT_CAPABILITIES_KEY}" ${EndIf} diff --git a/windows/strings.nsh b/windows/strings.nsh index 1da4a42a3..cbeeafed9 100644 --- a/windows/strings.nsh +++ b/windows/strings.nsh @@ -25,7 +25,7 @@ !define DESC_SecExtensions "Associate Falkon with .htm(l) files" !define DESC_SecThemes "Additional themes for Falkon" !define DESC_SecSetASDefault "Set Falkon as default internet browser" -!define DESC_SecProtocols "Associate Falkon with http(s) and ftp protocols" +!define DESC_SecProtocols "Associate Falkon with http(s) protocols" !define DESC_InstallationMode "Select installation mode" !define DESC_PortableInstallation "Falkon will be installed as a 'Portable Application' to the selected location."