summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-09-12 21:59:46 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-09-12 21:59:46 (GMT)
commitf129de853154dc1d72cb5651606ca009c3b1f814 (patch)
tree8d500bcf8e6ef1f6a5f4ea0bc63f1810e6b167ff
parent1aa4cfab2d437210b8c0b064fa3bd071e53374c1 (diff)
parent0293aff5c44202e5c62e229b74d8bd0bf9206185 (diff)
downloadQt-f129de853154dc1d72cb5651606ca009c3b1f814.zip
Qt-f129de853154dc1d72cb5651606ca009c3b1f814.tar.gz
Qt-f129de853154dc1d72cb5651606ca009c3b1f814.tar.bz2
Merge branch '4.5' into 4.6
Conflicts: tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
-rw-r--r--src/gui/kernel/qcocoamenuloader_mac.mm2
-rw-r--r--src/gui/kernel/qwidget_mac.mm7
-rw-r--r--src/gui/painting/qprintengine_win.cpp10
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp10
-rw-r--r--src/opengl/util/fragmentprograms_p.h4
-rw-r--r--src/opengl/util/generator.cpp57
-rw-r--r--tests/auto/qhostinfo/tst_qhostinfo.cpp6
-rw-r--r--tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro1
-rw-r--r--tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro1
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp2
10 files changed, 82 insertions, 18 deletions
diff --git a/src/gui/kernel/qcocoamenuloader_mac.mm b/src/gui/kernel/qcocoamenuloader_mac.mm
index ce2a92c..9ab077f 100644
--- a/src/gui/kernel/qcocoamenuloader_mac.mm
+++ b/src/gui/kernel/qcocoamenuloader_mac.mm
@@ -44,6 +44,7 @@
#include <qaction.h>
#include <qcoreapplication.h>
#include <private/qcocoamenuloader_mac_p.h>
+#include <private/qapplication_p.h>
#include <private/qt_mac_p.h>
#include <qmenubar.h>
@@ -198,6 +199,7 @@ QT_USE_NAMESPACE
- (IBAction)qtDispatcherToQAction:(id)sender
{
+ QScopedLoopLevelCounter loopLevelCounter(QApplicationPrivate::instance()->threadData);
NSMenuItem *item = static_cast<NSMenuItem *>(sender);
if (QAction *action = reinterpret_cast<QAction *>([item tag])) {
action->trigger();
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index faf7f82..6b040bc 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -120,7 +120,7 @@ QT_BEGIN_NAMESPACE
extern "C" {
extern OSStatus _HIViewScrollRectWithOptions(HIViewRef, const HIRect *, CGFloat, CGFloat,
- OptionBits);
+ OptionBits) __attribute__ ((weak));
}
#define kHIViewScrollRectAdjustInvalid 1
#define kHIViewScrollRectDontInvalidateRevealedArea 2
@@ -3785,7 +3785,10 @@ static void qt_mac_update_widget_posisiton(QWidget *q, QRect oldRect, QRect newR
(oldRect.isValid() == false || newRect.isValid() == false) ||
// the position update is a part of a drag-and-drop operation
- QDragManager::self()->object
+ QDragManager::self()->object ||
+
+ // we are on Panther (no HIViewSetNeedsDisplayInRect)
+ QSysInfo::MacintoshVersion < QSysInfo::MV_10_4
){
HIViewSetFrame(view, &bounds);
return;
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index bd1d304..e59155c 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -367,11 +367,11 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem
return ;
}
- // We only want to convert the glyphs to text if the entire string is latin1
- bool latin1String = true;
+ // We only want to convert the glyphs to text if the entire string is compatible with ASCII
+ bool convertToText = true;
for (int i=0; i < ti.num_chars; ++i) {
- if (ti.chars[i].unicode() >= 0x100) {
- latin1String = false;
+ if (ti.chars[i].unicode() >= 0x80) {
+ convertToText = false;
break;
}
}
@@ -381,7 +381,7 @@ void QWin32PrintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem
SelectObject(d->hdc, CreatePen(PS_SOLID, 1, cf));
SetTextColor(d->hdc, cf);
- draw_text_item_win(p, ti, d->hdc, latin1String, d->matrix, d->devPaperRect.topLeft());
+ draw_text_item_win(p, ti, d->hdc, convertToText, d->matrix, d->devPaperRect.topLeft());
DeleteObject(SelectObject(d->hdc,GetStockObject(HOLLOW_BRUSH)));
DeleteObject(SelectObject(d->hdc,GetStockObject(BLACK_PEN)));
}
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index 1dad58c..83afddd 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -582,10 +582,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)
@@ -599,6 +595,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()
diff --git a/src/opengl/util/fragmentprograms_p.h b/src/opengl/util/fragmentprograms_p.h
index dad8795..18da5c8 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 548a97b..62d19ff 100644
--- a/src/opengl/util/generator.cpp
+++ b/src/opengl/util/generator.cpp
@@ -259,8 +259,61 @@ void writeIncludeFile(const QSet<QString> &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)
diff --git a/tests/auto/qhostinfo/tst_qhostinfo.cpp b/tests/auto/qhostinfo/tst_qhostinfo.cpp
index ac6adf7..4d63e10 100644
--- a/tests/auto/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/qhostinfo/tst_qhostinfo.cpp
@@ -247,6 +247,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;
@@ -362,6 +365,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(' ');
diff --git a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
index 5ce3a2d..0021bc1 100644
--- a/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
+++ b/tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro
@@ -1,7 +1,6 @@
load(qttest_p4)
SOURCES += tst_qhttpnetworkconnection.cpp
INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib
-
requires(contains(QT_CONFIG,private_tests))
QT = core network
diff --git a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
index f86250a..1782b43 100644
--- a/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
+++ b/tests/auto/qhttpnetworkreply/qhttpnetworkreply.pro
@@ -1,7 +1,6 @@
load(qttest_p4)
SOURCES += tst_qhttpnetworkreply.cpp
INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/zlib
-
requires(contains(QT_CONFIG,private_tests))
QT = core network
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index b16b3cc..9cd9f39 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -771,7 +771,7 @@ void tst_QSslCertificate::nulInSan()
QVERIFY(!dnssan.isEmpty());
QVERIFY(dnssan != "www.bank.com");
- static const char realSAN[] = "www.bank.com\0.badguy.com";
+ static const char realSAN[] = "www.bank.com\0www.badguy.com";
QCOMPARE(dnssan, QString::fromLatin1(realSAN, sizeof realSAN - 1));
}