Fix crash due to begin and end belonging to different iterators
(cherry picked from commit a33eb46d9b
)
This commit is contained in:
parent
80576d8599
commit
775b72fd4a
1 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,8 @@ bool SftpPlugin::startBrowsing()
|
||||||
|
|
||||||
bool SftpPlugin::receivePacket(const NetworkPacket &np)
|
bool SftpPlugin::receivePacket(const NetworkPacket &np)
|
||||||
{
|
{
|
||||||
QSet<QString> receivedFields(np.body().keys().begin(), np.body().keys().end());
|
QStringList receivedFieldsList = np.body().keys();
|
||||||
|
QSet<QString> receivedFields(receivedFieldsList.begin(), receivedFieldsList.end());
|
||||||
if (!(expectedFields - receivedFields).isEmpty()) {
|
if (!(expectedFields - receivedFields).isEmpty()) {
|
||||||
qCWarning(KDECONNECT_PLUGIN_SFTP) << "Invalid packet received.";
|
qCWarning(KDECONNECT_PLUGIN_SFTP) << "Invalid packet received.";
|
||||||
for (QString missingField : (expectedFields - receivedFields)) {
|
for (QString missingField : (expectedFields - receivedFields)) {
|
||||||
|
|
Loading…
Reference in a new issue