Skip to content

Commit

Permalink
removed useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
trialuser02 committed Sep 25, 2023
1 parent 2abf2ea commit 8ce1087
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/qt6ct-qtplugin/qt6ctplatformtheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,18 +266,12 @@ void Qt6CTPlatformTheme::readSettings()
{
//do not mix gtk2 style and gtk3 dialogs
QStringList keys = QPlatformThemeFactory::keys();
QString name = settings.value("standard_dialogs", "default").toString();
if((m_style == QLatin1String("gtk2") || m_style == QLatin1String("qt5gtk2")) &&
(name == QLatin1String("gtk3") || name == QLatin1String("qt5gtk3")))
{
name = QLatin1String("gtk2");
}
if(keys.contains(name))
m_theme.reset(QPlatformThemeFactory::create(name));
else if(name == QLatin1String("gtk2") && keys.contains("qt5gtk2"))
m_theme.reset(QPlatformThemeFactory::create("qt5gtk2"));
else if(name == QLatin1String("gtk3") && keys.contains("qt5gtk3"))
m_theme.reset(QPlatformThemeFactory::create("qt5gtk3"));
QString dialogs = settings.value("standard_dialogs", "default").toString();

if(m_style.endsWith("gtk2") && dialogs == QLatin1String("gtk3"))
dialogs = QLatin1String("gtk2");
if(keys.contains(dialogs))
m_theme.reset(QPlatformThemeFactory::create(dialogs));
}

settings.endGroup();
Expand Down

0 comments on commit 8ce1087

Please sign in to comment.