diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2020-03-30 10:21:40 +0200 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2020-03-30 10:27:33 +0200 |
commit | 066c2bd90db50f67214bca5fee171f1d43391dc2 (patch) | |
tree | 9f351014102801ba7912afa55a79f3d084b79b46 /src/core | |
parent | ec9522ae73ffa4e0ff750c52b412f4d6ad020590 (diff) | |
download | kconfig-066c2bd90db50f67214bca5fee171f1d43391dc2.tar.gz kconfig-066c2bd90db50f67214bca5fee171f1d43391dc2.tar.bz2 |
QAtomicInteger::loadRelaxed/storeRelaxed() are available since Qt 5.14
A similar patch was approved in https://phabricator.kde.org/D26102
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/kconfig.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index b8fbba53..0d430792 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -57,7 +57,7 @@ KConfigPrivate::KConfigPrivate(KConfig::OpenFlags flags, configState(KConfigBase::NoAccess) { static QBasicAtomicInt use_etc_kderc = Q_BASIC_ATOMIC_INITIALIZER(-1); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) if (use_etc_kderc.load() < 0) { use_etc_kderc.store( !qEnvironmentVariableIsSet("KDE_SKIP_KDERC")); // for unit tests } @@ -75,7 +75,7 @@ KConfigPrivate::KConfigPrivate(KConfig::OpenFlags flags, QStringLiteral("/etc/kde5rc"); #endif if (!QFileInfo(etc_kderc).isReadable()) { -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) use_etc_kderc.store(false); #else use_etc_kderc.storeRelaxed(false); @@ -253,7 +253,7 @@ KConfig::KConfig(KConfigPrivate &d) KConfig::~KConfig() { Q_D(KConfig); -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) +#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) if (d->bDirty && (d->mBackend && d->mBackend->ref.load() == 1)) { #else if (d->bDirty && (d->mBackend && d->mBackend->ref.loadRelaxed() == 1)) { |