From 44554f497d941acdc8c8e37948f77e04445f34d2 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 10 Sep 2009 19:34:39 +1000 Subject: Make opengl fragment program generator output license header. Stops the license checker failing each time the file is re-generated. Also added "_P" to the generated header guard, as it's a private header. Reviewed-by: Gunnar Sletta --- src/opengl/util/fragmentprograms_p.h | 4 +-- src/opengl/util/generator.cpp | 57 ++++++++++++++++++++++++++++++++++-- 2 files changed, 57 insertions(+), 4 deletions(-) diff --git a/src/opengl/util/fragmentprograms_p.h b/src/opengl/util/fragmentprograms_p.h index 15315e5..364f99f 100644 --- a/src/opengl/util/fragmentprograms_p.h +++ b/src/opengl/util/fragmentprograms_p.h @@ -38,8 +38,8 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -#ifndef FRAGMENTPROGRAMS_H -#define FRAGMENTPROGRAMS_H +#ifndef FRAGMENTPROGRAMS_P_H +#define FRAGMENTPROGRAMS_P_H // // W A R N I N G diff --git a/src/opengl/util/generator.cpp b/src/opengl/util/generator.cpp index 87f42db..4704d54 100644 --- a/src/opengl/util/generator.cpp +++ b/src/opengl/util/generator.cpp @@ -258,8 +258,61 @@ void writeIncludeFile(const QSet &variables, QLatin1String tab(" "); - out << "#ifndef FRAGMENTPROGRAMS_H\n" - << "#define FRAGMENTPROGRAMS_H\n\n"; + out << "/****************************************************************************\n" + "**\n" + "** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\n" + "** All rights reserved.\n" + "** Contact: Nokia Corporation (qt-info@nokia.com)\n" + "**\n" + "** This file is part of the test suite of the Qt Toolkit.\n" + "**\n" + "** $QT_BEGIN_LICENSE:LGPL$\n" + "** No Commercial Usage\n" + "** This file contains pre-release code and may not be distributed.\n" + "** You may use this file in accordance with the terms and conditions\n" + "** contained in the Technology Preview License Agreement accompanying\n" + "** this package.\n" + "**\n" + "** GNU Lesser General Public License Usage\n" + "** Alternatively, this file may be used under the terms of the GNU Lesser\n" + "** General Public License version 2.1 as published by the Free Software\n" + "** Foundation and appearing in the file LICENSE.LGPL included in the\n" + "** packaging of this file. Please review the following information to\n" + "** ensure the GNU Lesser General Public License version 2.1 requirements\n" + "** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.\n" + "**\n" + "** In addition, as a special exception, Nokia gives you certain additional\n" + "** rights. These rights are described in the Nokia Qt LGPL Exception\n" + "** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.\n" + "**\n" + "** If you have questions regarding the use of this file, please contact\n" + "** Nokia at qt-info@nokia.com.\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "**\n" + "** $QT_END_LICENSE$\n" + "**\n" + "****************************************************************************/\n" + "\n" + "#ifndef FRAGMENTPROGRAMS_P_H\n" + "#define FRAGMENTPROGRAMS_P_H\n" + "\n" + "//\n" + "// W A R N I N G\n" + "// -------------\n" + "//\n" + "// This file is not part of the Qt API. It exists purely as an\n" + "// implementation detail. This header file may change from version to\n" + "// version without notice, or even be removed.\n" + "//\n" + "// We mean it.\n" + "//\n" + "\n"; out << "enum FragmentVariable {\n"; foreach (QString str, variables) -- cgit v0.12 From ebc0079ee5fa70564816817a2ea4aecd7ff189db Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 10 Sep 2009 14:42:58 +0200 Subject: tst_qinfo: Be more verbose in case of failures --- tests/auto/qhostinfo/tst_qhostinfo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp index 1fd805a..5f4dfaf 100644 --- a/tests/auto/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp @@ -236,6 +236,9 @@ void tst_QHostInfo::lookupIPv4() QVERIFY(!QTestEventLoop::instance().timeout()); QVERIFY(lookupDone); + if ((int)lookupResults.error() != (int)err) { + qWarning() << hostname << "=>" << lookupResults.errorString(); + } QCOMPARE((int)lookupResults.error(), (int)err); QStringList tmp; @@ -351,6 +354,9 @@ void tst_QHostInfo::blockingLookup() tmp.append(hostInfo.addresses().at(i).toString()); tmp.sort(); + if ((int)hostInfo.error() != (int)err) { + qWarning() << hostname << "=>" << lookupResults.errorString(); + } QCOMPARE((int)hostInfo.error(), (int)err); QStringList expected = addresses.split(' '); -- cgit v0.12 From 77945d775006c296632c293fb320c5308901d5ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Thu, 10 Sep 2009 14:40:52 +0200 Subject: Only reset the backend pointer after we're done with it Since 925912ebf552417306a5bd20fd986afda6a582be QNetworkReplyImplPrivate no longer holds its own pointer to the network cache and relies on the backend to get it. Since the cache is used in our call to finished, we must reset the backend only after that. This fixes a crash I was seeing in Arora... Reviewed-by: Markus Goetz Reviewed-by: Peter Hartmann --- src/network/access/qnetworkreplyimpl.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 29bf238..87dd19a 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -540,10 +540,6 @@ void QNetworkReplyImpl::abort() return; // stop both upload and download - if (d->backend) { - d->backend->deleteLater(); - d->backend = 0; - } if (d->outgoingData) disconnect(d->outgoingData, 0, this, 0); if (d->copyDevice) @@ -557,6 +553,12 @@ void QNetworkReplyImpl::abort() d->finished(); } d->state = QNetworkReplyImplPrivate::Aborted; + + // finished may access the backend + if (d->backend) { + d->backend->deleteLater(); + d->backend = 0; + } } void QNetworkReplyImpl::close() -- cgit v0.12 From cc59689e4a09349b7475426bf98f4c0839f6ba6a Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 10 Sep 2009 15:41:42 +0200 Subject: QHttpNetworkConnection autotest: include zlib dir test was not building Reviewed-by: Trust Me --- tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro index 9593c55..2e41fcd 100644 --- a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro +++ b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro @@ -1,4 +1,5 @@ load(qttest_p4) SOURCES += tst_qhttpnetworkreply.cpp +INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib QT = core network -- cgit v0.12 From 53e1c8983b0093ce2b63f90eaee856f57961c00f Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 10 Sep 2009 15:55:08 +0200 Subject: restoring a minimized window on Windows CE didn't work After restoring a minimized window we only saw the window decoration. All content was missing. That's because we don't get a WM_SIZE message for restoring the window. We must react on WM_ACTIVATE in this case. This fixes the issue for Windows mobile too. Task-number: 260702 Reviewed-by: thartman --- src/gui/kernel/qapplication_win.cpp | 8 ++++++-- src/gui/kernel/qguifunctions_wince.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index d7d079c..1babb69 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -2084,8 +2084,12 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam // where it got it from; it would simply get a 0 value as the old focus widget. #ifdef Q_OS_WINCE { - if (widget->windowState() & Qt::WindowMinimized) - widget->dataPtr()->window_state &= ~Qt::WindowMinimized; + if (widget->windowState() & Qt::WindowMinimized) { + if (widget->windowState() & Qt::WindowMaximized) + widget->showMaximized(); + else + widget->show(); + } #else if (!(widget->windowState() & Qt::WindowMinimized)) { #endif diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp index 6d6aec8..4bfc14b 100644 --- a/src/gui/kernel/qguifunctions_wince.cpp +++ b/src/gui/kernel/qguifunctions_wince.cpp @@ -314,8 +314,8 @@ void qt_wince_maximize(QWidget *widget) } } -void qt_wince_minimize(HWND hwnd) { - +void qt_wince_minimize(HWND hwnd) +{ uint exstyle = GetWindowLongW(hwnd, GWL_EXSTYLE); uint style = GetWindowLongW(hwnd, GWL_STYLE); RECT rect; @@ -324,10 +324,13 @@ void qt_wince_minimize(HWND hwnd) { AdjustWindowRectEx(&crect, style & ~WS_OVERLAPPED, FALSE, exstyle); MoveWindow(hwnd, rect.left - crect.left, rect.top - crect.top, 0, 0, true); SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong (hwnd, GWL_EXSTYLE) | WS_EX_NODRAG); +#ifdef Q_OS_WINCE_WM ShowWindow(hwnd, SW_HIDE); +#else + ShowWindow(hwnd, SW_MINIMIZE); +#endif } - void qt_wince_hide_taskbar(HWND hwnd) { if (ptrAygFullScreen) ptrAygFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON | SHFS_HIDESTARTICON); -- cgit v0.12