Also use method-scoped static in Windows SftpPlugin
This commit is contained in:
parent
8edd2a2e52
commit
bd07b9b255
2 changed files with 7 additions and 3 deletions
|
@ -34,6 +34,13 @@ bool SftpPlugin::startBrowsing()
|
|||
|
||||
bool SftpPlugin::receivePacket(const NetworkPacket &np)
|
||||
{
|
||||
static const QSet<QString> expectedFields{
|
||||
QStringLiteral("ip"),
|
||||
QStringLiteral("port"),
|
||||
QStringLiteral("user"),
|
||||
QStringLiteral("password"),
|
||||
QStringLiteral("path"),
|
||||
};
|
||||
QStringList receivedFieldsList = np.body().keys();
|
||||
QSet<QString> receivedFields(receivedFieldsList.begin(), receivedFieldsList.end());
|
||||
if (!(expectedFields - receivedFields).isEmpty()) {
|
||||
|
|
|
@ -11,9 +11,6 @@
|
|||
|
||||
#define PACKET_TYPE_SFTP_REQUEST QStringLiteral("kdeconnect.sftp.request")
|
||||
|
||||
static const QSet<QString> expectedFields = QSet<QString>()
|
||||
<< QStringLiteral("ip") << QStringLiteral("port") << QStringLiteral("user") << QStringLiteral("password") << QStringLiteral("path");
|
||||
;
|
||||
class SftpPlugin : public KdeConnectPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
Loading…
Reference in a new issue