Changeset View
Changeset View
Standalone View
Standalone View
src/lib/util/kosrelease.cpp
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Line(s) | 67 | { | |||
---|---|---|---|---|---|
71 | if (separatorIndex != -1) { | 71 | if (separatorIndex != -1) { | ||
72 | list << line.mid(separatorIndex + 1, -1); | 72 | list << line.mid(separatorIndex + 1, -1); | ||
73 | } | 73 | } | ||
74 | return list; | 74 | return list; | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | static QString defaultFilePath() | 77 | static QString defaultFilePath() | ||
78 | { | 78 | { | ||
79 | if (QFile::exists(QStringLiteral("/etc/os-release"))) { | 79 | for (const auto& path : { | ||
sitter: & goes on the left of the space please | |||||
80 | return QStringLiteral("/etc/os-release"); | 80 | #ifdef Q_OS_FREEBSD | ||
81 | } else if (QFile::exists(QStringLiteral("/usr/lib/os-release"))) { | 81 | QStringLiteral("/usr/local/etc/os-release"), | ||
The indentation is missing a space on every line. Currently it aligns with the bracket when it fact it should align with the arguments after the opening bracket. sitter: The indentation is missing a space on every line. Currently it aligns with the bracket when it… | |||||
82 | return QStringLiteral("/usr/lib/os-release"); | 82 | #endif | ||
83 | } else { | 83 | QStringLiteral("/etc/os-release"), | ||
84 | return QString(); | 84 | QStringLiteral("/usr/lib/os-release") | ||
85 | }) { | ||||
86 | if (QFile::exists(path)) { | ||||
87 | return path; | ||||
88 | } | ||||
85 | } | 89 | } | ||
90 | return QString(); | ||||
86 | } | 91 | } | ||
87 | 92 | | |||
88 | class Q_DECL_HIDDEN KOSRelease::Private | 93 | class Q_DECL_HIDDEN KOSRelease::Private | ||
89 | { | 94 | { | ||
90 | public: | 95 | public: | ||
91 | Private(QString filePath) | 96 | Private(QString filePath) | ||
92 | : name(QStringLiteral("Linux")) | 97 | : name(QStringLiteral("Linux")) | ||
93 | , id(QStringLiteral("linux")) | 98 | , id(QStringLiteral("linux")) | ||
▲ Show 20 Lines • Show All 213 Lines • Show Last 20 Lines |
& goes on the left of the space please