Skip to content

Commit 298c241

Browse files
committed
Fix the version string for released builds
1 parent 3f5d20d commit 298c241

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

changelog/unreleased/10329

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bugfix: Fix the display of the version string for released builds
2+
3+
We removed a trailing `-` in the version string of released clients.
4+
5+
https://github.com/owncloud/client/pull/10329

src/common/version.cpp.in

+9
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,12 @@ QString OCC::Version::suffix()
3939
{
4040
return QStringLiteral("@MIRALL_VERSION_SUFFIX@");
4141
}
42+
43+
QString OCC::Version::displayString()
44+
{
45+
constexpr bool hasSuffix = !std::string_view("@MIRALL_VERSION_SUFFIX@").empty();
46+
if (hasSuffix) {
47+
return QStringLiteral("%1-%2").arg(versionWithBuildNumber().toString(), suffix());
48+
}
49+
return versionWithBuildNumber().toString();
50+
}

src/common/version.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,5 @@ OCSYNC_EXPORT QString suffix();
4343
*/
4444
OCSYNC_EXPORT QString gitSha();
4545

46-
inline auto displayString()
47-
{
48-
return QStringLiteral("%1-%2").arg(versionWithBuildNumber().toString(), suffix());
49-
}
46+
OCSYNC_EXPORT QString displayString();
5047
}

0 commit comments

Comments
 (0)