summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qdialog.cpp
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2013-08-22 14:25:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-23 08:42:35 +0200
commit1baf293548aa859e922dface4cd7b4bac5754b3c (patch)
treef5eba023471368e6dddc69ff70fe8c7be42711d3 /src/widgets/dialogs/qdialog.cpp
parent3abecf2ee9fc724af571f8c7da4302f7bee9eadb (diff)
Move SnapToDefaultButton from QPlatformDialogHelper to QPlatformTheme
Since QPlatformTheme covers all dialogs whereas QPlatformDialogHelper is really only for the native dialogs then the SnapToDefaultButton hint is moved as it has relevance for all dialogs Task-number: QTBUG-32631 Change-Id: I1dce0bb4abcd4cfd39c4a199a33fc7078176ab4b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/widgets/dialogs/qdialog.cpp')
-rw-r--r--src/widgets/dialogs/qdialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 2cda99a269..e1097dd1bb 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -767,8 +767,10 @@ void QDialog::setVisible(bool visible)
if (d->eventLoop)
d->eventLoop->exit();
}
+
+ const QPlatformTheme *theme = QGuiApplicationPrivate::platformTheme();
if (d->mainDef && isActiveWindow()
- && d->styleHint(QPlatformDialogHelper::SnapToDefaultButton).toBool())
+ && theme->themeHint(QPlatformTheme::DialogSnapToDefaultButton).toBool())
QCursor::setPos(d->mainDef->mapToGlobal(d->mainDef->rect().center()));
}