On Friday 27. November 2015 23:39:07 René J.V. Bertin wrote: > Digging through Qt's source code to figure out if and how I can get KF5 > applications to honour theming settings on OS X, I observe the following in > class QKdeThemePrivate in qgenericunixthemes.cpp: > > static QString kdeGlobals(const QString &kdeDir) > { > return kdeDir + QStringLiteral("/share/config/kdeglobals"); > } > > and QVariant QKdeThemePrivate::readKdeSetting() then does > > foreach (const QString &kdeDir, kdeDirs) { > QSettings *settings = kdeSettings.value(kdeDir); > if (!settings) { > const QString kdeGlobalsPath = kdeGlobals(kdeDir); > if (QFileInfo(kdeGlobalsPath).isReadable()) { > // ... etc ... > > It may be intentional that that file avoids the use of QStandardPaths (is > it?), but it seems that this code cannot read the kdeglobals file in its > intended location (~/.config/kdeglobals on XDG-compliant systems). Not even > when $KDExxx variables are set to provide the correct value for `kdeDirs` . > > Am I right that kdeGlobals() should return the current value only if > kdeVersion<=4, and for kdeVersion>=5 it should rather return `kdeDir + > QStringLiteral("/kdeglobals")`, with `kdeDirs` extended to include > ~/.config? In that case, should a fallback for "/share/config/kdeglobals" > be added? > > A pure KF5 system will not have ~/.kde*/share/config/kdeglobals, correct?
That code was written for integrating into KDE 4. It was not adapted to work with Plasma 5. A pure KF5 appliation would anyway use the KDE platform theme plugin provided by KDE Frameworks. (in frameworkintegration) (So in other words: that code should not be executed when kde frameworks is installed, in theory) -- Olivier Woboq - Qt services and support - http://woboq.com - http://code.woboq.org _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development