diff options
author | Liang Qi <liang.qi@qt.io> | 2017-02-17 20:10:34 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-02-17 20:10:34 +0100 |
commit | bc4cd465dd5df82e13f3c7709166ee11289d219f (patch) | |
tree | d6323aaed6383e589fbefb6057648c22bb187c76 /src/widgets/dialogs | |
parent | 43daefb0962794b2df256cae1098e889b9b36f12 (diff) | |
parent | 07745d7bfbf6c8d83e0243150d8ce934675dea87 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
qmake/Makefile.unix
Change-Id: Ia18e391198222eef34ffa2df6f683e052058d032
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dialogs/qwizard_win.cpp | 9 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index 5bfb7553a5..a552746385 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -656,7 +656,7 @@ void QFileDialogPrivate::retranslateStrings() /* WIDGETS */ if (options->useDefaultNameFilters()) q->setNameFilter(QFileDialogOptions::defaultNameFilterString()); - if (nativeDialogInUse) + if (!usingWidgets()) return; QList<QAction*> actions = qFileDialogUi->treeView->header()->actions(); @@ -2246,7 +2246,7 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent, } /*! - This is a convenience static function that will return or or more existing + This is a convenience static function that will return one or more existing files selected by the user. If the user presses Cancel, it returns an empty list. diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp index 4f6ef49a7f..4ab01aca66 100644 --- a/src/widgets/dialogs/qwizard_win.cpp +++ b/src/widgets/dialogs/qwizard_win.cpp @@ -215,8 +215,7 @@ void QVistaHelper::disconnectBackButton() QColor QVistaHelper::basicWindowFrameColor() { DWORD rgb; - HWND handle = QApplicationPrivate::getHWNDForWidget(QApplication::desktop()); - const HANDLE hTheme = OpenThemeData(handle, L"WINDOW"); + const HANDLE hTheme = OpenThemeData(GetDesktopWindow(), L"WINDOW"); GetThemeColor(hTheme, WP_CAPTION, CS_ACTIVE, wizard->isActiveWindow() ? TMT_FILLCOLORHINT : TMT_BORDERCOLORHINT, &rgb); BYTE r = GetRValue(rgb); @@ -258,8 +257,7 @@ static LOGFONT getCaptionLogFont(HANDLE hTheme) static bool getCaptionQFont(int dpi, QFont *result) { - const HANDLE hTheme = - OpenThemeData(QApplicationPrivate::getHWNDForWidget(QApplication::desktop()), L"WINDOW"); + const HANDLE hTheme = OpenThemeData(GetDesktopWindow(), L"WINDOW"); if (!hTheme) return false; // Call into QWindowsNativeInterface to convert the LOGFONT into a QFont. @@ -590,8 +588,7 @@ bool QVistaHelper::drawTitleText(QPainter *painter, const QString &text, const Q if (vistaState() == VistaAero) { const QRect rectDp = QRect(rect.topLeft() * QVistaHelper::m_devicePixelRatio, rect.size() * QVistaHelper::m_devicePixelRatio); - HWND handle = QApplicationPrivate::getHWNDForWidget(QApplication::desktop()); - const HANDLE hTheme = OpenThemeData(handle, L"WINDOW"); + const HANDLE hTheme = OpenThemeData(GetDesktopWindow(), L"WINDOW"); if (!hTheme) return false; // Set up a memory DC and bitmap that we'll draw into HDC dcMem; |