From da3f8b00a7f4652d97cb8d79599ddd2df7fdb344 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 10 Jul 2024 15:07:30 +0800 Subject: [PATCH 01/19] Limit clickable area of enable macOS vfs checkbox to its text/box Signed-off-by: Claudio Cambra --- src/gui/macOS/ui/FileProviderSettings.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/macOS/ui/FileProviderSettings.qml b/src/gui/macOS/ui/FileProviderSettings.qml index c9fc2f23cb74c..a4efa0a32eae9 100644 --- a/src/gui/macOS/ui/FileProviderSettings.qml +++ b/src/gui/macOS/ui/FileProviderSettings.qml @@ -78,7 +78,6 @@ Page { CheckBox { id: vfsEnabledCheckBox - Layout.fillWidth: true text: qsTr("Enable virtual files") checked: root.controller.vfsEnabledForAccount(root.accountUserIdAtHost) onClicked: root.controller.setVfsEnabledForAccount(root.accountUserIdAtHost, checked) From cd17c8e041322cc854300d9fc369205276f80710 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 10 Jul 2024 15:07:49 +0800 Subject: [PATCH 02/19] Limit clickable area of macOS vfs fast sync checkbox to its drawing zone Signed-off-by: Claudio Cambra --- src/gui/macOS/ui/FileProviderFastEnumerationSettings.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/macOS/ui/FileProviderFastEnumerationSettings.qml b/src/gui/macOS/ui/FileProviderFastEnumerationSettings.qml index b40dad56b48b5..ce94746298d5d 100644 --- a/src/gui/macOS/ui/FileProviderFastEnumerationSettings.qml +++ b/src/gui/macOS/ui/FileProviderFastEnumerationSettings.qml @@ -34,7 +34,6 @@ Column { CheckBox { id: fastEnumerationEnabledCheckBox - width: parent.width text: qsTr("Enable fast sync") checked: root.fastEnumerationEnabled onClicked: root.fastEnumerationEnabledToggled(checked) From 2e18a85cbd32adeec1986aad6d07304838c5be0d Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:46:14 +0800 Subject: [PATCH 03/19] Add non-white talk and more-apps svgs Signed-off-by: Claudio Cambra --- theme.qrc.in | 2 ++ theme/more-apps.svg | 55 +++++++++++++++++++++++++++++++++++++++++++++ theme/talk-app.svg | 40 +++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 theme/more-apps.svg create mode 100644 theme/talk-app.svg diff --git a/theme.qrc.in b/theme.qrc.in index e8d88fc8a1b0c..2405e4335afe6 100644 --- a/theme.qrc.in +++ b/theme.qrc.in @@ -238,5 +238,7 @@ theme/delete.svg theme/send.svg theme/call-notification.wav + theme/more-apps.svg + theme/talk-app.svg diff --git a/theme/more-apps.svg b/theme/more-apps.svg new file mode 100644 index 0000000000000..6b1fd877350e4 --- /dev/null +++ b/theme/more-apps.svg @@ -0,0 +1,55 @@ + + diff --git a/theme/talk-app.svg b/theme/talk-app.svg new file mode 100644 index 0000000000000..40e01fe81caea --- /dev/null +++ b/theme/talk-app.svg @@ -0,0 +1,40 @@ + + + + + + From 059e3a7db7c022bc162f950b74ffc2400f28f831 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:48:10 +0800 Subject: [PATCH 04/19] Fix breakages in autosizing menu when item does not have expected internal properties Signed-off-by: Claudio Cambra --- src/gui/tray/AutoSizingMenu.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/tray/AutoSizingMenu.qml b/src/gui/tray/AutoSizingMenu.qml index 5be41907c6780..1d3134b373069 100644 --- a/src/gui/tray/AutoSizingMenu.qml +++ b/src/gui/tray/AutoSizingMenu.qml @@ -8,7 +8,7 @@ Menu { var padding = 0; for (var i = 0; i < count; ++i) { var item = itemAt(i); - result = Math.max(item.contentItem.implicitWidth, result); + result = Math.max(item.implicitWidth, result); padding = Math.max(item.padding, padding); } return result + padding * 2; From 6f76e9e87456f12f935c438dcc40c77f99ed8191 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:48:28 +0800 Subject: [PATCH 05/19] Remove unneeded graphical effects import in headerbutton Signed-off-by: Claudio Cambra --- src/gui/tray/HeaderButton.qml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/tray/HeaderButton.qml b/src/gui/tray/HeaderButton.qml index add4b487d5968..d126c6c4ccdf7 100644 --- a/src/gui/tray/HeaderButton.qml +++ b/src/gui/tray/HeaderButton.qml @@ -18,7 +18,6 @@ import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 -import QtGraphicalEffects 1.15 // Custom qml modules are in /theme (and included by resources.qrc) import Style 1.0 From fdc761562edcec2c58d3f549516d162a7ac90b21 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:48:52 +0800 Subject: [PATCH 06/19] Fix vertical center anchor in trayfoldersmenubutton Signed-off-by: Claudio Cambra --- src/gui/tray/TrayFoldersMenuButton.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/tray/TrayFoldersMenuButton.qml b/src/gui/tray/TrayFoldersMenuButton.qml index 23a5f5942aefb..fc984eba931ca 100644 --- a/src/gui/tray/TrayFoldersMenuButton.qml +++ b/src/gui/tray/TrayFoldersMenuButton.qml @@ -124,7 +124,7 @@ HeaderButton { width: imageWidth height: imageHeight - anchors.verticalCenter: parent + anchors.verticalCenter: parent.verticalCenter } From 21d5911e05b909210c6ff80a9c8a2ae3d858fea2 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:49:11 +0800 Subject: [PATCH 07/19] Fix use of sourceSize in TrayFoldersMenuButton Signed-off-by: Claudio Cambra --- src/gui/tray/TrayFoldersMenuButton.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/tray/TrayFoldersMenuButton.qml b/src/gui/tray/TrayFoldersMenuButton.qml index fc984eba931ca..6295edda893fa 100644 --- a/src/gui/tray/TrayFoldersMenuButton.qml +++ b/src/gui/tray/TrayFoldersMenuButton.qml @@ -146,7 +146,7 @@ HeaderButton { cache: true source: "image://svgimage-custom-color/caret-down.svg/" + Style.currentUserHeaderTextColor - sourceSize: { + sourceSize { width: openLocalFolderButtonCaretIconLoader.imageWidth height: openLocalFolderButtonCaretIconLoader.imageHeight } From e32bd35995ee649af6cd674d966597c8fdd16a8e Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:51:07 +0800 Subject: [PATCH 08/19] Ensure svg icons generated by svgimageprovider have a reasonable default size Signed-off-by: Claudio Cambra --- src/gui/tray/svgimageprovider.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/tray/svgimageprovider.cpp b/src/gui/tray/svgimageprovider.cpp index ab57607004ac3..b8297b27e6f91 100644 --- a/src/gui/tray/svgimageprovider.cpp +++ b/src/gui/tray/svgimageprovider.cpp @@ -45,6 +45,10 @@ namespace Ui { return {}; } + if (size != nullptr && (size->width() <= 0 || size->height() <= 0)) { + *size = QSize(64, 64); + } + return IconUtils::createSvgImageWithCustomColor(pixmapName, pixmapColor, size, requestedSize); } } From ce20e0010710aae53b6501eecca602516045d152 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:51:48 +0800 Subject: [PATCH 09/19] Fix displaying of header buttons in tray window Signed-off-by: Claudio Cambra --- src/gui/tray/HeaderButton.qml | 17 ++++++++++++++++- src/gui/tray/Window.qml | 9 ++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/gui/tray/HeaderButton.qml b/src/gui/tray/HeaderButton.qml index d126c6c4ccdf7..3d16aa3509617 100644 --- a/src/gui/tray/HeaderButton.qml +++ b/src/gui/tray/HeaderButton.qml @@ -32,7 +32,6 @@ Button { icon.width: Style.headerButtonIconSize icon.height: Style.headerButtonIconSize - icon.color: palette.brightText Layout.alignment: Qt.AlignRight Layout.preferredWidth: Style.trayWindowHeaderHeight @@ -42,4 +41,20 @@ Button { color: root.hovered || root.visualFocus ? Style.currentUserHeaderTextColor : "transparent" opacity: 0.2 } + + contentItem: Item { + anchors.fill: parent + + Image { + id: internalImage + anchors.centerIn: parent + width: root.icon.width + height: root.icon.height + source: root.icon.source + sourceSize { + width: root.icon.width + height: root.icon.height + } + } + } } diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index 75380d5fddffd..848aac28194f4 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -639,9 +639,9 @@ ApplicationWindow { HeaderButton { id: trayWindowTalkButton - visible: UserModel.currentUser.serverHasTalk - icon.source: "qrc:///client/theme/white/talk-app.svg" - icon.color: Style.currentUserHeaderTextColor + visible: UserModel.currentUser && UserModel.currentUser.serverHasTalk + icon.source: "image://svgimage-custom-color/talk-app.svg" + "/" + Style.currentUserHeaderTextColor + onClicked: UserModel.openCurrentAccountTalk() Accessible.role: Accessible.Button @@ -656,8 +656,7 @@ ApplicationWindow { HeaderButton { id: trayWindowAppsButton - icon.source: "qrc:///client/theme/white/more-apps.svg" - icon.color: Style.currentUserHeaderTextColor + icon.source: "image://svgimage-custom-color/more-apps.svg" + "/" + Style.currentUserHeaderTextColor onClicked: { if(appsMenuListView.count <= 0) { From db4cc38ea826a169ed62d4e9e6ba9b8510ff6398 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 17:58:21 +0800 Subject: [PATCH 10/19] Fix displaying of more button in UserLine Signed-off-by: Claudio Cambra --- src/gui/tray/UserLine.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 8b5ebcebe19dc..a546cf5573072 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -141,9 +141,6 @@ AbstractButton { Layout.fillHeight: true flat: true - icon.source: "qrc:///client/theme/more.svg" - icon.color: palette.buttonText - Accessible.role: Accessible.ButtonMenu Accessible.name: qsTr("Account actions") Accessible.onPressAction: userMoreButtonMouseArea.clicked() @@ -155,6 +152,12 @@ AbstractButton { color: userMoreButton.hovered || userMoreButton.visualFocus ? palette.highlight : "transparent" } + contentItem: Image { + anchors.fill: parent + source: "image://svgimage-custom-color/more.svg" + "/" + palette.buttonText + fillMode: Image.PreserveAspectFit + } + AutoSizingMenu { id: userMoreButtonMenu closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape From 16a952b20c2c1b86555ccf90945e8ee766e8da0f Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 18:14:59 +0800 Subject: [PATCH 11/19] Remove broken and unneeded scroll view in tray user menu Signed-off-by: Claudio Cambra --- src/gui/tray/Window.qml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index 848aac28194f4..7d94526c14b6b 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -312,22 +312,6 @@ ApplicationWindow { radius: Style.currentAccountButtonRadius } - contentItem: ScrollView { - id: accMenuScrollView - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - - data: WheelHandler { - target: accMenuScrollView.contentItem - } - ListView { - implicitHeight: contentHeight - model: accountMenu.contentModel - interactive: true - clip: true - currentIndex: accountMenu.currentIndex - } - } - onClosed: { // HACK: reload account Instantiator immediately by restting it - could be done better I guess // see also onVisibleChanged above From 694d0c688255a5204182a8f04265138551a1ff33 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 6 Jun 2024 22:36:02 +0800 Subject: [PATCH 12/19] Prevent crash when originalSize is null Signed-off-by: Claudio Cambra --- src/gui/iconutils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/iconutils.cpp b/src/gui/iconutils.cpp index c25adbc76d00d..22ce38f85aabb 100644 --- a/src/gui/iconutils.cpp +++ b/src/gui/iconutils.cpp @@ -108,9 +108,11 @@ QImage createSvgImageWithCustomColor(const QString &fileName, return {}; } + const auto sizeToUse = requestedSize.isValid() || originalSize == nullptr ? requestedSize : *originalSize; + // some icons are present in white or black only, so, we need to check both when needed const auto iconBaseColors = QStringList{QStringLiteral("black"), QStringLiteral("white")}; - const auto customColorImage = findImageWithCustomColor(fileName, customColor, iconBaseColors, requestedSize); + const auto customColorImage = findImageWithCustomColor(fileName, customColor, iconBaseColors, sizeToUse); if (!customColorImage.isNull()) { return customColorImage; @@ -125,7 +127,7 @@ QImage createSvgImageWithCustomColor(const QString &fileName, return {}; } - const auto result = drawSvgWithCustomFillColor(sourceSvg, customColor, originalSize, requestedSize); + const auto result = drawSvgWithCustomFillColor(sourceSvg, customColor, originalSize, sizeToUse); Q_ASSERT(!result.isNull()); if (result.isNull()) { From 16b9a6ea091d2fdba7fd865bf285811a9d6f856f Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Thu, 18 Jul 2024 15:42:08 +0800 Subject: [PATCH 13/19] Fix visibility of info buttons and details when updater is disabled in general settings Signed-off-by: Claudio Cambra --- src/gui/generalsettings.ui | 80 ++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 46 deletions(-) diff --git a/src/gui/generalsettings.ui b/src/gui/generalsettings.ui index 54f79b55d4750..b0d82f7e47749 100644 --- a/src/gui/generalsettings.ui +++ b/src/gui/generalsettings.ui @@ -233,21 +233,9 @@ - - - 0 - - - 0 - - - 0 - - - 0 - + - + @@ -310,7 +298,7 @@ - + @@ -355,40 +343,40 @@ - - - - - - Usage Documentation - - - - - - - Legal Notice - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - + + + + + + Usage Documentation + + + + + + + Legal Notice + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + From c483e46eaab729cfa39b7e2f9d4c7fadc56be311 Mon Sep 17 00:00:00 2001 From: Lorenzo Tanganelli Date: Mon, 10 Jun 2024 14:30:34 +0200 Subject: [PATCH 14/19] fix doc configuration file Signed-off-by: Lorenzo Tanganelli --- doc/conffile.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conffile.rst b/doc/conffile.rst index 6451e8730ad41..732180357e79c 100644 --- a/doc/conffile.rst +++ b/doc/conffile.rst @@ -51,7 +51,7 @@ Some interesting values that can be set on the configuration file are: | | | The client adjusts the chunk size until each chunk upload takes approximately this long. | | | | Set to 0 to disable dynamic chunk sizing. | +----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+ -| ``promptDeleteAllFiles`` | ``false`` | If a UI prompt should ask for confirmation if it was detected that all files and folders were deleted. | +| ``promptDeleteAllFiles`` | ``false`` | If a UI prompt should ask for confirmation if it was detected that all files and folders were deleted. | +----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+ | ``timeout`` | ``300`` | The timeout for network connections in seconds. | +----------------------------------+--------------------------+--------------------------------------------------------------------------------------------------------+ From b2d3d9e9bba6c982ac0b3d7b693787f91ab532de Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 5 Aug 2024 16:41:01 +0200 Subject: [PATCH 15/19] forward the redirected signal from QNetworkReply to detect them Signed-off-by: Matthieu Gallien --- src/libsync/abstractnetworkjob.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libsync/abstractnetworkjob.cpp b/src/libsync/abstractnetworkjob.cpp index f4f90a80e30dc..327080fc540a2 100644 --- a/src/libsync/abstractnetworkjob.cpp +++ b/src/libsync/abstractnetworkjob.cpp @@ -116,6 +116,7 @@ void AbstractNetworkJob::setupConnections(QNetworkReply *reply) connect(reply, &QNetworkReply::metaDataChanged, this, &AbstractNetworkJob::networkActivity); connect(reply, &QNetworkReply::downloadProgress, this, &AbstractNetworkJob::networkActivity); connect(reply, &QNetworkReply::uploadProgress, this, &AbstractNetworkJob::networkActivity); + connect(reply, &QNetworkReply::redirected, this, [reply, this] (const QUrl &url) { emit redirected(reply, url, 0);}); } QNetworkReply *AbstractNetworkJob::addTimer(QNetworkReply *reply) From fdbf6ff4e08f190e3046a1f6fdec5478ef2d8249 Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Tue, 6 Aug 2024 12:34:08 +0200 Subject: [PATCH 16/19] Fix crash: web flow credential dialog is deleted when closing it. Signed-off-by: Camila Ayres --- src/gui/creds/webflowcredentials.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/creds/webflowcredentials.cpp b/src/gui/creds/webflowcredentials.cpp index 82fb78bd7ccc9..037485913d266 100644 --- a/src/gui/creds/webflowcredentials.cpp +++ b/src/gui/creds/webflowcredentials.cpp @@ -190,7 +190,6 @@ void WebFlowCredentials::slotAskFromUserCredentialsProvided(const QString &user, emit asked(); _askDialog->close(); - _askDialog->deleteLater(); _askDialog = nullptr; } From dbad78c5ebcf3c9a5b9387e87a4cd3bd197e0acb Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Tue, 30 Jul 2024 12:12:48 +0200 Subject: [PATCH 17/19] List sync folders in the file explorer with user's username. Signed-off-by: Camila Ayres --- src/gui/navigationpanehelper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/navigationpanehelper.cpp b/src/gui/navigationpanehelper.cpp index ce2bad09c2bb5..3b2221f3c68d1 100644 --- a/src/gui/navigationpanehelper.cpp +++ b/src/gui/navigationpanehelper.cpp @@ -97,8 +97,9 @@ void NavigationPaneHelper::updateCloudStorageRegistry() QString title = folder->shortGuiRemotePathOrAppName(); // Write the account name in the sidebar only when using more than one account. - if (AccountManager::instance()->accounts().size() > 1) - title = title % " - " % folder->accountState()->account()->displayName(); + if (AccountManager::instance()->accounts().size() > 1) { + title = title % " - " % folder->accountState()->account()->prettyName(); + } QString iconPath = QDir::toNativeSeparators(qApp->applicationFilePath()); QString targetFolderPath = QDir::toNativeSeparators(folder->cleanPath()); From 8d698df758874b87c6fac10bab6756d8efdf6b1a Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 8 Jul 2024 18:48:08 +0200 Subject: [PATCH 18/19] fix authentication using provider page and web page login flow Signed-off-by: Matthieu Gallien --- src/gui/owncloudsetupwizard.cpp | 4 +++- src/gui/wizard/welcomepage.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/owncloudsetupwizard.cpp b/src/gui/owncloudsetupwizard.cpp index a2ed7aae0db81..462e24090b768 100644 --- a/src/gui/owncloudsetupwizard.cpp +++ b/src/gui/owncloudsetupwizard.cpp @@ -333,7 +333,9 @@ void OwncloudSetupWizard::slotConnectToOCUrl(const QString &url) { qCInfo(lcWizard) << "Connect to url: " << url; AbstractCredentials *creds = _ocWizard->getCredentials(); - _ocWizard->account()->setCredentials(creds); + if (creds) { + _ocWizard->account()->setCredentials(creds); + } const auto fetchUserNameJob = new JsonApiJob(_ocWizard->account()->sharedFromThis(), QStringLiteral("/ocs/v1.php/cloud/user")); connect(fetchUserNameJob, &JsonApiJob::jsonReceived, this, [this, url](const QJsonDocument &json, int statusCode) { diff --git a/src/gui/wizard/welcomepage.cpp b/src/gui/wizard/welcomepage.cpp index 3c5dc4a9f1f96..1228f51599d87 100644 --- a/src/gui/wizard/welcomepage.cpp +++ b/src/gui/wizard/welcomepage.cpp @@ -96,7 +96,7 @@ void WelcomePage::setupCreateAccountButton() connect(_ui->createAccountButton, &QPushButton::clicked, this, [this](bool /*checked*/) { _ocWizard->setRegistration(true); _nextPage = WizardCommon::Page_WebView; - _ocWizard->next(); + _ocWizard->setAuthType(OCC::DetermineAuthTypeJob::WebViewFlow); }); #else // WITH_WEBENGINE connect(_ui->createAccountButton, &QPushButton::clicked, this, [this](bool /*checked*/) { From ad504eaf9ef3af55ff8605d02f97de440a1d1451 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Wed, 31 Jul 2024 18:14:26 +0200 Subject: [PATCH 19/19] prevent event loop reentrance when handling ENCRYPT socket requests when receiving a shell integration socket command for ENCRYPT, a generic interface and generic code paths was used the assumption was that the listener socket would need (and remain) valid while hanlding teh request some code paths need to display error messages to the user via a QMessageBox the issue is that this will execute a Qt event loop that will handle the socket disconnection while the socket variable from the caller seems it will stay valid and alive prevent that by not using a blocking method invocation such that life time mishandling about the socket listener is not possible Signed-off-by: Matthieu Gallien --- src/gui/socketapi/socketapi.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index 45e517183f855..2502b8735b6b3 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -444,6 +444,13 @@ void SocketApi::slotReadSocket() << "with argument:" << argument; socketApiJob->failure(QStringLiteral("command not found")); } + } else if (command.startsWith("ENCRYPT")) { + if (indexOfMethod != -1) { + ASSERT(thread() == QThread::currentThread()) + staticMetaObject.method(indexOfMethod) + .invoke(this, Qt::QueuedConnection, Q_ARG(QString, argument.toString()), + Q_ARG(SocketListener *, listener.data())); + } } else { if (indexOfMethod != -1) { // to ensure that listener is still valid we need to call it with Qt::DirectConnection