Ensure environment settings are effective before applying other settings
At least the documentation of `QIcon::setThemeName()` sounds like it could make a difference: ``` The name should correspond to a directory name in the themeSearchPath() … ```
This commit is contained in:
parent
fd151995ce
commit
e5bd602d91
|
@ -152,6 +152,14 @@ void QtSettings::save(QSettings &settings) const
|
||||||
*/
|
*/
|
||||||
void QtSettings::apply()
|
void QtSettings::apply()
|
||||||
{
|
{
|
||||||
|
// apply environment
|
||||||
|
if (m_d->additionalPluginDirectory.isEmpty()) {
|
||||||
|
QCoreApplication::addLibraryPath(m_d->additionalPluginDirectory);
|
||||||
|
}
|
||||||
|
if (!m_d->additionalIconThemeSearchPath.isEmpty()) {
|
||||||
|
QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << m_d->additionalIconThemeSearchPath);
|
||||||
|
}
|
||||||
|
|
||||||
// read style sheet
|
// read style sheet
|
||||||
QString styleSheet;
|
QString styleSheet;
|
||||||
if (m_d->customStyleSheet && !m_d->styleSheetPath.isEmpty()) {
|
if (m_d->customStyleSheet && !m_d->styleSheetPath.isEmpty()) {
|
||||||
|
@ -189,14 +197,6 @@ void QtSettings::apply()
|
||||||
|
|
||||||
// apply locale
|
// apply locale
|
||||||
QLocale::setDefault(m_d->customLocale ? QLocale(m_d->localeName) : m_d->defaultLocale);
|
QLocale::setDefault(m_d->customLocale ? QLocale(m_d->localeName) : m_d->defaultLocale);
|
||||||
|
|
||||||
// apply environment
|
|
||||||
if (m_d->additionalPluginDirectory.isEmpty()) {
|
|
||||||
QCoreApplication::addLibraryPath(m_d->additionalPluginDirectory);
|
|
||||||
}
|
|
||||||
if (!m_d->additionalIconThemeSearchPath.isEmpty()) {
|
|
||||||
QIcon::setThemeSearchPaths(QIcon::themeSearchPaths() << m_d->additionalIconThemeSearchPath);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Reference in New Issue