From 30f19d904fb3b93f4bb9a17646748b1fca4f286a Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 11 Jul 2013 06:03:46 +0200 Subject: [PATCH 01/14] Check if widget inherits from QTextEdit when drawing the frame There can be cases where the accessibility plugin is not available so rather than have an incorrect style in those cases we check if the widget inherits QTextEdit. Change-Id: Ia514ce61f24ef016f56c6dce103f90f699b4048a Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qwindowsvistastyle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index b08eab580d7..e442e53bde5 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -523,10 +523,11 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt case PE_Frame: { #ifndef QT_NO_ACCESSIBILITY if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText) - || QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText)) { + || QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText) || #else - if (false) { + if ( #endif + (widget && widget->inherits("QTextEdit"))) { painter->save(); int stateId = ETS_NORMAL; if (!(state & State_Enabled)) From bf42eacc7fb283d123f9bdf9ebc19c16dd7035e4 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 8 Jul 2013 16:50:31 +0200 Subject: [PATCH 02/14] Windows font database: Resolve aliases for extra fonts. Ensure QFontDataBase::hasFamily() deals with aliases. Task-number: QTBUG-31689 Change-Id: Ia59bfcb93362ac9343c6d30dab1091a4db482dfa Reviewed-by: Konstantin Ritt --- src/gui/text/qfontdatabase_qpa.cpp | 11 +++++++++++ src/gui/text/qplatformfontdatabase.cpp | 4 +++- .../fontconfig/qfontconfigdatabase.cpp | 5 ++++- .../windows/qwindowsfontdatabase.cpp | 9 ++++++--- .../text/qfontdatabase/tst_qfontdatabase.cpp | 19 +++++++++++++++++++ 5 files changed, 43 insertions(+), 5 deletions(-) diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp index 32580ada7a4..62b99968bce 100644 --- a/src/gui/text/qfontdatabase_qpa.cpp +++ b/src/gui/text/qfontdatabase_qpa.cpp @@ -101,6 +101,17 @@ Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const f->aliases.push_back(alias); } +QString qt_resolveFontFamilyAlias(const QString &alias) +{ + if (!alias.isEmpty()) { + const QFontDatabasePrivate *d = privateDb(); + for (int i = 0; i < d->count; ++i) + if (d->families[i]->matchesFamilyName(alias)) + return d->families[i]->name; + } + return alias; +} + static QStringList fallbackFamilies(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script) { QStringList retList = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,styleHint,script); diff --git a/src/gui/text/qplatformfontdatabase.cpp b/src/gui/text/qplatformfontdatabase.cpp index 4e2a2df66a7..4399aff9da8 100644 --- a/src/gui/text/qplatformfontdatabase.cpp +++ b/src/gui/text/qplatformfontdatabase.cpp @@ -379,9 +379,11 @@ QFont QPlatformFontDatabase::defaultFont() const \since 5.0 */ +QString qt_resolveFontFamilyAlias(const QString &alias); + QString QPlatformFontDatabase::resolveFontFamilyAlias(const QString &family) const { - return family; + return qt_resolveFontFamilyAlias(family); } /*! diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp index 1cc85bd0dc7..afe634dc4b9 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp @@ -768,6 +768,9 @@ QStringList QFontconfigDatabase::addApplicationFont(const QByteArray &fontData, QString QFontconfigDatabase::resolveFontFamilyAlias(const QString &family) const { + QString resolved = QBasicFontDatabase::resolveFontFamilyAlias(family); + if (!resolved.isEmpty() && resolved != family) + return resolved; FcPattern *pattern = FcPatternCreate(); if (!pattern) return family; @@ -781,7 +784,7 @@ QString QFontconfigDatabase::resolveFontFamilyAlias(const QString &family) const FcChar8 *familyAfterSubstitution = 0; FcPatternGetString(pattern, FC_FAMILY, 0, &familyAfterSubstitution); - QString resolved = QString::fromUtf8((const char *) familyAfterSubstitution); + resolved = QString::fromUtf8((const char *) familyAfterSubstitution); FcPatternDestroy(pattern); return resolved; diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp index 7fedc27951a..b7ccb5767e1 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase.cpp @@ -1586,11 +1586,14 @@ static QStringList extraTryFontsForFamily(const QString& family) break; } } - QStringList fm = QFontDatabase().families(); + QFontDatabase db; + const QStringList families = db.families(); const char **tf = tryFonts; while (tf && *tf) { - if (fm.contains(QLatin1String(*tf))) - result << QLatin1String(*tf); + // QTBUG-31689, family might be an English alias for a localized font name. + const QString family = QString::fromLatin1(*tf); + if (families.contains(family) || db.hasFamily(family)) + result << family; ++tf; } } diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index a9ad299ad83..715d937a7fe 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -73,6 +73,8 @@ private slots: void addAppFont_data(); void addAppFont(); + + void aliases(); }; tst_QFontDatabase::tst_QFontDatabase() @@ -268,5 +270,22 @@ void tst_QFontDatabase::addAppFont() QCOMPARE(db.families(), oldFamilies); } +QT_BEGIN_NAMESPACE +Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias); +QT_END_NAMESPACE + +void tst_QFontDatabase::aliases() +{ + QFontDatabase db; + const QStringList families = db.families(); + QVERIFY(!families.isEmpty()); + const QString firstFont = families.front(); + QVERIFY(db.hasFamily(firstFont)); + const QString alias = QStringLiteral("AliasToFirstFont") + firstFont; + QVERIFY(!db.hasFamily(alias)); + qt_registerAliasToFontFamily(firstFont, alias); + QVERIFY(db.hasFamily(alias)); +} + QTEST_MAIN(tst_QFontDatabase) #include "tst_qfontdatabase.moc" From 0b9c942f3d36d55b92b4e94e9212ad5dc7638f72 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 9 Jul 2013 08:22:23 +0200 Subject: [PATCH 03/14] Use QFINDTESTDATA in tst_qfontdatabase. Change-Id: I851dbe18cd3ba9a07ddac71d23e04f5211b2db17 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Konstantin Ritt --- .../gui/text/qfontdatabase/qfontdatabase.pro | 1 - .../text/qfontdatabase/tst_qfontdatabase.cpp | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro index 43e04a006f1..37868dcfdea 100644 --- a/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro +++ b/tests/auto/gui/text/qfontdatabase/qfontdatabase.pro @@ -2,7 +2,6 @@ CONFIG += testcase CONFIG += parallel_test TARGET = tst_qfontdatabase SOURCES += tst_qfontdatabase.cpp -DEFINES += SRCDIR=\\\"$$PWD\\\" QT += testlib !mac: QT += core-private gui-private diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp index 715d937a7fe..9cf4082287a 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp @@ -54,6 +54,7 @@ public: virtual ~tst_QFontDatabase(); public slots: + void initTestCase(); void init(); void cleanup(); private slots: @@ -75,13 +76,14 @@ private slots: void addAppFont(); void aliases(); + +private: + const QString m_testFont; }; tst_QFontDatabase::tst_QFontDatabase() + : m_testFont(QFINDTESTDATA("FreeMono.ttf")) { -#ifndef Q_OS_IRIX - QDir::setCurrent(SRCDIR); -#endif } tst_QFontDatabase::~tst_QFontDatabase() @@ -89,6 +91,11 @@ tst_QFontDatabase::~tst_QFontDatabase() } +void tst_QFontDatabase::initTestCase() +{ + QVERIFY(!m_testFont.isEmpty()); +} + void tst_QFontDatabase::init() { // TODO: Add initialization code here. @@ -230,13 +237,13 @@ void tst_QFontDatabase::addAppFont() int id; if (useMemoryFont) { - QFile fontfile("FreeMono.ttf"); + QFile fontfile(m_testFont); fontfile.open(QIODevice::ReadOnly); QByteArray fontdata = fontfile.readAll(); QVERIFY(!fontdata.isEmpty()); id = QFontDatabase::addApplicationFontFromData(fontdata); } else { - id = QFontDatabase::addApplicationFont("FreeMono.ttf"); + id = QFontDatabase::addApplicationFont(m_testFont); } #if defined(Q_OS_HPUX) && defined(QT_NO_FONTCONFIG) // Documentation says that X11 systems that don't have fontconfig From 2c0f7fb8dc113ca3a1c0446edcd1b6ff05c082f0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 10 Jul 2013 14:00:13 +0200 Subject: [PATCH 04/14] Fix compilation of libGLESv2 with older MinGW-w64 headers Fix compilation of libGLESv2 for mingw-headers predating MinGW-w64 svn commit 5567 (like MinGW-builds gcc 4.7.2-rev8, the toolchain we officially support). Commit 5567 added the D3DCOMPILER_DLL define to d3dcompiler.h, but with a trailing semicolon that has then fixed in commit 5783. Any toolchain that ships MinGW-w64 headers from a version in between (like MinGW-builds gcc 4.7.2-rev11) will unfortunately remain broken. Change-Id: I31272a1a991c4fc0f1611f8fb7510be51d6bb925 Reviewed-by: Jonathan Liu Reviewed-by: Friedemann Kleint --- .../angle/src/libGLESv2/renderer/Renderer.cpp | 19 +++++++ ...of-libGLESv2-with-older-MinGW-w64-he.patch | 52 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp index 41cdb8b2782..218356c59bc 100644 --- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp +++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp @@ -22,6 +22,25 @@ #define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL3 #endif +#ifdef __MINGW32__ + +#ifndef D3DCOMPILER_DLL + +//Add define + typedefs for older MinGW-w64 headers (pre 5783) + +#define D3DCOMPILER_DLL L"d3dcompiler_43.dll" + +HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, + const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages); +typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const char *filename, + const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, + const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages); + +#endif // D3DCOMPILER_DLL + +#endif // __MINGW32__ + namespace rx { diff --git a/src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch b/src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch new file mode 100644 index 00000000000..f104a273cc8 --- /dev/null +++ b/src/angle/patches/0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch @@ -0,0 +1,52 @@ +From 82fd5de3ae5e242730fdaf8044f17227337d881c Mon Sep 17 00:00:00 2001 +From: Kai Koehne +Date: Wed, 10 Jul 2013 14:00:13 +0200 +Subject: [PATCH] Fix compilation of libGLESv2 with older MinGW-w64 headers + +Fix compilation of libGLESv2 for mingw-headers predating MinGW-w64 +svn commit 5567 (like MinGW-builds gcc 4.7.2-rev8, the toolchain +we officially support). + +Commit 5567 added the D3DCOMPILER_DLL define to d3dcompiler.h, but with +a trailing semicolon that has then fixed in commit 5783. Any toolchain +that ships MinGW-w64 headers from a version in between (like +MinGW-builds gcc 4.7.2-rev11) will unfortunately remain broken. + +Change-Id: I31272a1a991c4fc0f1611f8fb7510be51d6bb925 +--- + .../angle/src/libGLESv2/renderer/Renderer.cpp | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp +index 41cdb8b..218356c 100644 +--- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp ++++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp +@@ -22,6 +22,25 @@ + #define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL3 + #endif + ++#ifdef __MINGW32__ ++ ++#ifndef D3DCOMPILER_DLL ++ ++//Add define + typedefs for older MinGW-w64 headers (pre 5783) ++ ++#define D3DCOMPILER_DLL L"d3dcompiler_43.dll" ++ ++HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename, ++ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, ++ const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages); ++typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const char *filename, ++ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint, ++ const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages); ++ ++#endif // D3DCOMPILER_DLL ++ ++#endif // __MINGW32__ ++ + namespace rx + { + +-- +1.8.3.msysgit.0 + From 376abfab39fe849a8d43a9cc425012b8dfe5f6ff Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 11 Jul 2013 15:42:34 +0200 Subject: [PATCH 05/14] Remove references to Nokia in qtbase examples. Change-Id: I0d4a309bc7f92e1ad2c7465bfb2d677c91e6d818 Reviewed-by: Jerome Pasion --- examples/embedded/lightmaps/slippymap.cpp | 2 +- examples/embedded/styleexample/main.cpp | 4 ++-- examples/widgets/painting/basicdrawing/renderarea.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/embedded/lightmaps/slippymap.cpp b/examples/embedded/lightmaps/slippymap.cpp index 9861618dba0..7355e336c7a 100644 --- a/examples/embedded/lightmaps/slippymap.cpp +++ b/examples/embedded/lightmaps/slippymap.cpp @@ -198,7 +198,7 @@ void SlippyMap::download() m_url = QUrl(path.arg(zoom).arg(grab.x()).arg(grab.y())); QNetworkRequest request; request.setUrl(m_url); - request.setRawHeader("User-Agent", "Nokia (Qt) Graphics Dojo 1.0"); + request.setRawHeader("User-Agent", "Digia (Qt) Graphics Dojo 1.0"); request.setAttribute(QNetworkRequest::User, QVariant(grab)); m_manager.get(request); } diff --git a/examples/embedded/styleexample/main.cpp b/examples/embedded/styleexample/main.cpp index 833dbadd49f..6630682fe4d 100644 --- a/examples/embedded/styleexample/main.cpp +++ b/examples/embedded/styleexample/main.cpp @@ -48,8 +48,8 @@ int main(int argc, char *argv[]) Q_INIT_RESOURCE(styleexample); app.setApplicationName("style"); - app.setOrganizationName("Nokia"); - app.setOrganizationDomain("com.nokia.qt"); + app.setOrganizationName("QtProject"); + app.setOrganizationDomain("www.qt-project.org"); StyleWidget widget; widget.showFullScreen(); diff --git a/examples/widgets/painting/basicdrawing/renderarea.cpp b/examples/widgets/painting/basicdrawing/renderarea.cpp index 0519ceee3a0..e3e6771b4f1 100644 --- a/examples/widgets/painting/basicdrawing/renderarea.cpp +++ b/examples/widgets/painting/basicdrawing/renderarea.cpp @@ -189,7 +189,7 @@ void RenderArea::paintEvent(QPaintEvent * /* event */) painter.drawPath(path); break; case Text: - painter.drawText(rect, Qt::AlignCenter, tr("Qt by\nNokia")); + painter.drawText(rect, Qt::AlignCenter, tr("Qt by\nDigia")); break; case Pixmap: painter.drawPixmap(10, 10, pixmap); From 5cab14b8a1dfbb03e22b10af385fb90900a9f280 Mon Sep 17 00:00:00 2001 From: Bradley Buda Date: Wed, 10 Jul 2013 17:29:22 -0700 Subject: [PATCH 06/14] Correct algorithm for digest auth when using the CONNECT verb QHttpSocketEngine fails to authenticate to an HTTP proxy that is using Digest authentication and the CONNECT method (i.e. when you are tunneling TLS over HTTP). The bug is due to a bad parameter being passed to QAuthenticatorPrivate::calculateResponse - the requestMethod parameter is passed in as "CONNECT " instead of "CONNECT" (note the trailing space). Because an MD5 hash is derived from this method when using the qop="auth" flavor of Digest auth, the hash does not match the expected value and authentication always fails in this configuration. Change-Id: Ia97ce5967bfb57b28db7614347ffdcaa56e4da0c Reviewed-by: Peter Hartmann --- src/network/socket/qhttpsocketengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp index e3aae8ef0d7..f2a1633bd31 100644 --- a/src/network/socket/qhttpsocketengine.cpp +++ b/src/network/socket/qhttpsocketengine.cpp @@ -497,12 +497,13 @@ void QHttpSocketEngine::slotSocketConnected() Q_D(QHttpSocketEngine); // Send the greeting. - const char method[] = "CONNECT "; + const char method[] = "CONNECT"; QByteArray peerAddress = d->peerName.isEmpty() ? d->peerAddress.toString().toLatin1() : QUrl::toAce(d->peerName); QByteArray path = peerAddress + ':' + QByteArray::number(d->peerPort); QByteArray data = method; + data += " "; data += path; data += " HTTP/1.1\r\n"; data += "Proxy-Connection: keep-alive\r\n"; From e602003f87fe8483be3963bb6b42692b727d1b3d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 14 Jun 2013 17:16:49 +0200 Subject: [PATCH 07/14] DirectFB: Improve mapping of multimedia keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The play_pause key was mapped incorrectly to direct pause. This one maps it to togglePlayPause. The two keys fast-forward and rewind have been mapped to Key_AudioForward and Key_AudioRewind, matching XCB and Android mappings. Change-Id: I481bafab2fdfe1824b49e268e9d0754eef348cbf Reviewed-by: Jørgen Lind --- src/plugins/platforms/directfb/qdirectfbconvenience.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/directfb/qdirectfbconvenience.cpp b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp index 4a349bbae68..939d8c06866 100644 --- a/src/plugins/platforms/directfb/qdirectfbconvenience.cpp +++ b/src/plugins/platforms/directfb/qdirectfbconvenience.cpp @@ -291,12 +291,14 @@ QDirectFbKeyMap::QDirectFbKeyMap() insert(DIKS_VOLUME_UP , Qt::Key_VolumeUp); insert(DIKS_VOLUME_DOWN , Qt::Key_VolumeDown); insert(DIKS_MUTE , Qt::Key_VolumeMute); - insert(DIKS_PLAYPAUSE , Qt::Key_Pause); + insert(DIKS_PLAYPAUSE , Qt::Key_MediaTogglePlayPause); insert(DIKS_PLAY , Qt::Key_MediaPlay); insert(DIKS_STOP , Qt::Key_MediaStop); insert(DIKS_RECORD , Qt::Key_MediaRecord); insert(DIKS_PREVIOUS , Qt::Key_MediaPrevious); insert(DIKS_NEXT , Qt::Key_MediaNext); + insert(DIKS_REWIND , Qt::Key_AudioRewind); + insert(DIKS_FASTFORWARD , Qt::Key_AudioForward); insert(DIKS_F1 , Qt::Key_F1); insert(DIKS_F2 , Qt::Key_F2); From 6c37fb70d695df001999c78a27ca50d6d2ac6517 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 9 Jul 2013 11:17:37 +0200 Subject: [PATCH 08/14] Consider virtual screen when determining dock widget visibility. Task-number: QTBUG-32260 Change-Id: I8b28e3869a6e3b1ed12a311dfa0100979098fc4b Reviewed-by: Andy Shaw --- src/widgets/widgets/qdockwidget.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 7cd7172ef50..45e3f1b10bd 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -1387,9 +1388,17 @@ bool QDockWidget::event(QEvent *event) d->toggleViewAction->setChecked(false); emit visibilityChanged(false); break; - case QEvent::Show: + case QEvent::Show: { d->toggleViewAction->setChecked(true); - emit visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0); + QPoint parentTopLeft(0, 0); + if (isWindow()) { + if (const QWindow *window = windowHandle()) + parentTopLeft = window->screen()->availableVirtualGeometry().topLeft(); + else + parentTopLeft = QGuiApplication::primaryScreen()->availableVirtualGeometry().topLeft(); + } + emit visibilityChanged(geometry().right() >= parentTopLeft.x() && geometry().bottom() >= parentTopLeft.y()); +} break; #endif case QEvent::ApplicationLayoutDirectionChange: From b72a32b05d2e7d4b141aad61b58c1965ad2f9bca Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 12 Jul 2013 10:46:30 +0200 Subject: [PATCH 09/14] Remove Nokia-domains in commented-out test code. Task-number: QTBUG-32390 Change-Id: Ida7d54aba9cde5c472ff6bb2696d1201ba4f2199 Reviewed-by: Sergio Ahumada --- .../tst_qabstractnetworkcache.cpp | 2 - .../tst_qhttpnetworkconnection.cpp | 2 - .../sql/kernel/qsqldatabase/tst_databases.h | 42 +++++++++---------- .../qnetworkreply/tst_qnetworkreply.cpp | 2 - 4 files changed, 21 insertions(+), 27 deletions(-) diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp index fa5b25c14b0..53b367c8724 100644 --- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp +++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp @@ -273,8 +273,6 @@ void tst_QAbstractNetworkCache::cacheControl_data() QTest::newRow("304-3") << QNetworkRequest::AlwaysCache << "httpcachetest_cachecontrol.cgi?max-age=1000, must-revalidate" << false; QTest::newRow("304-4") << QNetworkRequest::PreferCache << "httpcachetest_cachecontrol.cgi?max-age=1000, must-revalidate" << true; - // see QTBUG-7060 - //QTest::newRow("nokia-boston") << QNetworkRequest::PreferNetwork << "http://waplabdc.nokia-boston.com/browser/users/venkat/cache/Cache_directives/private_1b.asp" << true; QTest::newRow("304-2b") << QNetworkRequest::PreferNetwork << "httpcachetest_cachecontrol200.cgi?private, max-age=1000" << true; QTest::newRow("304-4b") << QNetworkRequest::PreferCache << "httpcachetest_cachecontrol200.cgi?private, max-age=1000" << true; } diff --git a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 7bb435952bd..47ab7c2e99e 100644 --- a/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/network/access/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -825,8 +825,6 @@ void tst_QHttpNetworkConnection::getMultiple() // for the "real" results, use a URL that has "internet latency" for you. Then (6 connections, pipelining) will win. // for LAN latency, you will possibly get that (1 connection, no pipelining) is the fastest QHttpNetworkRequest *request = new QHttpNetworkRequest("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt"); - // located in Berlin: - //QHttpNetworkRequest *request = new QHttpNetworkRequest(QUrl("http://klinsmann.nokia.trolltech.de/~berlin/qtcreatorad.gif")); if (pipeliningAllowed) request->setPipeliningAllowed(true); requests.append(request); diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h index af3c5b2e90f..f87493205f3 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_databases.h +++ b/tests/auto/sql/kernel/qsqldatabase/tst_databases.h @@ -248,10 +248,10 @@ public: void addDbs() { //addDb("QOCI", "localhost", "system", "penandy"); -// addDb( "QOCI8", "//horsehead.nokia.troll.no:1521/pony.troll.no", "scott", "tiger" ); // Oracle 9i on horsehead -// addDb( "QOCI8", "//horsehead.nokia.troll.no:1521/ustest.troll.no", "scott", "tiger", "" ); // Oracle 9i on horsehead -// addDb( "QOCI8", "//iceblink.nokia.troll.no:1521/ice.troll.no", "scott", "tiger", "" ); // Oracle 8 on iceblink (not currently working) -// addDb( "QOCI", "//silence.nokia.troll.no:1521/testdb", "scott", "tiger" ); // Oracle 10g on silence +// addDb( "QOCI8", "//horsehead.qt-project.org:1521/pony.troll.no", "scott", "tiger" ); // Oracle 9i on horsehead +// addDb( "QOCI8", "//horsehead.qt-project.org:1521/ustest.troll.no", "scott", "tiger", "" ); // Oracle 9i on horsehead +// addDb( "QOCI8", "//iceblink.qt-project.org:1521/ice.troll.no", "scott", "tiger", "" ); // Oracle 8 on iceblink (not currently working) +// addDb( "QOCI", "//silence.qt-project.org:1521/testdb", "scott", "tiger" ); // Oracle 10g on silence // addDb( "QOCI", "//bq-oracle10g.qt-project.org:1521/XE", "scott", "tiger" ); // Oracle 10gexpress // This requires a local ODBC data source to be configured( pointing to a MySql database ) @@ -261,22 +261,22 @@ public: // addDb( "QODBC", "silencetestdb", "troll", "trond", "silence" ); // addDb( "QODBC", "horseheadtestdb", "troll", "trondk", "horsehead" ); -// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no" ); -// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3307 ); -// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3308, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 4.1.1 -// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3309, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 5.0.18 Linux -// addDb( "QMYSQL3", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // MySQL 5.1.36 Windows +// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org" ); +// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org", 3307 ); +// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org", 3308, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 4.1.1 +// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org", 3309, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 5.0.18 Linux +// addDb( "QMYSQL3", "testdb", "troll", "trond", "silence.qt-project.org" ); // MySQL 5.1.36 Windows // addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql41.qt-project.org" ); // MySQL 4.1.22-2.el4 linux // addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql50.qt-project.org" ); // MySQL 5.0.45-7.el5 linux // addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql51.qt-project.org" ); // MySQL 5.1.36-6.7.2.i586 linux -// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no" ); // V7.2 NOT SUPPORTED! -// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5434 ); // V7.2 NOT SUPPORTED! Multi-byte -// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5435 ); // V7.3 -// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5436 ); // V7.4 -// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5437 ); // V8.0.3 -// addDb( "QPSQL7", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // V8.2.1, UTF-8 +// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org" ); // V7.2 NOT SUPPORTED! +// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5434 ); // V7.2 NOT SUPPORTED! Multi-byte +// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5435 ); // V7.3 +// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5436 ); // V7.4 +// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5437 ); // V8.0.3 +// addDb( "QPSQL7", "testdb", "troll", "trond", "silence.qt-project.org" ); // V8.2.1, UTF-8 // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-postgres74.qt-project.org" ); // Version 7.4.19-1.el4_6.1 // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql81.qt-project.org" ); // Version 8.1.11-1.el5_1.1 @@ -284,11 +284,11 @@ public: // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql90.qt-project.org" ); // Version 9.0.0 -// addDb( "QDB2", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // DB2 v9.1 on silence +// addDb( "QDB2", "testdb", "troll", "trond", "silence.qt-project.org" ); // DB2 v9.1 on silence // addDb( "QDB2", "testdb", "testuser", "Ee4Gabf6_", "bq-db2-972.qt-project.org" ); // DB2 // yes - interbase really wants the physical path on the host machine. -// addDb( "QIBASE", "/opt/interbase/qttest.gdb", "SYSDBA", "masterkey", "horsehead.nokia.troll.no" ); +// addDb( "QIBASE", "/opt/interbase/qttest.gdb", "SYSDBA", "masterkey", "horsehead.qt-project.org" ); // addDb( "QIBASE", "silence.troll.no:c:\\ibase\\testdb", "SYSDBA", "masterkey", "" ); // InterBase 7.5 on silence // addDb( "QIBASE", "silence.troll.no:c:\\ibase\\testdb_ascii", "SYSDBA", "masterkey", "" ); // InterBase 7.5 on silence // addDb( "QIBASE", "/opt/firebird/databases/testdb.fdb", "testuser", "Ee4Gabf6_", "firebird1-nokia.trolltech.com.au" ); // Firebird 1.5.5 @@ -301,13 +301,13 @@ public: // addDb("QSQLITE", ":memory:"); addDb( "QSQLITE", QDir::toNativeSeparators(QDir::tempPath()+"/foo.db") ); // addDb( "QSQLITE2", QDir::toNativeSeparators(QDir::tempPath()+"/foo2.db") ); -// addDb( "QODBC3", "DRIVER={SQL SERVER};SERVER=iceblink.nokia.troll.no\\ICEBLINK", "troll", "trond", "" ); -// addDb( "QODBC3", "DRIVER={SQL Native Client};SERVER=silence.nokia.troll.no\\SQLEXPRESS", "troll", "trond", "" ); +// addDb( "QODBC3", "DRIVER={SQL SERVER};SERVER=iceblink.qt-project.org\\ICEBLINK", "troll", "trond", "" ); +// addDb( "QODBC3", "DRIVER={SQL Native Client};SERVER=silence.qt-project.org\\SQLEXPRESS", "troll", "trond", "" ); // addDb( "QODBC", "DRIVER={MySQL ODBC 5.1 Driver};SERVER=bq-mysql50.qt-project.org;DATABASE=testdb", "testuser", "Ee4Gabf6_", "" ); // addDb( "QODBC", "DRIVER={MySQL ODBC 5.1 Driver};SERVER=bq-mysql51.qt-project.org;DATABASE=testdb", "testuser", "Ee4Gabf6_", "" ); -// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=horsehead.nokia.troll.no;DATABASE=testdb;PORT=4101;UID=troll;PWD=trondk", "troll", "trondk", "" ); -// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=silence.nokia.troll.no;DATABASE=testdb;PORT=2392;UID=troll;PWD=trond", "troll", "trond", "" ); +// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=horsehead.qt-project.org;DATABASE=testdb;PORT=4101;UID=troll;PWD=trondk", "troll", "trondk", "" ); +// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=silence.qt-project.org;DATABASE=testdb;PORT=2392;UID=troll;PWD=trond", "troll", "trond", "" ); // addDb( "QODBC", "DRIVER={FreeTDS};SERVER=bq-winserv2003-x86-01.qt-project.org;DATABASE=testdb;PORT=1433;UID=testuser;PWD=Ee4Gabf6_;TDS_Version=8.0", "", "", "" ); // addDb( "QODBC", "DRIVER={FreeTDS};SERVER=bq-winserv2008-x86-01.qt-project.org;DATABASE=testdb;PORT=1433;UID=testuser;PWD=Ee4Gabf6_;TDS_Version=8.0", "", "", "" ); // addDb( "QTDS7", "testdb", "testuser", "Ee4Gabf6_", "bq-winserv2003" ); diff --git a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp index f62ce6bf5c9..58cb65e1c74 100644 --- a/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -798,7 +798,6 @@ void tst_qnetworkreply::httpsRequestChain() int count = 10; QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + "/fluke.gif")); - //QNetworkRequest request(QUrl("https://www.nokia.com/robots.txt")); // Disable keep-alive so we have the full re-connecting of TCP. request.setRawHeader("Connection", "close"); @@ -808,7 +807,6 @@ void tst_qnetworkreply::httpsRequestChain() // Warm up DNS cache and then immediately start HTTP QHostInfo::lookupHost(QtNetworkSettings::serverName(), &helper, SLOT(doNextRequest())); - //QHostInfo::lookupHost("www.nokia.com", &helper, SLOT(doNextRequest())); // we can use QBENCHMARK_ONCE when we find out how to make it really run once. // there is still a warmup-run :( From 7e7c689c347ce1497d06ced5aca72d78ee75cf99 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 12 Jul 2013 10:47:58 +0200 Subject: [PATCH 10/14] Fix domain in manual test qhttpnetworkconnection. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-32390 Change-Id: Ic56640087d1f07edeca5f5fc36acac9dddc79c73 Reviewed-by: Sergio Ahumada Reviewed-by: Peter Hartmann Reviewed-by: Tony Sarajärvi --- tests/manual/qhttpnetworkconnection/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/manual/qhttpnetworkconnection/main.cpp b/tests/manual/qhttpnetworkconnection/main.cpp index 1ddf6859e29..ed9670ecec6 100644 --- a/tests/manual/qhttpnetworkconnection/main.cpp +++ b/tests/manual/qhttpnetworkconnection/main.cpp @@ -55,15 +55,17 @@ private slots: }; +const char urlC[] = "http://download.qt-project.org/official_releases/online_installers/qt-linux-opensource-1.4.0-x86-online.run"; + void tst_qhttpnetworkconnection::bigRemoteFile() { QNetworkAccessManager manager; qint64 size; QTime t; - QNetworkRequest request(QUrl("http://nds1.nokia.com/files/support/global/phones/software/Nokia_Ovi_Suite_webinstaller.exe")); + QNetworkRequest request(QUrl(QString::fromLatin1(urlC))); QNetworkReply* reply = manager.get(request); connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection); - qDebug() << "Starting download"; + qDebug() << "Starting download" << urlC; t.start(); QTestEventLoop::instance().enterLoop(50); QVERIFY(!QTestEventLoop::instance().timeout()); From 9f3f4551511b63a3f230a8d71718d0d5fa352a28 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 8 Jul 2013 18:15:37 -0700 Subject: [PATCH 11/14] Fix disconnectFrom{Peer,Bus} when the connection failed If the connection failed, the DBusConnection object is null, but we still add our QDBusConnectionPrivate to the global hash (maybe we shouldn't). Both disconnectFromXXX functions check that they are disconnecting a connection of the right type, but we never initialized the type if the connection failed. So simply make sure we initialize before handling the error state. Task-number: QTBUG-27973 Change-Id: I96f4825ab1b71adf1b72caf4f72db41742b44a55 Reviewed-by: Frederik Gladhorn --- src/dbus/qdbusintegrator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index afb8506b286..d5c359aea16 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1681,13 +1681,13 @@ static dbus_int32_t server_slot = -1; void QDBusConnectionPrivate::setServer(DBusServer *s, const QDBusErrorInternal &error) { + mode = ServerMode; if (!s) { handleError(error); return; } server = s; - mode = ServerMode; dbus_bool_t data_allocated = q_dbus_server_allocate_data_slot(&server_slot); if (data_allocated && server_slot < 0) @@ -1718,13 +1718,13 @@ void QDBusConnectionPrivate::setServer(DBusServer *s, const QDBusErrorInternal & void QDBusConnectionPrivate::setPeer(DBusConnection *c, const QDBusErrorInternal &error) { + mode = PeerMode; if (!c) { handleError(error); return; } connection = c; - mode = PeerMode; q_dbus_connection_set_exit_on_disconnect(connection, false); q_dbus_connection_set_watch_functions(connection, @@ -1771,13 +1771,13 @@ static QDBusConnection::ConnectionCapabilities connectionCapabilies(DBusConnecti void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusErrorInternal &error) { + mode = ClientMode; if (!dbc) { handleError(error); return; } connection = dbc; - mode = ClientMode; const char *service = q_dbus_bus_get_unique_name(connection); Q_ASSERT(service); From 4f71a272b57c5e63b9fb166cbc352c305f3c7ef7 Mon Sep 17 00:00:00 2001 From: Tomasz Olszak Date: Mon, 1 Jul 2013 22:24:55 +0000 Subject: [PATCH 12/14] QCoreApplication: Removed out-of-date docs (argv() method). QCoreApplication::argv() method was obsolete in Qt4.8 and removed in Qt5.0. Change-Id: I217402f774f5509c8ca317a35c831ffa5ac2af06 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcoreapplication.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index c3a05551b8f..efb1289a5cd 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -394,7 +394,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint static const char *const empty = ""; if (argc == 0 || argv == 0) { argc = 0; - argv = (char **)∅ // ouch! careful with QCoreApplication::argv()! + argv = (char **)∅ } #ifdef Q_OS_WIN qCopy(argv, argv + argc, origArgv); @@ -589,10 +589,6 @@ void QCoreApplicationPrivate::initLocale() Note that some arguments supplied by the user may have been processed and removed by QCoreApplication. - In cases where command line arguments need to be obtained using the - argv() function, you must convert them from the local string encoding - using QString::fromLocal8Bit(). - \section1 Locale Settings On Unix/Linux Qt is configured to use the system locale settings by From 64caf7b1be4ebf9a21653a1ee808e39618cceb55 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 12 Jul 2013 14:42:06 +0200 Subject: [PATCH 13/14] Display sizegrip on QMdiSubWindows, even on 10.7 and later We don't have 4-edge window resizing, so we need QSizeGrip to be functional again in this case. Task-number: QTBUG-32228 Change-Id: Ib66bc662f8bf0b521427755570bc1cd65fb28446 Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qmacstyle_mac.mm | 22 ++++++++++++++++++---- src/widgets/widgets/qmdisubwindow.cpp | 2 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index dad4e57d133..9119e2cfbac 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -69,6 +69,7 @@ #include #include #include +#include #include #include #include @@ -849,8 +850,17 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg gbi.direction = QApplication::isRightToLeft() ? kThemeGrowLeft | kThemeGrowDown : kThemeGrowRight | kThemeGrowDown; gbi.size = sz == QAquaSizeSmall ? kHIThemeGrowBoxSizeSmall : kHIThemeGrowBoxSizeNormal; - if (HIThemeGetGrowBoxBounds(&p, &gbi, &r) == noErr) - ret = QSize(QSysInfo::MacintoshVersion <= QSysInfo::MV_10_6 ? r.size.width : 0, r.size.height); + if (HIThemeGetGrowBoxBounds(&p, &gbi, &r) == noErr) { + int width = 0; + // Snow Leopard and older get a size grip, as well as QMdiSubWindows. + if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_6 +#ifndef QT_NO_MDIAREA + || (widg && widg->parentWidget() && qobject_cast(widg->parentWidget())) +#endif + ) + width = r.size.width; + ret = QSize(width, r.size.height); + } } break; case QStyle::CT_ComboBox: @@ -4333,8 +4343,12 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter case CE_ProgressBarGroove: break; case CE_SizeGrip: { - // We do not draw size grips on versions > 10.6 - if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_6) + // We do not draw size grips on versions > 10.6 unless it's a QMdiSubWindow + if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_6 +#ifndef QT_NO_MDIAREA + && !(w && w->parentWidget() && qobject_cast(w->parentWidget())) +#endif + ) break; if (w && w->testAttribute(Qt::WA_MacOpaqueSizeGrip)) { diff --git a/src/widgets/widgets/qmdisubwindow.cpp b/src/widgets/widgets/qmdisubwindow.cpp index b38dea074fd..63d14f23015 100644 --- a/src/widgets/widgets/qmdisubwindow.cpp +++ b/src/widgets/widgets/qmdisubwindow.cpp @@ -2927,7 +2927,7 @@ void QMdiSubWindow::showEvent(QShowEvent *showEvent) #if !defined(QT_NO_SIZEGRIP) && defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC) if (qobject_cast(style()) && !d->sizeGrip && !(windowFlags() & Qt::FramelessWindowHint)) { - d->setSizeGrip(new QSizeGrip(0)); + d->setSizeGrip(new QSizeGrip(this)); Q_ASSERT(d->sizeGrip); if (isMinimized()) d->setSizeGripVisible(false); From e4484bb15b29b01dba07cbc31c150153f537606a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 12 Jul 2013 15:16:17 +0200 Subject: [PATCH 14/14] XCB: Append 0-character to atom name string. The below loop needs 2 consecutive 0-characters to terminate properly. Change-Id: I73e56cadbcd2515d5b0f1b4907316a27a6bbaf0e Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbconnection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 209c7bb187b..f944b65a57a 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -1397,7 +1397,7 @@ static const char * xcb_atomnames = { #if XCB_USE_MAEMO_WINDOW_PROPERTIES "_MEEGOTOUCH_ORIENTATION_ANGLE\0" #endif - "_XSETTINGS_SETTINGS" + "_XSETTINGS_SETTINGS\0" // \0\0 terminates loop. }; xcb_atom_t QXcbConnection::atom(QXcbAtom::Atom atom)