summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2010-01-22 02:58:47 (GMT)
committerRohan McGovern <rohan.mcgovern@nokia.com>2010-01-22 03:01:46 (GMT)
commita5f0627f0d6123286ae852bbb1dc942214f3ee53 (patch)
tree2b1d0406dbb598bcd5b1a1f06d4f0175e5c57fd7 /src
parentc4dc54a048202955d68262a20e0100f9856be303 (diff)
downloadQt-a5f0627f0d6123286ae852bbb1dc942214f3ee53.zip
Qt-a5f0627f0d6123286ae852bbb1dc942214f3ee53.tar.gz
Qt-a5f0627f0d6123286ae852bbb1dc942214f3ee53.tar.bz2
Fixed compile for wincewm60standard-msvc2008.
Includes partial revert of b4dd6ff29bc921ec81b4fd67ed44830e4d697d1d
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qfiledialog_win.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp
index f8c3b84..7938040 100644
--- a/src/gui/dialogs/qfiledialog_win.cpp
+++ b/src/gui/dialogs/qfiledialog_win.cpp
@@ -59,7 +59,23 @@
#endif
#ifdef Q_WS_WINCE
+#include <shlobj.h>
#include <commdlg.h>
+# ifndef BFFM_SETSELECTION
+# define BFFM_SETSELECTION (WM_USER + 102)
+# endif
+// Windows Mobile has a broken definition for BROWSEINFO
+// Only compile fix
+typedef struct qt_priv_browseinfo {
+ HWND hwndOwner;
+ LPCITEMIDLIST pidlRoot;
+ LPWSTR pszDisplayName;
+ LPCWSTR lpszTitle;
+ UINT ulFlags;
+ BFFCALLBACK lpfn;
+ LPARAM lParam;
+ int iImage;
+} qt_BROWSEINFO;
bool qt_priv_ptr_valid = false;
#else
#include "qfiledialog_win_p.h"
@@ -698,6 +714,11 @@ static int __stdcall winGetExistDirCallbackProc(HWND hwnd,
return 0;
}
+#ifndef BIF_NEWDIALOGSTYLE
+#define BIF_NEWDIALOGSTYLE 0x0040 // Use the new dialog layout with the ability to resize
+#endif
+
+
QString qt_win_get_existing_directory(const QFileDialogArgs &args)
{
QString currentDir = QDir::currentPath();
@@ -722,7 +743,11 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args)
path[0] = 0;
tTitle = args.caption;
+#if !defined(Q_WS_WINCE)
BROWSEINFO bi;
+#else
+ qt_BROWSEINFO bi;
+#endif
Q_ASSERT(!parent ||parent->testAttribute(Qt::WA_WState_Created));
bi.hwndOwner = (parent ? parent->winId() : 0);
@@ -736,7 +761,7 @@ QString qt_win_get_existing_directory(const QFileDialogArgs &args)
qt_win_resolve_libs();
if (ptrSHBrowseForFolder) {
- LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder(&bi);
+ LPITEMIDLIST pItemIDList = ptrSHBrowseForFolder((BROWSEINFO*)&bi);
if (pItemIDList) {
ptrSHGetPathFromIDList(pItemIDList, path);
IMalloc *pMalloc;