mirror of
https://github.com/huderlem/porymap.git
synced 2026-07-20 09:24:45 -05:00
Fix config appending 0s to saved window geometry/state
This commit is contained in:
parent
f093a16851
commit
67c3a4befd
|
|
@ -155,8 +155,8 @@ protected:
|
|||
virtual void setUnreadKeys() override {};
|
||||
|
||||
private:
|
||||
QString stringFromByteArray(QByteArray);
|
||||
QByteArray bytesFromString(QString);
|
||||
QString stringFromByteArray(const QByteArray&);
|
||||
QByteArray bytesFromString(const QString&);
|
||||
|
||||
QStringList recentProjects;
|
||||
QByteArray mainWindowGeometry;
|
||||
|
|
|
|||
|
|
@ -496,18 +496,18 @@ QMap<QString, QString> PorymapConfig::getKeyValueMap() {
|
|||
return map;
|
||||
}
|
||||
|
||||
QString PorymapConfig::stringFromByteArray(QByteArray bytearray) {
|
||||
QString PorymapConfig::stringFromByteArray(const QByteArray &bytearray) {
|
||||
QString ret;
|
||||
for (auto ch : bytearray) {
|
||||
for (const auto &ch : bytearray) {
|
||||
ret += QString::number(static_cast<int>(ch)) + ":";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
QByteArray PorymapConfig::bytesFromString(QString in) {
|
||||
QByteArray PorymapConfig::bytesFromString(const QString &in) {
|
||||
QByteArray ba;
|
||||
QStringList split = in.split(":");
|
||||
for (auto ch : split) {
|
||||
QStringList split = in.split(":", Qt::SkipEmptyParts);
|
||||
for (const auto &ch : split) {
|
||||
ba.append(static_cast<char>(ch.toInt()));
|
||||
}
|
||||
return ba;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user