diff options
author | Martin Smith <msmith@trolltech.com> | 2010-03-23 13:34:42 (GMT) |
---|---|---|
committer | Martin Smith <msmith@trolltech.com> | 2010-03-23 13:34:42 (GMT) |
commit | 265b6b3383e8e3adb89db2e6015ef10e405cf418 (patch) | |
tree | fa082478bc2725cc138d3428e315b30d5b9d2bcd /src | |
parent | f44f210ca4611fbc30afa849058d4286e1a1284c (diff) | |
parent | c4536ce25a9fdfe6a9b447f893796c1262e06df6 (diff) | |
download | Qt-265b6b3383e8e3adb89db2e6015ef10e405cf418.zip Qt-265b6b3383e8e3adb89db2e6015ef10e405cf418.tar.gz Qt-265b6b3383e8e3adb89db2e6015ef10e405cf418.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/io/qfsfileengine.cpp | 2 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_p.h | 4 | ||||
-rw-r--r-- | src/corelib/io/qfsfileengine_win.cpp | 18 | ||||
-rw-r--r-- | src/corelib/tools/qlocale_symbian.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qdnd_win.cpp | 16 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 2 | ||||
-rw-r--r-- | src/gui/util/qcompleter.cpp | 2 |
7 files changed, 31 insertions, 15 deletions
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp index 5e14804..a1ffb81 100644 --- a/src/corelib/io/qfsfileengine.cpp +++ b/src/corelib/io/qfsfileengine.cpp @@ -126,8 +126,10 @@ void QFSFileEnginePrivate::init() fileAttrib = INVALID_FILE_ATTRIBUTES; fileHandle = INVALID_HANDLE_VALUE; mapHandle = INVALID_HANDLE_VALUE; +#ifndef Q_OS_WINCE cachedFd = -1; #endif +#endif } /*! diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h index d07c3a0..55c779e 100644 --- a/src/corelib/io/qfsfileengine_p.h +++ b/src/corelib/io/qfsfileengine_p.h @@ -112,7 +112,11 @@ public: HANDLE fileHandle; HANDLE mapHandle; QHash<uchar *, DWORD /* offset % AllocationGranularity */> maps; + +#ifndef Q_OS_WINCE mutable int cachedFd; +#endif + mutable DWORD fileAttrib; #else QHash<uchar *, QPair<int /*offset % PageSize*/, size_t /*length + offset % PageSize*/> > maps; diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp index 8d34486..9fc8dc3 100644 --- a/src/corelib/io/qfsfileengine_win.cpp +++ b/src/corelib/io/qfsfileengine_win.cpp @@ -450,13 +450,27 @@ bool QFSFileEnginePrivate::nativeClose() // Windows native mode. bool ok = true; + +#ifndef Q_OS_WINCE + if (cachedFd != -1) { + if (::_close(cachedFd) && !::CloseHandle(fileHandle)) { + q->setError(QFile::UnspecifiedError, qt_error_string()); + ok = false; + } + + // System handle is closed with associated file descriptor. + fileHandle = INVALID_HANDLE_VALUE; + cachedFd = -1; + + return ok; + } +#endif + if ((fileHandle == INVALID_HANDLE_VALUE || !::CloseHandle(fileHandle))) { q->setError(QFile::UnspecifiedError, qt_error_string()); ok = false; } fileHandle = INVALID_HANDLE_VALUE; - cachedFd = -1; // gets closed by CloseHandle above - return ok; } diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp index 58e3ba8..01f56cc 100644 --- a/src/corelib/tools/qlocale_symbian.cpp +++ b/src/corelib/tools/qlocale_symbian.cpp @@ -133,7 +133,7 @@ static const symbianToISO symbian_to_iso_list[] = { { ELangMalay, "ms_MY" }, { ELangBrazilianPortuguese, "pt_BR" }, { ELangRomanian, "ro_RO" }, - { ELangSerbian, "sr_YU" }, + { ELangSerbian, "sr_RS" }, { ELangLatinAmericanSpanish, "es" }, { ELangUkrainian, "uk_UA" }, { ELangUrdu, "ur_PK" }, // India/Pakistan diff --git a/src/gui/kernel/qdnd_win.cpp b/src/gui/kernel/qdnd_win.cpp index 0742a93..a164c2a 100644 --- a/src/gui/kernel/qdnd_win.cpp +++ b/src/gui/kernel/qdnd_win.cpp @@ -524,18 +524,14 @@ QOleDropSource::QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState) if (fEscapePressed) { return ResultFromScode(DRAGDROP_S_CANCEL); - } else if (!(grfKeyState & (MK_LBUTTON|MK_MBUTTON|MK_RBUTTON))) { + } else if ((GetAsyncKeyState(VK_LBUTTON) == 0) + && (GetAsyncKeyState(VK_MBUTTON) == 0) + && (GetAsyncKeyState(VK_RBUTTON) == 0)) { + // grfKeyState is broken on CE & some Windows XP versions, + // therefore we need to check the state manually return ResultFromScode(DRAGDROP_S_DROP); } else { -#if defined(Q_OS_WINCE) - // grfKeyState is broken on CE, therefore need to check - // the state manually - if ((GetAsyncKeyState(VK_LBUTTON) == 0) && - (GetAsyncKeyState(VK_MBUTTON) == 0) && - (GetAsyncKeyState(VK_RBUTTON) == 0)) { - return ResultFromScode(DRAGDROP_S_DROP); - } -#else +#if !defined(Q_OS_WINCE) if (currentButtons == Qt::NoButton) { currentButtons = keystate_to_mousebutton(grfKeyState); } else { diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index c32e1a1..ef7ac1f 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -680,7 +680,7 @@ public: QMap<Qt::GestureType, Qt::GestureFlags> gestureContext; // Bit fields. - uint high_attributes[3]; // the low ones are in QWidget::widget_attributes + uint high_attributes[4]; // the low ones are in QWidget::widget_attributes QPalette::ColorRole fg_role : 8; QPalette::ColorRole bg_role : 8; uint dirtyOpaqueChildren : 1; diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp index 387bf87..c095b3b 100644 --- a/src/gui/util/qcompleter.cpp +++ b/src/gui/util/qcompleter.cpp @@ -1110,7 +1110,7 @@ void QCompleter::setPopup(QAbstractItemView *popup) delete d->popup; if (popup->model() != d->proxy) popup->setModel(d->proxy); -#ifdef Q_OS_MAC +#if defined(Q_OS_MAC) && !defined(QT_MAC_USE_COCOA) popup->show(); #else popup->hide(); |