mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 09:43:07 -07:00
Raise minimal Qt version to 5.5.1
This commit is contained in:
parent
e64bb1de8c
commit
008d7dbedc
7 changed files with 32 additions and 65 deletions
|
@ -899,17 +899,6 @@ QVariantMap generateSyncData(int acceptedResponseId, QVariantMap data, QVariantM
|
|||
if (fullUpdate) {
|
||||
lastAcceptedData.clear();
|
||||
syncData = data;
|
||||
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0)
|
||||
// QJsonDocument::fromVariant() supports QVariantHash only
|
||||
// since Qt5.5, so manually convert data["torrents"]
|
||||
QVariantMap torrentsMap;
|
||||
QVariantHash torrents = data["torrents"].toHash();
|
||||
foreach (const QString &key, torrents.keys())
|
||||
torrentsMap[key] = torrents[key];
|
||||
syncData["torrents"] = torrentsMap;
|
||||
#endif
|
||||
|
||||
syncData[KEY_FULL_UPDATE] = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue