From 77a06e7e6c517003585ba53b9776e90c8d290e84 Mon Sep 17 00:00:00 2001 From: Matt Hoosier Date: Thu, 16 May 2013 11:01:23 -0500 Subject: [PATCH 01/60] QNX: Support window translucency A few tactical changes were necessary to do this: * The root window's buffer must be the full size of the window in order for transparency to work. We now transition this buffer to full-size upon first request of some QWindow to be translucent. At the same time the root window is transitioned to being full- screen, we also set its alpha blending mode to Source-Over in order to permit lower z-ordered apps to show through. * Set the root window's buffer position to (0, 0) to avoid a momentary flicker of unpainted pixels on the far right-hand border as a translucent window comes on-screen. * Use Source-Over alpha blending for normal child windows too. The QtGui core logic for setting the backing surface pixel format to something with an alpha channel if Qt::WA_TranslucentBackground is set on the toplevel QWidget already accomplished the remainder of the work. Change-Id: I1c2b31aa6323b4555fa194313f0f5e06ada494fc Reviewed-by: Kevin Krammer Reviewed-by: Thomas McGuire Reviewed-by: Rafael Roquetto Reviewed-by: Andreas Holzammer --- src/plugins/platforms/qnx/qqnxrootwindow.cpp | 59 +++++++++++++++++++- src/plugins/platforms/qnx/qqnxrootwindow.h | 4 ++ src/plugins/platforms/qnx/qqnxwindow.cpp | 14 ++++- 3 files changed, 72 insertions(+), 5 deletions(-) diff --git a/src/plugins/platforms/qnx/qqnxrootwindow.cpp b/src/plugins/platforms/qnx/qqnxrootwindow.cpp index dddadb5ca84..5d58890c510 100644 --- a/src/plugins/platforms/qnx/qqnxrootwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrootwindow.cpp @@ -60,7 +60,8 @@ static const int MAGIC_ZORDER_FOR_NO_NAV = 10; QQnxRootWindow::QQnxRootWindow(const QQnxScreen *screen) : m_screen(screen), m_window(0), - m_windowGroupName() + m_windowGroupName(), + m_translucent(false) { qRootWindowDebug() << Q_FUNC_INFO; // Create one top-level QNX window to act as a container for child windows @@ -122,7 +123,10 @@ QQnxRootWindow::QQnxRootWindow(const QQnxScreen *screen) if (result != 0) qFatal("QQnxRootWindow: failed to set window size, errno=%d", errno); - // Fill the window with solid black + // Fill the window with solid black. Note that the LSB of the pixel value + // 0x00000000 just happens to be 0x00, so if and when this root window's + // alpha blending mode is changed from None to Source-Over, it will then + // be interpreted as transparent. errno = 0; val[0] = 0; result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_COLOR, val); @@ -152,13 +156,62 @@ QQnxRootWindow::QQnxRootWindow(const QQnxScreen *screen) qFatal("QQnxRootWindow: failed to set window source size, errno=%d", errno); errno = 0; - val[0] = 1; + val[0] = 0; val[1] = 0; result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_SOURCE_POSITION, val); if (result != 0) qFatal("QQnxRootWindow: failed to set window source position, errno=%d", errno); createWindowGroup(); + + // Don't post yet. This will be lazily done from QQnxScreen upon first posting of + // a child window. Doing it now pre-emptively would create a flicker if one of + // the QWindow's about to be created sets its Qt::WA_TranslucentBackground flag + // and immediately triggers the buffer re-creation in makeTranslucent(). +} + +void QQnxRootWindow::makeTranslucent() +{ + if (m_translucent) + return; + + int result; + + errno = 0; + result = screen_destroy_window_buffers(m_window); + if (result != 0) { + qFatal("QQnxRootWindow: failed to destroy window buffer, errno=%d", errno); + } + + QRect geometry = m_screen->geometry(); + errno = 0; + int val[2]; + val[0] = geometry.width(); + val[1] = geometry.height(); + result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_BUFFER_SIZE, val); + if (result != 0) { + qFatal("QQnxRootWindow: failed to set window buffer size, errno=%d", errno); + } + + errno = 0; + result = screen_create_window_buffers(m_window, 1); + if (result != 0) { + qFatal("QQNX: failed to create window buffer, errno=%d", errno); + } + + // Install an alpha channel on the root window. + // + // This is necessary in order to avoid interfering with any particular + // toplevel widget's QQnxWindow window instance from showing transparent + // if it desires. + errno = 0; + val[0] = SCREEN_TRANSPARENCY_SOURCE_OVER; + result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_TRANSPARENCY, val); + if (result != 0) { + qFatal("QQnxRootWindow: failed to set window transparency, errno=%d", errno); + } + + m_translucent = true; post(); } diff --git a/src/plugins/platforms/qnx/qqnxrootwindow.h b/src/plugins/platforms/qnx/qqnxrootwindow.h index aae1563c953..ea7c7faaceb 100644 --- a/src/plugins/platforms/qnx/qqnxrootwindow.h +++ b/src/plugins/platforms/qnx/qqnxrootwindow.h @@ -66,6 +66,8 @@ public: void resize(const QSize &size); + void makeTranslucent(); + QByteArray groupName() const { return m_windowGroupName; } private: @@ -74,6 +76,8 @@ private: const QQnxScreen *m_screen; screen_window_t m_window; QByteArray m_windowGroupName; + + bool m_translucent; }; QT_END_NAMESPACE diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index f4cbb0e9db5..7a1ffb98b8c 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -117,9 +117,13 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context) if (result != 0) qFatal("QQnxWindow: failed to set window alpha mode, errno=%d", errno); - // Make the window opaque + // Blend the window with Source Over Porter-Duff behavior onto whatever's + // behind it. + // + // If the desired use-case is opaque, the Widget painting framework will + // already fill in the alpha channel with full opacity. errno = 0; - val = SCREEN_TRANSPARENCY_NONE; + val = SCREEN_TRANSPARENCY_SOURCE_OVER; result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_TRANSPARENCY, &val); if (result != 0) qFatal("QQnxWindow: failed to set window transparency, errno=%d", errno); @@ -370,6 +374,12 @@ void QQnxWindow::setBufferSize(const QSize &size) qWarning() << "QQnxWindow: Buffer size was" << size; qFatal("QQnxWindow: failed to create window buffers, errno=%d", errno); + // If the child window has been configured for transparency, lazily create + // a full-screen buffer to back the root window. + if (window()->requestedFormat().hasAlpha()) { + m_screen->rootWindow()->makeTranslucent(); + } + // check if there are any buffers available int bufferCount = 0; result = screen_get_window_property_iv(m_window, SCREEN_PROPERTY_RENDER_BUFFER_COUNT, &bufferCount); From c1ca272f04465b58a7b1720df3b03c6573de8851 Mon Sep 17 00:00:00 2001 From: Matt Hoosier Date: Thu, 16 May 2013 11:02:37 -0500 Subject: [PATCH 02/60] QNX: support underlain foreign windows Previously, any foreign window was treated as an overlay, with its z-order being forcibly set above the native Qt windows. This change adjusts the strategy to treat foreign windows whose initial z-order is less than -1 (the default z-order used by mmrender for its overlay surfaces) as underlays; otherwise the foreign window is treated as an overlay. Change-Id: Ifbcfd3a956965fa1a347076e9845afa50a81edfd Reviewed-by: Thomas McGuire Reviewed-by: Kevin Krammer Reviewed-by: Rafael Roquetto --- src/plugins/platforms/qnx/qqnxscreen.cpp | 69 +++++++++++++++++++----- src/plugins/platforms/qnx/qqnxscreen.h | 4 +- 2 files changed, 60 insertions(+), 13 deletions(-) diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index f8203b2329a..84721c9c2a7 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -62,6 +62,14 @@ #error Please define QQNX_PHYSICAL_SCREEN_WIDTH and QQNX_PHYSICAL_SCREEN_HEIGHT to values greater than zero #endif +// The default z-order of a window (intended to be overlain) created by +// mmrender. +static const int MMRENDER_DEFAULT_ZORDER = -1; + +// The maximum z-order at which a foreign window will be considered +// an underlay. +static const int MAX_UNDERLAY_ZORDER = MMRENDER_DEFAULT_ZORDER - 1; + QT_BEGIN_NAMESPACE static QSize determineScreenSize(screen_display_t display, bool primaryScreen) { @@ -463,16 +471,32 @@ void QQnxScreen::updateHierarchy() qScreenDebug() << Q_FUNC_INFO; QList::const_iterator it; - int topZorder = 1; // root window is z-order 0, all "top" level windows are "above" it + int result; + int topZorder; + errno = 0; + result = screen_get_window_property_iv(rootWindow()->nativeHandle(), SCREEN_PROPERTY_ZORDER, &topZorder); + if (result != 0) + qFatal("QQnxScreen: failed to query root window z-order, errno=%d", errno); + + topZorder++; // root window has the lowest z-order in the windowgroup + + // Underlays sit immediately above the root window in the z-ordering + Q_FOREACH (screen_window_t underlay, m_underlays) { + // Do nothing when this fails. This can happen if we have stale windows in m_underlays, + // which in turn can happen because a window was removed but we didn't get a notification + // yet. + screen_set_window_property_iv(underlay, SCREEN_PROPERTY_ZORDER, &topZorder); + topZorder++; + } + + // Normal Qt windows come next above underlays in the z-ordering for (it = m_childWindows.constBegin(); it != m_childWindows.constEnd(); ++it) (*it)->updateZorder(topZorder); - topZorder++; + // Finally overlays sit above all else in the z-ordering Q_FOREACH (screen_window_t overlay, m_overlays) { - // Do nothing when this fails. This can happen if we have stale windows in mOverlays, - // which in turn can happen because a window was removed but we didn't get a notification - // yet. + // No error handling, see underlay logic above screen_set_window_property_iv(overlay, SCREEN_PROPERTY_ZORDER, &topZorder); topZorder++; } @@ -529,10 +553,16 @@ void QQnxScreen::addOverlayWindow(screen_window_t window) updateHierarchy(); } -void QQnxScreen::removeOverlayWindow(screen_window_t window) +void QQnxScreen::addUnderlayWindow(screen_window_t window) { - const int numOverlaysRemoved = m_overlays.removeAll(window); - if (numOverlaysRemoved > 0) + m_underlays.append(window); + updateHierarchy(); +} + +void QQnxScreen::removeOverlayOrUnderlayWindow(screen_window_t window) +{ + const int numRemoved = m_overlays.removeAll(window) + m_underlays.removeAll(window); + if (numRemoved > 0) updateHierarchy(); } @@ -546,13 +576,28 @@ void QQnxScreen::newWindowCreated(void *window) return; } + int zorder; + if (screen_get_window_property_iv(windowHandle, SCREEN_PROPERTY_ZORDER, &zorder) != 0) { + qWarning("QQnx: Failed to get z-order for window, errno=%d", errno); + zorder = 0; + } + if (display == nativeDisplay()) { // A window was created on this screen. If we don't know about this window yet, it means // it was not created by Qt, but by some foreign library like the multimedia renderer, which // creates an overlay window when playing a video. - // Treat all foreign windows as overlays here. - if (!findWindow(windowHandle)) - addOverlayWindow(windowHandle); + // + // Treat all foreign windows as overlays or underlays here. + // + // Assume that if a foreign window already has a Z-Order both negative and + // less than the default Z-Order installed by mmrender on windows it creates, + // the windows should be treated as an underlay. Otherwise, we treat it as an overlay. + if (!findWindow(windowHandle)) { + if (zorder <= MAX_UNDERLAY_ZORDER) + addUnderlayWindow(windowHandle); + else + addOverlayWindow(windowHandle); + } } } @@ -560,7 +605,7 @@ void QQnxScreen::windowClosed(void *window) { Q_ASSERT(thread() == QThread::currentThread()); const screen_window_t windowHandle = reinterpret_cast(window); - removeOverlayWindow(windowHandle); + removeOverlayOrUnderlayWindow(windowHandle); } void QQnxScreen::windowGroupStateChanged(const QByteArray &id, Qt::WindowState state) diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h index 98f2a90fbc8..6e8c2c6a60f 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.h +++ b/src/plugins/platforms/qnx/qqnxscreen.h @@ -114,7 +114,8 @@ private: void resizeTopLevelWindow(QQnxWindow *w, const QRect &previousScreenGeometry) const; void resizeWindows(const QRect &previousScreenGeometry); void addOverlayWindow(screen_window_t window); - void removeOverlayWindow(screen_window_t window); + void addUnderlayWindow(screen_window_t window); + void removeOverlayOrUnderlayWindow(screen_window_t window); QWindow *topMostChildWindow() const; @@ -136,6 +137,7 @@ private: QList m_childWindows; QList m_overlays; + QList m_underlays; QPlatformCursor *m_cursor; }; From d2ec7e05eb26a7b877eef1d78f2b7acbfb20336e Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 23 May 2013 15:36:31 +0200 Subject: [PATCH 03/60] Fix crash in QCococaWindow::childWindowAt(). Task-number: QTBUG-31297 Change-Id: I96f4652e410334fae54a0012ed917a965becfe5c Reviewed-by: Shawn Rutledge Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoawindow.mm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 30c2a99fd87..c8ef967f200 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1010,15 +1010,11 @@ void QCocoaWindow::obscureWindow() QWindow *QCocoaWindow::childWindowAt(QPoint windowPoint) { QWindow *targetWindow = window(); - foreach (QObject *child, targetWindow->children()) { - if (QWindow *childWindow = qobject_cast(child)) { - if (childWindow->geometry().contains(windowPoint)) { - QCocoaWindow* platformWindow = static_cast(childWindow->handle()); - if (platformWindow->isExposed()) - targetWindow = platformWindow->childWindowAt(windowPoint - childWindow->position()); - } - } - } + foreach (QObject *child, targetWindow->children()) + if (QWindow *childWindow = qobject_cast(child)) + if (QPlatformWindow *handle = childWindow->handle()) + if (handle->isExposed() && childWindow->geometry().contains(windowPoint)) + targetWindow = static_cast(handle)->childWindowAt(windowPoint - childWindow->position()); return targetWindow; } From 7878eb6ba30a8b84199f3c8fba4cac739e8a788a Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 22 May 2013 09:53:39 +0200 Subject: [PATCH 04/60] Fix parsing of long latin strings in the json parser MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Latin1 strings are usually stored as 8 bit data in the json binary format. But that data structure has a size limitation of 16bit, so we need to fall back to storing the string as 16 bit data if it is too long. Task-number: QTBUG-30946 Change-Id: I0069b1367030b0b2f819fd1f04e34c9e2534a2a3 Reviewed-by: Jędrzej Nowacki --- src/corelib/json/qjsonparser.cpp | 3 +- tests/auto/corelib/json/tst_qtjson.cpp | 45 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/corelib/json/qjsonparser.cpp b/src/corelib/json/qjsonparser.cpp index 7989d189016..b151af79550 100644 --- a/src/corelib/json/qjsonparser.cpp +++ b/src/corelib/json/qjsonparser.cpp @@ -886,7 +886,8 @@ bool Parser::parseString(bool *latin1) return false; } } - if (ch > 0xff) { + // bail out if the string is not pure latin1 or too long to hold as a latin1string (which has only 16 bit for the length) + if (ch > 0xff || json - start >= 0x8000) { *latin1 = false; break; } diff --git a/tests/auto/corelib/json/tst_qtjson.cpp b/tests/auto/corelib/json/tst_qtjson.cpp index fc4b3831c4e..c19a42e4a69 100644 --- a/tests/auto/corelib/json/tst_qtjson.cpp +++ b/tests/auto/corelib/json/tst_qtjson.cpp @@ -128,6 +128,8 @@ private Q_SLOTS: void bom(); void nesting(); + + void longStrings(); private: QString testDataDir; }; @@ -2118,5 +2120,48 @@ void tst_QtJson::nesting() } +void tst_QtJson::longStrings() +{ + // test around 15 and 16 bit boundaries, as these are limits + // in the data structures (for Latin1String in qjson_p.h) + QString s(0x7ff0, 'a'); + for (int i = 0x7ff0; i < 0x8010; i++) { + s.append("c"); + + QMap map; + map["key"] = s; + + /* Create a QJsonDocument from the QMap ... */ + QJsonDocument d1 = QJsonDocument::fromVariant(QVariant(map)); + /* ... and a QByteArray from the QJsonDocument */ + QByteArray a1 = d1.toJson(); + + /* Create a QJsonDocument from the QByteArray ... */ + QJsonDocument d2 = QJsonDocument::fromJson(a1); + /* ... and a QByteArray from the QJsonDocument */ + QByteArray a2 = d2.toJson(); + QVERIFY(a1 == a2); + } + + s = QString(0xfff0, 'a'); + for (int i = 0xfff0; i < 0x10010; i++) { + s.append("c"); + + QMap map; + map["key"] = s; + + /* Create a QJsonDocument from the QMap ... */ + QJsonDocument d1 = QJsonDocument::fromVariant(QVariant(map)); + /* ... and a QByteArray from the QJsonDocument */ + QByteArray a1 = d1.toJson(); + + /* Create a QJsonDocument from the QByteArray ... */ + QJsonDocument d2 = QJsonDocument::fromJson(a1); + /* ... and a QByteArray from the QJsonDocument */ + QByteArray a2 = d2.toJson(); + QVERIFY(a1 == a2); + } +} + QTEST_MAIN(tst_QtJson) #include "tst_qtjson.moc" From a3a43abc048d9ca1a50368c1dbb77cc8cf7a61b1 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 22 May 2013 16:25:53 +0200 Subject: [PATCH 05/60] Fixes: QtNetwork compilation for OpenSSL < 1.0.0 Incorporate some more of the API changes between OpenSSL versions 0.9.8 and 1.0.0. Task-number: QTBUG-31140 Change-Id: Ie719b34e3ec8751f0fbc07d315e82816c110762c Reviewed-by: Shane Kearns --- src/network/ssl/qsslsocket_openssl.cpp | 2 +- src/network/ssl/qsslsocket_openssl_symbols.cpp | 6 +++++- src/network/ssl/qsslsocket_openssl_symbols_p.h | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index 52f683e267a..675bd7d9f7e 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -1594,7 +1594,7 @@ QList QSslSocketBackendPrivate::verify(QList certifi #if OPENSSL_VERSION_NUMBER >= 0x10000000L q_sk_push( (_STACK *)intermediates, reinterpret_cast(cert.handle())); #else - q_sk_push( (STACK *)intermediates, reinterpret_cast(cert.handle())); + q_sk_push( (STACK *)intermediates, reinterpret_cast(cert.handle())); #endif } } diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index fed99752b07..812703b21ac 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -183,7 +183,7 @@ DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG) DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return 0, return) #else DEFINEFUNC(STACK *, sk_new_null, DUMMYARG, DUMMYARG, return 0, return) -DEFINEFUNC2(void, sk_push, STACK *a, a, void *b, b, return, DUMMYARG) +DEFINEFUNC2(void, sk_push, STACK *a, a, char *b, b, return, DUMMYARG) DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG) DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return) #endif @@ -297,7 +297,11 @@ DEFINEFUNC(int, X509_EXTENSION_get_critical, X509_EXTENSION *a, a, return 0, ret DEFINEFUNC(ASN1_OCTET_STRING *, X509_EXTENSION_get_data, X509_EXTENSION *a, a, return 0, return) DEFINEFUNC(void, BASIC_CONSTRAINTS_free, BASIC_CONSTRAINTS *a, a, return, DUMMYARG) DEFINEFUNC(void, AUTHORITY_KEYID_free, AUTHORITY_KEYID *a, a, return, DUMMYARG) +#if OPENSSL_VERSION_NUMBER >= 0x10000000L DEFINEFUNC2(int, ASN1_STRING_print, BIO *a, a, const ASN1_STRING *b, b, return 0, return) +#else +DEFINEFUNC2(int, ASN1_STRING_print, BIO *a, a, ASN1_STRING *b, b, return 0, return) +#endif DEFINEFUNC(X509_NAME *, X509_get_issuer_name, X509 *a, a, return 0, return) DEFINEFUNC(X509_NAME *, X509_get_subject_name, X509 *a, a, return 0, return) DEFINEFUNC(int, X509_verify_cert, X509_STORE_CTX *a, a, return -1, return) diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h index 62648e3e37a..2e01ee4d31f 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -285,7 +285,7 @@ void q_sk_free(_STACK *a); void * q_sk_value(STACK *a, int b); #else STACK *q_sk_new_null(); -void q_sk_push(STACK *st, void *data); +void q_sk_push(STACK *st, char *data); void q_sk_free(STACK *a); char * q_sk_value(STACK *a, int b); #endif @@ -399,7 +399,11 @@ int q_X509_EXTENSION_get_critical(X509_EXTENSION *a); ASN1_OCTET_STRING *q_X509_EXTENSION_get_data(X509_EXTENSION *a); void q_BASIC_CONSTRAINTS_free(BASIC_CONSTRAINTS *a); void q_AUTHORITY_KEYID_free(AUTHORITY_KEYID *a); +#if OPENSSL_VERSION_NUMBER >= 0x10000000L int q_ASN1_STRING_print(BIO *a, const ASN1_STRING *b); +#else +int q_ASN1_STRING_print(BIO *a, ASN1_STRING *b); +#endif X509_NAME *q_X509_get_issuer_name(X509 *a); X509_NAME *q_X509_get_subject_name(X509 *a); int q_X509_verify_cert(X509_STORE_CTX *ctx); From dff296c8263b5ca31c0f9713d5171798cc7013ba Mon Sep 17 00:00:00 2001 From: radman0x Date: Fri, 17 May 2013 05:47:54 +1000 Subject: [PATCH 06/60] Fixed static linking against QtGui and QtOpenGL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When linking QtGui and QtOpenGL libraries on linux a multiple defined symbols linker error causes failure. This change renames the offending class in the QtOpenGL library. For more information see: http://qt-project.org/forums/viewthread/27458 Change-Id: I05488bf2c5c612476432c11095b24bc2b29c78f2 Reviewed-by: Samuel Rødal --- .../qpaintengineex_opengl2.cpp | 24 +++++++++---------- .../qpaintengineex_opengl2_p.h | 16 ++++++------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 27073e80be3..4e198cf550d 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1217,7 +1217,7 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) if (qpen_style(pen) == Qt::NoPen || qbrush_style(penBrush) == Qt::NoBrush) return; - QOpenGL2PaintEngineState *s = state(); + QGL2PaintEngineState *s = state(); if (qt_pen_is_cosmetic(pen, s->renderHints) && !qt_scaleForTransform(s->transform(), 0)) { // QTriangulatingStroker class is not meant to support cosmetically sheared strokes. QPaintEngineEx::stroke(path, pen); @@ -1231,7 +1231,7 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) void QGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &pen) { - const QOpenGL2PaintEngineState *s = q->state(); + const QGL2PaintEngineState *s = q->state(); if (snapToPixelGrid) { snapToPixelGrid = false; matrixDirty = true; @@ -1504,7 +1504,7 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem Q_D(QGL2PaintEngineEx); ensureActive(); - QOpenGL2PaintEngineState *s = state(); + QGL2PaintEngineState *s = state(); const QTextItemInt &ti = static_cast(textItem); @@ -1579,7 +1579,7 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp { Q_Q(QGL2PaintEngineEx); - QOpenGL2PaintEngineState *s = q->state(); + QGL2PaintEngineState *s = q->state(); void *cacheKey = const_cast(QGLContextPrivate::contextGroup(ctx)->context()); bool recreateVertexArrays = false; @@ -2360,8 +2360,8 @@ void QGL2PaintEngineEx::setState(QPainterState *new_state) Q_D(QGL2PaintEngineEx); - QOpenGL2PaintEngineState *s = static_cast(new_state); - QOpenGL2PaintEngineState *old_state = state(); + QGL2PaintEngineState *s = static_cast(new_state); + QGL2PaintEngineState *old_state = state(); QPaintEngineEx::setState(s); @@ -2402,11 +2402,11 @@ QPainterState *QGL2PaintEngineEx::createState(QPainterState *orig) const if (orig) const_cast(this)->ensureActive(); - QOpenGL2PaintEngineState *s; + QGL2PaintEngineState *s; if (!orig) - s = new QOpenGL2PaintEngineState(); + s = new QGL2PaintEngineState(); else - s = new QOpenGL2PaintEngineState(*static_cast(orig)); + s = new QGL2PaintEngineState(*static_cast(orig)); s->matrixChanged = false; s->compositionModeChanged = false; @@ -2417,7 +2417,7 @@ QPainterState *QGL2PaintEngineEx::createState(QPainterState *orig) const return s; } -QOpenGL2PaintEngineState::QOpenGL2PaintEngineState(QOpenGL2PaintEngineState &other) +QGL2PaintEngineState::QGL2PaintEngineState(QGL2PaintEngineState &other) : QPainterState(other) { isNew = true; @@ -2428,7 +2428,7 @@ QOpenGL2PaintEngineState::QOpenGL2PaintEngineState(QOpenGL2PaintEngineState &oth rectangleClip = other.rectangleClip; } -QOpenGL2PaintEngineState::QOpenGL2PaintEngineState() +QGL2PaintEngineState::QGL2PaintEngineState() { isNew = true; needsClipBufferClear = true; @@ -2436,7 +2436,7 @@ QOpenGL2PaintEngineState::QOpenGL2PaintEngineState() canRestoreClip = true; } -QOpenGL2PaintEngineState::~QOpenGL2PaintEngineState() +QGL2PaintEngineState::~QGL2PaintEngineState() { } diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h index b0517fd083e..76ef3aa55ae 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h @@ -82,12 +82,12 @@ QT_BEGIN_NAMESPACE class QGL2PaintEngineExPrivate; -class QOpenGL2PaintEngineState : public QPainterState +class QGL2PaintEngineState : public QPainterState { public: - QOpenGL2PaintEngineState(QOpenGL2PaintEngineState &other); - QOpenGL2PaintEngineState(); - ~QOpenGL2PaintEngineState(); + QGL2PaintEngineState(QGL2PaintEngineState &other); + QGL2PaintEngineState(); + ~QGL2PaintEngineState(); uint isNew : 1; uint needsClipBufferClear : 1; @@ -141,11 +141,11 @@ public: virtual void setState(QPainterState *s); virtual QPainterState *createState(QPainterState *orig) const; - inline QOpenGL2PaintEngineState *state() { - return static_cast(QPaintEngineEx::state()); + inline QGL2PaintEngineState *state() { + return static_cast(QPaintEngineEx::state()); } - inline const QOpenGL2PaintEngineState *state() const { - return static_cast(QPaintEngineEx::state()); + inline const QGL2PaintEngineState *state() const { + return static_cast(QPaintEngineEx::state()); } void beginNativePainting(); From 6359f42064cdd9733ac54c3931156fd37448838e Mon Sep 17 00:00:00 2001 From: Matt Hoosier Date: Thu, 23 May 2013 15:49:37 -0500 Subject: [PATCH 07/60] QNX: fix buffer creation During some coding style cleanup in 02311c07 ("QNX: normalize braces") some braces which were actually necessary got removed. The result was an spurious report of a fatal error when no underlying error condition had occurred. This change restores the braces to preserve the prior behavior. Change-Id: Ic32fbd5961ce59f6c01476fd2cef6fec0bdae93e Reviewed-by: Rafael Roquetto --- src/plugins/platforms/qnx/qqnxwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 7a1ffb98b8c..9523685f703 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -370,9 +370,10 @@ void QQnxWindow::setBufferSize(const QSize &size) errno = 0; result = screen_create_window_buffers(m_window, MAX_BUFFER_COUNT); - if (result != 0) + if (result != 0) { qWarning() << "QQnxWindow: Buffer size was" << size; qFatal("QQnxWindow: failed to create window buffers, errno=%d", errno); + } // If the child window has been configured for transparency, lazily create // a full-screen buffer to back the root window. From 9ae5162b3c972a2cedba4f817235aaf96e7dfd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 24 May 2013 09:19:12 +0200 Subject: [PATCH 08/60] Prevent QOpenGLShaderProgram::link() from showing unnecessary warnings. If the liking didn't fail there's no need to print out warnings. The warnings can still be accessed by the application after calling link() through the log() function. This prevents warnings such as these from appearing: QOpenGLShader::link: "No errors." Task-number: QTBUG-31326 Change-Id: I03c9be5dfada8822c3ab1c3610eac2fc0a91410b Reviewed-by: Gunnar Sletta Reviewed-by: Sean Harmer --- src/gui/opengl/qopenglshaderprogram.cpp | 12 +++++++----- src/opengl/qglshaderprogram.cpp | 10 ++++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index 1cde0cb92d2..8278e4fb5ae 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -907,11 +907,13 @@ bool QOpenGLShaderProgram::link() GLint len; d->glfuncs->glGetProgramInfoLog(program, value, &len, logbuf); d->log = QString::fromLatin1(logbuf); - QString name = objectName(); - if (name.isEmpty()) - qWarning() << "QOpenGLShader::link:" << d->log; - else - qWarning() << "QOpenGLShader::link[" << name << "]:" << d->log; + if (!d->linked) { + QString name = objectName(); + if (name.isEmpty()) + qWarning() << "QOpenGLShader::link:" << d->log; + else + qWarning() << "QOpenGLShader::link[" << name << "]:" << d->log; + } delete [] logbuf; } return d->linked; diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index 4859df21d60..e7b7ad13484 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -957,10 +957,12 @@ bool QGLShaderProgram::link() d->glfuncs->glGetProgramInfoLog(program, value, &len, logbuf); d->log = QString::fromLatin1(logbuf); QString name = objectName(); - if (name.isEmpty()) - qWarning() << "QGLShader::link:" << d->log; - else - qWarning() << "QGLShader::link[" << name << "]:" << d->log; + if (!d->linked) { + if (name.isEmpty()) + qWarning() << "QGLShader::link:" << d->log; + else + qWarning() << "QGLShader::link[" << name << "]:" << d->log; + } delete [] logbuf; } return d->linked; From 683228f8de4fb58df210431b555669afd32c6a5b Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 16 May 2013 11:32:20 +0200 Subject: [PATCH 09/60] iOS: don't activate non-toplevel windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parts of the code seems to assume that all QWindows are top-level windows. This will be false when not using alien, as then, each widget will be wrapped inside a QWidgetWindow. In that case, we should not tell QPA to activate the "window". This bug caused focus handling (and text input) to fall apart for e.g graphicsview when using a QGLWidget as viewport. Change-Id: I579db7a84d718973e02e96ed535fe6e25baf4bd5 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioswindow.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 02ac413b3b1..13815a22bf8 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -407,7 +407,7 @@ void QIOSWindow::requestActivateWindow() // Note that several windows can be active at the same time if they exist in the same // hierarchy (transient children). But only one window can be QGuiApplication::focusWindow(). // Dispite the name, 'requestActivateWindow' means raise and transfer focus to the window: - if (blockedByModal()) + if (!window()->isTopLevel() || blockedByModal()) return; raise(); From 07b34d934ef2227fd5bbc840d405d909e45243ac Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Thu, 23 May 2013 13:02:06 +0200 Subject: [PATCH 10/60] Android: detect Linux 64 bit host architecture This is the easy fix: looking at what is supported by the NDK. If people have weird setups, then they have to specify -android-ndk-host. We do actually detect the host architecture later, but using that would be a much bigger (and riskier) change. Task-number: QTBUG-31275 Change-Id: I18db878031baa2e1ee2fa4beff364d58d8bd3c7a Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Oswald Buddenhagen --- configure | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 8427e323c65..e633a780bdc 100755 --- a/configure +++ b/configure @@ -2664,15 +2664,12 @@ esac if [ "$XPLATFORM_ANDROID" = "yes" ]; then if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then case $PLATFORM in - linux-*-64) - if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then - CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64 - else - CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86 - fi - ;; linux-*) - CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86 + if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86" ]; then + CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86 + elif [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then + CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64 + fi ;; macx-*) CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86 From c1d5f46d239182763d3b1774b32c94ba25ab2b6a Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Thu, 16 May 2013 04:41:41 +1000 Subject: [PATCH 11/60] Need to register dbus metatypes to have them work correctly. Change-Id: Ic994a0747c692fffe8a986eba6f754a6c0eddfa8 Reviewed-by: Thiago Macieira --- src/plugins/bearer/connman/qconnmanservice_linux.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp index e78a597433b..4efecc54643 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp +++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp @@ -81,6 +81,8 @@ QConnmanManagerInterface::QConnmanManagerInterface( QObject *parent) CONNMAN_MANAGER_INTERFACE, QDBusConnection::systemBus(), parent) { + qDBusRegisterMetaType(); + qDBusRegisterMetaType(); } QConnmanManagerInterface::~QConnmanManagerInterface() From 8ea19caacf281240411541b5af37c2f9a103a7d1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 7 May 2013 17:10:22 +0200 Subject: [PATCH 12/60] add -compile-examples configure option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this overrides the magic that makes examples only install their sources in production builds. packagers may want to force the build of the examples, so they can package them up for demo purposes. this is actually why we formerly had the split between demos and examples ... Task-number: QTBUG-30788 Change-Id: I5633f69404c5aa6846f5496e8f161a273a7a7da3 Reviewed-by: Joerg Bornemann Reviewed-by: Lisandro Damián Nicanor Pérez Meyer Reviewed-by: Oswald Buddenhagen --- configure | 22 ++++++++++++++++++++++ mkspecs/features/qt_example_installs.prf | 3 +-- tools/configure/configureapp.cpp | 20 ++++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) diff --git a/configure b/configure index e633a780bdc..d11a50554f2 100755 --- a/configure +++ b/configure @@ -880,6 +880,7 @@ QT_DEFAULT_BUILD_PARTS="libs tools examples" CFG_BUILD_PARTS="" CFG_NOBUILD_PARTS="" CFG_SKIP_MODULES="" +CFG_COMPILE_EXAMPLES=auto CFG_RELEASE_QMAKE=no CFG_AUDIO_BACKEND=auto CFG_V8SNAPSHOT=auto @@ -1404,6 +1405,13 @@ while [ "$#" -gt 0 ]; do fi CFG_SKIP_MODULES="$CFG_SKIP_MODULES $VAL" ;; + compile-examples) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_COMPILE_EXAMPLES="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; sdk) if [ "$BUILD_ON_MAC" = "yes" ]; then DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL" @@ -3151,6 +3159,18 @@ else QT_HOST_DATA=`"$relpath/config.tests/unix/makeabs" "$QT_HOST_DATA"` fi +# Do not actually build the examples in production builds with -prefix, unless requested +if [ "$CFG_COMPILE_EXAMPLES" = auto ]; then + if [ "$CFG_DEV" = "yes" ] || [ "x$outpath" = "x$QT_INSTALL_PREFIX" ]; then + CFG_COMPILE_EXAMPLES=yes + else + CFG_COMPILE_EXAMPLES=no + fi +fi +if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG compile_examples" +fi + #------------------------------------------------------------------------------- # help - interactive parts of the script _after_ this section please #------------------------------------------------------------------------------- @@ -3452,6 +3472,8 @@ Additional options: -skip ..... Exclude an entire module from the build. + -compile-examples .. Compile examples even in a production build. + -no-gui ............ Don't build the Qt GUI module and dependencies. + -gui ............... Build the Qt GUI module and dependencies. diff --git a/mkspecs/features/qt_example_installs.prf b/mkspecs/features/qt_example_installs.prf index 479a16a90be..2db752c1e4e 100644 --- a/mkspecs/features/qt_example_installs.prf +++ b/mkspecs/features/qt_example_installs.prf @@ -93,8 +93,7 @@ probase = $$relative_path($$_PRO_FILE_PWD_, $$dirname(_QMAKE_CONF_)/examples) !isEmpty(allfiles): warning("remaining files in $$_PRO_FILE_PWD_: $$allfiles") } - # Do not actually build the examples in production builds with -prefix - !equals(TEMPLATE, subdirs):prefix_build:!contains(QT_CONFIG, private_tests) { + !equals(TEMPLATE, subdirs):!compile_examples { TEMPLATE = aux CONFIG -= have_target qt staticlib dll SOURCES = diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index a0303514437..a83f451b815 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -276,6 +276,8 @@ Configure::Configure(int& argc, char** argv) dictionary[ "BUILDDEV" ] = "no"; + dictionary[ "COMPILE_EXAMPLES" ] = "auto"; + dictionary[ "C++11" ] = "auto"; dictionary[ "SHARED" ] = "yes"; @@ -458,6 +460,13 @@ void Configure::parseCmdLine() dictionary[ "BUILDALL" ] = "yes"; else if (configCmdLine.at(i) == "-force-debug-info") dictionary[ "FORCEDEBUGINFO" ] = "yes"; + + else if (configCmdLine.at(i) == "-compile-examples") { + dictionary[ "COMPILE_EXAMPLES" ] = "yes"; + } else if (configCmdLine.at(i) == "-no-compile-examples") { + dictionary[ "COMPILE_EXAMPLES" ] = "no"; + } + else if (configCmdLine.at(i) == "-c++11") dictionary[ "C++11" ] = "yes"; else if (configCmdLine.at(i) == "-no-c++11") @@ -1696,6 +1705,8 @@ bool Configure::displayHelp() desc( "-skip ", "Exclude an entire module from the build.\n"); + desc( "-compile-examples", "Compile examples even in a production build.\n"); + desc("WIDGETS", "no", "-no-widgets", "Disable Qt Widgets module.\n"); desc("GUI", "no", "-no-gui", "Disable Qt GUI module.\n"); @@ -1979,6 +1990,13 @@ QString Configure::defaultTo(const QString &option) && (!QFile::exists(sourcePath + "/bin/syncqt.pl"))) return "no"; + // Do not actually build the examples in production builds with -prefix, unless requested + if (option == "COMPILE_EXAMPLES" + && QDir::cleanPath(dictionary[ "QT_BUILD_TREE" ]) + != QDir::cleanPath(dictionary[ "QT_INSTALL_PREFIX" ]) + && dictionary[ "BUILDDEV" ] == "no") + return "no"; + return "yes"; } @@ -2560,6 +2578,8 @@ void Configure::generateOutputVars() if (!buildParts.contains("libs")) buildParts += "libs"; buildParts.removeDuplicates(); + if (dictionary[ "COMPILE_EXAMPLES" ] == "yes") + qmakeConfig += "compile_examples"; if (dictionary["MSVC_MP"] == "yes") qmakeConfig += "msvc_mp"; From 32e78f4b6cc0e0ef710259ae73c39bf607cbb743 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 24 May 2013 14:09:01 +0200 Subject: [PATCH 13/60] Manual test for window transparency Change-Id: I8b9fdd14382904b5a0c2a1ecaabf01b209034b95 Reviewed-by: Friedemann Kleint --- tests/manual/manual.pro | 5 +- .../windowtransparency/windowtransparency.cpp | 200 ++++++++++++++++++ .../windowtransparency/windowtransparency.pro | 6 + 3 files changed, 209 insertions(+), 2 deletions(-) create mode 100644 tests/manual/windowtransparency/windowtransparency.cpp create mode 100644 tests/manual/windowtransparency/windowtransparency.pro diff --git a/tests/manual/manual.pro b/tests/manual/manual.pro index 4a466aa4728..d97c69025b5 100644 --- a/tests/manual/manual.pro +++ b/tests/manual/manual.pro @@ -38,7 +38,8 @@ windowmodality \ widgetgrab \ xembed-raster \ xembed-widgets \ -dialogs +dialogs \ +windowtransparency !contains(QT_CONFIG, openssl):!contains(QT_CONFIG, openssl-linked):SUBDIRS -= qssloptions @@ -49,4 +50,4 @@ win32 { } lessThan(QT_MAJOR_VERSION, 5): SUBDIRS -= bearerex lance qnetworkaccessmanager/qget qnetworkreply \ -qpainfo qscreen socketengine xembed-raster xembed-widgets +qpainfo qscreen socketengine xembed-raster xembed-widgets windowtransparency diff --git a/tests/manual/windowtransparency/windowtransparency.cpp b/tests/manual/windowtransparency/windowtransparency.cpp new file mode 100644 index 00000000000..e90fee82f6d --- /dev/null +++ b/tests/manual/windowtransparency/windowtransparency.cpp @@ -0,0 +1,200 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include + +class GLWindow : public QWindow +{ +public: + GLWindow(Qt::WindowFlags flags) + : gl(0) + { + setFlags(flags); + setSurfaceType(OpenGLSurface); + + QSurfaceFormat format; + format.setAlphaBufferSize(8); + format.setSamples(16); + setFormat(format); + } + + void exposeEvent(QExposeEvent *) + { + if (!isExposed()) + return; + + if (!gl) { + gl = new QOpenGLContext(); + gl->setFormat(requestedFormat()); + gl->create(); + } + + gl->makeCurrent(this); + + QOpenGLShaderProgram prog; + prog.addShaderFromSourceCode(QOpenGLShader::Vertex, + "attribute highp vec4 a_Pos;" + "attribute lowp vec4 a_Color;" + "varying lowp vec4 v_Color;" + "void main() {" + " gl_Position = a_Pos;" + " v_Color = a_Color;" + "}"); + prog.addShaderFromSourceCode(QOpenGLShader::Fragment, + "varying lowp vec4 v_Color;" + "void main() {" + " gl_FragColor = v_Color;" + "}"); + prog.bind(); + + glClearColor(0, 0, 0, 1); + glClear(GL_COLOR_BUFFER_BIT); + glViewport(0, 0, width(), height()); + + prog.enableAttributeArray("a_Pos"); + prog.enableAttributeArray("a_Color"); + + float coords[] = { -0.7f, 0.7f, + 0.8f, 0.8f, + -0.8f, -0.8f, + 0.7f, -0.7f }; + float colors[] = { 1, 0, 0, 1, + 0, 1, 0, 1, + 0, 0, 1, 1, + 0, 0, 0, 0 }; + + prog.setAttributeArray("a_Pos", GL_FLOAT, coords, 2, 0); + prog.setAttributeArray("a_Color", GL_FLOAT, colors, 4, 0); + + glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); + + prog.disableAttributeArray("a_Pos"); + prog.disableAttributeArray("a_Color"); + + gl->swapBuffers(this); + } + + void mousePressEvent(QMouseEvent *) + { + QCoreApplication::quit(); + } + +private: + QOpenGLContext *gl; +}; + +class Widget : public QWidget +{ +public: + Widget(Qt::WindowFlags flags) + : QWidget(0, flags) + { + setAttribute(Qt::WA_TranslucentBackground); + } + + void paintEvent(QPaintEvent *) + { + QPainter p(this); + + p.setRenderHint(QPainter::Antialiasing); + + p.fillRect(rect(), QColor("steelblue")); + + int w = width(); + int h = height(); + int w2 = width() / 2; + int h2 = height() / 2; + + QPainterPath path; + path.moveTo(0, 0); + path.cubicTo(w2, 0, w2, h2, w, h); + path.cubicTo(w2, h, w2, h2, 0, 0); + + QLinearGradient lg(0, 0, w, h); + lg.setColorAt(0.0, Qt::transparent); + lg.setColorAt(0.5, QColor("palegreen")); + lg.setColorAt(1.0, Qt::transparent); + + p.setCompositionMode(QPainter::CompositionMode_Source); + p.fillPath(path, lg); + } + + void mousePressEvent(QMouseEvent *) + { + QCoreApplication::quit(); + } + +}; + +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + // mask: on/off + // opacity: on/off + + for (int i=0; i<4; ++i) { + bool mask = i & 0x1; + bool opacity = i & 0x2; + + Qt::WindowFlags flags = Qt::FramelessWindowHint; + + Widget *widget = new Widget(flags); + GLWindow *window = new GLWindow(flags); + + widget->setGeometry(100 + 100 * i, 100, 80, 80); + window->setGeometry(100 + 100 * i, 200, 80, 80); + if (mask) { + QRegion region(0, 0, 80, 80, QRegion::Ellipse); + widget->setMask(region); + window->setMask(region); + } + if (opacity) { + widget->setWindowOpacity(0.5); + window->setOpacity(0.5); + } + + widget->show(); + window->show(); + } + + return app.exec(); +} diff --git a/tests/manual/windowtransparency/windowtransparency.pro b/tests/manual/windowtransparency/windowtransparency.pro new file mode 100644 index 00000000000..0de5c6feb54 --- /dev/null +++ b/tests/manual/windowtransparency/windowtransparency.pro @@ -0,0 +1,6 @@ +QT += widgets + +SOURCES += \ + windowtransparency.cpp + +CONFIG += console From b571b6329b8dd51b22cdea58b512d9b19a7a78f3 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 24 May 2013 15:49:24 +0200 Subject: [PATCH 14/60] Update manualtests license to say "part of test suite". Change-Id: Ice9498c65a20ff17e68303578f8a1d9d6877f501 Reviewed-by: Friedemann Kleint --- tests/manual/cocoa/menus/main.cpp | 2 +- tests/manual/dialogs/colordialogpanel.cpp | 2 +- tests/manual/dialogs/colordialogpanel.h | 2 +- tests/manual/dialogs/filedialogpanel.cpp | 2 +- tests/manual/dialogs/filedialogpanel.h | 2 +- tests/manual/dialogs/fontdialogpanel.cpp | 2 +- tests/manual/dialogs/fontdialogpanel.h | 2 +- tests/manual/dialogs/main.cpp | 2 +- tests/manual/dialogs/wizardpanel.cpp | 2 +- tests/manual/dialogs/wizardpanel.h | 2 +- tests/manual/filetest/main.cpp | 2 +- tests/manual/highdpi/main.cpp | 2 +- tests/manual/inputmethodhints/inputmethodhints.cpp | 2 +- tests/manual/inputmethodhints/inputmethodhints.h | 2 +- tests/manual/inputmethodhints/main.cpp | 2 +- tests/manual/keypadnavigation/main.cpp | 2 +- tests/manual/mkspecs/test.sh | 2 +- tests/manual/network_stresstest/minihttpserver.cpp | 2 +- tests/manual/network_stresstest/minihttpserver.h | 2 +- tests/manual/qimagereader/main.cpp | 2 +- tests/manual/qlayout/gridwidget.cpp | 2 +- tests/manual/qlayout/gridwidget.h | 2 +- tests/manual/qlayout/hbwidget.cpp | 2 +- tests/manual/qlayout/hbwidget.h | 2 +- tests/manual/qlayout/main.cpp | 2 +- tests/manual/qlayout/mainwindow.cpp | 2 +- tests/manual/qlayout/mainwindow.h | 2 +- tests/manual/qlayout/vbwidget.cpp | 2 +- tests/manual/qlayout/vbwidget.h | 2 +- tests/manual/qlocale/calendar.cpp | 2 +- tests/manual/qlocale/calendar.h | 2 +- tests/manual/qlocale/currency.cpp | 2 +- tests/manual/qlocale/currency.h | 2 +- tests/manual/qlocale/dateformats.cpp | 2 +- tests/manual/qlocale/dateformats.h | 2 +- tests/manual/qlocale/info.cpp | 2 +- tests/manual/qlocale/info.h | 2 +- tests/manual/qlocale/languages.cpp | 2 +- tests/manual/qlocale/languages.h | 2 +- tests/manual/qlocale/main.cpp | 2 +- tests/manual/qlocale/miscellaneous.cpp | 2 +- tests/manual/qlocale/miscellaneous.h | 2 +- tests/manual/qlocale/numberformats.cpp | 2 +- tests/manual/qlocale/numberformats.h | 2 +- tests/manual/qlocale/window.cpp | 2 +- tests/manual/qlocale/window.h | 2 +- tests/manual/qtabletevent/regular_widgets/main.cpp | 2 +- tests/manual/widgetgrab/main.cpp | 2 +- tests/manual/windowflags/controllerwindow.cpp | 2 +- tests/manual/windowflags/controllerwindow.h | 2 +- tests/manual/windowflags/controls.cpp | 2 +- tests/manual/windowflags/controls.h | 2 +- tests/manual/windowflags/main.cpp | 2 +- tests/manual/windowflags/previewwindow.cpp | 2 +- tests/manual/windowflags/previewwindow.h | 2 +- tests/manual/windowgeometry/controllerwidget.cpp | 2 +- tests/manual/windowgeometry/controllerwidget.h | 2 +- tests/manual/windowgeometry/main.cpp | 2 +- tests/manual/windowmodality/main.cpp | 2 +- tests/manual/windowtransparency/windowtransparency.cpp | 2 +- tests/manual/xembed-raster/main.cpp | 2 +- tests/manual/xembed-raster/rasterwindow.cpp | 2 +- tests/manual/xembed-raster/rasterwindow.h | 2 +- tests/manual/xembed-widgets/main.cpp | 2 +- tests/manual/xembed-widgets/window.cpp | 2 +- tests/manual/xembed-widgets/window.h | 2 +- 66 files changed, 66 insertions(+), 66 deletions(-) diff --git a/tests/manual/cocoa/menus/main.cpp b/tests/manual/cocoa/menus/main.cpp index 760115ce252..ccaa06aa673 100644 --- a/tests/manual/cocoa/menus/main.cpp +++ b/tests/manual/cocoa/menus/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2012 KDAB ** Contact: http://www.qt-project.org/legal ** -** This file is part of the plugins of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/colordialogpanel.cpp b/tests/manual/dialogs/colordialogpanel.cpp index 695e37a4c7a..24416fdfa19 100644 --- a/tests/manual/dialogs/colordialogpanel.cpp +++ b/tests/manual/dialogs/colordialogpanel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/colordialogpanel.h b/tests/manual/dialogs/colordialogpanel.h index bcd2cf6e523..05ca336a233 100644 --- a/tests/manual/dialogs/colordialogpanel.h +++ b/tests/manual/dialogs/colordialogpanel.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/filedialogpanel.cpp b/tests/manual/dialogs/filedialogpanel.cpp index 2ca9dccf1b3..a342122570a 100644 --- a/tests/manual/dialogs/filedialogpanel.cpp +++ b/tests/manual/dialogs/filedialogpanel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/filedialogpanel.h b/tests/manual/dialogs/filedialogpanel.h index 7ee7cb3f605..2977de41643 100644 --- a/tests/manual/dialogs/filedialogpanel.h +++ b/tests/manual/dialogs/filedialogpanel.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/fontdialogpanel.cpp b/tests/manual/dialogs/fontdialogpanel.cpp index 2bdbb0625ad..02f05f95807 100644 --- a/tests/manual/dialogs/fontdialogpanel.cpp +++ b/tests/manual/dialogs/fontdialogpanel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/fontdialogpanel.h b/tests/manual/dialogs/fontdialogpanel.h index 92f2b7313fc..f3bbbb3939a 100644 --- a/tests/manual/dialogs/fontdialogpanel.h +++ b/tests/manual/dialogs/fontdialogpanel.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/main.cpp b/tests/manual/dialogs/main.cpp index 86e6c90b3f8..4ad2842e442 100644 --- a/tests/manual/dialogs/main.cpp +++ b/tests/manual/dialogs/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/wizardpanel.cpp b/tests/manual/dialogs/wizardpanel.cpp index 13060624260..73b21600d58 100644 --- a/tests/manual/dialogs/wizardpanel.cpp +++ b/tests/manual/dialogs/wizardpanel.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/dialogs/wizardpanel.h b/tests/manual/dialogs/wizardpanel.h index 0a4ec8e467b..6a2268e94c4 100644 --- a/tests/manual/dialogs/wizardpanel.h +++ b/tests/manual/dialogs/wizardpanel.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/filetest/main.cpp b/tests/manual/filetest/main.cpp index 2f7c5cdd061..95ddc4aa369 100644 --- a/tests/manual/filetest/main.cpp +++ b/tests/manual/filetest/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/highdpi/main.cpp b/tests/manual/highdpi/main.cpp index d093569ea80..c40cbd7b426 100644 --- a/tests/manual/highdpi/main.cpp +++ b/tests/manual/highdpi/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** - ** This file is part of the QtGui module of the Qt Toolkit. + ** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/inputmethodhints/inputmethodhints.cpp b/tests/manual/inputmethodhints/inputmethodhints.cpp index 18a699fcd3a..6bbdb7fb5d7 100644 --- a/tests/manual/inputmethodhints/inputmethodhints.cpp +++ b/tests/manual/inputmethodhints/inputmethodhints.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/inputmethodhints/inputmethodhints.h b/tests/manual/inputmethodhints/inputmethodhints.h index da1262da393..72de0fbccea 100644 --- a/tests/manual/inputmethodhints/inputmethodhints.h +++ b/tests/manual/inputmethodhints/inputmethodhints.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/inputmethodhints/main.cpp b/tests/manual/inputmethodhints/main.cpp index fc294dfc43c..274ac23884b 100644 --- a/tests/manual/inputmethodhints/main.cpp +++ b/tests/manual/inputmethodhints/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/keypadnavigation/main.cpp b/tests/manual/keypadnavigation/main.cpp index 71a0072fbac..ca6118c206c 100644 --- a/tests/manual/keypadnavigation/main.cpp +++ b/tests/manual/keypadnavigation/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/mkspecs/test.sh b/tests/manual/mkspecs/test.sh index ad0a74701c3..d78946f20c2 100755 --- a/tests/manual/mkspecs/test.sh +++ b/tests/manual/mkspecs/test.sh @@ -4,7 +4,7 @@ ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## -## This file is part of the manual tests of the Qt Toolkit. +## This file is part of the test suite of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License Usage diff --git a/tests/manual/network_stresstest/minihttpserver.cpp b/tests/manual/network_stresstest/minihttpserver.cpp index 96db4b70700..6ec001f95c3 100644 --- a/tests/manual/network_stresstest/minihttpserver.cpp +++ b/tests/manual/network_stresstest/minihttpserver.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the FOO module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/network_stresstest/minihttpserver.h b/tests/manual/network_stresstest/minihttpserver.h index 8ab460560d4..4d7d39984c3 100644 --- a/tests/manual/network_stresstest/minihttpserver.h +++ b/tests/manual/network_stresstest/minihttpserver.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the FOO module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qimagereader/main.cpp b/tests/manual/qimagereader/main.cpp index 4dc41ac5427..faa4b83e615 100644 --- a/tests/manual/qimagereader/main.cpp +++ b/tests/manual/qimagereader/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/gridwidget.cpp b/tests/manual/qlayout/gridwidget.cpp index f4e267be80b..31f00941828 100644 --- a/tests/manual/qlayout/gridwidget.cpp +++ b/tests/manual/qlayout/gridwidget.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/gridwidget.h b/tests/manual/qlayout/gridwidget.h index 8b8a4bb8693..ecce182516d 100644 --- a/tests/manual/qlayout/gridwidget.h +++ b/tests/manual/qlayout/gridwidget.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/hbwidget.cpp b/tests/manual/qlayout/hbwidget.cpp index 5fe59e0f93a..e8bb07f4a43 100644 --- a/tests/manual/qlayout/hbwidget.cpp +++ b/tests/manual/qlayout/hbwidget.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/hbwidget.h b/tests/manual/qlayout/hbwidget.h index 7aef8f701d0..8af3dc3f05c 100644 --- a/tests/manual/qlayout/hbwidget.h +++ b/tests/manual/qlayout/hbwidget.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/main.cpp b/tests/manual/qlayout/main.cpp index 6f190e48f32..9d2277f9c37 100644 --- a/tests/manual/qlayout/main.cpp +++ b/tests/manual/qlayout/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/mainwindow.cpp b/tests/manual/qlayout/mainwindow.cpp index 5ef8d0e1a49..429cea18303 100644 --- a/tests/manual/qlayout/mainwindow.cpp +++ b/tests/manual/qlayout/mainwindow.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/mainwindow.h b/tests/manual/qlayout/mainwindow.h index 31ef00a60bf..122e80e1c06 100644 --- a/tests/manual/qlayout/mainwindow.h +++ b/tests/manual/qlayout/mainwindow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/vbwidget.cpp b/tests/manual/qlayout/vbwidget.cpp index 750a1d552f5..063176625d9 100644 --- a/tests/manual/qlayout/vbwidget.cpp +++ b/tests/manual/qlayout/vbwidget.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlayout/vbwidget.h b/tests/manual/qlayout/vbwidget.h index 5f50d35b00d..4c6ea264d3b 100644 --- a/tests/manual/qlayout/vbwidget.h +++ b/tests/manual/qlayout/vbwidget.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/qlocale/calendar.cpp b/tests/manual/qlocale/calendar.cpp index 6b3d3c213d1..7e26e0eaf93 100644 --- a/tests/manual/qlocale/calendar.cpp +++ b/tests/manual/qlocale/calendar.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/calendar.h b/tests/manual/qlocale/calendar.h index ec152a7f4e1..af888a02de6 100644 --- a/tests/manual/qlocale/calendar.h +++ b/tests/manual/qlocale/calendar.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/currency.cpp b/tests/manual/qlocale/currency.cpp index 5be527ae912..e8e3b68c794 100644 --- a/tests/manual/qlocale/currency.cpp +++ b/tests/manual/qlocale/currency.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/currency.h b/tests/manual/qlocale/currency.h index b81a67e51e9..061b3e1260f 100644 --- a/tests/manual/qlocale/currency.h +++ b/tests/manual/qlocale/currency.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/dateformats.cpp b/tests/manual/qlocale/dateformats.cpp index 3b523ca863f..89bd32645d1 100644 --- a/tests/manual/qlocale/dateformats.cpp +++ b/tests/manual/qlocale/dateformats.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/dateformats.h b/tests/manual/qlocale/dateformats.h index ae3621403e3..dbeb45745a3 100644 --- a/tests/manual/qlocale/dateformats.h +++ b/tests/manual/qlocale/dateformats.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/info.cpp b/tests/manual/qlocale/info.cpp index e3d392fd468..a613ba81904 100644 --- a/tests/manual/qlocale/info.cpp +++ b/tests/manual/qlocale/info.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/info.h b/tests/manual/qlocale/info.h index 9657f3264c6..9b950fe2a95 100644 --- a/tests/manual/qlocale/info.h +++ b/tests/manual/qlocale/info.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/languages.cpp b/tests/manual/qlocale/languages.cpp index 828b43ae627..722fb09eadd 100644 --- a/tests/manual/qlocale/languages.cpp +++ b/tests/manual/qlocale/languages.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/languages.h b/tests/manual/qlocale/languages.h index 57fbf456f37..0dd3b97d26d 100644 --- a/tests/manual/qlocale/languages.h +++ b/tests/manual/qlocale/languages.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/main.cpp b/tests/manual/qlocale/main.cpp index cacc0c01816..5ec2a0d2e25 100644 --- a/tests/manual/qlocale/main.cpp +++ b/tests/manual/qlocale/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/miscellaneous.cpp b/tests/manual/qlocale/miscellaneous.cpp index 62ebac09e46..b27b82737bc 100644 --- a/tests/manual/qlocale/miscellaneous.cpp +++ b/tests/manual/qlocale/miscellaneous.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/miscellaneous.h b/tests/manual/qlocale/miscellaneous.h index 29543a81e6e..c25dd7abdb2 100644 --- a/tests/manual/qlocale/miscellaneous.h +++ b/tests/manual/qlocale/miscellaneous.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/numberformats.cpp b/tests/manual/qlocale/numberformats.cpp index edab69b48c9..ca802552999 100644 --- a/tests/manual/qlocale/numberformats.cpp +++ b/tests/manual/qlocale/numberformats.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/numberformats.h b/tests/manual/qlocale/numberformats.h index 2a91dd3f81a..6c2f5fcc48a 100644 --- a/tests/manual/qlocale/numberformats.h +++ b/tests/manual/qlocale/numberformats.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/window.cpp b/tests/manual/qlocale/window.cpp index 40d13160507..a2179ecffcc 100644 --- a/tests/manual/qlocale/window.cpp +++ b/tests/manual/qlocale/window.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qlocale/window.h b/tests/manual/qlocale/window.h index 25b8de0ce55..ec4a4b578b6 100644 --- a/tests/manual/qlocale/window.h +++ b/tests/manual/qlocale/window.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/qtabletevent/regular_widgets/main.cpp b/tests/manual/qtabletevent/regular_widgets/main.cpp index d8878219983..1e2f5c00da2 100644 --- a/tests/manual/qtabletevent/regular_widgets/main.cpp +++ b/tests/manual/qtabletevent/regular_widgets/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the FOO module of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/widgetgrab/main.cpp b/tests/manual/widgetgrab/main.cpp index 3025c4686e2..7b6be840390 100644 --- a/tests/manual/widgetgrab/main.cpp +++ b/tests/manual/widgetgrab/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowflags/controllerwindow.cpp b/tests/manual/windowflags/controllerwindow.cpp index d181698d84a..b3657a3663c 100644 --- a/tests/manual/windowflags/controllerwindow.cpp +++ b/tests/manual/windowflags/controllerwindow.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowflags/controllerwindow.h b/tests/manual/windowflags/controllerwindow.h index 70b9202f418..925a20a6e04 100644 --- a/tests/manual/windowflags/controllerwindow.h +++ b/tests/manual/windowflags/controllerwindow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowflags/controls.cpp b/tests/manual/windowflags/controls.cpp index 422656ff03e..3633ca6bdc8 100644 --- a/tests/manual/windowflags/controls.cpp +++ b/tests/manual/windowflags/controls.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowflags/controls.h b/tests/manual/windowflags/controls.h index 43d206577ca..0f79f9882d9 100644 --- a/tests/manual/windowflags/controls.h +++ b/tests/manual/windowflags/controls.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowflags/main.cpp b/tests/manual/windowflags/main.cpp index 10f01971aa4..1b2545166a1 100644 --- a/tests/manual/windowflags/main.cpp +++ b/tests/manual/windowflags/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowflags/previewwindow.cpp b/tests/manual/windowflags/previewwindow.cpp index 22b114eb406..5288d70db64 100644 --- a/tests/manual/windowflags/previewwindow.cpp +++ b/tests/manual/windowflags/previewwindow.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowflags/previewwindow.h b/tests/manual/windowflags/previewwindow.h index 33e13778f12..15a76087889 100644 --- a/tests/manual/windowflags/previewwindow.h +++ b/tests/manual/windowflags/previewwindow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowgeometry/controllerwidget.cpp b/tests/manual/windowgeometry/controllerwidget.cpp index d8c74ef8a3a..aab3842a3a3 100644 --- a/tests/manual/windowgeometry/controllerwidget.cpp +++ b/tests/manual/windowgeometry/controllerwidget.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowgeometry/controllerwidget.h b/tests/manual/windowgeometry/controllerwidget.h index 1e5e30fa203..275734b7b75 100644 --- a/tests/manual/windowgeometry/controllerwidget.h +++ b/tests/manual/windowgeometry/controllerwidget.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowgeometry/main.cpp b/tests/manual/windowgeometry/main.cpp index 0041411a004..847188e530f 100644 --- a/tests/manual/windowgeometry/main.cpp +++ b/tests/manual/windowgeometry/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowmodality/main.cpp b/tests/manual/windowmodality/main.cpp index bfbeaf3df88..7ef2754cd76 100644 --- a/tests/manual/windowmodality/main.cpp +++ b/tests/manual/windowmodality/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/tests/manual/windowtransparency/windowtransparency.cpp b/tests/manual/windowtransparency/windowtransparency.cpp index e90fee82f6d..3d5e6074230 100644 --- a/tests/manual/windowtransparency/windowtransparency.cpp +++ b/tests/manual/windowtransparency/windowtransparency.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/xembed-raster/main.cpp b/tests/manual/xembed-raster/main.cpp index dc5fb8a5ca2..8c5cc189472 100644 --- a/tests/manual/xembed-raster/main.cpp +++ b/tests/manual/xembed-raster/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/xembed-raster/rasterwindow.cpp b/tests/manual/xembed-raster/rasterwindow.cpp index cad50812808..098e4a12ce9 100644 --- a/tests/manual/xembed-raster/rasterwindow.cpp +++ b/tests/manual/xembed-raster/rasterwindow.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/xembed-raster/rasterwindow.h b/tests/manual/xembed-raster/rasterwindow.h index 3fed06d7de3..a695cbfe442 100644 --- a/tests/manual/xembed-raster/rasterwindow.h +++ b/tests/manual/xembed-raster/rasterwindow.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/xembed-widgets/main.cpp b/tests/manual/xembed-widgets/main.cpp index fbd9773b61d..2ce473985aa 100644 --- a/tests/manual/xembed-widgets/main.cpp +++ b/tests/manual/xembed-widgets/main.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/xembed-widgets/window.cpp b/tests/manual/xembed-widgets/window.cpp index 92eccf50ba5..70bdf77ba08 100644 --- a/tests/manual/xembed-widgets/window.cpp +++ b/tests/manual/xembed-widgets/window.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: diff --git a/tests/manual/xembed-widgets/window.h b/tests/manual/xembed-widgets/window.h index fbb9b82300a..aad6e029a99 100644 --- a/tests/manual/xembed-widgets/window.h +++ b/tests/manual/xembed-widgets/window.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the examples of the Qt Toolkit. +** This file is part of the test suite of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: From e9723d9d31e1ec8ce3d56fb143621841b9f3f794 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Sun, 26 May 2013 18:38:58 +0800 Subject: [PATCH 15/60] QtTest: Output correct library name "QTest" is the C++ namespace; "QtTest" is the library name - Edited the logger output in qplaintestlogger.cpp - Updated documentation - Updated expected outputs for self-tests Change-Id: I43c525c43221a8d4e843a00d6d55b0f06ef55fd7 Reviewed-by: Thiago Macieira --- src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc | 2 +- src/testlib/qplaintestlogger.cpp | 2 +- tests/auto/testlib/selftests/expected_alive.txt | 2 +- tests/auto/testlib/selftests/expected_assert.txt | 2 +- tests/auto/testlib/selftests/expected_badxml.txt | 2 +- .../testlib/selftests/expected_benchlibcallgrind.txt | 2 +- .../testlib/selftests/expected_benchlibcounting.txt | 2 +- .../selftests/expected_benchlibeventcounter.txt | 2 +- .../testlib/selftests/expected_benchliboptions.txt | 6 +++--- .../selftests/expected_benchlibtickcounter.txt | 2 +- .../testlib/selftests/expected_benchlibwalltime.txt | 2 +- tests/auto/testlib/selftests/expected_cmptest.txt | 2 +- .../testlib/selftests/expected_commandlinedata.txt | 2 +- tests/auto/testlib/selftests/expected_counting.txt | 2 +- tests/auto/testlib/selftests/expected_crashes_1.txt | 2 +- tests/auto/testlib/selftests/expected_crashes_2.txt | 2 +- tests/auto/testlib/selftests/expected_crashes_3.txt | 2 +- tests/auto/testlib/selftests/expected_datatable.txt | 2 +- tests/auto/testlib/selftests/expected_datetime.txt | 2 +- .../testlib/selftests/expected_differentexec.txt | 6 +++--- .../testlib/selftests/expected_exceptionthrow.txt | 2 +- tests/auto/testlib/selftests/expected_expectfail.txt | 2 +- .../auto/testlib/selftests/expected_failcleanup.txt | 2 +- tests/auto/testlib/selftests/expected_failinit.txt | 2 +- .../auto/testlib/selftests/expected_failinitdata.txt | 2 +- tests/auto/testlib/selftests/expected_fetchbogus.txt | 2 +- .../auto/testlib/selftests/expected_findtestdata.txt | 2 +- tests/auto/testlib/selftests/expected_float.txt | 2 +- tests/auto/testlib/selftests/expected_globaldata.txt | 2 +- tests/auto/testlib/selftests/expected_longstring.txt | 2 +- .../auto/testlib/selftests/expected_maxwarnings.txt | 2 +- tests/auto/testlib/selftests/expected_multiexec.txt | 10 +++++----- .../testlib/selftests/expected_qexecstringlist.txt | 12 ++++++------ tests/auto/testlib/selftests/expected_singleskip.txt | 2 +- tests/auto/testlib/selftests/expected_skip.txt | 2 +- .../auto/testlib/selftests/expected_skipcleanup.txt | 2 +- tests/auto/testlib/selftests/expected_skipinit.txt | 2 +- .../auto/testlib/selftests/expected_skipinitdata.txt | 2 +- tests/auto/testlib/selftests/expected_sleep.txt | 2 +- tests/auto/testlib/selftests/expected_strcmp.txt | 2 +- tests/auto/testlib/selftests/expected_subtest.txt | 2 +- tests/auto/testlib/selftests/expected_verbose1.txt | 2 +- tests/auto/testlib/selftests/expected_verbose2.txt | 2 +- tests/auto/testlib/selftests/expected_warnings.txt | 2 +- tests/auto/testlib/selftests/expected_xunit.txt | 2 +- 45 files changed, 58 insertions(+), 58 deletions(-) diff --git a/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc b/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc index 16bd099e376..eb3301aa580 100644 --- a/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc +++ b/src/testlib/doc/snippets/code/doc_src_qtestlib.qdoc @@ -78,7 +78,7 @@ set LIB=C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SD //! [10] ********* Start testing of TestQString ********* -Config: Using QTest library %VERSION%, Qt %VERSION% +Config: Using QtTest library %VERSION%, Qt %VERSION% PASS : TestQString::initTestCase() PASS : TestQString::toUpper() PASS : TestQString::cleanupTestCase() diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp index 9fe82de19ee..a923a0d0fa6 100644 --- a/src/testlib/qplaintestlogger.cpp +++ b/src/testlib/qplaintestlogger.cpp @@ -319,7 +319,7 @@ void QPlainTestLogger::startLogging() } else { qsnprintf(buf, sizeof(buf), "********* Start testing of %s *********\n" - "Config: Using QTest library " QTEST_VERSION_STR + "Config: Using QtTest library " QTEST_VERSION_STR ", Qt %s\n", QTestResult::currentTestObjectName(), qVersion()); } outputMessage(buf); diff --git a/tests/auto/testlib/selftests/expected_alive.txt b/tests/auto/testlib/selftests/expected_alive.txt index 352c8785756..093a3a6f096 100644 --- a/tests/auto/testlib/selftests/expected_alive.txt +++ b/tests/auto/testlib/selftests/expected_alive.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Alive ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Alive::initTestCase() QWARN : tst_Alive::alive() TEST LAGS 3 PINGS behind! QWARN : tst_Alive::alive() TEST LAGS 4 PINGS behind! diff --git a/tests/auto/testlib/selftests/expected_assert.txt b/tests/auto/testlib/selftests/expected_assert.txt index 591a7c204b6..0e9bfb263ff 100644 --- a/tests/auto/testlib/selftests/expected_assert.txt +++ b/tests/auto/testlib/selftests/expected_assert.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Assert ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Assert::initTestCase() PASS : tst_Assert::testNumber1() QFATAL : tst_Assert::testNumber2() ASSERT: "false" in file tst_assert.cpp, line 66 diff --git a/tests/auto/testlib/selftests/expected_badxml.txt b/tests/auto/testlib/selftests/expected_badxml.txt index 68d333ec303..0458401b448 100644 --- a/tests/auto/testlib/selftests/expected_badxml.txt +++ b/tests/auto/testlib/selftests/expected_badxml.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BadXml ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BadXml::initTestCase() QDEBUG : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a message FAIL! : tst_BadXml::badDataTag(fail end cdata ]]> text ]]> more text) a failure diff --git a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt index 13e9a39affa..ca0d0bdda53 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt +++ b/tests/auto/testlib/selftests/expected_benchlibcallgrind.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BenchlibCallgrind ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibCallgrind::initTestCase() PASS : tst_BenchlibCallgrind::twoHundredMillionInstructions() RESULT : tst_BenchlibCallgrind::twoHundredMillionInstructions(): diff --git a/tests/auto/testlib/selftests/expected_benchlibcounting.txt b/tests/auto/testlib/selftests/expected_benchlibcounting.txt index e1af40b9e0b..23dd19d2cd2 100644 --- a/tests/auto/testlib/selftests/expected_benchlibcounting.txt +++ b/tests/auto/testlib/selftests/expected_benchlibcounting.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BenchlibCounting ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibCounting::initTestCase() PASS : tst_BenchlibCounting::passingBenchmark() RESULT : tst_BenchlibCounting::passingBenchmark(): diff --git a/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt b/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt index 7be4bcccc49..7a5faa9ac68 100644 --- a/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt +++ b/tests/auto/testlib/selftests/expected_benchlibeventcounter.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BenchlibEventCounter ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibEventCounter::initTestCase() PASS : tst_BenchlibEventCounter::events(0) RESULT : tst_BenchlibEventCounter::events():"0": diff --git a/tests/auto/testlib/selftests/expected_benchliboptions.txt b/tests/auto/testlib/selftests/expected_benchliboptions.txt index ef9f0c5ad05..d8b69cf80e8 100644 --- a/tests/auto/testlib/selftests/expected_benchliboptions.txt +++ b/tests/auto/testlib/selftests/expected_benchliboptions.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BenchlibOptions ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibOptions::initTestCase() PASS : tst_BenchlibOptions::threeEvents() RESULT : tst_BenchlibOptions::threeEvents(): @@ -8,7 +8,7 @@ PASS : tst_BenchlibOptions::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibOptions ********* ********* Start testing of tst_BenchlibFifteenIterations ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibFifteenIterations::initTestCase() PASS : tst_BenchlibFifteenIterations::threeEvents() RESULT : tst_BenchlibFifteenIterations::threeEvents(): @@ -17,7 +17,7 @@ PASS : tst_BenchlibFifteenIterations::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_BenchlibFifteenIterations ********* ********* Start testing of tst_BenchlibOneHundredMinimum ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibOneHundredMinimum::initTestCase() PASS : tst_BenchlibOneHundredMinimum::threeEvents() RESULT : tst_BenchlibOneHundredMinimum::threeEvents(): diff --git a/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt b/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt index b43392adb09..9519e1d3408 100644 --- a/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt +++ b/tests/auto/testlib/selftests/expected_benchlibtickcounter.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BenchlibTickCounter ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibTickCounter::initTestCase() RESULT : tst_BenchlibTickCounter::threeBillionTicks(): 3,000,000,000 ticks per iteration (total: 3000000000, iterations: 1) diff --git a/tests/auto/testlib/selftests/expected_benchlibwalltime.txt b/tests/auto/testlib/selftests/expected_benchlibwalltime.txt index f0b656851ef..b0e78ae78d9 100644 --- a/tests/auto/testlib/selftests/expected_benchlibwalltime.txt +++ b/tests/auto/testlib/selftests/expected_benchlibwalltime.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_BenchlibWalltime ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_BenchlibWalltime::initTestCase() RESULT : tst_BenchlibWalltime::waitForOneThousand(): 1,000 msec per iteration (total: 1000, iterations: 1) diff --git a/tests/auto/testlib/selftests/expected_cmptest.txt b/tests/auto/testlib/selftests/expected_cmptest.txt index d41da53b068..9d03a8e3daa 100644 --- a/tests/auto/testlib/selftests/expected_cmptest.txt +++ b/tests/auto/testlib/selftests/expected_cmptest.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Cmptest ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Cmptest::initTestCase() PASS : tst_Cmptest::compare_boolfuncs() PASS : tst_Cmptest::compare_pointerfuncs() diff --git a/tests/auto/testlib/selftests/expected_commandlinedata.txt b/tests/auto/testlib/selftests/expected_commandlinedata.txt index 10e4916b540..7c16267b74b 100644 --- a/tests/auto/testlib/selftests/expected_commandlinedata.txt +++ b/tests/auto/testlib/selftests/expected_commandlinedata.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_DataTable ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ INFO : tst_DataTable::initTestCase() entering PASS : tst_DataTable::initTestCase() INFO : tst_DataTable::fiveTablePasses() entering diff --git a/tests/auto/testlib/selftests/expected_counting.txt b/tests/auto/testlib/selftests/expected_counting.txt index 3245d9d7be1..f413882c2a4 100644 --- a/tests/auto/testlib/selftests/expected_counting.txt +++ b/tests/auto/testlib/selftests/expected_counting.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Counting ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Counting::initTestCase() PASS : tst_Counting::testPassPass(row 1) PASS : tst_Counting::testPassPass(row 2) diff --git a/tests/auto/testlib/selftests/expected_crashes_1.txt b/tests/auto/testlib/selftests/expected_crashes_1.txt index 1e0c2164070..b91b6c4d5d7 100644 --- a/tests/auto/testlib/selftests/expected_crashes_1.txt +++ b/tests/auto/testlib/selftests/expected_crashes_1.txt @@ -1,3 +1,3 @@ ********* Start testing of tst_Crashes ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Crashes::initTestCase() diff --git a/tests/auto/testlib/selftests/expected_crashes_2.txt b/tests/auto/testlib/selftests/expected_crashes_2.txt index 593d22d0af6..cbfce589b92 100644 --- a/tests/auto/testlib/selftests/expected_crashes_2.txt +++ b/tests/auto/testlib/selftests/expected_crashes_2.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Crashes ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Crashes::initTestCase() FAIL! : tst_Crashes::crash() Caught unhandled exception .\qtestcase.cpp(984) : failure location diff --git a/tests/auto/testlib/selftests/expected_crashes_3.txt b/tests/auto/testlib/selftests/expected_crashes_3.txt index b93039b2a60..617a009b46e 100644 --- a/tests/auto/testlib/selftests/expected_crashes_3.txt +++ b/tests/auto/testlib/selftests/expected_crashes_3.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Crashes ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Crashes::initTestCase() QFATAL : tst_Crashes::crash() Received signal 11 FAIL! : tst_Crashes::crash() Received a fatal error. diff --git a/tests/auto/testlib/selftests/expected_datatable.txt b/tests/auto/testlib/selftests/expected_datatable.txt index 68c33e6efd8..24b39becd2d 100644 --- a/tests/auto/testlib/selftests/expected_datatable.txt +++ b/tests/auto/testlib/selftests/expected_datatable.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_DataTable ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_DataTable::initTestCase() PASS : tst_DataTable::singleTestFunction1() PASS : tst_DataTable::singleTestFunction2() diff --git a/tests/auto/testlib/selftests/expected_datetime.txt b/tests/auto/testlib/selftests/expected_datetime.txt index 6e82bddda73..ce9e1f36b4a 100644 --- a/tests/auto/testlib/selftests/expected_datetime.txt +++ b/tests/auto/testlib/selftests/expected_datetime.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_DateTime ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_DateTime::initTestCase() FAIL! : tst_DateTime::dateTime() Compared values are not the same Actual (local): 2000/05/03 04:03:04.000[local time] diff --git a/tests/auto/testlib/selftests/expected_differentexec.txt b/tests/auto/testlib/selftests/expected_differentexec.txt index bef404bcb83..3b8dd20e6ba 100644 --- a/tests/auto/testlib/selftests/expected_differentexec.txt +++ b/tests/auto/testlib/selftests/expected_differentexec.txt @@ -1,19 +1,19 @@ ********* Start testing of tst_TestA ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_TestA::initTestCase() PASS : tst_TestA::slotName() PASS : tst_TestA::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_TestA ********* ********* Start testing of tst_TestA ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_TestA::initTestCase() PASS : tst_TestA::slotName() PASS : tst_TestA::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_TestA ********* ********* Start testing of tst_TestB ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_TestB::initTestCase() PASS : tst_TestB::slotName() PASS : tst_TestB::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_exceptionthrow.txt b/tests/auto/testlib/selftests/expected_exceptionthrow.txt index 6b0c0fad84d..ecbc7da01ab 100644 --- a/tests/auto/testlib/selftests/expected_exceptionthrow.txt +++ b/tests/auto/testlib/selftests/expected_exceptionthrow.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Exception ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Exception::initTestCase() FAIL! : tst_Exception::throwException() Caught unhandled exception Loc: [/home/user/dev/qt5/qtbase/src/testlib/qtestcase.cpp(1220)] diff --git a/tests/auto/testlib/selftests/expected_expectfail.txt b/tests/auto/testlib/selftests/expected_expectfail.txt index 6028b5ddfed..abd1cdc32ce 100644 --- a/tests/auto/testlib/selftests/expected_expectfail.txt +++ b/tests/auto/testlib/selftests/expected_expectfail.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_ExpectFail ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_ExpectFail::initTestCase() QDEBUG : tst_ExpectFail::xfailAndContinue() begin XFAIL : tst_ExpectFail::xfailAndContinue() This should xfail diff --git a/tests/auto/testlib/selftests/expected_failcleanup.txt b/tests/auto/testlib/selftests/expected_failcleanup.txt index 08c10b18232..1d9405b3262 100644 --- a/tests/auto/testlib/selftests/expected_failcleanup.txt +++ b/tests/auto/testlib/selftests/expected_failcleanup.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_FailCleanup ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_FailCleanup::initTestCase() PASS : tst_FailCleanup::aTestFunction() FAIL! : tst_FailCleanup::cleanupTestCase() 'false' returned FALSE. (Fail inside cleanupTestCase) diff --git a/tests/auto/testlib/selftests/expected_failinit.txt b/tests/auto/testlib/selftests/expected_failinit.txt index 469aa84a6e6..a6cf55b2e26 100644 --- a/tests/auto/testlib/selftests/expected_failinit.txt +++ b/tests/auto/testlib/selftests/expected_failinit.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_FailInit ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ FAIL! : tst_FailInit::initTestCase() 'false' returned FALSE. () Loc: [tst_failinit.cpp(22)] PASS : tst_FailInit::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_failinitdata.txt b/tests/auto/testlib/selftests/expected_failinitdata.txt index b700beda16c..40b36526ba3 100644 --- a/tests/auto/testlib/selftests/expected_failinitdata.txt +++ b/tests/auto/testlib/selftests/expected_failinitdata.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_FailInitData ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ FAIL! : tst_FailInitData::initTestCase() 'false' returned FALSE. () Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/failinitdata/tst_failinitdata.cpp(23)] Totals: 0 passed, 1 failed, 0 skipped diff --git a/tests/auto/testlib/selftests/expected_fetchbogus.txt b/tests/auto/testlib/selftests/expected_fetchbogus.txt index eecaaa61069..0306fe7cc47 100644 --- a/tests/auto/testlib/selftests/expected_fetchbogus.txt +++ b/tests/auto/testlib/selftests/expected_fetchbogus.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_FetchBogus ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_FetchBogus::initTestCase() QFATAL : tst_FetchBogus::fetchBogus(foo) QFETCH: Requested testdata 'bubu' not available, check your _data function. FAIL! : tst_FetchBogus::fetchBogus(foo) Received a fatal error. diff --git a/tests/auto/testlib/selftests/expected_findtestdata.txt b/tests/auto/testlib/selftests/expected_findtestdata.txt index e9387a38c8c..22c2e851d4a 100644 --- a/tests/auto/testlib/selftests/expected_findtestdata.txt +++ b/tests/auto/testlib/selftests/expected_findtestdata.txt @@ -1,5 +1,5 @@ ********* Start testing of FindTestData ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : FindTestData::initTestCase() WARNING: FindTestData::paths() testdata testfile could not be located! Loc: [findtestdata.cpp(131)] diff --git a/tests/auto/testlib/selftests/expected_float.txt b/tests/auto/testlib/selftests/expected_float.txt index 6a7804adc0e..dc32fd76f14 100644 --- a/tests/auto/testlib/selftests/expected_float.txt +++ b/tests/auto/testlib/selftests/expected_float.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_float ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_float::initTestCase() PASS : tst_float::floatComparisons(should SUCCEED 1) FAIL! : tst_float::floatComparisons(should FAIL 1) Compared floats are not the same (fuzzy compare) diff --git a/tests/auto/testlib/selftests/expected_globaldata.txt b/tests/auto/testlib/selftests/expected_globaldata.txt index 59b95fa2533..e5d9cacc9c4 100644 --- a/tests/auto/testlib/selftests/expected_globaldata.txt +++ b/tests/auto/testlib/selftests/expected_globaldata.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_globaldata ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ QDEBUG : tst_globaldata::initTestCase() initTestCase initTestCase (null) PASS : tst_globaldata::initTestCase() QDEBUG : tst_globaldata::testGlobal(1:local 1) init testGlobal local 1 diff --git a/tests/auto/testlib/selftests/expected_longstring.txt b/tests/auto/testlib/selftests/expected_longstring.txt index dbc694f236b..b367e64959b 100644 --- a/tests/auto/testlib/selftests/expected_longstring.txt +++ b/tests/auto/testlib/selftests/expected_longstring.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_LongString ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_LongString::initTestCase() FAIL! : tst_LongString::failWithLongString() Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. diff --git a/tests/auto/testlib/selftests/expected_maxwarnings.txt b/tests/auto/testlib/selftests/expected_maxwarnings.txt index e12e05d8998..3e880ee5519 100644 --- a/tests/auto/testlib/selftests/expected_maxwarnings.txt +++ b/tests/auto/testlib/selftests/expected_maxwarnings.txt @@ -1,5 +1,5 @@ ********* Start testing of MaxWarnings ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : MaxWarnings::initTestCase() QWARN : MaxWarnings::warn() 0 QWARN : MaxWarnings::warn() 1 diff --git a/tests/auto/testlib/selftests/expected_multiexec.txt b/tests/auto/testlib/selftests/expected_multiexec.txt index 8af04d7d383..b2f1d7009c8 100644 --- a/tests/auto/testlib/selftests/expected_multiexec.txt +++ b/tests/auto/testlib/selftests/expected_multiexec.txt @@ -1,33 +1,33 @@ ********* Start testing of tst_Nothing ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Nothing::initTestCase() PASS : tst_Nothing::nothing() PASS : tst_Nothing::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_Nothing ********* ********* Start testing of tst_Nothing ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Nothing::initTestCase() PASS : tst_Nothing::nothing() PASS : tst_Nothing::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_Nothing ********* ********* Start testing of tst_Nothing ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Nothing::initTestCase() PASS : tst_Nothing::nothing() PASS : tst_Nothing::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_Nothing ********* ********* Start testing of tst_Nothing ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Nothing::initTestCase() PASS : tst_Nothing::nothing() PASS : tst_Nothing::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_Nothing ********* ********* Start testing of tst_Nothing ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Nothing::initTestCase() PASS : tst_Nothing::nothing() PASS : tst_Nothing::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_qexecstringlist.txt b/tests/auto/testlib/selftests/expected_qexecstringlist.txt index da283e106f0..d4ce643804c 100644 --- a/tests/auto/testlib/selftests/expected_qexecstringlist.txt +++ b/tests/auto/testlib/selftests/expected_qexecstringlist.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testA() PASS : tst_QExecStringList::testB(Data1) @@ -10,7 +10,7 @@ PASS : tst_QExecStringList::cleanupTestCase() Totals: 7 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testA() PASS : tst_QExecStringList::testB(Data1) @@ -21,14 +21,14 @@ PASS : tst_QExecStringList::cleanupTestCase() Totals: 7 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testA() PASS : tst_QExecStringList::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testB(Data1) PASS : tst_QExecStringList::testB(Data2) @@ -37,14 +37,14 @@ PASS : tst_QExecStringList::cleanupTestCase() Totals: 5 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testB(Data2) PASS : tst_QExecStringList::cleanupTestCase() Totals: 3 passed, 0 failed, 0 skipped ********* Finished testing of tst_QExecStringList ********* ********* Start testing of tst_QExecStringList ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_QExecStringList::initTestCase() PASS : tst_QExecStringList::testC() PASS : tst_QExecStringList::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_singleskip.txt b/tests/auto/testlib/selftests/expected_singleskip.txt index b9085b1cbdc..46b40e57915 100644 --- a/tests/auto/testlib/selftests/expected_singleskip.txt +++ b/tests/auto/testlib/selftests/expected_singleskip.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_SingleSkip ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_SingleSkip::initTestCase() SKIP : tst_SingleSkip::myTest() skipping test Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/singleskip/tst_singleskip.cpp(56)] diff --git a/tests/auto/testlib/selftests/expected_skip.txt b/tests/auto/testlib/selftests/expected_skip.txt index fadbc966f02..ef96d08d83e 100644 --- a/tests/auto/testlib/selftests/expected_skip.txt +++ b/tests/auto/testlib/selftests/expected_skip.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Skip ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Skip::initTestCase() SKIP : tst_Skip::test() skipping all Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skip/tst_skip.cpp(68)] diff --git a/tests/auto/testlib/selftests/expected_skipcleanup.txt b/tests/auto/testlib/selftests/expected_skipcleanup.txt index c97f31c2a9b..52845c355ec 100644 --- a/tests/auto/testlib/selftests/expected_skipcleanup.txt +++ b/tests/auto/testlib/selftests/expected_skipcleanup.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_SkipCleanup ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_SkipCleanup::initTestCase() PASS : tst_SkipCleanup::aTestFunction() SKIP : tst_SkipCleanup::cleanupTestCase() Skip inside cleanupTestCase. diff --git a/tests/auto/testlib/selftests/expected_skipinit.txt b/tests/auto/testlib/selftests/expected_skipinit.txt index a86060fa5af..dcd0322e9d4 100644 --- a/tests/auto/testlib/selftests/expected_skipinit.txt +++ b/tests/auto/testlib/selftests/expected_skipinit.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_SkipInit ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ SKIP : tst_SkipInit::initTestCase() Skip inside initTestCase. This should skip all tests in the class. Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinit/tst_skipinit.cpp(55)] PASS : tst_SkipInit::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_skipinitdata.txt b/tests/auto/testlib/selftests/expected_skipinitdata.txt index a4cbbea194c..1010f97689b 100644 --- a/tests/auto/testlib/selftests/expected_skipinitdata.txt +++ b/tests/auto/testlib/selftests/expected_skipinitdata.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_SkipInitData ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ SKIP : tst_SkipInitData::initTestCase() Skip inside initTestCase_data. This should skip all tests in the class. Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/skipinitdata/tst_skipinitdata.cpp(56)] Totals: 0 passed, 0 failed, 1 skipped diff --git a/tests/auto/testlib/selftests/expected_sleep.txt b/tests/auto/testlib/selftests/expected_sleep.txt index 70df6743a8e..f007cbdd0e0 100644 --- a/tests/auto/testlib/selftests/expected_sleep.txt +++ b/tests/auto/testlib/selftests/expected_sleep.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Sleep ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Sleep::initTestCase() PASS : tst_Sleep::sleep() PASS : tst_Sleep::cleanupTestCase() diff --git a/tests/auto/testlib/selftests/expected_strcmp.txt b/tests/auto/testlib/selftests/expected_strcmp.txt index 804d6b92659..797aefa82fe 100644 --- a/tests/auto/testlib/selftests/expected_strcmp.txt +++ b/tests/auto/testlib/selftests/expected_strcmp.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_StrCmp ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_StrCmp::initTestCase() PASS : tst_StrCmp::compareCharStars() XFAIL : tst_StrCmp::compareByteArray() Next test should fail diff --git a/tests/auto/testlib/selftests/expected_subtest.txt b/tests/auto/testlib/selftests/expected_subtest.txt index 940eb167fa8..4537f983e56 100644 --- a/tests/auto/testlib/selftests/expected_subtest.txt +++ b/tests/auto/testlib/selftests/expected_subtest.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Subtest ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ QDEBUG : tst_Subtest::initTestCase() initTestCase initTestCase (null) PASS : tst_Subtest::initTestCase() QDEBUG : tst_Subtest::test1() init test1 (null) diff --git a/tests/auto/testlib/selftests/expected_verbose1.txt b/tests/auto/testlib/selftests/expected_verbose1.txt index 0286f719aa5..4ba42c1c8e8 100644 --- a/tests/auto/testlib/selftests/expected_verbose1.txt +++ b/tests/auto/testlib/selftests/expected_verbose1.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Counting ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ INFO : tst_Counting::initTestCase() entering PASS : tst_Counting::initTestCase() INFO : tst_Counting::testPassPass() entering diff --git a/tests/auto/testlib/selftests/expected_verbose2.txt b/tests/auto/testlib/selftests/expected_verbose2.txt index 34957f4ae76..e9c7838f6d2 100644 --- a/tests/auto/testlib/selftests/expected_verbose2.txt +++ b/tests/auto/testlib/selftests/expected_verbose2.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Counting ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ INFO : tst_Counting::initTestCase() entering PASS : tst_Counting::initTestCase() INFO : tst_Counting::testPassPass() entering diff --git a/tests/auto/testlib/selftests/expected_warnings.txt b/tests/auto/testlib/selftests/expected_warnings.txt index 6196ec0261b..d8064651b0c 100644 --- a/tests/auto/testlib/selftests/expected_warnings.txt +++ b/tests/auto/testlib/selftests/expected_warnings.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Warnings ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Warnings::initTestCase() QWARN : tst_Warnings::testWarnings() Warning QWARN : tst_Warnings::testWarnings() Warning diff --git a/tests/auto/testlib/selftests/expected_xunit.txt b/tests/auto/testlib/selftests/expected_xunit.txt index 88e29495805..722db18de41 100644 --- a/tests/auto/testlib/selftests/expected_xunit.txt +++ b/tests/auto/testlib/selftests/expected_xunit.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Xunit ********* -Config: Using QTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ +Config: Using QtTest library @INSERT_QT_VERSION_HERE@, Qt @INSERT_QT_VERSION_HERE@ PASS : tst_Xunit::initTestCase() WARNING: tst_Xunit::testFunc1() just a QWARN() ! Loc: [/home/user/dev/qt5/qtbase/tests/auto/testlib/selftests/xunit/tst_xunit.cpp(67)] From 3194df547e024f21d5b2f1bf642ce92a08a7a1d0 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 24 May 2013 10:25:49 +0200 Subject: [PATCH 16/60] Doc: Removed pages from "technology-apis" group. "technology-apis" doesn't serve a purpose anymore and its product function is replaced by the new overviews on the landing page. Change-Id: I1e959981fd163966a54bec0d697bed12007c39e6 Reviewed-by: Geir Vattekar --- src/concurrent/doc/src/qtconcurrent-module.qdoc | 2 -- src/corelib/doc/src/containers.qdoc | 1 - src/dbus/doc/src/qtdbus-index.qdoc | 1 - src/dbus/doc/src/qtdbus-module.qdoc | 1 - src/opengl/doc/src/qtopengl-module.qdoc | 3 --- src/printsupport/doc/src/qtprintsupport-index.qdoc | 1 - src/printsupport/doc/src/qtprintsupport-module.qdoc | 1 - src/widgets/doc/src/gestures.qdoc | 1 - src/xml/doc/src/qtxml.qdoc | 1 - src/xml/doc/src/xml-processing.qdoc | 1 - 10 files changed, 13 deletions(-) diff --git a/src/concurrent/doc/src/qtconcurrent-module.qdoc b/src/concurrent/doc/src/qtconcurrent-module.qdoc index 2144c2661ae..b8d89cbde3c 100644 --- a/src/concurrent/doc/src/qtconcurrent-module.qdoc +++ b/src/concurrent/doc/src/qtconcurrent-module.qdoc @@ -31,9 +31,7 @@ \brief The Qt Concurrent module contains functionality to support concurrent execution of program code \ingroup modules - \ingroup technology-apis The Qt Concurrent module extends the basic threading support found in \l{Qt Core} module and simplifies the development of code that can be executed in parallel on all available CPU cores. */ - diff --git a/src/corelib/doc/src/containers.qdoc b/src/corelib/doc/src/containers.qdoc index 30d86eac630..fc23a9967cf 100644 --- a/src/corelib/doc/src/containers.qdoc +++ b/src/corelib/doc/src/containers.qdoc @@ -28,7 +28,6 @@ /*! \page containers.html \title Container Classes - \ingroup technology-apis \ingroup groups \ingroup qt-basic-concepts \keyword container class diff --git a/src/dbus/doc/src/qtdbus-index.qdoc b/src/dbus/doc/src/qtdbus-index.qdoc index 261183cb96c..b7c2ddbc92f 100644 --- a/src/dbus/doc/src/qtdbus-index.qdoc +++ b/src/dbus/doc/src/qtdbus-index.qdoc @@ -31,7 +31,6 @@ \brief An introduction to Inter-Process Communication and Remote Procedure Calling with D-Bus. \keyword QtDBus - \ingroup technology-apis \section1 Introduction diff --git a/src/dbus/doc/src/qtdbus-module.qdoc b/src/dbus/doc/src/qtdbus-module.qdoc index 12fc864e16c..fe3b11b926f 100644 --- a/src/dbus/doc/src/qtdbus-module.qdoc +++ b/src/dbus/doc/src/qtdbus-module.qdoc @@ -32,7 +32,6 @@ to perform Inter-Process Communication using the \l{D-Bus} protocol. \ingroup modules - \ingroup technology-apis \target The QDBus compiler diff --git a/src/opengl/doc/src/qtopengl-module.qdoc b/src/opengl/doc/src/qtopengl-module.qdoc index 9c15a544280..901766ae46f 100644 --- a/src/opengl/doc/src/qtopengl-module.qdoc +++ b/src/opengl/doc/src/qtopengl-module.qdoc @@ -29,7 +29,6 @@ \module QtOpenGL \title Qt OpenGL C++ Classes \ingroup modules - \ingroup technology-apis \brief The Qt OpenGL module offers classes that make it easy to use OpenGL in Qt applications. @@ -70,5 +69,3 @@ OpenGL module can take advantage of the whole Qt API for non-OpenGL-specific GUI functionality. */ - - diff --git a/src/printsupport/doc/src/qtprintsupport-index.qdoc b/src/printsupport/doc/src/qtprintsupport-index.qdoc index 243468e5fbd..0d015666b54 100644 --- a/src/printsupport/doc/src/qtprintsupport-index.qdoc +++ b/src/printsupport/doc/src/qtprintsupport-index.qdoc @@ -30,7 +30,6 @@ \title Qt Print Support \brief A guide to producing printed output with Qt's paint system and widgets. \ingroup qt-graphics - \ingroup technology-apis Qt provides extensive cross-platform support for printing. Using the printing diff --git a/src/printsupport/doc/src/qtprintsupport-module.qdoc b/src/printsupport/doc/src/qtprintsupport-module.qdoc index 477b9a70972..aaff476bc54 100644 --- a/src/printsupport/doc/src/qtprintsupport-module.qdoc +++ b/src/printsupport/doc/src/qtprintsupport-module.qdoc @@ -31,7 +31,6 @@ \brief The Qt PrintSupport module provides classes to make printing easier and portable. \ingroup modules - \ingroup technology-apis To include the definitions of the module's classes, use the following directive: diff --git a/src/widgets/doc/src/gestures.qdoc b/src/widgets/doc/src/gestures.qdoc index 027f893db2c..ed7e78ec5a4 100644 --- a/src/widgets/doc/src/gestures.qdoc +++ b/src/widgets/doc/src/gestures.qdoc @@ -29,7 +29,6 @@ \page gestures-overview.html \title Gestures in Widgets and Graphics View \startpage index.html Qt Reference Documentation - \ingroup technology-apis \ingroup qt-gui-concepts \brief An overview of Qt support for Gesture programming diff --git a/src/xml/doc/src/qtxml.qdoc b/src/xml/doc/src/qtxml.qdoc index 1647630d6d8..5ffa0f73300 100644 --- a/src/xml/doc/src/qtxml.qdoc +++ b/src/xml/doc/src/qtxml.qdoc @@ -29,7 +29,6 @@ \module QtXml \title Qt XML C++ Classes \ingroup modules - \ingroup technology-apis \brief The Qt XML module provides C++ implementations of the SAX and DOM standards for XML. diff --git a/src/xml/doc/src/xml-processing.qdoc b/src/xml/doc/src/xml-processing.qdoc index a1487a8c9e8..c7c3edeeb0c 100644 --- a/src/xml/doc/src/xml-processing.qdoc +++ b/src/xml/doc/src/xml-processing.qdoc @@ -39,7 +39,6 @@ /*! \page xml-processing.html \title XML Processing - \ingroup technology-apis \brief An Overview of the XML processing facilities in Qt. From c9e1c947d40c259b0fcd28fcfd85b001ee7c5b69 Mon Sep 17 00:00:00 2001 From: Bjoern Breitmeyer Date: Mon, 13 May 2013 18:13:20 +0200 Subject: [PATCH 17/60] Disabled test on WINCE. The winapi call used to load the icon does not support the arguments on windows ce Change-Id: Ia600eb9b05d5eb40778d8c281e6ce8278bfd7177 Reviewed-by: Friedemann Kleint --- tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 531ec68fdc8..cb5d8362911 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -1005,6 +1005,7 @@ void tst_QPixmap::fromWinHICON_data() void tst_QPixmap::fromWinHICON() { +#ifndef Q_OS_WINCE QFETCH(int, width); QFETCH(int, height); QFETCH(QString, image); @@ -1020,6 +1021,7 @@ void tst_QPixmap::fromWinHICON() // between QImage::Format_ARGB32 and QImage::Format_ARGB32_Premultiplied, or elsewhere QVERIFY(compareImages(imageFromHICON, imageFromFile)); +#endif // Q_OS_WINCE } #endif // Q_OS_WIN From cf366e8b862a616efd7c3d4683d59971f795d476 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Fri, 24 May 2013 17:55:21 +0200 Subject: [PATCH 18/60] Made sure items with preferred width of 0 could also stretch If no stretch factors were specified, we used the preferred size as a stretch factor. Obviously, that didn't work if the preferred size was actually 0. This patch works around this by actually setting the stretch factor to 1.0 if this is the case. This should work fine in most cases, except for the case where there are also other items with a preferred size close to 0. In this case, the item with preferred size 0 will just grow faster than an item with e.g. preferred size 0.1. Task-number: QTBUG-31217 Change-Id: I966455da0bdd00308591c7f7cfbc4e134d423e57 Reviewed-by: Paul Olav Tvete --- src/widgets/graphicsview/qgridlayoutengine.cpp | 2 +- .../qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/widgets/graphicsview/qgridlayoutengine.cpp b/src/widgets/graphicsview/qgridlayoutengine.cpp index b80612bc474..4f43a0a4ac1 100644 --- a/src/widgets/graphicsview/qgridlayoutengine.cpp +++ b/src/widgets/graphicsview/qgridlayoutengine.cpp @@ -291,7 +291,7 @@ void QGridLayoutRowData::calculateGeometries(int start, int end, qreal targetSiz int stretch = stretches[start + i]; if (sumStretches == 0) { - if (hasIgnoreFlag) { + if (hasIgnoreFlag || sizes[i] == 0.0) { factors[i] = (stretch < 0) ? 1.0 : 0.0; } else { factors[i] = (stretch < 0) ? sizes[i] : 0.0; diff --git a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp index 41e5ed466c1..8c8f27d635f 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp +++ b/tests/auto/widgets/graphicsview/qgraphicsgridlayout/tst_qgraphicsgridlayout.cpp @@ -1884,6 +1884,18 @@ void tst_QGraphicsGridLayout::defaultStretchFactors_data() << QSizeF(10,10) << QSizeF(10,10) << QSizeF(10,10) ); + QTest::newRow("preferredsizeIsZero") << (ItemList() + << ItemDesc(0,0) + .preferredSizeHint(QSizeF(0,10)) + << ItemDesc(0,1) + .preferredSizeHint(QSizeF(10,10)) + .maxSize(QSizeF(20, 10)) + ) + << QSizeF(30, 10) + << (SizeList() + << QSizeF(10,10) << QSizeF(20,10) + ); + QTest::newRow("ignoreitem01") << (ItemList() << ItemDesc(0,0) .preferredSizeHint(QSizeF(10,10)) From 60768a0af9f8773a46990e40051ac692521af055 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 27 May 2013 13:41:15 +0200 Subject: [PATCH 19/60] Windows: Respect geometry set before native window creation Task-number: QTBUG-31071 Change-Id: Idab21c5996d1dc31b0a6fab4960c3c48a50d4966 Reviewed-by: Friedemann Kleint Reviewed-by: Shawn Rutledge --- src/plugins/platforms/windows/qwindowswindow.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 73c78f00903..8ce6dcc9e77 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -503,10 +503,14 @@ QWindowsWindow::WindowData const QWindowCreationContextPtr context(new QWindowCreationContext(w, rect, data.customMargins, style, exStyle)); QWindowsContext::instance()->setWindowCreationContext(context); - if (context->frameX < 0) - context->frameX = 0; - if (context->frameY < 0) - context->frameY = 0; + QRect screenGeometry; + if (QScreen *screen = w->screen()) + screenGeometry = screen->availableVirtualGeometry(); + + if (context->frameX < screenGeometry.left()) + context->frameX = screenGeometry.left(); + if (context->frameY < screenGeometry.top()) + context->frameY = screenGeometry.top(); if (QWindowsContext::verboseWindows) qDebug().nospace() From 130ee40b5e29267ad4c58280d700e1c72569ba12 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 23 May 2013 14:17:27 +0200 Subject: [PATCH 20/60] iOS: take orientation into account when reporting touch positions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This implementation will look at the orientation of the main screen to convert the touch coordinates. This will most likely change in future work, where we might look at a views view controller instead to decide orientation etc. Change-Id: Ic7875c5ecc4f21538f82a4f0467350bdf8ecc0b0 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioswindow.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm index 13815a22bf8..0c3ae8e8341 100644 --- a/src/plugins/platforms/ios/qioswindow.mm +++ b/src/plugins/platforms/ios/qioswindow.mm @@ -150,7 +150,8 @@ - (void)updateTouchList:(NSSet *)touches withState:(Qt::TouchPointState)state { - QRect applicationRect = fromCGRect(self.window.screen.applicationFrame); + QPlatformScreen *screen = QGuiApplication::primaryScreen()->handle(); + QRect applicationRect = fromPortraitToPrimary(fromCGRect(self.window.screen.applicationFrame), screen); foreach (UITouch *uiTouch, m_activeTouches.keys()) { QWindowSystemInterface::TouchPoint &touchPoint = m_activeTouches[uiTouch]; @@ -163,8 +164,10 @@ // Find the touch position relative to the window. Then calculate the screen // position by subtracting the position of the applicationRect (since UIWindow // does not take that into account when reporting its own frame): - QPoint touchPos = fromCGPoint([uiTouch locationInView:nil]); - touchPoint.area = QRectF(touchPos - applicationRect.topLeft(), QSize(0, 0)); + QRect touchInWindow = QRect(fromCGPoint([uiTouch locationInView:nil]), QSize(0, 0)); + QRect touchInScreen = fromPortraitToPrimary(touchInWindow, screen); + QPoint touchPos = touchInScreen.topLeft() - applicationRect.topLeft(); + touchPoint.area = QRectF(touchPos, QSize(0, 0)); touchPoint.normalPosition = QPointF(touchPos.x() / applicationRect.width(), touchPos.y() / applicationRect.height()); } } From 991b817e7521d56862f42aad78568368e16f0f48 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 27 May 2013 13:56:59 +0200 Subject: [PATCH 21/60] Avoid double-highdpi scaling for attached painters. updateMatrix will us both redirection matrix and highdpi scale matrix, so make sure we don't multiply it in twice. Change-Id: I7394e504746a8de54b4dc79492264deba320538f Reviewed-by: Richard Moe Gustavsen --- src/gui/painting/qpainter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index d950c4e45f3..cfb9d71f5c8 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -293,6 +293,7 @@ bool QPainterPrivate::attachPainterPrivate(QPainter *q, QPaintDevice *pdev) // Update matrix. if (q->d_ptr->state->WxF) { q->d_ptr->state->redirectionMatrix = q->d_ptr->state->matrix; + q->d_ptr->state->redirectionMatrix *= q->d_ptr->hidpiScaleTransform().inverted(); q->d_ptr->state->redirectionMatrix.translate(-offset.x(), -offset.y()); q->d_ptr->state->worldMatrix = QTransform(); q->d_ptr->state->WxF = false; From 9fdb9b269b65b56ac87b938e49053a6549a9ca92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 15 May 2013 13:52:07 +0200 Subject: [PATCH 22/60] iOS: Use right DPI for all iPad Minis, not just the WiFi version The 3G versions are iPad2,6 and iPad2,7. Change-Id: I43a00e84535d494550bca8a533a6d16af4be6722 Reviewed-by: Ian Dean Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/ios/qiosscreen.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index c1613c1af4c..106cf1a9781 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -136,7 +136,7 @@ QIOSScreen::QIOSScreen(unsigned int screenIndex) int unscaledDpi = 163; // Regular iPhone DPI if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad - && deviceIdentifier != QStringLiteral("iPad2,5") /* iPad Mini */) { + && !deviceIdentifier.contains(QRegularExpression("^iPad2,[567]$")) /* excluding iPad Mini */) { unscaledDpi = 132; }; From 7f1ad7c7c95ba37c172fa5819b2ba4f78bb3ceb6 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Fri, 24 May 2013 13:51:01 +0200 Subject: [PATCH 23/60] Fix transparent toplevels on Mac OS X again.. We're using QWindow::format() to decide opacity or not in a few places, but this used to resolve to QPlatformFormat::format() which would in turn return a default format without alpha set. Instead, return the format requested by the user. Masked windows were always broken as converting a 32-bit image to an Indexed8, doesn't give a grayscale image, but rather a randomly spreadout set of indices based on the colortable generated by the converToFormat function. Task-number: QTBUG-28531 Change-Id: I537288f85c70b1e6194785b9ebcb5ea1f9581cee Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qcocoawindow.h | 1 + src/plugins/platforms/cocoa/qcocoawindow.mm | 5 +++++ src/plugins/platforms/cocoa/qnsview.mm | 19 ++++++++++++------- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h index 60f448044e7..91eaea21b67 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.h +++ b/src/plugins/platforms/cocoa/qcocoawindow.h @@ -118,6 +118,7 @@ public: bool setKeyboardGrabEnabled(bool grab); bool setMouseGrabEnabled(bool grab); QMargins frameMargins() const; + QSurfaceFormat format() const; void requestActivateWindow(); diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index c8ef967f200..0dec048a9db 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -253,6 +253,11 @@ QCocoaWindow::~QCocoaWindow() [m_nsWindowDelegate release]; } +QSurfaceFormat QCocoaWindow::format() const +{ + return window()->requestedFormat(); +} + void QCocoaWindow::setGeometry(const QRect &rect) { if (geometry() == rect) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 0916a1faa81..ee6a9616a6d 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -340,15 +340,20 @@ static QTouchDevice *touchDevice = 0; } const QRect &rect = region->boundingRect(); - QImage maskImage(rect.size(), QImage::Format_RGB888); - maskImage.fill(Qt::white); - QPainter p(&maskImage); - p.setRenderHint(QPainter::Antialiasing); + QImage tmp(rect.size(), QImage::Format_RGB32); + tmp.fill(Qt::white); + QPainter p(&tmp); p.setClipRegion(*region); - p.fillRect(rect, QBrush(Qt::black)); + p.fillRect(rect, Qt::black); p.end(); - - maskImage = maskImage.convertToFormat(QImage::Format_Indexed8); + QImage maskImage = QImage(rect.size(), QImage::Format_Indexed8); + for (int y=0; y Date: Thu, 23 May 2013 14:24:50 +0200 Subject: [PATCH 24/60] iOS: bugfix function portraitToPrimary() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The old implementation was wrong since it did not use the screen's height (which was already in primary orientation) to calculate what the new y value of the target rect (which was in portrait) should be. Change-Id: Ie5b2241119e244d099e06d85f69953c1d64979aa Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosglobal.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/qiosglobal.mm b/src/plugins/platforms/ios/qiosglobal.mm index 9abb4ba851d..537d63ae777 100644 --- a/src/plugins/platforms/ios/qiosglobal.mm +++ b/src/plugins/platforms/ios/qiosglobal.mm @@ -142,7 +142,7 @@ QRect fromPortraitToPrimary(const QRect &rect, QPlatformScreen *screen) // aligned with UIScreen into whatever is the current orientation of QScreen. QRect geometry = screen->geometry(); return geometry.width() < geometry.height() ? rect - : QRect(rect.y(), geometry.width() - rect.width() - rect.x(), rect.height(), rect.width()); + : QRect(rect.y(), geometry.height() - rect.width() - rect.x(), rect.height(), rect.width()); } QT_END_NAMESPACE From 680b6b2192480f908f967927f9c54b56cce6c6cc Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 28 May 2013 09:10:39 +0200 Subject: [PATCH 25/60] Android: Compile jar file on Windows Due to the way the DEX_CMD is formatted on Windows this would break every time. Since we actually bundle dx.bat in the repository, there's no need to check for its existence, so the easy fix is just to move the existence check into the code path where it's run from the SDK. Task-number: QTBUG-31405 Change-Id: If1aeb744d3abbd2488153b13aac401436965074e Reviewed-by: Oswald Buddenhagen Reviewed-by: Ray Donnelly --- mkspecs/features/java.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/java.prf b/mkspecs/features/java.prf index 7360103757b..411a839ad89 100644 --- a/mkspecs/features/java.prf +++ b/mkspecs/features/java.prf @@ -62,8 +62,8 @@ android:!bundled_jar_file { } else { DEX_CMD = $$SDK_ROOT/platform-tools/dx !exists($$DEX_CMD): DEX_CMD = $$SDK_ROOT/build-tools/$$BUILD_TOOLS_REVISION/dx + !exists($$DEX_CMD): error("The path $$DEX_CMD does not exist. Please set the environment variable ANDROID_BUILD_TOOLS_REVISION to the revision of the build tools installed in your Android SDK.") } - !exists($$DEX_CMD): error("The path $$DEX_CMD does not exist. Please set the environment variable ANDROID_BUILD_TOOLS_REVISION to the revision of the build tools installed in your Android SDK.") QMAKE_LINK_SHLIB_CMD = $$DEX_CMD --dex --output $(TARGET) $$CLASS_DIR } else { QMAKE_LINK_SHLIB_CMD = jar cf $(TARGET) -C $$CLASS_DIR . From 85a6446164531ad400e1e2a62a42353c85571a2c Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 27 May 2013 19:56:12 +0200 Subject: [PATCH 26/60] Cocoa: Use actual modifiers when sending ShortcutOverride event Probably a typo since keyCode clearly has no modifiers encoded. Change-Id: I1c7908b06a759baf7b2c3462861a5d61f8c52b9f Reviewed-by: Frederik Gladhorn --- src/plugins/platforms/cocoa/qcocoamenu.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/cocoa/qcocoamenu.mm b/src/plugins/platforms/cocoa/qcocoamenu.mm index 18e17a340d3..25ece7349c7 100644 --- a/src/plugins/platforms/cocoa/qcocoamenu.mm +++ b/src/plugins/platforms/cocoa/qcocoamenu.mm @@ -177,7 +177,7 @@ static inline QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *getMenuLoader() } QKeyEvent accel_ev(QEvent::ShortcutOverride, (keyCode & (~Qt::KeyboardModifierMask)), - Qt::KeyboardModifiers(keyCode & Qt::KeyboardModifierMask)); + Qt::KeyboardModifiers(modifiers & Qt::KeyboardModifierMask)); accel_ev.ignore(); QCoreApplication::sendEvent(object, &accel_ev); if (accel_ev.isAccepted()) { From 81e981a704116ca7b1b619a2c1e8db837046d2cf Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 28 May 2013 10:17:32 +0200 Subject: [PATCH 27/60] Fix QPlatformWindow::initialGeometry() to not touch large windows. Do not touch windows whose geometry (including the unknown frame size) is likely to be larger than the screen. Remove fix-up in the Windows plugin. Task-number: QTBUG-30142 Task-number: QTBUG-31071 Change-Id: I13a8ffb9fb9d8c71d35de75094275388fa427f2c Reviewed-by: Shawn Rutledge Reviewed-by: Gabriel de Dietrich --- src/gui/kernel/qplatformwindow.cpp | 24 ++++++++++++------- .../platforms/windows/qwindowswindow.cpp | 9 ------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/gui/kernel/qplatformwindow.cpp b/src/gui/kernel/qplatformwindow.cpp index d23cfde1723..4c0d68e7c15 100644 --- a/src/gui/kernel/qplatformwindow.cpp +++ b/src/gui/kernel/qplatformwindow.cpp @@ -510,15 +510,21 @@ QRect QPlatformWindow::initialGeometry(const QWindow *w, } } if (w->isTopLevel() && qt_window_private(const_cast(w))->positionAutomatic) { - const QWindow *tp = w->transientParent(); - if (tp) { - // A transient window should be centered w.r.t. its transient parent. - rect.moveCenter(tp->geometry().center()); - } else { - // Center the window on the screen. (Only applicable on platforms - // which do not provide a better way.) - QPlatformScreen *scr = QPlatformScreen::platformScreenForWindow(w); - rect.moveCenter(scr->availableGeometry().center()); + if (const QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(w)) { + const QRect availableGeometry = platformScreen->availableGeometry(); + // Center unless the geometry ( + unknown window frame) is too large for the screen). + if (rect.height() < (availableGeometry.height() * 8) / 9 + && rect.width() < (availableGeometry.width() * 8) / 9) { + const QWindow *tp = w->transientParent(); + if (tp) { + // A transient window should be centered w.r.t. its transient parent. + rect.moveCenter(tp->geometry().center()); + } else { + // Center the window on the screen. (Only applicable on platforms + // which do not provide a better way.) + rect.moveCenter(availableGeometry.center()); + } + } } } return rect; diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 8ce6dcc9e77..9d817c2043b 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -503,15 +503,6 @@ QWindowsWindow::WindowData const QWindowCreationContextPtr context(new QWindowCreationContext(w, rect, data.customMargins, style, exStyle)); QWindowsContext::instance()->setWindowCreationContext(context); - QRect screenGeometry; - if (QScreen *screen = w->screen()) - screenGeometry = screen->availableVirtualGeometry(); - - if (context->frameX < screenGeometry.left()) - context->frameX = screenGeometry.left(); - if (context->frameY < screenGeometry.top()) - context->frameY = screenGeometry.top(); - if (QWindowsContext::verboseWindows) qDebug().nospace() << "CreateWindowEx: " << w << *this From 72768c089a431eafcc816413c247c8b8d896fdce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 28 May 2013 15:43:05 +0200 Subject: [PATCH 28/60] Fixed crashes in QGLTextureDestroyer. QGLTextureDestroyer will try to make the context current on the GUI thread, regardless of whether it is owned by another thread. Use QOpenGLSharedResourceGuard instead which does the right thing and takes shared contexts into account. Task-number: QTBUG-31403 Change-Id: I1377f9284995a7ba5af32c85296eef152fc035c8 Reviewed-by: Gunnar Sletta --- src/opengl/qgl.cpp | 5 +---- src/opengl/qgl_p.h | 21 ++++++--------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 72c6e035d93..3f496a4ffc6 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1579,10 +1579,7 @@ QGLContextPrivate::QGLContextPrivate(QGLContext *context) { group = new QGLContextGroup(context); - if (qApp) { - texture_destroyer = new QGLTextureDestroyer; - texture_destroyer->moveToThread(qApp->thread()); - } + texture_destroyer = new QGLTextureDestroyer; } QGLContextPrivate::~QGLContextPrivate() diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index ff9baf89716..484c3ea2d98 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -335,25 +335,16 @@ QT_END_NAMESPACE Q_DECLARE_METATYPE(GLuint) QT_BEGIN_NAMESPACE -class Q_OPENGL_EXPORT QGLTextureDestroyer : public QObject +class Q_OPENGL_EXPORT QGLTextureDestroyer { - Q_OBJECT public: - QGLTextureDestroyer() : QObject() { - connect(this, SIGNAL(freeTexture(QGLContext *, QPlatformPixmap *, quint32)), - this, SLOT(freeTexture_slot(QGLContext *, QPlatformPixmap *, quint32))); - } - void emitFreeTexture(QGLContext *context, QPlatformPixmap *boundPixmap, GLuint id) { - emit freeTexture(context, boundPixmap, id); + void emitFreeTexture(QGLContext *context, QPlatformPixmap *, GLuint id) { + if (context->contextHandle()) + (new QOpenGLSharedResourceGuard(context->contextHandle(), id, freeTextureFunc))->free(); } -Q_SIGNALS: - void freeTexture(QGLContext *context, QPlatformPixmap *boundPixmap, quint32 id); - -private slots: - void freeTexture_slot(QGLContext *context, QPlatformPixmap *boundPixmap, quint32 id) { - Q_UNUSED(boundPixmap); - QGLShareContextScope scope(context); +private: + static void freeTextureFunc(QOpenGLFunctions *, GLuint id) { glDeleteTextures(1, &id); } }; From 89f219da0c720c326c4c3aa696141e368832ee43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 28 May 2013 09:42:52 +0200 Subject: [PATCH 29/60] Disable "QBackingStore::flush() called with non-exposed window" warning This warning is pretty annoying and doesn't necessarily imply that an application is not working properly. Task-number: QTBUG-28613 Change-Id: Id0a2ebd91f9e4d59dce3e3e29637988d8e6175a9 Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta --- src/gui/painting/qbackingstore.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp index cd3f935c5b2..edb5f66c5b5 100644 --- a/src/gui/painting/qbackingstore.cpp +++ b/src/gui/painting/qbackingstore.cpp @@ -98,10 +98,12 @@ void QBackingStore::flush(const QRegion ®ion, QWindow *win, const QPoint &off if (!win) win = window(); +#ifdef QBACKINGSTORE_DEBUG if (win && win->isTopLevel() && !qt_window_private(win)->receivedExpose) { qWarning().nospace() << "QBackingStore::flush() called with non-exposed window " << win << ", behavior is undefined"; } +#endif d_ptr->platformBackingStore->flush(win, region, offset); } From 78511a8afcd6ef313cd509ac2747da48eaf0a648 Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Tue, 28 May 2013 13:40:22 +0200 Subject: [PATCH 30/60] Bump Qt version to 5.1.1 Change-Id: Id5e2e1c69f09e43460e45d8ccf7a430f3052149b Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qglobal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 79e32fe7938..4e63e5d0ba6 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -45,11 +45,11 @@ #include -#define QT_VERSION_STR "5.1.0" +#define QT_VERSION_STR "5.1.1" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x050100 +#define QT_VERSION 0x050101 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ From 8230a0d38dd055387e5c5ed21dbff22cf93f853e Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Mon, 27 May 2013 15:00:20 +0200 Subject: [PATCH 31/60] qdoc: QML property lists were not shown For grouped properties, the property list in the summary section was not shown owing to a bug introduced when implementing the abstract base class concept for QML types. This has now been fixed. Task-number: QTBUG-31317 Change-Id: Idc2344539ecf3da53e1be6816f59e01922c5c6fc Reviewed-by: Jerome Pasion --- src/tools/qdoc/codemarker.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/qdoc/codemarker.cpp b/src/tools/qdoc/codemarker.cpp index e39ff203a57..c7d9c5b339a 100644 --- a/src/tools/qdoc/codemarker.cpp +++ b/src/tools/qdoc/codemarker.cpp @@ -397,8 +397,11 @@ void CodeMarker::insert(FastSection &fastSection, bool irrelevant = false; bool inheritedMember = false; if (!node->relates()) { - if (node->parent() != fastSection.parent_) { // && !node->parent()->isAbstract()) { - if ((node->parent()->subType() != Node::QmlClass) || !node->parent()->isAbstract()) { + InnerNode* p = node->parent(); + if (p->subType() == Node::QmlPropertyGroup) + p = p->parent(); + if (p != fastSection.parent_) { // && !node->parent()->isAbstract()) { + if (p->subType() != Node::QmlClass || !p->isAbstract()) { //if (node->type() != Node::QmlProperty) { inheritedMember = true; } From a4fdd382e4a03e224a19c03c0a5b1d7e889842ff Mon Sep 17 00:00:00 2001 From: Martin Smith Date: Tue, 28 May 2013 12:13:08 +0200 Subject: [PATCH 32/60] qdoc: "All Overview and HOWTOs" no longer lists internal pages This page is generated by a function in qdoc that was wwrriten especially for this page. It wasn't checking to see of the group member pages were marked with \internal. Now it does. Task-number: QTBUG-31197 Change-Id: If3f0e90f1a3748c47b3975373047b04d011d6748 Reviewed-by: Jerome Pasion --- src/tools/qdoc/ditaxmlgenerator.cpp | 4 ++-- src/tools/qdoc/htmlgenerator.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp index eea1845e177..dd87e889bfd 100644 --- a/src/tools/qdoc/ditaxmlgenerator.cpp +++ b/src/tools/qdoc/ditaxmlgenerator.cpp @@ -3138,7 +3138,7 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative) // If we encounter a group definition page, we add all // the pages in that group to the list for that group. foreach (Node* member, docNode->members()) { - if (member->type() != Node::Document) + if (member->isInternal() || member->type() != Node::Document) continue; DocNode* page = static_cast(member); if (page) { @@ -3155,7 +3155,7 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative) // If we encounter a page that belongs to a group then // we add that page to the list for that group. const DocNode* gn = qdb_->getGroup(group); - if (gn) + if (gn && !docNode->isInternal()) docNodeMap[gn].insert(sortKey, docNode); } } diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 2dc4c1e6c62..7e1467f300a 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -2644,7 +2644,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative) // If we encounter a group definition page, we add all // the pages in that group to the list for that group. foreach (Node *member, docNode->members()) { - if (member->type() != Node::Document) + if (member->isInternal() || member->type() != Node::Document) continue; DocNode *page = static_cast(member); if (page) { @@ -2661,7 +2661,7 @@ void HtmlGenerator::generateOverviewList(const Node *relative) // If we encounter a page that belongs to a group then // we add that page to the list for that group. const DocNode* gn = qdb_->getGroup(group); - if (gn) + if (gn && !docNode->isInternal()) docNodeMap[gn].insert(sortKey, docNode); } } From 1faafdbe4a9ef79c9afec8d9a5e8c126a1384d9a Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 28 May 2013 16:09:59 +0200 Subject: [PATCH 33/60] Cocoa: Hide empty menus from the menubar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-31378 Change-Id: I33ab2979a26166fb07e836c85dfc8089af5e1fda Reviewed-by: Tor Arne Vestbø Reviewed-by: Shawn Rutledge --- src/plugins/platforms/cocoa/qcocoamenubar.mm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.mm b/src/plugins/platforms/cocoa/qcocoamenubar.mm index b112e405491..e280cf45816 100644 --- a/src/plugins/platforms/cocoa/qcocoamenubar.mm +++ b/src/plugins/platforms/cocoa/qcocoamenubar.mm @@ -136,6 +136,17 @@ void QCocoaMenuBar::syncMenu(QPlatformMenu *menu) QCocoaMenu *cocoaMenu = static_cast(menu); Q_FOREACH (QCocoaMenuItem *item, cocoaMenu->items()) cocoaMenu->syncMenuItem(item); + + // If the NSMenu has no visble items, or only separators, we should hide it + // on the menubar. This can happen after syncing the menu items since they + // can be moved to other menus. + BOOL shouldHide = YES; + for (NSMenuItem *item in [cocoaMenu->nsMenu() itemArray]) + if (![item isSeparatorItem] && ![item isHidden]) { + shouldHide = NO; + break; + } + [cocoaMenu->nsMenuItem() setHidden:shouldHide]; } void QCocoaMenuBar::handleReparent(QWindow *newParentWindow) From a09a867de081b4e335ce36b7377ce33abcd3e142 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 28 May 2013 16:10:52 +0200 Subject: [PATCH 34/60] Cocoa: Allow delayed title setting in menu items MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is what happens in uic generated code. Therefore, we should not mark an item as text-synced until it's got its text set. Task-number: QTBUG-31378 Change-Id: I7bb7db8abad922b50546c7669d285369ebf01394 Reviewed-by: Friedemann Kleint Reviewed-by: Tor Arne Vestbø Reviewed-by: Shawn Rutledge --- src/plugins/platforms/cocoa/qcocoamenuitem.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoamenuitem.mm b/src/plugins/platforms/cocoa/qcocoamenuitem.mm index 1255f75eb7f..1e2b593a08e 100644 --- a/src/plugins/platforms/cocoa/qcocoamenuitem.mm +++ b/src/plugins/platforms/cocoa/qcocoamenuitem.mm @@ -241,7 +241,8 @@ NSMenuItem *QCocoaMenuItem::sync() mergeItem = [loader quitMenuItem]; break; default: - m_textSynced = true; + if (!m_text.isEmpty()) + m_textSynced = true; break; } break; @@ -264,7 +265,7 @@ NSMenuItem *QCocoaMenuItem::sync() m_native = nil; // create item below m_merged = false; } - } else { + } else if (!m_text.isEmpty()) { m_textSynced = true; // NoRole, and that was set explicitly. So, nothing to do anymore. } From 75cdce283f03fb26a34750bc075f62e8bc35232a Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 28 May 2013 18:18:29 +0200 Subject: [PATCH 35/60] QMenu: Remove last references to QMacWindowFader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was never ported to Qt 5, and 10.7 has simple API for that. Task-number: QTBUG-31336 Change-Id: Ie00c4ed3af9cd098c9e63eba1c654f1801aa83aa Reviewed-by: Tor Arne Vestbø Reviewed-by: Shawn Rutledge --- src/plugins/platforms/cocoa/qcocoawindow.mm | 3 ++ src/plugins/platforms/cocoa/qt_mac_p.h | 15 ---------- src/widgets/widgets/qmenu.cpp | 31 ++------------------- src/widgets/widgets/qmenu_p.h | 2 +- 4 files changed, 7 insertions(+), 44 deletions(-) diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 0dec048a9db..f8d0eafcb3b 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -823,6 +823,9 @@ NSWindow * QCocoaWindow::createNSWindow() if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) { // Make popup winows show on the same desktop as the parent full-screen window. [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary]; + + if ((type & Qt::Popup) == Qt::Popup) + [window setAnimationBehavior:NSWindowAnimationBehaviorUtilityWindow]; } #endif window->m_cocoaPlatformWindow = this; diff --git a/src/plugins/platforms/cocoa/qt_mac_p.h b/src/plugins/platforms/cocoa/qt_mac_p.h index 09064319865..808ca9194be 100644 --- a/src/plugins/platforms/cocoa/qt_mac_p.h +++ b/src/plugins/platforms/cocoa/qt_mac_p.h @@ -111,21 +111,6 @@ public: } }; -// Class for chaining to gether a bunch of fades. It pretty much is only used for qmenu fading. -class QMacWindowFader -{ - QWidgetList m_windowsToFade; - float m_duration; - Q_DISABLE_COPY(QMacWindowFader) -public: - QMacWindowFader(); // PLEASE DON'T CALL THIS. - static QMacWindowFader *currentFader(); - void registerWindowToFade(QWidget *window); - void setFadeDuration(float durationInSecs) { m_duration = durationInSecs; } - float fadeDuration() const { return m_duration; } - void performFade(); -}; - class Q_WIDGETS_EXPORT QMacCocoaAutoReleasePool { private: diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 33d2e01ed72..7c72c5c456e 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -420,25 +420,17 @@ void QMenuPrivate::hideUpToMenuBar() if (QMenu *m = qobject_cast(caused)) { caused = m->d_func()->causedPopup.widget; if (!m->d_func()->tornoff) - hideMenu(m, fadeMenus); + hideMenu(m); if (!fadeMenus) // Mac doesn't clear the action until after hidden. m->d_func()->setCurrentAction(0); } else { caused = 0; } } -#if defined(Q_WS_MAC) - if (fadeMenus) { - QEventLoop eventLoop; - QTimer::singleShot(int(MenuFadeTimeInSec * 1000), &eventLoop, SLOT(quit())); - QMacWindowFader::currentFader()->performFade(); - eventLoop.exec(); - } -#endif } setCurrentAction(0); } -void QMenuPrivate::hideMenu(QMenu *menu, bool justRegister) +void QMenuPrivate::hideMenu(QMenu *menu) { if (!menu) return; @@ -462,27 +454,10 @@ void QMenuPrivate::hideMenu(QMenu *menu, bool justRegister) eventLoop.exec(); } - // Fade out. - if (menu->style()->styleHint(QStyle::SH_Menu_FadeOutOnHide)) { - // ### Qt 4.4: - // Should be something like: q->transitionWindow(Qt::FadeOutTransition, MenuFadeTimeInSec); - // Hopefully we'll integrate qt/research/windowtransitions into main before 4.4. - // Talk to Richard, Trenton or Bjoern. -#if defined(Q_WS_MAC) - if (justRegister) { - QMacWindowFader::currentFader()->setFadeDuration(MenuFadeTimeInSec); - QMacWindowFader::currentFader()->registerWindowToFade(menu); - } else { - macWindowFade(qt_mac_window_for(menu), MenuFadeTimeInSec); - } - -#endif // Q_WS_MAC - } aboutToHide = false; menu->blockSignals(false); #endif // QT_NO_EFFECTS - if (!justRegister) - menu->close(); + menu->close(); } void QMenuPrivate::popupAction(QAction *action, int delay, bool activateFirst) diff --git a/src/widgets/widgets/qmenu_p.h b/src/widgets/widgets/qmenu_p.h index 15f3c92127f..71a3fca2371 100644 --- a/src/widgets/widgets/qmenu_p.h +++ b/src/widgets/widgets/qmenu_p.h @@ -189,7 +189,7 @@ public: virtual QList > calcCausedStack() const; QMenuCaused causedPopup; void hideUpToMenuBar(); - void hideMenu(QMenu *menu, bool justRegister = false); + void hideMenu(QMenu *menu); //index mappings inline QAction *actionAt(int i) const { return q_func()->actions().at(i); } From c3bec846ac89bb79fbdfa5e2bedb3495b0055b09 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 28 May 2013 21:40:01 +0200 Subject: [PATCH 36/60] remove bizarre perl detection magic the code makes no sense, and was added with the QNX port without comment. there is already a detection a few lines up. Change-Id: I18ec18604c37c7c42f2649a658dd22324d481dd3 Reviewed-by: Andreas Holzammer Reviewed-by: Harald Fernengel Reviewed-by: Rafael Roquetto --- configure | 6 ------ 1 file changed, 6 deletions(-) diff --git a/configure b/configure index d11a50554f2..079f2e7415c 100755 --- a/configure +++ b/configure @@ -2344,12 +2344,6 @@ for e in gawk nawk awk; do fi done -# find perl -PERL="/usr/bin/perl" -if "$WHICH" perl >/dev/null 2>&1 && ( perl /dev/null ) >/dev/null 2>&1; then - PERL=`$WHICH perl` -fi - ### skip this if the user just needs help... if [ "$OPT_HELP" != "yes" ]; then From 9943285e9fd33ced6fe0d2ea95be2a4662993b29 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 29 May 2013 09:38:56 +0200 Subject: [PATCH 37/60] fix license headers Change-Id: I10738f89cc0f8629adb787b2477d4170ff4d44e3 Reviewed-by: Oswald Buddenhagen --- qmake/generators/integrity/gbuild.cpp | 2 +- qmake/generators/integrity/gbuild.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qmake/generators/integrity/gbuild.cpp b/qmake/generators/integrity/gbuild.cpp index 2266a3c06dc..ace3558d7dc 100644 --- a/qmake/generators/integrity/gbuild.cpp +++ b/qmake/generators/integrity/gbuild.cpp @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the qmake application of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage diff --git a/qmake/generators/integrity/gbuild.h b/qmake/generators/integrity/gbuild.h index 234a2be9af6..e69d634abbe 100644 --- a/qmake/generators/integrity/gbuild.h +++ b/qmake/generators/integrity/gbuild.h @@ -3,7 +3,7 @@ ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** -** This file is part of the QtGui module of the Qt Toolkit. +** This file is part of the qmake application of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage From 9e2f8b5c345f6a9e140983a62725d64f4a1691cf Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 29 May 2013 13:41:31 +0200 Subject: [PATCH 38/60] remove pointless QString::arg call Change-Id: I6838e73c68a2d16ecb053f897e81b06d7186a166 Reviewed-by: Oswald Buddenhagen --- qmake/generators/xmloutput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp index 9cd0995a92b..80008cae8ce 100644 --- a/qmake/generators/xmloutput.cpp +++ b/qmake/generators/xmloutput.cpp @@ -183,7 +183,7 @@ XmlOutput& XmlOutput::operator<<(const xml_output& o) addRaw(QString("").arg(o.xo_text)); break; case tValueTag: - addRaw(QString("%1").arg(doConversion(o.xo_text))); + addRaw(doConversion(o.xo_text)); setFormat(NoNewLine); closeTag(); setFormat(NewLine); From 389b6f51613a2d34b132b3955e8595bc594a336a Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Tue, 28 May 2013 13:47:32 +0200 Subject: [PATCH 39/60] qdoc: Handle collision nodes when building index files Currently qdoc skips collision nodes (and their children) when reading index files. This means that cross-linking between modules does not work for nodes that are defined under a collision page node. Most notably, the QML global object 'Qt' cannot be linked to from outside Qml module as it collides with Qt namespace. This change fixes the issue by skipping collision nodes and only processing their children when writing index files. In addition, we need to adjust the function that searches for nodes to the possibility that there may be multiple nodes with the same name but different type. Task-number: QTBUG-31096 Change-Id: Ic71d714f85539d8537021c73d8f1a527006a6f23 Reviewed-by: Martin Smith --- src/tools/qdoc/node.cpp | 9 ++++++--- src/tools/qdoc/qdocindexfiles.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/tools/qdoc/node.cpp b/src/tools/qdoc/node.cpp index e627cf859e7..2184e302aed 100644 --- a/src/tools/qdoc/node.cpp +++ b/src/tools/qdoc/node.cpp @@ -862,9 +862,12 @@ Node* InnerNode::findChildNodeByNameAndType(const QString& name, Type type) if (type == Function) return primaryFunctionMap.value(name); else { - Node *node = childMap.value(name); - if (node && node->type() == type) - return node; + QList nodes = childMap.values(name); + for (int i=0; itype() == type) + return node; + } } return 0; } diff --git a/src/tools/qdoc/qdocindexfiles.cpp b/src/tools/qdoc/qdocindexfiles.cpp index daba2cc78a1..5f2ebdfd077 100644 --- a/src/tools/qdoc/qdocindexfiles.cpp +++ b/src/tools/qdoc/qdocindexfiles.cpp @@ -1183,8 +1183,13 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter& writer, It is just a place holder for a collection of QML property nodes. Recurse to its children, which are the QML property nodes. + + Do the same thing for collision nodes - we want children + of collision nodes in the index, but leaving out the + parent collision page will make searching for nodes easier. */ - if (child->subType() == Node::QmlPropertyGroup) { + if (child->subType() == Node::QmlPropertyGroup || + child->subType() == Node::Collision) { const InnerNode* pgn = static_cast(child); foreach (Node* c, pgn->childNodes()) { generateIndexSections(writer, c, generateInternalNodes); From aa1b4c0943187d82e0c313b93559e99226a9c75a Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 2 May 2013 17:04:08 +0200 Subject: [PATCH 40/60] Disable precision timers when running MSVC2012 code on pre-Windows 8. Precision timers can cause the event loop to lock up when running MSVC2012 code on pre-Windows 8. Task-number: QTBUG-27266 Change-Id: Idd73731e82843d0d140859bab825bc1a54eccf1a Reviewed-by: Gunnar Sletta --- src/corelib/kernel/qeventdispatcher_win.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp index ae291f13cd9..d1bd8fbe958 100644 --- a/src/corelib/kernel/qeventdispatcher_win.cpp +++ b/src/corelib/kernel/qeventdispatcher_win.cpp @@ -52,6 +52,8 @@ #include "qelapsedtimer.h" #include "qcoreapplication_p.h" +#include "qsysinfo.h" + #include #include @@ -305,8 +307,14 @@ static void resolveTimerAPI() #endif triedResolve = true; #if !defined(Q_OS_WINCE) +# if defined(_MSC_VER) && _MSC_VER >= 1700 + if (QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS8) { // QTBUG-27266, Disable when running MSVC2012-built code on pre-Windows 8 +# else + { +# endif qtimeSetEvent = (ptimeSetEvent)QSystemLibrary::resolve(QLatin1String("winmm"), "timeSetEvent"); qtimeKillEvent = (ptimeKillEvent)QSystemLibrary::resolve(QLatin1String("winmm"), "timeKillEvent"); + } #else qtimeSetEvent = (ptimeSetEvent)QSystemLibrary::resolve(QLatin1String("Mmtimer"), "timeSetEvent"); qtimeKillEvent = (ptimeKillEvent)QSystemLibrary::resolve(QLatin1String("Mmtimer"), "timeKillEvent"); From 853a0b764e08d5f910072b6f3fd3ff3f9dc5c0c4 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 29 May 2013 12:54:15 +0200 Subject: [PATCH 41/60] fix PlatformToolSet tag location in vcxproj files The PlatformToolSet tag belongs into the PropertyGroup with the label "Configuration". The former location in an anonymous PropertyGroup tricked Visual Studio into displaying the right PlatformToolSet but using its default value. If VS 2010 and VS 2012 are freshly installed on the same machine, the default toolset for VS 2012 is VS 2010. Task-number: QTBUG-30822 Change-Id: If00a532e92b0812c552b1cac52ff77a1e7039146 Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msbuild_objectmodel.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 67446b2efef..44fbf20f810 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -182,6 +182,7 @@ const char _Optimization[] = "Optimization"; const char _OptimizeReferences[] = "OptimizeReferences"; const char _OutputDirectory[] = "OutputDirectory"; const char _OutputFile[] = "OutputFile"; +const char _PlatformToolSet[] = "PlatformToolSet"; const char _PrecompiledHeader[] = "PrecompiledHeader"; const char _PrecompiledHeaderFile[] = "PrecompiledHeaderFile"; const char _PrecompiledHeaderOutputFile[] = "PrecompiledHeaderOutputFile"; @@ -467,10 +468,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool) << attrTag("Condition", condition) << valueTag(tool.Configuration.IntermediateDirectory); } - if (tool.Configuration.CompilerVersion >= NET2012) { - xml << tagValue("PlatformToolSet", - platformToolSetVersion(tool.Configuration.CompilerVersion)); - } if ( !tool.Configuration.PrimaryOutput.isEmpty() ) { xml<< tag("TargetName") << attrTag("Condition", condition) @@ -668,10 +665,6 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) << attrTag("Condition", condition) << valueTag(config.IntermediateDirectory); } - if (config.CompilerVersion >= NET2012) { - xml << tagValue("PlatformToolSet", - platformToolSetVersion(config.CompilerVersion)); - } if (!config.PrimaryOutput.isEmpty()) { xml << tag("TargetName") << attrTag("Condition", condition) @@ -1649,6 +1642,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCConfiguration &tool) xml << tag("PropertyGroup") << attrTag("Condition", generateCondition(tool)) << attrTag("Label", "Configuration") + << attrTagS(_PlatformToolSet, platformToolSetVersion(tool.CompilerVersion)) << attrTagS(_OutputDirectory, tool.OutputDirectory) << attrTagT(_ATLMinimizesCRunTimeLibraryUsage, tool.ATLMinimizesCRunTimeLibraryUsage) << attrTagT(_BuildBrowserInformation, tool.BuildBrowserInformation) @@ -2057,7 +2051,6 @@ QString VCXProjectWriter::platformToolSetVersion(const DotNET version) case NET2012: return "v110"; } - Q_ASSERT(!"This MSVC version does not support the PlatformToolSet tag!"); return QString(); } From 1df7a6a50a794721edb1bc63d268378f4f0ed7c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 23 May 2013 12:44:20 +0200 Subject: [PATCH 42/60] Move QBasicDrag and QSimpleDrag to QtGui. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These are useful as default implementations of QPlatformIntegration::drag(), instead of having it return 0 which will lead to crashes in Qt Quick 2 and widgets applications that use drag and drop. Task-number: QTBUG-31288 Change-Id: I70efa139306ced5d879def0f74e3a72d3bcd64f7 Reviewed-by: Jørgen Lind --- src/gui/kernel/kernel.pri | 4 ++++ src/gui/kernel/qplatformintegration.cpp | 7 ++++++- .../dnd => gui/kernel}/qshapedpixmapdndwindow.cpp | 0 .../dnd => gui/kernel}/qshapedpixmapdndwindow_p.h | 0 src/{platformsupport/dnd => gui/kernel}/qsimpledrag.cpp | 2 +- src/{platformsupport/dnd => gui/kernel}/qsimpledrag_p.h | 4 ++-- src/platformsupport/dnd/dnd.pri | 6 ------ src/platformsupport/platformsupport.pro | 1 - src/plugins/platforms/cocoa/qcocoadrag.h | 2 +- src/plugins/platforms/qnx/qqnxintegration.cpp | 2 +- src/plugins/platforms/xcb/qxcbdrag.cpp | 4 ++-- src/plugins/platforms/xcb/qxcbdrag.h | 2 +- 12 files changed, 18 insertions(+), 16 deletions(-) rename src/{platformsupport/dnd => gui/kernel}/qshapedpixmapdndwindow.cpp (100%) rename src/{platformsupport/dnd => gui/kernel}/qshapedpixmapdndwindow_p.h (100%) rename src/{platformsupport/dnd => gui/kernel}/qsimpledrag.cpp (99%) rename src/{platformsupport/dnd => gui/kernel}/qsimpledrag_p.h (96%) delete mode 100644 src/platformsupport/dnd/dnd.pri diff --git a/src/gui/kernel/kernel.pri b/src/gui/kernel/kernel.pri index 91374fe2dd2..3c019fc5b5d 100644 --- a/src/gui/kernel/kernel.pri +++ b/src/gui/kernel/kernel.pri @@ -31,6 +31,8 @@ HEADERS += \ kernel/qplatformclipboard.h \ kernel/qplatformnativeinterface.h \ kernel/qplatformmenu.h \ + kernel/qshapedpixmapdndwindow_p.h \ + kernel/qsimpledrag_p.h \ kernel/qsurfaceformat.h \ kernel/qguiapplication.h \ kernel/qguiapplication_p.h \ @@ -89,6 +91,8 @@ SOURCES += \ kernel/qplatformclipboard.cpp \ kernel/qplatformnativeinterface.cpp \ kernel/qsessionmanager.cpp \ + kernel/qshapedpixmapdndwindow.cpp \ + kernel/qsimpledrag.cpp \ kernel/qsurfaceformat.cpp \ kernel/qguiapplication.cpp \ kernel/qwindow.cpp \ diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index e82e30df808..e4f45ebb6eb 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -49,6 +49,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -99,7 +100,11 @@ QPlatformClipboard *QPlatformIntegration::clipboard() const */ QPlatformDrag *QPlatformIntegration::drag() const { - return 0; + static QSimpleDrag *drag = 0; + if (!drag) { + drag = new QSimpleDrag; + } + return drag; } #endif diff --git a/src/platformsupport/dnd/qshapedpixmapdndwindow.cpp b/src/gui/kernel/qshapedpixmapdndwindow.cpp similarity index 100% rename from src/platformsupport/dnd/qshapedpixmapdndwindow.cpp rename to src/gui/kernel/qshapedpixmapdndwindow.cpp diff --git a/src/platformsupport/dnd/qshapedpixmapdndwindow_p.h b/src/gui/kernel/qshapedpixmapdndwindow_p.h similarity index 100% rename from src/platformsupport/dnd/qshapedpixmapdndwindow_p.h rename to src/gui/kernel/qshapedpixmapdndwindow_p.h diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp similarity index 99% rename from src/platformsupport/dnd/qsimpledrag.cpp rename to src/gui/kernel/qsimpledrag.cpp index f2ff1770557..f6912a2d577 100644 --- a/src/platformsupport/dnd/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -62,7 +62,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/dnd/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h similarity index 96% rename from src/platformsupport/dnd/qsimpledrag_p.h rename to src/gui/kernel/qsimpledrag_p.h index 10237b36d79..36ea4c1ec54 100644 --- a/src/platformsupport/dnd/qsimpledrag_p.h +++ b/src/gui/kernel/qsimpledrag_p.h @@ -56,7 +56,7 @@ class QEventLoop; class QDropData; class QShapedPixmapWindow; -class QBasicDrag : public QPlatformDrag, public QObject +class Q_GUI_EXPORT QBasicDrag : public QPlatformDrag, public QObject { public: virtual ~QBasicDrag(); @@ -99,7 +99,7 @@ private: QShapedPixmapWindow *m_drag_icon_window; }; -class QSimpleDrag : public QBasicDrag +class Q_GUI_EXPORT QSimpleDrag : public QBasicDrag { public: QSimpleDrag(); diff --git a/src/platformsupport/dnd/dnd.pri b/src/platformsupport/dnd/dnd.pri deleted file mode 100644 index 47feb81ef22..00000000000 --- a/src/platformsupport/dnd/dnd.pri +++ /dev/null @@ -1,6 +0,0 @@ -HEADERS += \ - $$PWD/qsimpledrag_p.h \ - $$PWD/qshapedpixmapdndwindow_p.h -SOURCES += \ - $$PWD/qsimpledrag.cpp \ - $$PWD/qshapedpixmapdndwindow.cpp diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index 4cb1f2c1bfa..da87f395fd3 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -9,7 +9,6 @@ PRECOMPILED_HEADER = ../corelib/global/qt_pch.h include(cfsocketnotifier/cfsocketnotifier.pri) include(cglconvenience/cglconvenience.pri) -include(dnd/dnd.pri) include(eglconvenience/eglconvenience.pri) include(eventdispatchers/eventdispatchers.pri) include(fbconvenience/fbconvenience.pri) diff --git a/src/plugins/platforms/cocoa/qcocoadrag.h b/src/plugins/platforms/cocoa/qcocoadrag.h index 6e29fd1a78e..80259df6006 100644 --- a/src/plugins/platforms/cocoa/qcocoadrag.h +++ b/src/plugins/platforms/cocoa/qcocoadrag.h @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index 072f60dff87..feb05e30934 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -89,7 +89,7 @@ #include #endif -#include +#include #include #include diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp index db736cef4e7..4961e0377cc 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.cpp +++ b/src/plugins/platforms/xcb/qxcbdrag.cpp @@ -57,8 +57,8 @@ #include -#include -#include +#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h index 5678c2d3034..5648f70d9e8 100644 --- a/src/plugins/platforms/xcb/qxcbdrag.h +++ b/src/plugins/platforms/xcb/qxcbdrag.h @@ -43,7 +43,7 @@ #define QXCBDRAG_H #include -#include +#include #include #include #include From de3d449dcff4ee00fea72b3697055f5459fb13ec Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 28 May 2013 14:23:57 +0200 Subject: [PATCH 43/60] Windows: Suppress mouse events synthesized by OS. Change the hint for QPlatformIntegration::SynthesizeMouseFromTouchEvents to false for Windows and suppress the events synthesized by OS. The synthesized events cause touch events to generate 2 clicks in Quick2. Leave code as is for Windows CE. Task-number: QTBUG-31386 Change-Id: Ia0987342dcdd55c8540810da5e4b90518a501ce6 Reviewed-by: Alan Alpert Reviewed-by: Shawn Rutledge --- src/plugins/platforms/windows/qwindowsintegration.cpp | 4 ++++ src/plugins/platforms/windows/qwindowsmousehandler.cpp | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 73df3ec0324..814892b43a8 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -552,11 +552,15 @@ QVariant QWindowsIntegration::styleHint(QPlatformIntegration::StyleHint hint) co break; case QPlatformIntegration::UseRtlExtensions: return QVariant(d->m_context.useRTLExtensions()); +#ifdef Q_OS_WINCE case QPlatformIntegration::SynthesizeMouseFromTouchEvents: // We do not want Qt to synthesize mouse events as Windows also does that. // Alternatively, Windows-generated touch mouse events can be identified and // ignored by checking GetMessageExtraInfo() for MI_WP_SIGNATURE (0xFF515700). return false; +#endif // Q_OS_WINCE + default: + break; } return QPlatformIntegration::styleHint(hint); } diff --git a/src/plugins/platforms/windows/qwindowsmousehandler.cpp b/src/plugins/platforms/windows/qwindowsmousehandler.cpp index fd00a07d6c3..5c096b7ecad 100644 --- a/src/plugins/platforms/windows/qwindowsmousehandler.cpp +++ b/src/plugins/platforms/windows/qwindowsmousehandler.cpp @@ -157,9 +157,19 @@ bool QWindowsMouseHandler::translateMouseEvent(QWindow *window, HWND hwnd, QtWindows::WindowsEventType et, MSG msg, LRESULT *result) { + enum { signatureMask = 0xffffff00, miWpSignature = 0xff515700 }; + if (et == QtWindows::MouseWheelEvent) return translateMouseWheelEvent(window, hwnd, msg, result); +#ifndef Q_OS_WINCE + // Check for events synthesized from touch. Lower byte is touch index, 0 means pen. + const LPARAM extraInfo = GetMessageExtraInfo(); + const bool fromTouch = (extraInfo & signatureMask) == miWpSignature && (extraInfo & 0xff); + if (fromTouch) + return false; +#endif // !Q_OS_WINCE + const QPoint winEventPosition(GET_X_LPARAM(msg.lParam), GET_Y_LPARAM(msg.lParam)); if (et & QtWindows::NonClientEventFlag) { const QPoint globalPosition = winEventPosition; From 49d9fd1935ae9c05ab1bc250d4c6f5a05a17bdb4 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 29 May 2013 07:41:16 +0200 Subject: [PATCH 44/60] Fix incorrect statement in QTreeWidgetItem docs. Task-number: QTBUG-25598 Change-Id: Ib90578081d4e52877ce4842ebbc824ef74179341 Reviewed-by: Stephen Kelly Reviewed-by: Jerome Pasion --- src/widgets/itemviews/qtreewidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp index 653a9170b20..f72abd20ab5 100644 --- a/src/widgets/itemviews/qtreewidget.cpp +++ b/src/widgets/itemviews/qtreewidget.cpp @@ -1677,8 +1677,8 @@ void QTreeWidgetItemPrivate::propagateDisabled(QTreeWidgetItem *item) the item can be checked, edited, and selected. The default value for flags is - Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | Qt::ItemIsDragEnabled. - If the item was constructed with a parent, flags will in addition contain Qt::ItemIsDropEnabled. + Qt::ItemIsSelectable | Qt::ItemIsUserCheckable | Qt::ItemIsEnabled | + Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled. \sa setFlags() */ From f587d1de6b2da66ab5f4dfcda640a2a1b190c73f Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 29 May 2013 11:11:25 +0200 Subject: [PATCH 45/60] Refer to setDragEnabled in QLineEdit's detailed description. It's currently not obvious how to drag text from a QLineEdit. Task-number: QTBUG-22413 Change-Id: I5b92ce5c7425a1cb8ee6f401c685424eb9396592 Reviewed-by: Jerome Pasion --- src/widgets/widgets/qlineedit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index abef6e88321..6d648f11268 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -132,7 +132,8 @@ void QLineEdit::initStyleOption(QStyleOptionFrame *option) const A line edit allows the user to enter and edit a single line of plain text with a useful collection of editing functions, - including undo and redo, cut and paste, and drag and drop. + including undo and redo, cut and paste, and drag and drop (see + \l setDragEnabled()). By changing the echoMode() of a line edit, it can also be used as a "write-only" field, for inputs such as passwords. From 20d08a96c8240a9fda1a359d98be42f69ed9592e Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 17 Apr 2013 14:26:37 +0300 Subject: [PATCH 46/60] Fix tst_qtendian autotest build for WEC7. MSVC2008 compiler fo ARM targets fail to compile qToUnaligned when using sizeof(T) inside memcpy fynction. The compiler fails at least when the code is reached through the following macros and templates: -> tst_QtEndian::toLittleEndian -> qToLittleEndian(T src, uchar *dest) -> qToUnaligned(const T src, uchar *dest) The above sequence produces internal compiler error with MSVC2008/ARM builds when called from tst_endian. As a workaround sizeof(T) is called outside memcpy function. Change-Id: Ib4d382c2cebecb6e54bb99fc8fad72db93825fcd Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qendian.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h index c9c4d23aabe..9b939feea09 100644 --- a/src/corelib/global/qendian.h +++ b/src/corelib/global/qendian.h @@ -78,7 +78,10 @@ template inline void qbswap(const T src, uchar *dest) // If you want to avoid the memcopy, you must write specializations for this function template inline void qToUnaligned(const T src, uchar *dest) { - memcpy(dest, &src, sizeof(T)); + // Using sizeof(T) inside memcpy function produces internal compiler error with + // MSVC2008/ARM in tst_endian -> use extra indirection to resolve size of T. + const size_t size = sizeof(T); + memcpy(dest, &src, size); } /* T qFromLittleEndian(const uchar *src) From 12ae86119cf389dab368bbc8a9d49b29b0b155cd Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 29 May 2013 17:42:30 +0200 Subject: [PATCH 47/60] Mac style: Remove yet another reference to widgets Change-Id: I545cfe22c6307864cdb18093a37e09a8ad042347 Reviewed-by: J-P Nurmi Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qmacstyle_mac.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index b7f39d45dd5..a8fba4fb680 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -3366,7 +3366,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter if (const QStyleOptionToolButton *tb = qstyleoption_cast(opt)) { QStyleOptionToolButton myTb = *tb; myTb.state &= ~State_AutoRaise; - if (w && qobject_cast(w->parentWidget())) { + if (QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ToolBar)) { QRect cr = tb->rect; int shiftX = 0; int shiftY = 0; @@ -3405,7 +3405,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter if (tb->toolButtonStyle != Qt::ToolButtonIconOnly) { needText = true; if (tb->toolButtonStyle == Qt::ToolButtonTextUnderIcon) { - QMainWindow *mw = qobject_cast(w->window()); + QMainWindow *mw = w ? qobject_cast(w->window()) : 0; if (mw && mw->unifiedTitleAndToolBarOnMac()) { pr.setHeight(pixmap.size().height() / pixmap.devicePixelRatio()); cr.adjust(0, pr.bottom() + 1, 0, 1); From 9e36747786b31c9494f99af5e1f7c977b51b7ce7 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 6 May 2013 14:07:10 +0200 Subject: [PATCH 48/60] Use [NSEvent characters] to retrieve the input character. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is how it was done in Qt 4. An issue with the current approach was that it did not consider modifiers when setting a Qt::Key_* value, which would assign the same Qt keycode for: a = a(65) Alt + a = ā(65) [here it should return a unicode value for 'ā'] This is inconsistent with the other platform plugins. Also in the combination with a dead keys it was returning nothing in the output. Task-number: QTBUG-29005 (cherry picked from commit 6730413fcac1d7eb39af3683b87f965c5823cb6c) Change-Id: Ic28eb55b3a9798ecb6012cc2e3fb18589b8b0392 Reviewed-by: Shawn Rutledge --- src/plugins/platforms/cocoa/qnsview.mm | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index ee6a9616a6d..5c5da830acc 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -897,7 +897,6 @@ static QTouchDevice *touchDevice = 0; ulong timestamp = [nsevent timestamp] * 1000; ulong nativeModifiers = [nsevent modifierFlags]; Qt::KeyboardModifiers modifiers = [QNSView convertKeyModifiers: nativeModifiers]; - NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers]; NSString *characters = [nsevent characters]; // [from Qt 4 impl] There is no way to get the scan code from carbon. But we cannot @@ -909,19 +908,11 @@ static QTouchDevice *touchDevice = 0; EventRef eventRef = EventRef([nsevent eventRef]); GetEventParameter(eventRef, kEventParamKeyCode, typeUInt32, 0, sizeof(nativeVirtualKey), 0, &nativeVirtualKey); - QChar ch; - int keyCode; - if ([charactersIgnoringModifiers length] > 0) { // convert the first character into a key code - if ((modifiers & Qt::ControlModifier) && ([characters length] != 0)) { - ch = QChar([characters characterAtIndex:0]); - } else { - ch = QChar([charactersIgnoringModifiers characterAtIndex:0]); - } + QChar ch = QChar::ReplacementCharacter; + int keyCode = Qt::Key_unknown; + if ([characters length] != 0) { + ch = QChar([characters characterAtIndex:0]); keyCode = [self convertKeyCode:ch]; - } else { - // might be a dead key - ch = QChar::ReplacementCharacter; - keyCode = Qt::Key_unknown; } // we will send a key event unless the input method sets m_sendKeyEvent to false @@ -931,7 +922,7 @@ static QTouchDevice *touchDevice = 0; if (eventType == QEvent::KeyPress) { // ignore text for the U+F700-U+F8FF range. This is used by Cocoa when // delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.) - if ([charactersIgnoringModifiers length] == 1 && (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff)) + if (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff) text = QCFString::toQString(characters); if (m_composingText.isEmpty()) From cef67cc8dbf665369584fdc0ac01b9e01af133fc Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 14 May 2013 11:55:53 -0600 Subject: [PATCH 49/60] Fix the host_bins variable in the QtCore pkg-config file The qmake HOST_BINS property has no /raw variant. We need to use the regular one. Change-Id: I38254f77d1039c312913a987353342ce5ed3feec Reviewed-by: Oswald Buddenhagen --- src/corelib/corelib.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro index 0a5cc04a173..44a3f06f502 100644 --- a/src/corelib/corelib.pro +++ b/src/corelib/corelib.pro @@ -58,7 +58,7 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtCore.dynlist contains(DEFINES,QT_EVAL):include(eval.pri) -HOST_BINS = $$[QT_HOST_BINS/raw] +HOST_BINS = $$[QT_HOST_BINS] host_bins.name = host_bins host_bins.variable = HOST_BINS From 3523c9e138dc8591619d21f24f60ded27bd7e7e3 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 10 May 2013 11:06:57 -0700 Subject: [PATCH 50/60] Support setting the library-search environment on a few more OSs Most Unix systems will honor LD_LIBRARY_PATH (all ELF-based systems definitely do), so let's not make it an error if the user isn't compiling on Linux or FreeBSD. The only known exception are Darwin / Mac OS X and AIX. For everything else, cause an error. The list of unames came from: http://en.wikipedia.org/wiki/Uname. AIX does not use ELF, so its variable is called LIBPATH: http://publib.boulder.ibm.com/infocenter/forms/v3r5m0/index.jsp?topic=/com.ibm.form.api.configuring.doc/api_configuring_unix_path.html Change-Id: I67055e6a231aa1430d91431e7cab5f98f0e1bd95 Reviewed-by: Oswald Buddenhagen --- mkspecs/features/qt_functions.prf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 9ec22d57db9..d1e0e39cff5 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -240,13 +240,15 @@ defineTest(qtAddTargetEnv) { deppath += $$shell_path($$eval(QT.$${dep}.libs)) equals(QMAKE_HOST.os, Windows) { deppath.name = PATH - } else:contains(QMAKE_HOST.os, Linux|FreeBSD) { + } else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) { deppath.name = LD_LIBRARY_PATH } else:equals(QMAKE_HOST.os, Darwin) { contains(QT_CONFIG, qt_framework): \ deppath.name = DYLD_FRAMEWORK_PATH else: \ deppath.name = DYLD_LIBRARY_PATH + } else:equals(QMAKE_HOST.os, AIX) { + deppath.name = LIBPATH } else { error("Operating system not supported.") } From 468a37fa2053f91dd64c182b834dc636ff77c7cc Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 27 May 2013 15:52:26 +0200 Subject: [PATCH 51/60] Support Mac key equivalent Cmd+Period On Mac Cmd+Period isa special key combination which never got delived to Qt application. We can intercept these special keyboard shortcuts in the performKeyEquivalent function. Task-number: QTBUG-11386 Change-Id: I680385bde07b2810e8bde86ec9fbbe7e09156c84 Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qnsview.h | 1 + src/plugins/platforms/cocoa/qnsview.mm | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index 85f72a4dbbe..c7c6c20473f 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -113,6 +113,7 @@ QT_END_NAMESPACE - (void)handleKeyEvent:(NSEvent *)theEvent eventType:(int)eventType; - (void)keyDown:(NSEvent *)theEvent; - (void)keyUp:(NSEvent *)theEvent; +- (BOOL)performKeyEquivalent:(NSEvent *)theEvent; - (void)registerDragTypes; - (NSDragOperation)handleDrag:(id )sender; diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index ee6a9616a6d..8b157c58e91 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -972,6 +972,23 @@ static QTouchDevice *touchDevice = 0; [self handleKeyEvent:nsevent eventType:int(QEvent::KeyRelease)]; } +- (BOOL)performKeyEquivalent:(NSEvent *)nsevent +{ + NSString *chars = [nsevent charactersIgnoringModifiers]; + + if ([nsevent type] == NSKeyDown && [chars length] > 0) { + QChar ch = [chars characterAtIndex:0]; + Qt::Key qtKey = qt_mac_cocoaKey2QtKey(ch); + // check for Command + Key_Period + if ([nsevent modifierFlags] & NSCommandKeyMask + && qtKey == Qt::Key_Period) { + [self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)]; + return YES; + } + } + return [super performKeyEquivalent:nsevent]; +} + - (void)flagsChanged:(NSEvent *)nsevent { ulong timestamp = [nsevent timestamp] * 1000; From 1840400a9a65283b9911c252b8e2f97af3242ecb Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Fri, 24 May 2013 17:19:14 +0400 Subject: [PATCH 52/60] Fix leak in QNSView. Change-Id: Ide0e826bf068340c86d87a8ccbb3bd58b60f6d8c Reviewed-by: Gabriel de Dietrich --- src/plugins/platforms/cocoa/qnsview.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 8b157c58e91..9250eead8ce 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -113,6 +113,8 @@ static QTouchDevice *touchDevice = 0; name:NSViewGlobalFrameDidChangeNotification object:self]; } + delete currentCustomDragTypes; + [super dealloc]; } From 2cb5f1957ac709d27acbbdb49be8615670682212 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 17 May 2013 16:32:04 -0700 Subject: [PATCH 53/60] Silence warning in QtNetwork build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qnetworkconfigmanager.cpp:63:9: error: unused variable ‘shutdown’ [-Werror=unused-variable] This warning was introduced by f273d6fbc02055ff3999adc0df76360ca0670435 Change-Id: Ied650a4d94d18495684a8f08ab5f2cd628026fb7 Reviewed-by: Jonas Gastal Reviewed-by: Peter Hartmann --- src/network/bearer/qnetworkconfigmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/bearer/qnetworkconfigmanager.cpp b/src/network/bearer/qnetworkconfigmanager.cpp index 4f74936ac72..933bebe2ad7 100644 --- a/src/network/bearer/qnetworkconfigmanager.cpp +++ b/src/network/bearer/qnetworkconfigmanager.cpp @@ -62,6 +62,7 @@ static void connManager_cleanup() // this is not atomic or thread-safe! int shutdown = appShutdown.fetchAndStoreAcquire(1); Q_ASSERT(shutdown == 0); + Q_UNUSED(shutdown); QNetworkConfigurationManagerPrivate *cmp = connManager_ptr.fetchAndStoreAcquire(0); if (cmp) cmp->cleanup(); From f89c99fa7294aa47c57ae0e74011b3de731852bc Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 31 May 2013 11:02:18 +0200 Subject: [PATCH 54/60] Fix typo Change-Id: I0983f12759fdb806e4fc89f4abefb9088502208d Reviewed-by: Sergio Ahumada --- tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h index fe9e71e6504..920fa5e023a 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget_mac_helpers.h @@ -42,7 +42,7 @@ #include #include -#pragma once // Yeah, it's deprecated in general, but it's standard practive for Mac OS X. +#pragma once // Yeah, it's deprecated in general, but it's standard practice for Mac OS X. QString nativeWindowTitle(QWidget *widget, Qt::WindowState state); bool nativeWindowModified(QWidget *widget); From 092a2f813cc02fe16f875149cd663922b9e99651 Mon Sep 17 00:00:00 2001 From: Scott Deboy Date: Wed, 10 Apr 2013 18:31:47 -0700 Subject: [PATCH 55/60] Fix broken build when using OpenSSL 0.9.8 Resolving compilation issues encountered when dynamically linking to OpenSSL release 0.9.8 (no letter) Adding #ifdefs to address OpenSSL version issues, correcting q_sk_push declaration Conflicting code in qsslsocket_openssl.cpp not present in stable branch. Task-number: QTBUG-30615 Change-Id: I4b86ca4303343cca5d440ab9821b275028cc5a72 Reviewed-by: Shane Kearns From 830cbb1aaf047d8f0ab63f25148b7dc7cc9f8fe0 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Sat, 13 Apr 2013 15:54:12 +0900 Subject: [PATCH 56/60] Make qtbase compile with QT_NO_TEMPORARYFILE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ida2f59bb245ef70bf65f7e8944c4c315d5bc2f81 Reviewed-by: David Faure (KDE) Reviewed-by: Jørgen Lind Reviewed-by: Gunnar Sletta Reviewed-by: Oswald Buddenhagen --- src/corelib/global/qfeatures.h | 5 +++++ src/corelib/global/qfeatures.txt | 7 +++++++ src/corelib/io/qlockfile_unix.cpp | 9 +++++++-- src/corelib/io/qsavefile.cpp | 7 ++++++- src/corelib/io/qsavefile.h | 7 ++++++- src/corelib/io/qsavefile_p.h | 6 ++++++ src/corelib/io/qtemporaryfile_p.h | 6 ++++++ src/gui/painting/qpdf.cpp | 9 +++++++-- src/gui/painting/qpdf_p.h | 7 +++++++ src/gui/painting/qpdfwriter.cpp | 5 +++++ src/gui/painting/qpdfwriter.h | 7 ++++++- src/gui/text/qfontsubset.cpp | 3 +++ src/gui/text/qfontsubset_p.h | 9 ++++++++- 13 files changed, 79 insertions(+), 8 deletions(-) diff --git a/src/corelib/global/qfeatures.h b/src/corelib/global/qfeatures.h index f2e5dc7633f..4534e9bf133 100644 --- a/src/corelib/global/qfeatures.h +++ b/src/corelib/global/qfeatures.h @@ -311,6 +311,11 @@ #define QT_NO_LOCALSERVER #endif +// QPdf +#if !defined(QT_NO_PDF) && (defined(QT_NO_TEMPORARYFILE)) +#define QT_NO_PDF +#endif + // QMenu #if !defined(QT_NO_MENU) && (defined(QT_NO_ACTION)) #define QT_NO_MENU diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 43db585643a..61a3df39f30 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -851,6 +851,13 @@ Requires: Name: Color Names SeeAlso: ??? +Feature: PDF +Description: Supports pdf format +Section: Painting +Requires: TEMPORARYFILE +Name: QPdf +SeeAlso: ??? + Feature: PRINTER Description: Supports printing Section: Painting diff --git a/src/corelib/io/qlockfile_unix.cpp b/src/corelib/io/qlockfile_unix.cpp index ed3b399fbf5..db81d65565c 100644 --- a/src/corelib/io/qlockfile_unix.cpp +++ b/src/corelib/io/qlockfile_unix.cpp @@ -45,6 +45,7 @@ #include "QtCore/qcoreapplication.h" #include "QtCore/qfileinfo.h" #include "QtCore/qdebug.h" +#include "QtCore/qdatetime.h" #include "private/qcore_unix_p.h" // qt_safe_open #include "private/qabstractfileengine_p.h" @@ -80,12 +81,13 @@ static qint64 qt_write_loop(int fd, const char *data, qint64 len) int QLockFilePrivate::checkFcntlWorksAfterFlock() { +#ifndef QT_NO_TEMPORARYFILE QTemporaryFile file; if (!file.open()) - return -2; + return 0; const int fd = file.d_func()->engine()->handle(); if (flock(fd, LOCK_EX | LOCK_NB) == -1) // other threads, and other processes on a local fs - return -3; + return 0; struct flock flockData; flockData.l_type = F_WRLCK; flockData.l_whence = SEEK_SET; @@ -95,6 +97,9 @@ int QLockFilePrivate::checkFcntlWorksAfterFlock() if (fcntl(fd, F_SETLK, &flockData) == -1) // for networked filesystems return 0; return 1; +#else + return 0; +#endif } static QBasicAtomicInt fcntlOK = Q_BASIC_ATOMIC_INITIALIZER(-1); diff --git a/src/corelib/io/qsavefile.cpp b/src/corelib/io/qsavefile.cpp index f8b5ebcabd3..5ed429c4648 100644 --- a/src/corelib/io/qsavefile.cpp +++ b/src/corelib/io/qsavefile.cpp @@ -39,8 +39,11 @@ ** ****************************************************************************/ -#include "qplatformdefs.h" #include "qsavefile.h" + +#ifndef QT_NO_TEMPORARYFILE + +#include "qplatformdefs.h" #include "private/qsavefile_p.h" #include "qfileinfo.h" #include "qabstractfileengine_p.h" @@ -381,3 +384,5 @@ bool QSaveFile::directWriteFallback() const } QT_END_NAMESPACE + +#endif // QT_NO_TEMPORARYFILE diff --git a/src/corelib/io/qsavefile.h b/src/corelib/io/qsavefile.h index 6d81f58d42b..ad18417124b 100644 --- a/src/corelib/io/qsavefile.h +++ b/src/corelib/io/qsavefile.h @@ -42,6 +42,10 @@ #ifndef QSAVEFILE_H #define QSAVEFILE_H +#include + +#ifndef QT_NO_TEMPORARYFILE + #include #include @@ -51,7 +55,6 @@ QT_BEGIN_NAMESPACE - class QAbstractFileEngine; class QSaveFilePrivate; @@ -90,4 +93,6 @@ private: QT_END_NAMESPACE +#endif // QT_NO_TEMPORARYFILE + #endif // QSAVEFILE_H diff --git a/src/corelib/io/qsavefile_p.h b/src/corelib/io/qsavefile_p.h index 53a8b5eb340..b9efd1ee7cf 100644 --- a/src/corelib/io/qsavefile_p.h +++ b/src/corelib/io/qsavefile_p.h @@ -53,6 +53,10 @@ // We mean it. // +#include + +#ifndef QT_NO_TEMPORARYFILE + #include "private/qfiledevice_p.h" QT_BEGIN_NAMESPACE @@ -75,4 +79,6 @@ protected: QT_END_NAMESPACE +#endif // QT_NO_TEMPORARYFILE + #endif // QSAVEFILE_P_H diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h index d274f60ecc3..fe637c8dfd3 100644 --- a/src/corelib/io/qtemporaryfile_p.h +++ b/src/corelib/io/qtemporaryfile_p.h @@ -42,6 +42,10 @@ #ifndef QTEMPORARYFILE_P_H #define QTEMPORARYFILE_P_H +#include + +#ifndef QT_NO_TEMPORARYFILE + #include "private/qfsfileengine_p.h" #include "private/qfilesystemengine_p.h" #include "private/qfile_p.h" @@ -99,5 +103,7 @@ public: QT_END_NAMESPACE +#endif // QT_NO_TEMPORARYFILE + #endif /* QTEMPORARYFILE_P_H */ diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 5d9a743dac1..345ebefea70 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -38,9 +38,13 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ + +#include "qpdf_p.h" + +#ifndef QT_NO_PDF + #include "qplatformdefs.h" #include -#include "qpdf_p.h" #include #include #include @@ -2624,5 +2628,6 @@ void QPdfEnginePrivate::newPage() << "q q\n"; } - QT_END_NAMESPACE + +#endif // QT_NO_PDF diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h index 44e1446fff1..560621775b4 100644 --- a/src/gui/painting/qpdf_p.h +++ b/src/gui/painting/qpdf_p.h @@ -52,6 +52,11 @@ // // We mean it. // + +#include + +#ifndef QT_NO_PDF + #include "QtGui/qmatrix.h" #include "QtCore/qstring.h" #include "QtCore/qvector.h" @@ -328,5 +333,7 @@ void QPdfEngine::setResolution(int resolution) QT_END_NAMESPACE +#endif // QT_NO_PDF + #endif // QPDF_P_H diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp index ad6b66ae09b..136654cb5d2 100644 --- a/src/gui/painting/qpdfwriter.cpp +++ b/src/gui/painting/qpdfwriter.cpp @@ -40,6 +40,9 @@ ****************************************************************************/ #include + +#ifndef QT_NO_PDF + #include #include "private/qpdf_p.h" #include @@ -214,3 +217,5 @@ void QPdfWriter::setMargins(const Margins &m) } QT_END_NAMESPACE + +#endif // QT_NO_PDF diff --git a/src/gui/painting/qpdfwriter.h b/src/gui/painting/qpdfwriter.h index 45bb5ad4b43..f5c25de5e9a 100644 --- a/src/gui/painting/qpdfwriter.h +++ b/src/gui/painting/qpdfwriter.h @@ -42,12 +42,15 @@ #ifndef QPDFWRITER_H #define QPDFWRITER_H +#include + +#ifndef QT_NO_PDF + #include #include QT_BEGIN_NAMESPACE - class QIODevice; class QPdfWriterPrivate; @@ -83,4 +86,6 @@ private: QT_END_NAMESPACE +#endif // QT_NO_PDF + #endif diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp index 649c6ec36d8..3c39272d11f 100644 --- a/src/gui/text/qfontsubset.cpp +++ b/src/gui/text/qfontsubset.cpp @@ -91,6 +91,8 @@ static const unsigned short symbol_map[0x100] = { // ---------------------------- PS/PDF helper methods ----------------------------------- +#ifndef QT_NO_PDF + QByteArray QFontSubset::glyphName(unsigned short unicode, bool symbol) { if (symbol && unicode < 0x100) @@ -311,6 +313,7 @@ int QFontSubset::addGlyph(int index) return idx; } +#endif // QT_NO_PDF // ------------------------------ Truetype generation ---------------------------------------------- diff --git a/src/gui/text/qfontsubset_p.h b/src/gui/text/qfontsubset_p.h index 00054dfe395..df5e72ab7d3 100644 --- a/src/gui/text/qfontsubset_p.h +++ b/src/gui/text/qfontsubset_p.h @@ -62,13 +62,19 @@ class QFontSubset public: explicit QFontSubset(QFontEngine *fe, int obj_id = 0) : object_id(obj_id), noEmbed(false), fontEngine(fe), downloaded_glyphs(0), standard_font(false) - { fontEngine->ref.ref(); addGlyph(0); } + { + fontEngine->ref.ref(); +#ifndef QT_NO_PDF + addGlyph(0); +#endif + } ~QFontSubset() { if (!fontEngine->ref.deref()) delete fontEngine; } QByteArray toTruetype() const; +#ifndef QT_NO_PDF QByteArray widthArray() const; QByteArray createToUnicodeMap() const; QVector getReverseMap() const; @@ -77,6 +83,7 @@ public: static QByteArray glyphName(unsigned short unicode, bool symbol); int addGlyph(int index); +#endif const int object_id; bool noEmbed; QFontEngine *fontEngine; From 46e6bbd22991dd62040ee1eb24433b5f7316793a Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 3 Jun 2013 18:00:57 +0200 Subject: [PATCH 57/60] Mention QRect's int min/max constraints in detailed description. Task-number: QTBUG-25732 Change-Id: If330768c3075568f09593ed17f26389d3dec3335 Reviewed-by: Jerome Pasion --- src/corelib/tools/qrect.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp index e197fd9178c..41b2b266ee5 100644 --- a/src/corelib/tools/qrect.cpp +++ b/src/corelib/tools/qrect.cpp @@ -201,6 +201,12 @@ QT_BEGIN_NAMESPACE function to manipulate the rectangle's coordinates and dimensions in one go. + \section1 Constraints + + QRect is limited to the minimum and maximum values for the \c int type. + Operations on a QRect that could potentially result in values outside this + range will result in undefined behavior. + \sa QRectF, QRegion */ From 0c8061f608cbc36239e793f8c7baa04c58e40769 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 May 2013 13:08:15 -0700 Subject: [PATCH 58/60] QDnsLookup: test MX and SRV records that can change order The DNS protocol changes the order of the RRs in each reply it sends, in an effort to balance the load in servers. For most tests, to ensure that we get always the same result, we simply sort it back. For MX and SRV, we can't sort because we also need to test that QDnsLookup sorted correctly according to priority. So instead allow that test to have multiple alternatives. Change-Id: I5c119f907b31789de5c9cf2471cc82ecd140d06f Reviewed-by: Oswald Buddenhagen Reviewed-by: Sergio Ahumada Reviewed-by: Thiago Macieira --- .../kernel/qdnslookup/tst_qdnslookup.cpp | 31 ++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp index 9135c574203..869b0829570 100644 --- a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp +++ b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp @@ -61,6 +61,7 @@ class tst_QDnsLookup: public QObject QString domainName(const QString &input); QString domainNameList(const QString &input); + QStringList domainNameListAlternatives(const QString &input); public slots: void initTestCase(); @@ -105,6 +106,14 @@ QString tst_QDnsLookup::domainNameList(const QString &input) return result; } +QStringList tst_QDnsLookup::domainNameListAlternatives(const QString &input) +{ + QStringList alternatives = input.split('|'); + for (int i = 0; i < alternatives.length(); ++i) + alternatives[i] = domainNameList(alternatives[i]); + return alternatives; +} + void tst_QDnsLookup::lookup_data() { QTest::addColumn("type"); @@ -138,6 +147,9 @@ void tst_QDnsLookup::lookup_data() QTest::newRow("mx-single") << int(QDnsLookup::MX) << "mx-single" << int(QDnsLookup::NoError) << "" << "" << "10 multi" << "" << "" << "" << QByteArray(); QTest::newRow("mx-single-cname") << int(QDnsLookup::MX) << "mx-single-cname" << int(QDnsLookup::NoError) << "" << "" << "10 cname" << "" << "" << "" << QByteArray(); QTest::newRow("mx-multi") << int(QDnsLookup::MX) << "mx-multi" << int(QDnsLookup::NoError) << "" << "" << "10 multi;20 a-single" << "" << "" << "" << QByteArray(); + QTest::newRow("mx-multi-sameprio") << int(QDnsLookup::MX) << "mx-multi-sameprio" << int(QDnsLookup::NoError) << "" << "" + << "10 multi;10 a-single|" + "10 a-single;10 multi" << "" << "" << "" << QByteArray(); QTest::newRow("ns-empty") << int(QDnsLookup::NS) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); QTest::newRow("ns-notfound") << int(QDnsLookup::NS) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); @@ -152,6 +164,12 @@ void tst_QDnsLookup::lookup_data() QTest::newRow("srv-notfound") << int(QDnsLookup::SRV) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); QTest::newRow("srv-single") << int(QDnsLookup::SRV) << "_echo._tcp.srv-single" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "5 0 7 multi" << QByteArray(); QTest::newRow("srv-prio") << int(QDnsLookup::SRV) << "_echo._tcp.srv-prio" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "1 0 7 multi;2 0 7 a-plus-aaaa" << QByteArray(); + QTest::newRow("srv-weighted") << int(QDnsLookup::SRV) << "_echo._tcp.srv-weighted" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" + << "5 75 7 multi;5 25 7 a-plus-aaaa|" + "5 25 7 a-plus-aaaa;5 75 7 multi" << QByteArray(); + QTest::newRow("srv-multi") << int(QDnsLookup::SRV) << "_echo._tcp.srv-multi" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" + << "1 50 7 multi;2 50 7 a-single;2 50 7 aaaa-single;3 50 7 a-multi|" + "1 50 7 multi;2 50 7 aaaa-single;2 50 7 a-single;3 50 7 a-multi" << QByteArray(); QTest::newRow("txt-empty") << int(QDnsLookup::TXT) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); QTest::newRow("txt-notfound") << int(QDnsLookup::TXT) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); @@ -174,10 +192,13 @@ void tst_QDnsLookup::lookup() // transform the inputs domain = domainName(domain); cname = domainName(cname); - mx = domainNameList(mx); ns = domainNameList(ns); ptr = domainNameList(ptr); - srv = domainNameList(srv); + + // SRV and MX have reply entries that can change order + // and we can't sort + QStringList mx_alternatives = domainNameListAlternatives(mx); + QStringList srv_alternatives = domainNameListAlternatives(srv); QDnsLookup lookup; lookup.setType(static_cast(type)); @@ -218,7 +239,8 @@ void tst_QDnsLookup::lookup() QCOMPARE(record.name(), domain); mailExchanges << QString("%1 %2").arg(QString::number(record.preference()), record.exchange()); } - QCOMPARE(mailExchanges.join(';'), mx); + QVERIFY2(mx_alternatives.contains(mailExchanges.join(';')), + qPrintable("Actual: " + mailExchanges.join(';') + "\nExpected one of:\n" + mx_alternatives.join('\n'))); // name servers QStringList nameServers; @@ -250,7 +272,8 @@ void tst_QDnsLookup::lookup() QString::number(record.port()), record.target()); } - QCOMPARE(services.join(';'), srv); + QVERIFY2(srv_alternatives.contains(services.join(';')), + qPrintable("Actual: " + services.join(';') + "\nExpected one of:\n" + srv_alternatives.join('\n'))); // text if (!txt.isEmpty()) { From db15341d273730298ab5af03b59e9ea1cca782be Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 3 May 2013 13:21:56 -0700 Subject: [PATCH 59/60] QDnsLookup: test multiple TXT answers too The TXT record is particular because each RR can contain multiple text strings. So we need to join each RR's texts too. To make it easy, I've made everything be QStrings. Change-Id: Ia0506544b913585e7be860c81077cff8e0dab547 Reviewed-by: Oswald Buddenhagen Reviewed-by: Sergio Ahumada Reviewed-by: Thiago Macieira --- .../kernel/qdnslookup/tst_qdnslookup.cpp | 96 ++++++++++--------- 1 file changed, 51 insertions(+), 45 deletions(-) diff --git a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp index 869b0829570..a381ba7b711 100644 --- a/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp +++ b/tests/auto/network/kernel/qdnslookup/tst_qdnslookup.cpp @@ -125,55 +125,57 @@ void tst_QDnsLookup::lookup_data() QTest::addColumn("ns"); QTest::addColumn("ptr"); QTest::addColumn("srv"); - QTest::addColumn("txt"); + QTest::addColumn("txt"); - QTest::newRow("a-empty") << int(QDnsLookup::A) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << ""<< "" << QByteArray(); - QTest::newRow("a-notfound") << int(QDnsLookup::A) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("a-single") << int(QDnsLookup::A) << "a-single" << int(QDnsLookup::NoError) << "" << "192.0.2.1" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("a-multi") << int(QDnsLookup::A) << "a-multi" << int(QDnsLookup::NoError) << "" << "192.0.2.1;192.0.2.2;192.0.2.3" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("aaaa-empty") << int(QDnsLookup::AAAA) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("aaaa-notfound") << int(QDnsLookup::AAAA) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("aaaa-single") << int(QDnsLookup::AAAA) << "aaaa-single" << int(QDnsLookup::NoError) << "" << "2001:db8::1" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("aaaa-multi") << int(QDnsLookup::AAAA) << "aaaa-multi" << int(QDnsLookup::NoError) << "" << "2001:db8::1;2001:db8::2;2001:db8::3" << "" << "" << "" << "" << QByteArray(); + QTest::newRow("a-empty") << int(QDnsLookup::A) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << ""<< "" << ""; + QTest::newRow("a-notfound") << int(QDnsLookup::A) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("a-single") << int(QDnsLookup::A) << "a-single" << int(QDnsLookup::NoError) << "" << "192.0.2.1" << "" << "" << "" << "" << ""; + QTest::newRow("a-multi") << int(QDnsLookup::A) << "a-multi" << int(QDnsLookup::NoError) << "" << "192.0.2.1;192.0.2.2;192.0.2.3" << "" << "" << "" << "" << ""; + QTest::newRow("aaaa-empty") << int(QDnsLookup::AAAA) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("aaaa-notfound") << int(QDnsLookup::AAAA) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("aaaa-single") << int(QDnsLookup::AAAA) << "aaaa-single" << int(QDnsLookup::NoError) << "" << "2001:db8::1" << "" << "" << "" << "" << ""; + QTest::newRow("aaaa-multi") << int(QDnsLookup::AAAA) << "aaaa-multi" << int(QDnsLookup::NoError) << "" << "2001:db8::1;2001:db8::2;2001:db8::3" << "" << "" << "" << "" << ""; - QTest::newRow("any-empty") << int(QDnsLookup::ANY) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("any-notfound") << int(QDnsLookup::ANY) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("any-a-single") << int(QDnsLookup::ANY) << "a-single" << int(QDnsLookup::NoError) << "" << "192.0.2.1" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("any-a-plus-aaaa") << int(QDnsLookup::ANY) << "a-plus-aaaa" << int(QDnsLookup::NoError) << "" << "198.51.100.1;2001:db8::1:1" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("any-multi") << int(QDnsLookup::ANY) << "multi" << int(QDnsLookup::NoError) << "" << "198.51.100.1;198.51.100.2;198.51.100.3;2001:db8::1:1;2001:db8::1:2" << "" << "" << "" << "" << QByteArray(); + QTest::newRow("any-empty") << int(QDnsLookup::ANY) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("any-notfound") << int(QDnsLookup::ANY) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("any-a-single") << int(QDnsLookup::ANY) << "a-single" << int(QDnsLookup::NoError) << "" << "192.0.2.1" << "" << "" << "" << "" << ""; + QTest::newRow("any-a-plus-aaaa") << int(QDnsLookup::ANY) << "a-plus-aaaa" << int(QDnsLookup::NoError) << "" << "198.51.100.1;2001:db8::1:1" << "" << "" << "" << "" << ""; + QTest::newRow("any-multi") << int(QDnsLookup::ANY) << "multi" << int(QDnsLookup::NoError) << "" << "198.51.100.1;198.51.100.2;198.51.100.3;2001:db8::1:1;2001:db8::1:2" << "" << "" << "" << "" << ""; - QTest::newRow("mx-empty") << int(QDnsLookup::MX) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("mx-notfound") << int(QDnsLookup::MX) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("mx-single") << int(QDnsLookup::MX) << "mx-single" << int(QDnsLookup::NoError) << "" << "" << "10 multi" << "" << "" << "" << QByteArray(); - QTest::newRow("mx-single-cname") << int(QDnsLookup::MX) << "mx-single-cname" << int(QDnsLookup::NoError) << "" << "" << "10 cname" << "" << "" << "" << QByteArray(); - QTest::newRow("mx-multi") << int(QDnsLookup::MX) << "mx-multi" << int(QDnsLookup::NoError) << "" << "" << "10 multi;20 a-single" << "" << "" << "" << QByteArray(); + QTest::newRow("mx-empty") << int(QDnsLookup::MX) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("mx-notfound") << int(QDnsLookup::MX) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("mx-single") << int(QDnsLookup::MX) << "mx-single" << int(QDnsLookup::NoError) << "" << "" << "10 multi" << "" << "" << "" << ""; + QTest::newRow("mx-single-cname") << int(QDnsLookup::MX) << "mx-single-cname" << int(QDnsLookup::NoError) << "" << "" << "10 cname" << "" << "" << "" << ""; + QTest::newRow("mx-multi") << int(QDnsLookup::MX) << "mx-multi" << int(QDnsLookup::NoError) << "" << "" << "10 multi;20 a-single" << "" << "" << "" << ""; QTest::newRow("mx-multi-sameprio") << int(QDnsLookup::MX) << "mx-multi-sameprio" << int(QDnsLookup::NoError) << "" << "" << "10 multi;10 a-single|" - "10 a-single;10 multi" << "" << "" << "" << QByteArray(); + "10 a-single;10 multi" << "" << "" << "" << ""; - QTest::newRow("ns-empty") << int(QDnsLookup::NS) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("ns-notfound") << int(QDnsLookup::NS) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("ns-single") << int(QDnsLookup::NS) << "ns-single" << int(QDnsLookup::NoError) << "" << "" << "" << "ns3.macieira.info." << "" << "" << QByteArray(); - QTest::newRow("ns-multi") << int(QDnsLookup::NS) << "ns-multi" << int(QDnsLookup::NoError) << "" << "" << "" << "gondolin.macieira.info.;ns3.macieira.info." << "" << "" << QByteArray(); + QTest::newRow("ns-empty") << int(QDnsLookup::NS) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("ns-notfound") << int(QDnsLookup::NS) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("ns-single") << int(QDnsLookup::NS) << "ns-single" << int(QDnsLookup::NoError) << "" << "" << "" << "ns3.macieira.info." << "" << "" << ""; + QTest::newRow("ns-multi") << int(QDnsLookup::NS) << "ns-multi" << int(QDnsLookup::NoError) << "" << "" << "" << "gondolin.macieira.info.;ns3.macieira.info." << "" << "" << ""; - QTest::newRow("ptr-empty") << int(QDnsLookup::PTR) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("ptr-notfound") << int(QDnsLookup::PTR) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("ptr-single") << int(QDnsLookup::PTR) << "ptr-single" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "a-single" << "" << QByteArray(); + QTest::newRow("ptr-empty") << int(QDnsLookup::PTR) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("ptr-notfound") << int(QDnsLookup::PTR) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("ptr-single") << int(QDnsLookup::PTR) << "ptr-single" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "a-single" << "" << ""; - QTest::newRow("srv-empty") << int(QDnsLookup::SRV) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("srv-notfound") << int(QDnsLookup::SRV) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("srv-single") << int(QDnsLookup::SRV) << "_echo._tcp.srv-single" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "5 0 7 multi" << QByteArray(); - QTest::newRow("srv-prio") << int(QDnsLookup::SRV) << "_echo._tcp.srv-prio" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "1 0 7 multi;2 0 7 a-plus-aaaa" << QByteArray(); + QTest::newRow("srv-empty") << int(QDnsLookup::SRV) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("srv-notfound") << int(QDnsLookup::SRV) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("srv-single") << int(QDnsLookup::SRV) << "_echo._tcp.srv-single" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "5 0 7 multi" << ""; + QTest::newRow("srv-prio") << int(QDnsLookup::SRV) << "_echo._tcp.srv-prio" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "1 0 7 multi;2 0 7 a-plus-aaaa" << ""; QTest::newRow("srv-weighted") << int(QDnsLookup::SRV) << "_echo._tcp.srv-weighted" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "5 75 7 multi;5 25 7 a-plus-aaaa|" - "5 25 7 a-plus-aaaa;5 75 7 multi" << QByteArray(); + "5 25 7 a-plus-aaaa;5 75 7 multi" << ""; QTest::newRow("srv-multi") << int(QDnsLookup::SRV) << "_echo._tcp.srv-multi" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "1 50 7 multi;2 50 7 a-single;2 50 7 aaaa-single;3 50 7 a-multi|" - "1 50 7 multi;2 50 7 aaaa-single;2 50 7 a-single;3 50 7 a-multi" << QByteArray(); + "1 50 7 multi;2 50 7 aaaa-single;2 50 7 a-single;3 50 7 a-multi" << ""; - QTest::newRow("txt-empty") << int(QDnsLookup::TXT) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("txt-notfound") << int(QDnsLookup::TXT) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << QByteArray(); - QTest::newRow("txt-single") << int(QDnsLookup::TXT) << "txt-single" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "" << QByteArray("Hello"); + QTest::newRow("txt-empty") << int(QDnsLookup::TXT) << "" << int(QDnsLookup::InvalidRequestError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("txt-notfound") << int(QDnsLookup::TXT) << "invalid.invalid" << int(QDnsLookup::NotFoundError) << "" << "" << "" << "" << "" << "" << ""; + QTest::newRow("txt-single") << int(QDnsLookup::TXT) << "txt-single" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "" << "Hello"; + QTest::newRow("txt-multi-onerr") << int(QDnsLookup::TXT) << "txt-multi-onerr" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "" << "Hello World"; + QTest::newRow("txt-multi-multirr") << int(QDnsLookup::TXT) << "txt-multi-multirr" << int(QDnsLookup::NoError) << "" << "" << "" << "" << "" << "" << "Hello;World"; } void tst_QDnsLookup::lookup() @@ -187,7 +189,7 @@ void tst_QDnsLookup::lookup() QFETCH(QString, ns); QFETCH(QString, ptr); QFETCH(QString, srv); - QFETCH(QByteArray, txt); + QFETCH(QString, txt); // transform the inputs domain = domainName(domain); @@ -276,15 +278,19 @@ void tst_QDnsLookup::lookup() qPrintable("Actual: " + services.join(';') + "\nExpected one of:\n" + srv_alternatives.join('\n'))); // text - if (!txt.isEmpty()) { - QVERIFY(!lookup.textRecords().isEmpty()); - const QDnsTextRecord firstRecord = lookup.textRecords().first(); - QCOMPARE(firstRecord.name(), domain); - QCOMPARE(firstRecord.values().size(), 1); - QCOMPARE(firstRecord.values().first(), txt); - } else { - QVERIFY(lookup.textRecords().isEmpty()); + QStringList texts; + foreach (const QDnsTextRecord &record, lookup.textRecords()) { + QCOMPARE(record.name(), domain); + QString text; + foreach (const QByteArray &ba, record.values()) { + if (!text.isEmpty()) + text += ' '; + text += QString::fromLatin1(ba); + } + texts << text; } + texts.sort(); + QCOMPARE(texts.join(';'), txt); } void tst_QDnsLookup::lookupReuse() From c11a7d16c7056da4086a87c9e85b89f8466be032 Mon Sep 17 00:00:00 2001 From: aavit Date: Tue, 28 May 2013 13:31:55 +0200 Subject: [PATCH 60/60] Fixes QKeyEvent::count() on Windows All other main platform plugins leave the count parameter at its default value (1). For improved compatibility, make the Windows plugin do the same, instead of hardcoding the value to 0. Task-number: QTBUG-31285 Change-Id: Id87fd559d13f42391be3200d5ff2393285f0d2a6 Reviewed-by: Friedemann Kleint Reviewed-by: Gatis Paeglis --- .../platforms/windows/qwindowskeymapper.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/platforms/windows/qwindowskeymapper.cpp b/src/plugins/platforms/windows/qwindowskeymapper.cpp index 924d604641d..f6163ed8c73 100644 --- a/src/plugins/platforms/windows/qwindowskeymapper.cpp +++ b/src/plugins/platforms/windows/qwindowskeymapper.cpp @@ -793,7 +793,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms // A multi-character key or a Input method character // not found by our look-ahead if (msgType == WM_CHAR || msgType == WM_IME_CHAR) { - sendExtendedPressRelease(receiver, 0, Qt::KeyboardModifier(state), scancode, vk_key, nModifiers, messageKeyText(msg), false, 0); + sendExtendedPressRelease(receiver, 0, Qt::KeyboardModifier(state), scancode, vk_key, nModifiers, messageKeyText(msg), false); return true; } @@ -822,13 +822,13 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms if (dirStatus == VK_LSHIFT && ((msg.wParam == VK_SHIFT && GetKeyState(VK_LCONTROL)) || (msg.wParam == VK_CONTROL && GetKeyState(VK_LSHIFT)))) { - sendExtendedPressRelease(receiver, Qt::Key_Direction_L, 0, scancode, msg.wParam, nModifiers, QString(), false, 0); + sendExtendedPressRelease(receiver, Qt::Key_Direction_L, 0, scancode, msg.wParam, nModifiers, QString(), false); result = true; dirStatus = 0; } else if (dirStatus == VK_RSHIFT && ( (msg.wParam == VK_SHIFT && GetKeyState(VK_RCONTROL)) || (msg.wParam == VK_CONTROL && GetKeyState(VK_RSHIFT)))) { - sendExtendedPressRelease(receiver, Qt::Key_Direction_R, 0, scancode, msg.wParam, nModifiers, QString(), false, 0); + sendExtendedPressRelease(receiver, Qt::Key_Direction_R, 0, scancode, msg.wParam, nModifiers, QString(), false); result = true; dirStatus = 0; } else { @@ -1020,9 +1020,9 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms if (rec) { if (code < Qt::Key_Shift || code > Qt::Key_ScrollLock) { QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyRelease, code, - Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, rec->text, true, 0); + Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, rec->text, true); QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyPress, code, - Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, rec->text, true, 0); + Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, rec->text, true); result = true; } } @@ -1033,7 +1033,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms const char a = uch.row() ? 0 : uch.cell(); key_recorder.storeKey(msg.wParam, a, state, text); QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyPress, code, - Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, text, false, 0); + Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, text, false); result =true; bool store = true; #ifndef Q_OS_WINCE @@ -1077,7 +1077,7 @@ bool QWindowsKeyMapper::translateKeyEventInternal(QWindow *window, const MSG &ms code = Qt::Key_Backtab; QWindowSystemInterface::handleExtendedKeyEvent(receiver, QEvent::KeyRelease, code, Qt::KeyboardModifier(state), scancode, msg.wParam, nModifiers, - (rec ? rec->text : QString()), false, 0); + (rec ? rec->text : QString()), false); result = true; #ifndef Q_OS_WINCE // don't pass Alt to Windows unless we are embedded in a non-Qt window