summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qplatformintegration.cpp2
-rw-r--r--src/gui/kernel/qplatformintegration.h3
-rw-r--r--src/gui/kernel/qplatformtheme.cpp2
-rw-r--r--src/gui/kernel/qplatformtheme.h3
-rw-r--r--src/gui/kernel/qstylehints.cpp9
-rw-r--r--src/gui/kernel/qstylehints.h1
6 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 8a0540efc2..e82e30df80 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -313,6 +313,8 @@ QVariant QPlatformIntegration::styleHint(StyleHint hint) const
return false;
case PasswordMaskDelay:
return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskDelay);
+ case PasswordMaskCharacter:
+ return QPlatformTheme::defaultThemeHint(QPlatformTheme::PasswordMaskCharacter);
case FontSmoothingGamma:
return qreal(1.7);
case StartDragVelocity:
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index bee2ba0caf..b7a44b13de 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -140,7 +140,8 @@ public:
FontSmoothingGamma,
StartDragVelocity,
UseRtlExtensions,
- SynthesizeMouseFromTouchEvents
+ SynthesizeMouseFromTouchEvents,
+ PasswordMaskCharacter
};
virtual QVariant styleHint(StyleHint hint) const;
diff --git a/src/gui/kernel/qplatformtheme.cpp b/src/gui/kernel/qplatformtheme.cpp
index b8bc72cf73..02b69bcb4d 100644
--- a/src/gui/kernel/qplatformtheme.cpp
+++ b/src/gui/kernel/qplatformtheme.cpp
@@ -238,6 +238,8 @@ QVariant QPlatformTheme::defaultThemeHint(ThemeHint hint)
return QVariant(500);
case QPlatformTheme::PasswordMaskDelay:
return QVariant(int(0));
+ case QPlatformTheme::PasswordMaskCharacter:
+ return QVariant(QChar(0x25CF));
case QPlatformTheme::StartDragVelocity:
return QVariant(int(0)); // no limit
case QPlatformTheme::UseFullScreenForPopupMenu:
diff --git a/src/gui/kernel/qplatformtheme.h b/src/gui/kernel/qplatformtheme.h
index ee12792547..80ba29a028 100644
--- a/src/gui/kernel/qplatformtheme.h
+++ b/src/gui/kernel/qplatformtheme.h
@@ -103,7 +103,8 @@ public:
UiEffects,
SpellCheckUnderlineStyle,
TabAllWidgets,
- IconPixmapSizes
+ IconPixmapSizes,
+ PasswordMaskCharacter
};
enum DialogType {
diff --git a/src/gui/kernel/qstylehints.cpp b/src/gui/kernel/qstylehints.cpp
index 23bc165edd..30b12835f7 100644
--- a/src/gui/kernel/qstylehints.cpp
+++ b/src/gui/kernel/qstylehints.cpp
@@ -193,6 +193,15 @@ int QStyleHints::passwordMaskDelay() const
}
/*!
+ Returns the character used to mask the characters typed into text input
+ fields in password mode.
+*/
+QChar QStyleHints::passwordMaskCharacter() const
+{
+ return themeableHint(QPlatformTheme::PasswordMaskCharacter, QPlatformIntegration::PasswordMaskCharacter).toChar();
+}
+
+/*!
Returns the gamma value used in font smoothing.
*/
qreal QStyleHints::fontSmoothingGamma() const
diff --git a/src/gui/kernel/qstylehints.h b/src/gui/kernel/qstylehints.h
index 7a447aae67..64ef182aab 100644
--- a/src/gui/kernel/qstylehints.h
+++ b/src/gui/kernel/qstylehints.h
@@ -62,6 +62,7 @@ public:
int cursorFlashTime() const;
bool showIsFullScreen() const;
int passwordMaskDelay() const;
+ QChar passwordMaskCharacter() const;
qreal fontSmoothingGamma() const;
bool useRtlExtensions() const;