Description: Also allow using 'gtk2' as a trigger key, for compatibility with qt5-gtk2-platformtheme. Author: Unit 193 Origin: vendor Forwarded: not-needed --- src/qt5gtk2-qtplugin/main.cpp | 3 ++- src/qt5gtk2-qtplugin/qt5gtk2.json | 2 +- src/qt5gtk2-style/plugin.cpp | 2 +- src/qt5gtk2-style/qt5gtk2.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) --- a/src/qt5gtk2-qtplugin/qt5gtk2.json +++ b/src/qt5gtk2-qtplugin/qt5gtk2.json @@ -1,3 +1,3 @@ { - "Keys": [ "qt5gtk2", "qt6gtk2" ] + "Keys": [ "gtk2", "qt5gtk2", "qt6gtk2" ] } --- a/src/qt5gtk2-style/plugin.cpp +++ b/src/qt5gtk2-style/plugin.cpp @@ -34,7 +34,7 @@ public: QStyle *Qt5Gtk2StylePlugin::create(const QString &key) { - if (key == "qt5gtk2") + if (key == "gtk2" || key == "qt5gtk2") return new QGtkStyle; return 0; } --- a/src/qt5gtk2-style/qt5gtk2.json +++ b/src/qt5gtk2-style/qt5gtk2.json @@ -1,3 +1,3 @@ { - "Keys": [ "qt5gtk2" ] + "Keys": [ "gtk2", "qt5gtk2" ] } --- a/src/qt5gtk2-qtplugin/main.cpp +++ b/src/qt5gtk2-qtplugin/main.cpp @@ -36,7 +36,8 @@ QPlatformTheme *Qt5Gtk2ThemePlugin::crea { Q_UNUSED(params); if (!key.compare(QLatin1String(Qt5Gtk2Theme::name), Qt::CaseInsensitive) || - !key.compare(QLatin1String("qt6gtk2"), Qt::CaseInsensitive)) + !key.compare(QLatin1String("qt6gtk2"), Qt::CaseInsensitive) || + !key.compare(QLatin1String("gtk2"), Qt::CaseInsensitive)) return new Qt5Gtk2Theme; return 0;