diff --git a/plugins/sftp/sftpplugin-win.cpp b/plugins/sftp/sftpplugin-win.cpp index 09cae9e90..dccd375ed 100644 --- a/plugins/sftp/sftpplugin-win.cpp +++ b/plugins/sftp/sftpplugin-win.cpp @@ -34,6 +34,13 @@ bool SftpPlugin::startBrowsing() bool SftpPlugin::receivePacket(const NetworkPacket &np) { + static const QSet expectedFields{ + QStringLiteral("ip"), + QStringLiteral("port"), + QStringLiteral("user"), + QStringLiteral("password"), + QStringLiteral("path"), + }; QStringList receivedFieldsList = np.body().keys(); QSet receivedFields(receivedFieldsList.begin(), receivedFieldsList.end()); if (!(expectedFields - receivedFields).isEmpty()) { diff --git a/plugins/sftp/sftpplugin-win.h b/plugins/sftp/sftpplugin-win.h index 689b01fef..b8287f259 100644 --- a/plugins/sftp/sftpplugin-win.h +++ b/plugins/sftp/sftpplugin-win.h @@ -11,9 +11,6 @@ #define PACKET_TYPE_SFTP_REQUEST QStringLiteral("kdeconnect.sftp.request") -static const QSet expectedFields = QSet() - << QStringLiteral("ip") << QStringLiteral("port") << QStringLiteral("user") << QStringLiteral("password") << QStringLiteral("path"); -; class SftpPlugin : public KdeConnectPlugin { Q_OBJECT