| 31 | |
| 32 | |
| 33 | QString getPath(const QString &type) |
| 34 | { |
| 35 | QSettings settings; |
| 36 | QString path = settings.value(type, QString()).toString(); |
| 37 | if (path.isEmpty()) { |
| 38 | // if not set, fallback to last check path hoping that it will be close enough |
| 39 | path = settings.value(SETTINGS_LAST_CHECK_PATH, QString()).toString(); |
| 40 | if (path.isEmpty()) |
| 41 | // if not set, return user's home directory as the best we can do for now |
| 42 | return QDir::homePath(); |
| 43 | } |
| 44 | return path; |
| 45 | } |
| 46 | |
| 47 | void setPath(const QString &type, const QString &value) |
| 48 | { |
no test coverage detected