mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Add versionSuffix function to Theme.
Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
parent
07f31f7b36
commit
3f9bf0ab9c
4 changed files with 8 additions and 2 deletions
|
@ -99,7 +99,7 @@ QUrlQuery Updater::getQueryParams()
|
|||
query.addQueryItem(QStringLiteral("buildArch"), QSysInfo::buildCpuArchitecture());
|
||||
query.addQueryItem(QStringLiteral("currentArch"), QSysInfo::currentCpuArchitecture());
|
||||
|
||||
const auto suffix = QStringLiteral(MIRALL_STRINGIFY(MIRALL_VERSION_SUFFIX));
|
||||
const auto suffix = Theme::instance()->versionSuffix();
|
||||
query.addQueryItem(QStringLiteral("versionsuffix"), suffix);
|
||||
|
||||
ConfigFile config;
|
||||
|
|
|
@ -686,7 +686,7 @@ int ConfigFile::updateSegment() const
|
|||
|
||||
QString ConfigFile::updateChannel() const
|
||||
{
|
||||
auto defaultUpdateChannel = QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION_SUFFIX));
|
||||
auto defaultUpdateChannel = Theme::instance()->versionSuffix();
|
||||
QSettings settings(configFile(), QSettings::IniFormat);
|
||||
const auto channel = settings.value(QLatin1String(updateChannelC), defaultUpdateChannel).toString();
|
||||
if (!validUpdateChannels().contains(channel)) {
|
||||
|
|
|
@ -195,6 +195,11 @@ QString Theme::version() const
|
|||
return MIRALL_VERSION_STRING;
|
||||
}
|
||||
|
||||
QString Theme::versionSuffix() const
|
||||
{
|
||||
return QString::fromLatin1(MIRALL_STRINGIFY(MIRALL_VERSION_SUFFIX));
|
||||
}
|
||||
|
||||
QString Theme::configFileName() const
|
||||
{
|
||||
return QStringLiteral(APPLICATION_CONFIG_NAME ".cfg");
|
||||
|
|
|
@ -196,6 +196,7 @@ public:
|
|||
|
||||
[[nodiscard]] QString statusHeaderText(SyncResult::Status) const;
|
||||
[[nodiscard]] QString version() const;
|
||||
[[nodiscard]] QString versionSuffix() const;
|
||||
|
||||
/**
|
||||
* Characteristics: bool if more than one sync folder is allowed
|
||||
|
|
Loading…
Reference in a new issue