Skip to content

Commit

Permalink
Merge pull request #1096 from deXol/develop
Browse files Browse the repository at this point in the history
Fix qt6 issue for Mini
  • Loading branch information
limpkin authored Nov 30, 2022
2 parents 2452207 + a34d0f0 commit f211d93
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/MPDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4271,7 +4271,7 @@ void MPDevice::getCredential(QString service, const QString &login, const QStrin
return false;
}

QString l = pMesProt->getFullPayload(data);
QString l = Common::getUntilNullByte(pMesProt->getFullPayload(data));
if (!login.isEmpty() && l != login)
{
jobs->setCurrentJobError("login mismatch");
Expand All @@ -4298,7 +4298,7 @@ void MPDevice::getCredential(QString service, const QString &login, const QStrin
return true; //Do not fail if description is not available for this node
}*/
QVariantMap m = jobs->user_data.toMap();
m["description"] = pMesProt->getFullPayload(data);
m["description"] = Common::getUntilNullByte(pMesProt->getFullPayload(data));
jobs->user_data = m;
return true;
}));
Expand All @@ -4321,7 +4321,7 @@ void MPDevice::getCredential(QString service, const QString &login, const QStrin
//all jobs finished success

qInfo() << "Password retreived ok";
QString pass = pMesProt->getFullPayload(data);
QString pass = Common::getUntilNullByte(pMesProt->getFullPayload(data));

QVariantMap m = jobs->user_data.toMap();
cb(true, QString(), m["service"].toString(), m["login"].toString(), pass, m["description"].toString());
Expand Down
2 changes: 1 addition & 1 deletion src/MessageProtocol/MessageProtocolMini.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ QByteArray MessageProtocolMini::toByteArray(const QString &input)

QString MessageProtocolMini::toQString(const QByteArray &data)
{
return QString::fromUtf8(data);
return QString::fromUtf8(Common::getUntilNullByte(data));
}

QByteArray MessageProtocolMini::convertDate(const QDateTime& dateTime)
Expand Down

0 comments on commit f211d93

Please sign in to comment.