| 29 | } |
| 30 | |
| 31 | bool StyleSettings::load(const QString &filePath) |
| 32 | { |
| 33 | QFile file(filePath); |
| 34 | if (!file.exists(filePath)) |
| 35 | return false; |
| 36 | |
| 37 | if (file.open(QFile::ReadOnly)) { |
| 38 | QJsonParseError error; |
| 39 | auto doc = QJsonDocument::fromJson(file.readAll(), &error); |
| 40 | if (error.error != QJsonParseError::NoError) |
| 41 | qCritical() << error.errorString(); |
| 42 | |
| 43 | parseThemeInfo(doc.object()); |
| 44 | } |
| 45 | |
| 46 | return true; |
| 47 | } |
| 48 | |
| 49 | QJsonValue StyleSettings::value(const QString &theme, const QString &key) |
| 50 | { |
no test coverage detected