Merge remote-tracking branch 'origin/stable' into dev

Change-Id: I0218a1f08b89f2d56757ab35eec06799d2a1492f
This commit is contained in:
Frederik Gladhorn 2013-07-15 10:36:58 +02:00
commit 1190863fc0
25 changed files with 198 additions and 64 deletions

View File

@ -198,7 +198,7 @@ void SlippyMap::download()
m_url = QUrl(path.arg(zoom).arg(grab.x()).arg(grab.y()));
QNetworkRequest request;
request.setUrl(m_url);
request.setRawHeader("User-Agent", "Nokia (Qt) Graphics Dojo 1.0");
request.setRawHeader("User-Agent", "Digia (Qt) Graphics Dojo 1.0");
request.setAttribute(QNetworkRequest::User, QVariant(grab));
m_manager.get(request);
}

View File

@ -48,8 +48,8 @@ int main(int argc, char *argv[])
Q_INIT_RESOURCE(styleexample);
app.setApplicationName("style");
app.setOrganizationName("Nokia");
app.setOrganizationDomain("com.nokia.qt");
app.setOrganizationName("QtProject");
app.setOrganizationDomain("www.qt-project.org");
StyleWidget widget;
widget.showFullScreen();

View File

@ -189,7 +189,7 @@ void RenderArea::paintEvent(QPaintEvent * /* event */)
painter.drawPath(path);
break;
case Text:
painter.drawText(rect, Qt::AlignCenter, tr("Qt by\nNokia"));
painter.drawText(rect, Qt::AlignCenter, tr("Qt by\nDigia"));
break;
case Pixmap:
painter.drawPixmap(10, 10, pixmap);

View File

@ -22,6 +22,25 @@
#define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL3
#endif
#ifdef __MINGW32__
#ifndef D3DCOMPILER_DLL
//Add define + typedefs for older MinGW-w64 headers (pre 5783)
#define D3DCOMPILER_DLL L"d3dcompiler_43.dll"
HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
#endif // D3DCOMPILER_DLL
#endif // __MINGW32__
namespace rx
{

View File

@ -0,0 +1,52 @@
From 82fd5de3ae5e242730fdaf8044f17227337d881c Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@digia.com>
Date: Wed, 10 Jul 2013 14:00:13 +0200
Subject: [PATCH] Fix compilation of libGLESv2 with older MinGW-w64 headers
Fix compilation of libGLESv2 for mingw-headers predating MinGW-w64
svn commit 5567 (like MinGW-builds gcc 4.7.2-rev8, the toolchain
we officially support).
Commit 5567 added the D3DCOMPILER_DLL define to d3dcompiler.h, but with
a trailing semicolon that has then fixed in commit 5783. Any toolchain
that ships MinGW-w64 headers from a version in between (like
MinGW-builds gcc 4.7.2-rev11) will unfortunately remain broken.
Change-Id: I31272a1a991c4fc0f1611f8fb7510be51d6bb925
---
.../angle/src/libGLESv2/renderer/Renderer.cpp | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
index 41cdb8b..218356c 100644
--- a/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
+++ b/src/3rdparty/angle/src/libGLESv2/renderer/Renderer.cpp
@@ -22,6 +22,25 @@
#define ANGLE_COMPILE_OPTIMIZATION_LEVEL D3DCOMPILE_OPTIMIZATION_LEVEL3
#endif
+#ifdef __MINGW32__
+
+#ifndef D3DCOMPILER_DLL
+
+//Add define + typedefs for older MinGW-w64 headers (pre 5783)
+
+#define D3DCOMPILER_DLL L"d3dcompiler_43.dll"
+
+HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
+ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
+ const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
+typedef HRESULT (WINAPI *pD3DCompile)(const void *data, SIZE_T data_size, const char *filename,
+ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
+ const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
+
+#endif // D3DCOMPILER_DLL
+
+#endif // __MINGW32__
+
namespace rx
{
--
1.8.3.msysgit.0

View File

@ -394,7 +394,7 @@ QCoreApplicationPrivate::QCoreApplicationPrivate(int &aargc, char **aargv, uint
static const char *const empty = "";
if (argc == 0 || argv == 0) {
argc = 0;
argv = (char **)&empty; // ouch! careful with QCoreApplication::argv()!
argv = (char **)&empty;
}
#ifdef Q_OS_WIN
qCopy(argv, argv + argc, origArgv);
@ -589,10 +589,6 @@ void QCoreApplicationPrivate::initLocale()
Note that some arguments supplied by the user may have been
processed and removed by QCoreApplication.
In cases where command line arguments need to be obtained using the
argv() function, you must convert them from the local string encoding
using QString::fromLocal8Bit().
\section1 Locale Settings
On Unix/Linux Qt is configured to use the system locale settings by

View File

@ -1683,13 +1683,13 @@ static dbus_int32_t server_slot = -1;
void QDBusConnectionPrivate::setServer(DBusServer *s, const QDBusErrorInternal &error)
{
mode = ServerMode;
if (!s) {
handleError(error);
return;
}
server = s;
mode = ServerMode;
dbus_bool_t data_allocated = q_dbus_server_allocate_data_slot(&server_slot);
if (data_allocated && server_slot < 0)
@ -1720,13 +1720,13 @@ void QDBusConnectionPrivate::setServer(DBusServer *s, const QDBusErrorInternal &
void QDBusConnectionPrivate::setPeer(DBusConnection *c, const QDBusErrorInternal &error)
{
mode = PeerMode;
if (!c) {
handleError(error);
return;
}
connection = c;
mode = PeerMode;
q_dbus_connection_set_exit_on_disconnect(connection, false);
q_dbus_connection_set_watch_functions(connection,
@ -1773,13 +1773,13 @@ static QDBusConnection::ConnectionCapabilities connectionCapabilies(DBusConnecti
void QDBusConnectionPrivate::setConnection(DBusConnection *dbc, const QDBusErrorInternal &error)
{
mode = ClientMode;
if (!dbc) {
handleError(error);
return;
}
connection = dbc;
mode = ClientMode;
const char *service = q_dbus_bus_get_unique_name(connection);
Q_ASSERT(service);

View File

@ -101,6 +101,17 @@ Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const
f->aliases.push_back(alias);
}
QString qt_resolveFontFamilyAlias(const QString &alias)
{
if (!alias.isEmpty()) {
const QFontDatabasePrivate *d = privateDb();
for (int i = 0; i < d->count; ++i)
if (d->families[i]->matchesFamilyName(alias))
return d->families[i]->name;
}
return alias;
}
static QStringList fallbackFamilies(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
{
QStringList retList = QGuiApplicationPrivate::platformIntegration()->fontDatabase()->fallbacksForFamily(family,style,styleHint,script);

View File

@ -379,9 +379,11 @@ QFont QPlatformFontDatabase::defaultFont() const
\since 5.0
*/
QString qt_resolveFontFamilyAlias(const QString &alias);
QString QPlatformFontDatabase::resolveFontFamilyAlias(const QString &family) const
{
return family;
return qt_resolveFontFamilyAlias(family);
}
/*!

View File

@ -497,12 +497,13 @@ void QHttpSocketEngine::slotSocketConnected()
Q_D(QHttpSocketEngine);
// Send the greeting.
const char method[] = "CONNECT ";
const char method[] = "CONNECT";
QByteArray peerAddress = d->peerName.isEmpty() ?
d->peerAddress.toString().toLatin1() :
QUrl::toAce(d->peerName);
QByteArray path = peerAddress + ':' + QByteArray::number(d->peerPort);
QByteArray data = method;
data += " ";
data += path;
data += " HTTP/1.1\r\n";
data += "Proxy-Connection: keep-alive\r\n";

View File

@ -768,6 +768,9 @@ QStringList QFontconfigDatabase::addApplicationFont(const QByteArray &fontData,
QString QFontconfigDatabase::resolveFontFamilyAlias(const QString &family) const
{
QString resolved = QBasicFontDatabase::resolveFontFamilyAlias(family);
if (!resolved.isEmpty() && resolved != family)
return resolved;
FcPattern *pattern = FcPatternCreate();
if (!pattern)
return family;
@ -781,7 +784,7 @@ QString QFontconfigDatabase::resolveFontFamilyAlias(const QString &family) const
FcChar8 *familyAfterSubstitution = 0;
FcPatternGetString(pattern, FC_FAMILY, 0, &familyAfterSubstitution);
QString resolved = QString::fromUtf8((const char *) familyAfterSubstitution);
resolved = QString::fromUtf8((const char *) familyAfterSubstitution);
FcPatternDestroy(pattern);
return resolved;

View File

@ -299,12 +299,14 @@ QDirectFbKeyMap::QDirectFbKeyMap()
insert(DIKS_VOLUME_UP , Qt::Key_VolumeUp);
insert(DIKS_VOLUME_DOWN , Qt::Key_VolumeDown);
insert(DIKS_MUTE , Qt::Key_VolumeMute);
insert(DIKS_PLAYPAUSE , Qt::Key_Pause);
insert(DIKS_PLAYPAUSE , Qt::Key_MediaTogglePlayPause);
insert(DIKS_PLAY , Qt::Key_MediaPlay);
insert(DIKS_STOP , Qt::Key_MediaStop);
insert(DIKS_RECORD , Qt::Key_MediaRecord);
insert(DIKS_PREVIOUS , Qt::Key_MediaPrevious);
insert(DIKS_NEXT , Qt::Key_MediaNext);
insert(DIKS_REWIND , Qt::Key_AudioRewind);
insert(DIKS_FASTFORWARD , Qt::Key_AudioForward);
insert(DIKS_F1 , Qt::Key_F1);
insert(DIKS_F2 , Qt::Key_F2);

View File

@ -1586,11 +1586,14 @@ static QStringList extraTryFontsForFamily(const QString& family)
break;
}
}
QStringList fm = QFontDatabase().families();
QFontDatabase db;
const QStringList families = db.families();
const char **tf = tryFonts;
while (tf && *tf) {
if (fm.contains(QLatin1String(*tf)))
result << QLatin1String(*tf);
// QTBUG-31689, family might be an English alias for a localized font name.
const QString family = QString::fromLatin1(*tf);
if (families.contains(family) || db.hasFamily(family))
result << family;
++tf;
}
}

View File

@ -1397,7 +1397,7 @@ static const char * xcb_atomnames = {
#if XCB_USE_MAEMO_WINDOW_PROPERTIES
"_MEEGOTOUCH_ORIENTATION_ANGLE\0"
#endif
"_XSETTINGS_SETTINGS"
"_XSETTINGS_SETTINGS\0" // \0\0 terminates loop.
};
xcb_atom_t QXcbConnection::atom(QXcbAtom::Atom atom) const

View File

@ -69,6 +69,7 @@
#include <qheaderview.h>
#include <qlineedit.h>
#include <qmainwindow.h>
#include <qmdisubwindow.h>
#include <qmenubar.h>
#include <qpaintdevice.h>
#include <qpainter.h>
@ -849,8 +850,17 @@ static QSize qt_aqua_get_known_size(QStyle::ContentsType ct, const QWidget *widg
gbi.direction = QApplication::isRightToLeft() ? kThemeGrowLeft | kThemeGrowDown
: kThemeGrowRight | kThemeGrowDown;
gbi.size = sz == QAquaSizeSmall ? kHIThemeGrowBoxSizeSmall : kHIThemeGrowBoxSizeNormal;
if (HIThemeGetGrowBoxBounds(&p, &gbi, &r) == noErr)
ret = QSize(QSysInfo::MacintoshVersion <= QSysInfo::MV_10_6 ? r.size.width : 0, r.size.height);
if (HIThemeGetGrowBoxBounds(&p, &gbi, &r) == noErr) {
int width = 0;
// Snow Leopard and older get a size grip, as well as QMdiSubWindows.
if (QSysInfo::MacintoshVersion <= QSysInfo::MV_10_6
#ifndef QT_NO_MDIAREA
|| (widg && widg->parentWidget() && qobject_cast<QMdiSubWindow *>(widg->parentWidget()))
#endif
)
width = r.size.width;
ret = QSize(width, r.size.height);
}
}
break;
case QStyle::CT_ComboBox:
@ -4333,8 +4343,12 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
case CE_ProgressBarGroove:
break;
case CE_SizeGrip: {
// We do not draw size grips on versions > 10.6
if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_6)
// We do not draw size grips on versions > 10.6 unless it's a QMdiSubWindow
if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_6
#ifndef QT_NO_MDIAREA
&& !(w && w->parentWidget() && qobject_cast<QMdiSubWindow *>(w->parentWidget()))
#endif
)
break;
if (w && w->testAttribute(Qt::WA_MacOpaqueSizeGrip)) {

View File

@ -523,10 +523,11 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
case PE_Frame: {
#ifndef QT_NO_ACCESSIBILITY
if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText)
|| QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText)) {
|| QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText) ||
#else
if (false) {
if (
#endif
(widget && widget->inherits("QTextEdit"))) {
painter->save();
int stateId = ETS_NORMAL;
if (!(state & State_Enabled))

View File

@ -49,6 +49,7 @@
#include <qevent.h>
#include <qfontmetrics.h>
#include <qwindow.h>
#include <qscreen.h>
#include <qmainwindow.h>
#include <qrubberband.h>
#include <qstylepainter.h>
@ -1387,9 +1388,17 @@ bool QDockWidget::event(QEvent *event)
d->toggleViewAction->setChecked(false);
emit visibilityChanged(false);
break;
case QEvent::Show:
case QEvent::Show: {
d->toggleViewAction->setChecked(true);
emit visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0);
QPoint parentTopLeft(0, 0);
if (isWindow()) {
if (const QWindow *window = windowHandle())
parentTopLeft = window->screen()->availableVirtualGeometry().topLeft();
else
parentTopLeft = QGuiApplication::primaryScreen()->availableVirtualGeometry().topLeft();
}
emit visibilityChanged(geometry().right() >= parentTopLeft.x() && geometry().bottom() >= parentTopLeft.y());
}
break;
#endif
case QEvent::ApplicationLayoutDirectionChange:

View File

@ -2927,7 +2927,7 @@ void QMdiSubWindow::showEvent(QShowEvent *showEvent)
#if !defined(QT_NO_SIZEGRIP) && defined(Q_OS_MAC) && !defined(QT_NO_STYLE_MAC)
if (qobject_cast<QMacStyle *>(style()) && !d->sizeGrip
&& !(windowFlags() & Qt::FramelessWindowHint)) {
d->setSizeGrip(new QSizeGrip(0));
d->setSizeGrip(new QSizeGrip(this));
Q_ASSERT(d->sizeGrip);
if (isMinimized())
d->setSizeGripVisible(false);

View File

@ -2,7 +2,6 @@ CONFIG += testcase
CONFIG += parallel_test
TARGET = tst_qfontdatabase
SOURCES += tst_qfontdatabase.cpp
DEFINES += SRCDIR=\\\"$$PWD\\\"
QT += testlib
!mac: QT += core-private gui-private

View File

@ -54,6 +54,7 @@ public:
virtual ~tst_QFontDatabase();
public slots:
void initTestCase();
void init();
void cleanup();
private slots:
@ -73,13 +74,16 @@ private slots:
void addAppFont_data();
void addAppFont();
void aliases();
private:
const QString m_testFont;
};
tst_QFontDatabase::tst_QFontDatabase()
: m_testFont(QFINDTESTDATA("FreeMono.ttf"))
{
#ifndef Q_OS_IRIX
QDir::setCurrent(SRCDIR);
#endif
}
tst_QFontDatabase::~tst_QFontDatabase()
@ -87,6 +91,11 @@ tst_QFontDatabase::~tst_QFontDatabase()
}
void tst_QFontDatabase::initTestCase()
{
QVERIFY(!m_testFont.isEmpty());
}
void tst_QFontDatabase::init()
{
// TODO: Add initialization code here.
@ -228,13 +237,13 @@ void tst_QFontDatabase::addAppFont()
int id;
if (useMemoryFont) {
QFile fontfile("FreeMono.ttf");
QFile fontfile(m_testFont);
fontfile.open(QIODevice::ReadOnly);
QByteArray fontdata = fontfile.readAll();
QVERIFY(!fontdata.isEmpty());
id = QFontDatabase::addApplicationFontFromData(fontdata);
} else {
id = QFontDatabase::addApplicationFont("FreeMono.ttf");
id = QFontDatabase::addApplicationFont(m_testFont);
}
#if defined(Q_OS_HPUX) && defined(QT_NO_FONTCONFIG)
// Documentation says that X11 systems that don't have fontconfig
@ -268,5 +277,22 @@ void tst_QFontDatabase::addAppFont()
QCOMPARE(db.families(), oldFamilies);
}
QT_BEGIN_NAMESPACE
Q_GUI_EXPORT void qt_registerAliasToFontFamily(const QString &familyName, const QString &alias);
QT_END_NAMESPACE
void tst_QFontDatabase::aliases()
{
QFontDatabase db;
const QStringList families = db.families();
QVERIFY(!families.isEmpty());
const QString firstFont = families.front();
QVERIFY(db.hasFamily(firstFont));
const QString alias = QStringLiteral("AliasToFirstFont") + firstFont;
QVERIFY(!db.hasFamily(alias));
qt_registerAliasToFontFamily(firstFont, alias);
QVERIFY(db.hasFamily(alias));
}
QTEST_MAIN(tst_QFontDatabase)
#include "tst_qfontdatabase.moc"

View File

@ -273,8 +273,6 @@ void tst_QAbstractNetworkCache::cacheControl_data()
QTest::newRow("304-3") << QNetworkRequest::AlwaysCache << "httpcachetest_cachecontrol.cgi?max-age=1000, must-revalidate" << false;
QTest::newRow("304-4") << QNetworkRequest::PreferCache << "httpcachetest_cachecontrol.cgi?max-age=1000, must-revalidate" << true;
// see QTBUG-7060
//QTest::newRow("nokia-boston") << QNetworkRequest::PreferNetwork << "http://waplabdc.nokia-boston.com/browser/users/venkat/cache/Cache_directives/private_1b.asp" << true;
QTest::newRow("304-2b") << QNetworkRequest::PreferNetwork << "httpcachetest_cachecontrol200.cgi?private, max-age=1000" << true;
QTest::newRow("304-4b") << QNetworkRequest::PreferCache << "httpcachetest_cachecontrol200.cgi?private, max-age=1000" << true;
}

View File

@ -825,8 +825,6 @@ void tst_QHttpNetworkConnection::getMultiple()
// for the "real" results, use a URL that has "internet latency" for you. Then (6 connections, pipelining) will win.
// for LAN latency, you will possibly get that (1 connection, no pipelining) is the fastest
QHttpNetworkRequest *request = new QHttpNetworkRequest("http://" + QtNetworkSettings::serverName() + "/qtest/rfc3252.txt");
// located in Berlin:
//QHttpNetworkRequest *request = new QHttpNetworkRequest(QUrl("http://klinsmann.nokia.trolltech.de/~berlin/qtcreatorad.gif"));
if (pipeliningAllowed)
request->setPipeliningAllowed(true);
requests.append(request);

View File

@ -248,10 +248,10 @@ public:
void addDbs()
{
//addDb("QOCI", "localhost", "system", "penandy");
// addDb( "QOCI8", "//horsehead.nokia.troll.no:1521/pony.troll.no", "scott", "tiger" ); // Oracle 9i on horsehead
// addDb( "QOCI8", "//horsehead.nokia.troll.no:1521/ustest.troll.no", "scott", "tiger", "" ); // Oracle 9i on horsehead
// addDb( "QOCI8", "//iceblink.nokia.troll.no:1521/ice.troll.no", "scott", "tiger", "" ); // Oracle 8 on iceblink (not currently working)
// addDb( "QOCI", "//silence.nokia.troll.no:1521/testdb", "scott", "tiger" ); // Oracle 10g on silence
// addDb( "QOCI8", "//horsehead.qt-project.org:1521/pony.troll.no", "scott", "tiger" ); // Oracle 9i on horsehead
// addDb( "QOCI8", "//horsehead.qt-project.org:1521/ustest.troll.no", "scott", "tiger", "" ); // Oracle 9i on horsehead
// addDb( "QOCI8", "//iceblink.qt-project.org:1521/ice.troll.no", "scott", "tiger", "" ); // Oracle 8 on iceblink (not currently working)
// addDb( "QOCI", "//silence.qt-project.org:1521/testdb", "scott", "tiger" ); // Oracle 10g on silence
// addDb( "QOCI", "//bq-oracle10g.qt-project.org:1521/XE", "scott", "tiger" ); // Oracle 10gexpress
// This requires a local ODBC data source to be configured( pointing to a MySql database )
@ -261,22 +261,22 @@ public:
// addDb( "QODBC", "silencetestdb", "troll", "trond", "silence" );
// addDb( "QODBC", "horseheadtestdb", "troll", "trondk", "horsehead" );
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no" );
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3307 );
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3308, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 4.1.1
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 3309, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 5.0.18 Linux
// addDb( "QMYSQL3", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // MySQL 5.1.36 Windows
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org" );
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org", 3307 );
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org", 3308, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 4.1.1
// addDb( "QMYSQL3", "testdb", "troll", "trond", "horsehead.qt-project.org", 3309, "CLIENT_COMPRESS=1;CLIENT_SSL=1" ); // MySQL 5.0.18 Linux
// addDb( "QMYSQL3", "testdb", "troll", "trond", "silence.qt-project.org" ); // MySQL 5.1.36 Windows
// addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql41.qt-project.org" ); // MySQL 4.1.22-2.el4 linux
// addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql50.qt-project.org" ); // MySQL 5.0.45-7.el5 linux
// addDb( "QMYSQL3", "testdb", "testuser", "Ee4Gabf6_", "bq-mysql51.qt-project.org" ); // MySQL 5.1.36-6.7.2.i586 linux
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no" ); // V7.2 NOT SUPPORTED!
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5434 ); // V7.2 NOT SUPPORTED! Multi-byte
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5435 ); // V7.3
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5436 ); // V7.4
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.nokia.troll.no", 5437 ); // V8.0.3
// addDb( "QPSQL7", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // V8.2.1, UTF-8
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org" ); // V7.2 NOT SUPPORTED!
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5434 ); // V7.2 NOT SUPPORTED! Multi-byte
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5435 ); // V7.3
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5436 ); // V7.4
// addDb( "QPSQL7", "testdb", "troll", "trond", "horsehead.qt-project.org", 5437 ); // V8.0.3
// addDb( "QPSQL7", "testdb", "troll", "trond", "silence.qt-project.org" ); // V8.2.1, UTF-8
// addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-postgres74.qt-project.org" ); // Version 7.4.19-1.el4_6.1
// addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql81.qt-project.org" ); // Version 8.1.11-1.el5_1.1
@ -284,11 +284,11 @@ public:
// addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql90.qt-project.org" ); // Version 9.0.0
// addDb( "QDB2", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // DB2 v9.1 on silence
// addDb( "QDB2", "testdb", "troll", "trond", "silence.qt-project.org" ); // DB2 v9.1 on silence
// addDb( "QDB2", "testdb", "testuser", "Ee4Gabf6_", "bq-db2-972.qt-project.org" ); // DB2
// yes - interbase really wants the physical path on the host machine.
// addDb( "QIBASE", "/opt/interbase/qttest.gdb", "SYSDBA", "masterkey", "horsehead.nokia.troll.no" );
// addDb( "QIBASE", "/opt/interbase/qttest.gdb", "SYSDBA", "masterkey", "horsehead.qt-project.org" );
// addDb( "QIBASE", "silence.troll.no:c:\\ibase\\testdb", "SYSDBA", "masterkey", "" ); // InterBase 7.5 on silence
// addDb( "QIBASE", "silence.troll.no:c:\\ibase\\testdb_ascii", "SYSDBA", "masterkey", "" ); // InterBase 7.5 on silence
// addDb( "QIBASE", "/opt/firebird/databases/testdb.fdb", "testuser", "Ee4Gabf6_", "firebird1-nokia.trolltech.com.au" ); // Firebird 1.5.5
@ -301,13 +301,13 @@ public:
// addDb("QSQLITE", ":memory:");
addDb( "QSQLITE", QDir::toNativeSeparators(QDir::tempPath()+"/foo.db") );
// addDb( "QSQLITE2", QDir::toNativeSeparators(QDir::tempPath()+"/foo2.db") );
// addDb( "QODBC3", "DRIVER={SQL SERVER};SERVER=iceblink.nokia.troll.no\\ICEBLINK", "troll", "trond", "" );
// addDb( "QODBC3", "DRIVER={SQL Native Client};SERVER=silence.nokia.troll.no\\SQLEXPRESS", "troll", "trond", "" );
// addDb( "QODBC3", "DRIVER={SQL SERVER};SERVER=iceblink.qt-project.org\\ICEBLINK", "troll", "trond", "" );
// addDb( "QODBC3", "DRIVER={SQL Native Client};SERVER=silence.qt-project.org\\SQLEXPRESS", "troll", "trond", "" );
// addDb( "QODBC", "DRIVER={MySQL ODBC 5.1 Driver};SERVER=bq-mysql50.qt-project.org;DATABASE=testdb", "testuser", "Ee4Gabf6_", "" );
// addDb( "QODBC", "DRIVER={MySQL ODBC 5.1 Driver};SERVER=bq-mysql51.qt-project.org;DATABASE=testdb", "testuser", "Ee4Gabf6_", "" );
// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=horsehead.nokia.troll.no;DATABASE=testdb;PORT=4101;UID=troll;PWD=trondk", "troll", "trondk", "" );
// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=silence.nokia.troll.no;DATABASE=testdb;PORT=2392;UID=troll;PWD=trond", "troll", "trond", "" );
// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=horsehead.qt-project.org;DATABASE=testdb;PORT=4101;UID=troll;PWD=trondk", "troll", "trondk", "" );
// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=silence.qt-project.org;DATABASE=testdb;PORT=2392;UID=troll;PWD=trond", "troll", "trond", "" );
// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=bq-winserv2003-x86-01.qt-project.org;DATABASE=testdb;PORT=1433;UID=testuser;PWD=Ee4Gabf6_;TDS_Version=8.0", "", "", "" );
// addDb( "QODBC", "DRIVER={FreeTDS};SERVER=bq-winserv2008-x86-01.qt-project.org;DATABASE=testdb;PORT=1433;UID=testuser;PWD=Ee4Gabf6_;TDS_Version=8.0", "", "", "" );
// addDb( "QTDS7", "testdb", "testuser", "Ee4Gabf6_", "bq-winserv2003" );

View File

@ -873,7 +873,6 @@ void tst_qnetworkreply::httpsRequestChain()
int count = 10;
QNetworkRequest request(QUrl("https://" + QtNetworkSettings::serverName() + "/fluke.gif"));
//QNetworkRequest request(QUrl("https://www.nokia.com/robots.txt"));
// Disable keep-alive so we have the full re-connecting of TCP.
request.setRawHeader("Connection", "close");
@ -883,7 +882,6 @@ void tst_qnetworkreply::httpsRequestChain()
// Warm up DNS cache and then immediately start HTTP
QHostInfo::lookupHost(QtNetworkSettings::serverName(), &helper, SLOT(doNextRequest()));
//QHostInfo::lookupHost("www.nokia.com", &helper, SLOT(doNextRequest()));
// we can use QBENCHMARK_ONCE when we find out how to make it really run once.
// there is still a warmup-run :(

View File

@ -55,15 +55,17 @@ private slots:
};
const char urlC[] = "http://download.qt-project.org/official_releases/online_installers/qt-linux-opensource-1.4.0-x86-online.run";
void tst_qhttpnetworkconnection::bigRemoteFile()
{
QNetworkAccessManager manager;
qint64 size;
QTime t;
QNetworkRequest request(QUrl("http://nds1.nokia.com/files/support/global/phones/software/Nokia_Ovi_Suite_webinstaller.exe"));
QNetworkRequest request(QUrl(QString::fromLatin1(urlC)));
QNetworkReply* reply = manager.get(request);
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
qDebug() << "Starting download";
qDebug() << "Starting download" << urlC;
t.start();
QTestEventLoop::instance().enterLoop(50);
QVERIFY(!QTestEventLoop::instance().timeout());