diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-02-09 14:16:05 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2023-02-13 17:19:23 +0100 |
commit | 32749c913b32e89e2027227233794f2296166cc6 (patch) | |
tree | 0daec9a562b3a1f5bc59a0a9cc556b193a0f8593 /src/gui/kernel/qstylehints.cpp | |
parent | 0c6aa4c8c2f05e9172a0f1f5852277a01e54c7c2 (diff) |
Rename Qt::Appearance to Qt::ColorScheme
Based on discussions in the 6.5 API review, where we concluded that
'appearance' is too general. Instead, we follow the CSS standard
and use the term 'color scheme'.
Pick-to: 6.5
Change-Id: I8ceaf4138ecadff5ccd962480e8e5beb39b556ec
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/gui/kernel/qstylehints.cpp')
-rw-r--r-- | src/gui/kernel/qstylehints.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp index a202c7ebc6..5becae76c6 100644 --- a/src/gui/kernel/qstylehints.cpp +++ b/src/gui/kernel/qstylehints.cpp @@ -122,20 +122,15 @@ int QStyleHints::touchDoubleTapDistance() const } /*! - \property QStyleHints::appearance - \brief the appearance of the platform theme. - \sa Qt::Appearance + \property QStyleHints::colorScheme + \brief the color scheme of the platform theme. + \sa Qt::ColorScheme \since 6.5 */ -Qt::Appearance QStyleHints::appearance() const -{ - Q_D(const QStyleHints); - return d->appearance(); -} - Qt::ColorScheme QStyleHints::colorScheme() const { - return Qt::ColorScheme(appearance()); + Q_D(const QStyleHints); + return d->colorScheme(); } /*! @@ -600,17 +595,17 @@ int QStyleHints::mouseQuickSelectionThreshold() const /*! \internal - QStyleHintsPrivate::setAppearance - set a new appearance. - Set \a appearance as the new appearance of the QStyleHints. - The appearanceChanged signal will be emitted if present and new appearance differ. + QStyleHintsPrivate::setColorScheme - set a new color scheme. + Set \a colorScheme as the new color scheme of the QStyleHints. + The colorSchemeChanged signal will be emitted if present and new color scheme differ. */ -void QStyleHintsPrivate::setAppearance(Qt::Appearance appearance) +void QStyleHintsPrivate::setColorScheme(Qt::ColorScheme colorScheme) { - if (m_appearance == appearance) + if (m_colorScheme == colorScheme) return; - m_appearance = appearance; + m_colorScheme = colorScheme; Q_Q(QStyleHints); - emit q->appearanceChanged(appearance); + emit q->colorSchemeChanged(colorScheme); } QStyleHintsPrivate *QStyleHintsPrivate::get(QStyleHints *q) |