diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-04 14:36:28 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-04 15:58:17 +0100 |
commit | 5a67cd24955da6c3ac27cbbd5e08cf9ce9fa88b9 (patch) | |
tree | 575dc1cf31891faa68a13848a16bf40ba3ec7e1b /src/plugins/platforms/windows/qwindowscontext.cpp | |
parent | 35f56b0cf97a9cc39ef4cdbedc9f502ffcc61ea1 (diff) |
Windows: Add dialog helpers for native dialogs.
Implement QPlatformDialogHelper for file dialogs based on
IFileDialog. Add prototypical implementation of color dialogs.
Change-Id: If3c7470be6c0b8fbf8cfea1b6638bda43afafea7
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowscontext.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 92f764cf14..f620cf8724 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -75,6 +75,7 @@ int QWindowsContext::verboseFonts = 0; int QWindowsContext::verboseGL = 0; int QWindowsContext::verboseOLE = 0; int QWindowsContext::verboseInputMethods = 0; +int QWindowsContext::verboseDialogs = 0; // Get verbosity of components from "foo:2,bar:3" static inline int componentVerbose(const char *v, const char *keyWord) @@ -144,6 +145,8 @@ static inline bool useRTL_Extensions(QSysInfo::WinVersion ver) In addition, touch-related functions are available only from Windows onwards. These need to resolved dynamically for Q_CC_MSVC as well. + \sa QWindowsShell32DLL + \ingroup qt-lighthouse-win */ @@ -178,7 +181,30 @@ bool QWindowsUser32DLL::initTouch() return registerTouchWindow && getTouchInputInfo && getTouchInputInfo; } +/*! + \class QWindowsShell32DLL + \brief Struct that contains dynamically resolved symbols of Shell32.dll. + + The stub libraries shipped with the MinGW compiler miss some of the + functions. They need to be retrieved dynamically. + + \sa QWindowsUser32DLL + + \ingroup qt-lighthouse-win +*/ + +QWindowsShell32DLL::QWindowsShell32DLL() : sHCreateItemFromParsingName(0) +{ +} + +void QWindowsShell32DLL::init() +{ + QSystemLibrary library(QStringLiteral("shell32")); + sHCreateItemFromParsingName = (SHCreateItemFromParsingName)(library.resolve("SHCreateItemFromParsingName")); +} + QWindowsUser32DLL QWindowsContext::user32dll; +QWindowsShell32DLL QWindowsContext::shell32dll; QWindowsContext *QWindowsContext::m_instance = 0; @@ -214,6 +240,7 @@ QWindowsContextPrivate::QWindowsContextPrivate() : m_oleInitializeResult(OleInitialize(NULL)) { QWindowsContext::user32dll.init(); + QWindowsContext::shell32dll.init(); const QSysInfo::WinVersion ver = QSysInfo::windowsVersion(); @@ -242,6 +269,7 @@ QWindowsContext::QWindowsContext() : QWindowsContext::verboseGL = componentVerbose(v, "gl"); QWindowsContext::verboseOLE = componentVerbose(v, "ole"); QWindowsContext::verboseInputMethods = componentVerbose(v, "im"); + QWindowsContext::verboseDialogs = componentVerbose(v, "dialogs"); } } |