summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAxel Spoerl <axel.spoerl@qt.io>2022-09-20 14:06:40 +0200
committerAxel Spoerl <axel.spoerl@qt.io>2022-09-20 22:25:59 +0200
commit4973155512969300c848a3aae8dbb21f07e50c45 (patch)
treeca0ffbdf07cad2d56e34065943b18bdd4a017f17 /src/gui
parentfeed452a9987a4629b03d3bc4a629ba7978ab7ba (diff)
Replace QPlatformTheme::Appearance by Qt:Appearance
With the introduction of Qt:Appearance, its predecessor in QPlatformTheme has become redundant. This patch replaces all occurrences of QPlatformTheme::Appearance with the new enum class. Task-number: QTBUG-106381 Change-Id: I5406f1b7c19f68571f074617c681318c96a6517e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformtheme.cpp6
-rw-r--r--src/gui/kernel/qplatformtheme.h8
2 files changed, 4 insertions, 10 deletions
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index 8e8d7b3be5..993836fa59 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -346,7 +346,7 @@ Q_GUI_EXPORT QPalette qt_fusionPalette()
{
auto theme = QGuiApplicationPrivate::platformTheme();
const bool darkAppearance = theme
- ? theme->appearance() == QPlatformTheme::Appearance::Dark
+ ? theme->appearance() == Qt::Appearance::Dark
: false;
const QColor windowText = darkAppearance ? QColor(240, 240, 240) : Qt::black;
const QColor backGround = darkAppearance ? QColor(50, 50, 50) : QColor(239, 239, 239);
@@ -426,9 +426,9 @@ QPlatformDialogHelper *QPlatformTheme::createPlatformDialogHelper(DialogType typ
return nullptr;
}
-QPlatformTheme::Appearance QPlatformTheme::appearance() const
+Qt::Appearance QPlatformTheme::appearance() const
{
- return Appearance::Unknown;
+ return Qt::Appearance::Unknown;
}
const QPalette *QPlatformTheme::palette(Palette type) const
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index d64f7633ba..94d9a82fd3 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -98,12 +98,6 @@ public:
MessageDialog
};
- enum class Appearance {
- Unknown = 0x0000,
- Light = 0x0001,
- Dark = 0x0002
- };
-
enum Palette {
SystemPalette,
ToolTipPalette,
@@ -286,7 +280,7 @@ public:
virtual QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const;
#endif
- virtual Appearance appearance() const;
+ virtual Qt::Appearance appearance() const;
virtual const QPalette *palette(Palette type = SystemPalette) const;