aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickapplicationwindow.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-03-21 16:22:17 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-22 11:16:54 +0000
commit489287d28849c7d4cd6fbc1f0d2dc893fee223ab (patch)
tree990b495fde3bdc77216894a14da18c840056cb81 /src/quicktemplates2/qquickapplicationwindow.cpp
parent1cd4f74778aa31842448b92c1b39cb160002a4fe (diff)
Fix the order in qquickapplicationwindow.cpp
It's more pleasant to work with, when the methods are in the same order they are declared. This makes also the refactoring tools in Qt Creator work correctly. Change-Id: I4065ace56728d2675c96cbf1e137930a969ca22e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickapplicationwindow.cpp')
-rw-r--r--src/quicktemplates2/qquickapplicationwindow.cpp45
1 files changed, 23 insertions, 22 deletions
diff --git a/src/quicktemplates2/qquickapplicationwindow.cpp b/src/quicktemplates2/qquickapplicationwindow.cpp
index c094d454..c40db20b 100644
--- a/src/quicktemplates2/qquickapplicationwindow.cpp
+++ b/src/quicktemplates2/qquickapplicationwindow.cpp
@@ -251,6 +251,29 @@ void QQuickApplicationWindowPrivate::itemImplicitHeightChanged(QQuickItem *item)
relayout();
}
+void QQuickApplicationWindowPrivate::updateFont(const QFont &f)
+{
+ Q_Q(QQuickApplicationWindow);
+ const bool changed = font != f;
+ font = f;
+
+ QQuickControlPrivate::updateFontRecur(q->QQuickWindow::contentItem(), f);
+
+ // TODO: internal QQuickPopupManager that provides reliable access to all QQuickPopup instances
+ const QList<QQuickPopup *> popups = q->findChildren<QQuickPopup *>();
+ for (QQuickPopup *popup : popups)
+ QQuickControlPrivate::get(static_cast<QQuickControl *>(popup->popupItem()))->inheritFont(f);
+
+ if (changed)
+ emit q->fontChanged();
+}
+
+void QQuickApplicationWindowPrivate::resolveFont()
+{
+ QFont resolvedFont = font.resolve(QQuickControlPrivate::themeFont(QPlatformTheme::SystemFont));
+ setFont_helper(resolvedFont);
+}
+
void QQuickApplicationWindowPrivate::_q_updateActiveFocus()
{
Q_Q(QQuickApplicationWindow);
@@ -612,28 +635,6 @@ void QQuickApplicationWindow::resetFont()
setFont(QFont());
}
-void QQuickApplicationWindowPrivate::resolveFont()
-{
- QFont resolvedFont = font.resolve(QQuickControlPrivate::themeFont(QPlatformTheme::SystemFont));
- setFont_helper(resolvedFont);
-}
-
-void QQuickApplicationWindowPrivate::updateFont(const QFont &f)
-{
- Q_Q(QQuickApplicationWindow);
- const bool changed = font != f;
- font = f;
-
- QQuickControlPrivate::updateFontRecur(q->QQuickWindow::contentItem(), f);
-
- // TODO: internal QQuickPopupManager that provides reliable access to all QQuickPopup instances
- const QList<QQuickPopup *> popups = q->findChildren<QQuickPopup *>();
- for (QQuickPopup *popup : popups)
- QQuickControlPrivate::get(static_cast<QQuickControl *>(popup->popupItem()))->inheritFont(f);
-
- if (changed)
- emit q->fontChanged();
-}
QLocale QQuickApplicationWindow::locale() const
{