| 151 | } |
| 152 | |
| 153 | QVariant migrateQByteArrayToBase64(QString key, QVariant value) |
| 154 | { |
| 155 | static const QStringList otherByteArrays = { "MainWindowState", "MainWindowGeometry", "ConsoleWindowState", |
| 156 | "ConsoleWindowGeometry", "PagedGeometry", "NewInstanceGeometry", |
| 157 | "ModDownloadGeometry", "RPDownloadGeometry", "TPDownloadGeometry", |
| 158 | "ShaderDownloadGeometry" }; |
| 159 | if (key.startsWith("WideBarVisibility_") || (key.startsWith("UI/") && key.endsWith("_Page/Columns"))) { |
| 160 | return QString::fromUtf8(value.toByteArray().toBase64()); |
| 161 | } |
| 162 | if (otherByteArrays.contains(key)) { |
| 163 | return QString::fromUtf8(value.toByteArray()); |
| 164 | } |
| 165 | if (key == "linkedInstances") { |
| 166 | return Json::fromStringList(value.toStringList()); |
| 167 | } |
| 168 | if (key == "Env") { |
| 169 | return Json::fromMap(value.toMap()); |
| 170 | } |
| 171 | return value; |
| 172 | } |
| 173 | |
| 174 | bool INIFile::loadFile(QString fileName) |
| 175 | { |
no test coverage detected