From 82ddb3a39596b6c245d26c80c1e3935aba04a3a9 Mon Sep 17 00:00:00 2001 From: Kurt Korbatits Date: Tue, 2 Mar 2010 11:12:34 +1000 Subject: Fixed compiler warnings when compiling multimedia module. Reviewed-by:Andrew den Exter --- src/multimedia/base/qmediaserviceprovider.cpp | 14 +++++++++----- src/multimedia/qml/qsoundeffect_qsound_p.cpp | 2 +- src/multimedia/qml/wavedecoder_p.cpp | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/multimedia/base/qmediaserviceprovider.cpp b/src/multimedia/base/qmediaserviceprovider.cpp index eb6505c..d51d682 100644 --- a/src/multimedia/base/qmediaserviceprovider.cpp +++ b/src/multimedia/base/qmediaserviceprovider.cpp @@ -268,7 +268,7 @@ class QPluginServiceProvider : public QMediaServiceProvider public: QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint) { - QString key(type); + QString key(QString::fromLatin1(type.constData(),type.length())); QListplugins; foreach (QObject *obj, loader()->instances(key)) { @@ -383,7 +383,8 @@ public: const QStringList& codecs, int flags) const { - QList instances = loader()->instances(serviceType); + QList instances = loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length())); if (instances.isEmpty()) return QtMultimedia::NotSupported; @@ -424,7 +425,8 @@ public: QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const { - QList instances = loader()->instances(serviceType); + QList instances = loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length())); QStringList supportedTypes; @@ -457,7 +459,8 @@ public: { QList res; - foreach(QObject *obj, loader()->instances(serviceType)) { + foreach(QObject *obj, loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length()))) { QMediaServiceSupportedDevicesInterface *iface = qobject_cast(obj); @@ -471,7 +474,8 @@ public: QString deviceDescription(const QByteArray &serviceType, const QByteArray &device) { - foreach(QObject *obj, loader()->instances(serviceType)) { + foreach(QObject *obj, loader()->instances( + QString::fromLatin1(serviceType.constData(),serviceType.length()))) { QMediaServiceSupportedDevicesInterface *iface = qobject_cast(obj); diff --git a/src/multimedia/qml/qsoundeffect_qsound_p.cpp b/src/multimedia/qml/qsoundeffect_qsound_p.cpp index 0292d26..df160a9 100644 --- a/src/multimedia/qml/qsoundeffect_qsound_p.cpp +++ b/src/multimedia/qml/qsoundeffect_qsound_p.cpp @@ -157,7 +157,7 @@ void QSoundEffectPrivate::setMedia(const QMediaContent &media) { m_queued = false; - if (media.isNull() || media.canonicalUrl().scheme() != "file") { + if (media.isNull() || media.canonicalUrl().scheme() != QLatin1String("file")) { m_media = QMediaContent(); return; } diff --git a/src/multimedia/qml/wavedecoder_p.cpp b/src/multimedia/qml/wavedecoder_p.cpp index b7d6101..f2277ae 100644 --- a/src/multimedia/qml/wavedecoder_p.cpp +++ b/src/multimedia/qml/wavedecoder_p.cpp @@ -122,7 +122,7 @@ void WaveDecoder::handleData() else { int bps = qFromLittleEndian(header.wave.bitsPerSample); - format.setCodec("audio/pcm"); + format.setCodec(QLatin1String("audio/pcm")); format.setSampleType(bps == 8 ? QAudioFormat::UnSignedInt : QAudioFormat::SignedInt); format.setByteOrder(QAudioFormat::LittleEndian); format.setFrequency(qFromLittleEndian(header.wave.sampleRate)); -- cgit v0.12 From 655228dd7f28d6641cabfeb6a878d9aa1ca8db5e Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Thu, 4 Mar 2010 09:57:42 +1000 Subject: In the way of merges. Remove. --- imports/Qt/multimedia/qmldir | 1 - imports/Qt/widgets/qmldir | 1 - imports/org/webkit/qmldir | 1 - 3 files changed, 3 deletions(-) delete mode 100644 imports/Qt/multimedia/qmldir delete mode 100644 imports/Qt/widgets/qmldir delete mode 100644 imports/org/webkit/qmldir diff --git a/imports/Qt/multimedia/qmldir b/imports/Qt/multimedia/qmldir deleted file mode 100644 index 0e6f656..0000000 --- a/imports/Qt/multimedia/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin multimedia diff --git a/imports/Qt/widgets/qmldir b/imports/Qt/widgets/qmldir deleted file mode 100644 index 6f19878..0000000 --- a/imports/Qt/widgets/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin widgets diff --git a/imports/org/webkit/qmldir b/imports/org/webkit/qmldir deleted file mode 100644 index 258aa2c..0000000 --- a/imports/org/webkit/qmldir +++ /dev/null @@ -1 +0,0 @@ -plugin webkitqmlplugin -- cgit v0.12 From 752550cec220cf42c77ee932a581d88e104fc256 Mon Sep 17 00:00:00 2001 From: Wolfgang Beck Date: Mon, 8 Mar 2010 16:12:48 +1000 Subject: Add missing QT namespace. --- src/plugins/bearer/nativewifi/platformdefs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/bearer/nativewifi/platformdefs.h b/src/plugins/bearer/nativewifi/platformdefs.h index 57ae852..d67525a 100644 --- a/src/plugins/bearer/nativewifi/platformdefs.h +++ b/src/plugins/bearer/nativewifi/platformdefs.h @@ -52,6 +52,8 @@ #define WLAN_AVAILABLE_NETWORK_HAS_PROFILE 2 #define DOT11_SSID_MAX_LENGTH 32 +QT_BEGIN_NAMESPACE + struct WLAN_NOTIFICATION_DATA { DWORD NotificationSource; DWORD NotificationCode; @@ -319,4 +321,6 @@ extern WlanScanProto local_WlanScan; extern WlanFreeMemoryProto local_WlanFreeMemory; extern WlanCloseHandleProto local_WlanCloseHandle; +QT_END_NAMESPACE + #endif // PLATFORMDEFS_H -- cgit v0.12 From 64284216cf9bbda4b8bbac9f19852d4c12a2bb97 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 22 Apr 2010 16:24:42 +1000 Subject: Long live Qt 4.8! --- dist/changes-4.8.0 | 130 +++++++++++++++++++++ src/corelib/global/qglobal.h | 4 +- src/plugins/qpluginbase.pri | 2 +- src/qbase.pri | 2 +- tests/auto/selftests/expected_cmptest.txt | 2 +- tests/auto/selftests/expected_crashes_3.txt | 2 +- tests/auto/selftests/expected_longstring.txt | 2 +- tests/auto/selftests/expected_maxwarnings.txt | 2 +- tests/auto/selftests/expected_skip.txt | 2 +- .../tools/assistant/doc/assistant.qdocconf | 2 +- tools/qdoc3/doc/qdoc-manual.qdocconf | 2 +- tools/qdoc3/test/assistant.qdocconf | 6 +- tools/qdoc3/test/designer.qdocconf | 4 +- tools/qdoc3/test/linguist.qdocconf | 6 +- tools/qdoc3/test/qmake.qdocconf | 6 +- tools/qdoc3/test/qt-build-docs.qdocconf | 10 +- tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf | 10 +- tools/qdoc3/test/qt-html-templates.qdocconf | 2 +- tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf | 8 +- tools/qdoc3/test/qt.qdocconf | 10 +- tools/qdoc3/test/qt_zh_CN.qdocconf | 10 +- 21 files changed, 177 insertions(+), 47 deletions(-) create mode 100644 dist/changes-4.8.0 diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 new file mode 100644 index 0000000..39ea604 --- /dev/null +++ b/dist/changes-4.8.0 @@ -0,0 +1,130 @@ +Qt 4.8 introduces many new features and improvements as well as bugfixes +over the 4.7.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + + http://qt.nokia.com/doc/4.8 + +The Qt version 4.8 series is binary compatible with the 4.7.x series. +Applications compiled for 4.7 will continue to run with 4.8. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt.nokia.com/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* General * +**************************************************************************** + +General Improvements +-------------------- + +- + +Third party components +---------------------- + + - Updated libpng to version x.y.z + + +**************************************************************************** +* Library * +**************************************************************************** + +QtCore +------ + +QtGui +----- + + +**************************************************************************** +* Database Drivers * +**************************************************************************** + + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Qt for Linux/X11 +---------------- + + +Qt for Windows +-------------- + + +Qt for Mac OS X +--------------- + + +Qt for Embedded Linux +--------------------- + + +Qt for Windows CE +----------------- + + +**************************************************************************** +* Compiler Specific Changes * +**************************************************************************** + + +**************************************************************************** +* Tools * +**************************************************************************** + +- Build System + +- Assistant + + +- Designer + + +- Linguist + - Linguist GUI + + - lupdate + + - lrelease + + +- rcc + + +- moc + + +- uic + + +- uic3 + + +- qmake + + +- configure + + +- qtconfig + + +- qt3to4 + + +**************************************************************************** +* Plugins * +**************************************************************************** + + +**************************************************************************** +* Important Behavior Changes * +**************************************************************************** + diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 3118f8f..7359b6d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -44,11 +44,11 @@ #include -#define QT_VERSION_STR "4.7.0" +#define QT_VERSION_STR "4.8.0" /* QT_VERSION is (major << 16) + (minor << 8) + patch. */ -#define QT_VERSION 0x040700 +#define QT_VERSION 0x040800 /* can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0)) */ diff --git a/src/plugins/qpluginbase.pri b/src/plugins/qpluginbase.pri index 8b119b5..45e3976 100644 --- a/src/plugins/qpluginbase.pri +++ b/src/plugins/qpluginbase.pri @@ -1,6 +1,6 @@ TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.7.0 + VERSION=4.8.0 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/src/qbase.pri b/src/qbase.pri index 4a75565..9c4732e 100644 --- a/src/qbase.pri +++ b/src/qbase.pri @@ -4,7 +4,7 @@ INCLUDEPATH *= $$QMAKE_INCDIR_QT/$$TARGET #just for today to have some compat isEmpty(QT_ARCH):!isEmpty(ARCH):QT_ARCH=$$ARCH #another compat that will rot for change #215700 TEMPLATE = lib isEmpty(QT_MAJOR_VERSION) { - VERSION=4.7.0 + VERSION=4.8.0 } else { VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION} } diff --git a/tests/auto/selftests/expected_cmptest.txt b/tests/auto/selftests/expected_cmptest.txt index e9f94c9..f4baf67 100644 --- a/tests/auto/selftests/expected_cmptest.txt +++ b/tests/auto/selftests/expected_cmptest.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Cmptest ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.8.0, Qt 4.8.0 PASS : tst_Cmptest::initTestCase() PASS : tst_Cmptest::compare_boolfuncs() PASS : tst_Cmptest::compare_pointerfuncs() diff --git a/tests/auto/selftests/expected_crashes_3.txt b/tests/auto/selftests/expected_crashes_3.txt index 3aced25..b7f462a 100644 --- a/tests/auto/selftests/expected_crashes_3.txt +++ b/tests/auto/selftests/expected_crashes_3.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Crashes ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.8.0, Qt 4.8.0 PASS : tst_Crashes::initTestCase() QFATAL : tst_Crashes::crash() Received signal 11 FAIL! : tst_Crashes::crash() Received a fatal error. diff --git a/tests/auto/selftests/expected_longstring.txt b/tests/auto/selftests/expected_longstring.txt index a6ad5d0..6cb6267 100644 --- a/tests/auto/selftests/expected_longstring.txt +++ b/tests/auto/selftests/expected_longstring.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_LongString ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.8.0, Qt 4.8.0 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/selftests/expected_maxwarnings.txt b/tests/auto/selftests/expected_maxwarnings.txt index 908bd5d..165bdda 100644 --- a/tests/auto/selftests/expected_maxwarnings.txt +++ b/tests/auto/selftests/expected_maxwarnings.txt @@ -1,5 +1,5 @@ ********* Start testing of MaxWarnings ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.8.0, Qt 4.8.0 PASS : MaxWarnings::initTestCase() QWARN : MaxWarnings::warn() 0 QWARN : MaxWarnings::warn() 1 diff --git a/tests/auto/selftests/expected_skip.txt b/tests/auto/selftests/expected_skip.txt index 4345a6c..9908c88 100644 --- a/tests/auto/selftests/expected_skip.txt +++ b/tests/auto/selftests/expected_skip.txt @@ -1,5 +1,5 @@ ********* Start testing of tst_Skip ********* -Config: Using QTest library 4.7.0, Qt 4.7.0 +Config: Using QTest library 4.8.0, Qt 4.8.0 PASS : tst_Skip::initTestCase() SKIP : tst_Skip::test() skipping all Loc: [/home/rmcgover/depot/qt-git/mainline/tests/auto/selftests/skip/tst_skip.cpp(68)] diff --git a/tools/assistant/tools/assistant/doc/assistant.qdocconf b/tools/assistant/tools/assistant/doc/assistant.qdocconf index 3b4b5f8..491f159 100644 --- a/tools/assistant/tools/assistant/doc/assistant.qdocconf +++ b/tools/assistant/tools/assistant/doc/assistant.qdocconf @@ -12,5 +12,5 @@ HTML.footer = "


\n" \ "\n" \ "\n" \ "\n" \ - "\n" \ + "\n" \ "
Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)Trademarks
Qt 4.7.0
Qt 4.8.0
" diff --git a/tools/qdoc3/doc/qdoc-manual.qdocconf b/tools/qdoc3/doc/qdoc-manual.qdocconf index 26fd09c..5a725b9 100644 --- a/tools/qdoc3/doc/qdoc-manual.qdocconf +++ b/tools/qdoc3/doc/qdoc-manual.qdocconf @@ -32,7 +32,7 @@ HTML.postheader = "" \ "" \ "Home: QDoc Manual ·" \ - "" \ + "" \ " Qt Reference Documentation" \ "\n" \ "
" diff --git a/tools/qdoc3/test/assistant.qdocconf b/tools/qdoc3/test/assistant.qdocconf index 5308afd..42d2193 100644 --- a/tools/qdoc3/test/assistant.qdocconf +++ b/tools/qdoc3/test/assistant.qdocconf @@ -6,18 +6,18 @@ include(qt-defines.qdocconf) project = Qt Assistant description = Qt Assistant Manual -url = http://qt.nokia.com/doc/4.7 +url = http://qt.nokia.com/doc/4.8 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Assistant qhp.Assistant.file = assistant.qhp -qhp.Assistant.namespace = com.trolltech.assistant.470 +qhp.Assistant.namespace = com.trolltech.assistant.480 qhp.Assistant.virtualFolder = qdoc qhp.Assistant.indexTitle = Qt Assistant Manual qhp.Assistant.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.Assistant.filterAttributes = qt 4.7.0 tools assistant +qhp.Assistant.filterAttributes = qt 4.8.0 tools assistant qhp.Assistant.customFilters.Assistant.name = Qt Assistant Manual qhp.Assistant.customFilters.Assistant.filterAttributes = qt tools assistant qhp.Assistant.subprojects = manual examples diff --git a/tools/qdoc3/test/designer.qdocconf b/tools/qdoc3/test/designer.qdocconf index 2eb3d96..cf85e58 100644 --- a/tools/qdoc3/test/designer.qdocconf +++ b/tools/qdoc3/test/designer.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt Designer description = Qt Designer Manual -url = http://qt.nokia.com/doc/4.7 +url = http://qt.nokia.com/doc/4.8 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index @@ -17,7 +17,7 @@ qhp.Designer.namespace = com.trolltech.designer.470 qhp.Designer.virtualFolder = qdoc qhp.Designer.indexTitle = Qt Designer Manual qhp.Designer.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.Designer.filterAttributes = qt 4.7.0 tools designer +qhp.Designer.filterAttributes = qt 4.8.0 tools designer qhp.Designer.customFilters.Designer.name = Qt Designer Manual qhp.Designer.customFilters.Designer.filterAttributes = qt tools designer qhp.Designer.subprojects = manual examples diff --git a/tools/qdoc3/test/linguist.qdocconf b/tools/qdoc3/test/linguist.qdocconf index ac536be..697ae6f 100644 --- a/tools/qdoc3/test/linguist.qdocconf +++ b/tools/qdoc3/test/linguist.qdocconf @@ -6,18 +6,18 @@ include(qt-defines.qdocconf) project = Qt Linguist description = Qt Linguist Manual -url = http://qt.nokia.com/doc/4.7 +url = http://qt.nokia.com/doc/4.8 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Linguist qhp.Linguist.file = linguist.qhp -qhp.Linguist.namespace = com.trolltech.linguist.470 +qhp.Linguist.namespace = com.trolltech.linguist.480 qhp.Linguist.virtualFolder = qdoc qhp.Linguist.indexTitle = Qt Linguist Manual qhp.Linguist.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.Linguist.filterAttributes = qt 4.7.0 tools linguist +qhp.Linguist.filterAttributes = qt 4.8.0 tools linguist qhp.Linguist.customFilters.Linguist.name = Qt Linguist Manual qhp.Linguist.customFilters.Linguist.filterAttributes = qt tools linguist qhp.Linguist.subprojects = manual examples diff --git a/tools/qdoc3/test/qmake.qdocconf b/tools/qdoc3/test/qmake.qdocconf index bd47028..af1b13d 100644 --- a/tools/qdoc3/test/qmake.qdocconf +++ b/tools/qdoc3/test/qmake.qdocconf @@ -6,18 +6,18 @@ include(qt-defines.qdocconf) project = QMake description = QMake Manual -url = http://qt.nokia.com/doc/4.7 +url = http://qt.nokia.com/doc/4.8 indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = qmake qhp.qmake.file = qmake.qhp -qhp.qmake.namespace = com.trolltech.qmake.470 +qhp.qmake.namespace = com.trolltech.qmake.480 qhp.qmake.virtualFolder = qdoc qhp.qmake.indexTitle = QMake Manual qhp.qmake.extraFiles = classic.css images/qt-logo.png images/trolltech-logo.png -qhp.qmake.filterAttributes = qt 4.7.0 tools qmake +qhp.qmake.filterAttributes = qt 4.8.0 tools qmake qhp.qmake.customFilters.qmake.name = qmake Manual qhp.qmake.customFilters.qmake.filterAttributes = qt tools qmake qhp.qmake.subprojects = manual diff --git a/tools/qdoc3/test/qt-build-docs.qdocconf b/tools/qdoc3/test/qt-build-docs.qdocconf index dbff4e2..24db29f 100644 --- a/tools/qdoc3/test/qt-build-docs.qdocconf +++ b/tools/qdoc3/test/qt-build-docs.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt description = Qt Reference Documentation -url = http://qt.nokia.com/doc/4.7 +url = http://qt.nokia.com/doc/4.8 sourceencoding = UTF-8 outputencoding = UTF-8 @@ -15,7 +15,7 @@ naturallanguage = en_US qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.480 qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation @@ -57,9 +57,9 @@ qhp.Qt.extraFiles = index.html \ images/stylesheet-coffee-plastique.png -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.8.0 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.8.0 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes diff --git a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf index 461c069..73ca4ac 100644 --- a/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-build-docs_zh_CN.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt description = Qt Reference Documentation -url = http://qt.nokia.com/doc/zh_CN/4.7 +url = http://qt.nokia.com/doc/zh_CN/4.8 sourceencoding = UTF-8 outputencoding = UTF-8 @@ -17,15 +17,15 @@ indexes = $QT_BUILD_TREE/doc-build/html-qt/qt.index qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.480 qhp.Qt.virtualFolder = qdoc qhp.Qt.title = 教程 qhp.Qt.indexTitle = 教程 qhp.Qt.selectors = fake:example -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc zh_CN -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.8.0 qtrefdoc zh_CN +qhp.Qt.customFilters.Qt.name = Qt 4.8.0 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 67a25f3..215fdf8 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -16,7 +16,7 @@ HTML.postheader = "
\n" \ "
\n" \ "
\n" \ " \n" \ diff --git a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf index 5fb68cf..94ac431 100644 --- a/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf @@ -6,13 +6,13 @@ HTML.postheader = "\n" \ "" \ "" \ "
  " \ - "" \ + "" \ "主页 ·" \ - " " \ + " " \ "所有类 ·" \ - " " \ + " " \ "所有函数 ·" \ - " " \ + " " \ "简介" \ "
" diff --git a/tools/qdoc3/test/qt.qdocconf b/tools/qdoc3/test/qt.qdocconf index cc3e436..3bb03b9 100644 --- a/tools/qdoc3/test/qt.qdocconf +++ b/tools/qdoc3/test/qt.qdocconf @@ -8,7 +8,7 @@ project = Qt versionsym = version = %VERSION% description = Qt Reference Documentation -url = http://qt.nokia.com/doc/4.7 +url = http://qt.nokia.com/doc/4.8 sourceencoding = UTF-8 outputencoding = UTF-8 @@ -17,7 +17,7 @@ naturallanguage = en_US qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.480 qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = @@ -59,9 +59,9 @@ qhp.Qt.extraFiles = index.html \ images/dynamiclayouts-example.png \ images/stylesheet-coffee-plastique.png -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.8.0 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.8.0 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes diff --git a/tools/qdoc3/test/qt_zh_CN.qdocconf b/tools/qdoc3/test/qt_zh_CN.qdocconf index c5d2c88..45a945e 100644 --- a/tools/qdoc3/test/qt_zh_CN.qdocconf +++ b/tools/qdoc3/test/qt_zh_CN.qdocconf @@ -8,7 +8,7 @@ project = Qt versionsym = version = %VERSION% description = Qt Reference Documentation -url = http://qt.nokia.com/doc/zh_CN/4.7 +url = http://qt.nokia.com/doc/zh_CN/4.8 sourceencoding = UTF-8 outputencoding = UTF-8 @@ -19,15 +19,15 @@ indexes = $QTDIR/doc/html/qt.index qhp.projects = Qt qhp.Qt.file = qt.qhp -qhp.Qt.namespace = com.trolltech.qt.470 +qhp.Qt.namespace = com.trolltech.qt.480 qhp.Qt.virtualFolder = qdoc qhp.Qt.title = 教程 qhp.Qt.indexTitle = 教程 qhp.Qt.selectors = fake:example -qhp.Qt.filterAttributes = qt 4.7.0 qtrefdoc zh_CN -qhp.Qt.customFilters.Qt.name = Qt 4.7.0 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.0 +qhp.Qt.filterAttributes = qt 4.8.0 qtrefdoc zh_CN +qhp.Qt.customFilters.Qt.name = Qt 4.8.0 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.8.0 # Files not referenced in any qdoc file (last four are needed by qtdemo) # See also extraimages.HTML -- cgit v0.12 From 17c48bde799d2ac382a6a95cd2d9d05e8d5828ad Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 22 Apr 2010 17:01:56 +1000 Subject: Add new QDataStream version for Qt 4.8. --- src/corelib/io/qdatastream.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/corelib/io/qdatastream.h b/src/corelib/io/qdatastream.h index 222ba8f..774c4bc 100644 --- a/src/corelib/io/qdatastream.h +++ b/src/corelib/io/qdatastream.h @@ -85,10 +85,11 @@ public: Qt_4_4 = 10, Qt_4_5 = 11, Qt_4_6 = 12, - Qt_4_7 = Qt_4_6 -#if QT_VERSION >= 0x040800 -#error Add the datastream version for this Qt version + Qt_4_7 = Qt_4_6, Qt_4_8 = Qt_4_7 +#if QT_VERSION >= 0x040900 +#error Add the datastream version for this Qt version + Qt_4_9 = Qt_4_8 #endif }; -- cgit v0.12 From 26eb22954b8fe766d5ad63c8d21124a8393bed17 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Apr 2010 19:06:14 +0200 Subject: [networkselftest] Add the FTP proxy and SMB ports to the test. --- tests/auto/networkselftest/tst_networkselftest.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index 752e368..041765c 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -408,6 +408,8 @@ void tst_NetworkSelfTest::remotePortsOpen_data() QTest::newRow("http-proxy-auth-ntlm") << 3130; QTest::newRow("socks5-proxy") << 1080; QTest::newRow("socks5-proxy-auth") << 1081; + QTest::newRow("ftp-proxy") << 2121; + QTest::newRow("smb") << 139; } void tst_NetworkSelfTest::remotePortsOpen() @@ -725,7 +727,7 @@ void tst_NetworkSelfTest::supportsSsl() #ifdef QT_NO_OPENSSL QFAIL("SSL not compiled in"); #else - QVERIFY(QSslSocket::supportsSsl()); + QVERIFY2(QSslSocket::supportsSsl(), "Could not load SSL libraries"); #endif } -- cgit v0.12 From 1692e4824a6c7b255b2f7d492ca69c4092d173ad Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Apr 2010 19:53:14 +0200 Subject: [networkselftest] Add a test to try the SMB server. --- tests/auto/networkselftest/tst_networkselftest.cpp | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index 041765c..d40a3fa 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -80,6 +80,7 @@ private slots: void httpProxyNtlmAuth(); void socks5Proxy(); void socks5ProxyAuth(); + void smbServer(); // ssl supported test void supportsSsl(); @@ -731,5 +732,61 @@ void tst_NetworkSelfTest::supportsSsl() #endif } +void tst_NetworkSelfTest::smbServer() +{ + static const char contents[] = "This is 34 bytes. Do not change..."; +#ifdef Q_OS_WIN + // use Windows's native UNC support to try and open a file on the server + QString filepath = QString("\\\\%1\\testshare\\test.pri").arg(QtNetworkSettings::winServerName()); + FILE *f = fopen(filepath.toLatin1(), "rb"); + QVERIFY2(f, qt_error_string().toLocal8Bit()); + + char buf[128]; + ssize_t ret = fread(buf, sizeof buf, 1, f); + fclose(f); + + QCOMPARE(ret, strlen(contents)); + QVERIFY(memcmp(ret, contents, strlen(contents)) == 0); +#else + // try to use Samba + QString progname = "smbclient"; + QProcess smbclient; + smbclient.start(progname, QIODevice::ReadOnly); + if (!smbclient.waitForStarted(2000)) + QSKIP("Could not find smbclient (from Samba), cannot continue testing", SkipAll); + if (!smbclient.waitForFinished(2000) || smbclient.exitStatus() != QProcess::NormalExit) + QSKIP("smbclient isn't working, cannot continue testing", SkipAll); + smbclient.close(); + + // try listing the server + smbclient.start(progname, QStringList() << "-g" << "-N" << "-L" << QtNetworkSettings::winServerName(), QIODevice::ReadOnly); + QVERIFY(smbclient.waitForFinished(5000)); + if (smbclient.exitStatus() != QProcess::NormalExit) + QSKIP("smbclient crashed", SkipAll); + QVERIFY2(smbclient.exitCode() == 0, "Test server not found"); + + QByteArray output = smbclient.readAll(); + QVERIFY(output.contains("Disk|testshare|")); + QVERIFY(output.contains("Disk|testsharewritable|")); + QVERIFY(output.contains("Disk|testsharelargefile|")); + qDebug() << "Test server found and shares are correct"; + + // try getting a file + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + env.insert("PAGER", "/bin/cat"); // just in case + smbclient.setProcessEnvironment(env); + smbclient.start(progname, QStringList() << "-N" << "-c" << "more test.pri" + << QString("\\\\%1\\testshare").arg(QtNetworkSettings::winServerName()), QIODevice::ReadOnly); + QVERIFY(smbclient.waitForFinished(5000)); + if (smbclient.exitStatus() != QProcess::NormalExit) + QSKIP("smbclient crashed", SkipAll); + QVERIFY2(smbclient.exitCode() == 0, "File //qt-test-server/testshare/test.pri not found"); + + output = smbclient.readAll(); + QCOMPARE(output.constData(), contents); + qDebug() << "Test file is correct"; +#endif +} + QTEST_MAIN(tst_NetworkSelfTest) #include "tst_networkselftest.moc" -- cgit v0.12 From d60a1d03453ab08ac12f85b4cf3beb0d4902b406 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Apr 2010 19:55:58 +0200 Subject: [networkselftest] Add a test for the FTP proxy server --- tests/auto/networkselftest/tst_networkselftest.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index d40a3fa..2cfe1cb 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -72,6 +72,7 @@ private slots: // specific protocol tests void ftpServer(); + void ftpProxyServer(); void imapServer(); void httpServer(); void httpsServer(); @@ -458,11 +459,11 @@ void tst_NetworkSelfTest::fileLineEndingTest() QVERIFY2(!lineEndingType.compare("LF"), QString("Reference file %1 has %2 as line ending - Git checkout issue !?!").arg(referenceName, lineEndingType).toLocal8Bit()); } -static QList ftpChat() +static QList ftpChat(const QByteArray &userSuffix = QByteArray()) { return QList() << Chat::expect("220") << Chat::discardUntil("\r\n") - << Chat::send("USER anonymous\r\n") + << Chat::send("USER anonymous" + userSuffix + "\r\n") << Chat::expect("331") << Chat::discardUntil("\r\n") << Chat::send("PASS user@hostname\r\n") @@ -479,6 +480,11 @@ void tst_NetworkSelfTest::ftpServer() netChat(21, ftpChat()); } +void tst_NetworkSelfTest::ftpProxyServer() +{ + netChat(2121, ftpChat("@" + QtNetworkSettings::serverName().toLatin1())); +} + void tst_NetworkSelfTest::imapServer() { netChat(143, QList() -- cgit v0.12 From 6e4ea4a55ccaf6e5f205c119062d6c2b527442ec Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Apr 2010 20:11:53 +0200 Subject: [networkselftest] Enchance test to verify the layout of the FTP server. --- tests/auto/networkselftest/tst_networkselftest.cpp | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index 2cfe1cb..297f289 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -469,6 +469,33 @@ static QList ftpChat(const QByteArray &userSuffix = QByteArray()) << Chat::send("PASS user@hostname\r\n") << Chat::expect("230") << Chat::discardUntil("\r\n") + + << Chat::send("CWD pub\r\n") + << Chat::expect("250") + << Chat::discardUntil("\r\n") + << Chat::send("CWD dir-not-readable\r\n") + << Chat::expect("550") + << Chat::discardUntil("\r\n") + << Chat::send("PWD\r\n") + << Chat::expect("257 \"/pub\"\r\n") + << Chat::send("SIZE file-not-readable.txt\r\n") + << Chat::expect("213 41\r\n") + << Chat::send("CWD qxmlquery\r\n") + << Chat::expect("250") + << Chat::discardUntil("\r\n") + + << Chat::send("CWD /qtest\r\n") + << Chat::expect("250") + << Chat::discardUntil("\r\n") + << Chat::send("SIZE bigfile\r\n") + << Chat::expect("213 519240\r\n") + << Chat::send("SIZE rfc3252\r\n") + << Chat::expect("213 25962\r\n") + << Chat::send("SIZE rfc3252.txt\r\n") + << Chat::expect("213 25962\r\n") +// << Chat::send("SIZE nonASCII/german_\344\366\374\304\326\334\337\r\n") +// << Chat::expect("213 40\r\n") + << Chat::send("QUIT\r\n") << Chat::expect("221") << Chat::discardUntil("\r\n") -- cgit v0.12 From 5c9581b896f99eda8bd98fa265f9d010e6961dea Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Apr 2010 20:48:32 +0200 Subject: [networkselftest] Verify PUT and DELETE commands and the protected area in HTTP --- tests/auto/networkselftest/tst_networkselftest.cpp | 79 ++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index 297f289..6e07d4a 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -42,6 +42,8 @@ #include #include +#include + #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir // Current path (C:\private\) contains only ascii chars @@ -529,6 +531,14 @@ void tst_NetworkSelfTest::imapServer() void tst_NetworkSelfTest::httpServer() { + QString uniqueExtension; + qsrand(time(0)); +#ifndef Q_OS_WINCE + uniqueExtension = QString("%1%2%3").arg((qulonglong)this).arg(qrand()).arg((qulonglong)time(0)); +#else + uniqueExtension = QString("%1%2").arg((qulonglong)this).arg(qrand()); +#endif + netChat(80, QList() // HTTP/0.9 chat: << Chat::send("GET /\r\n") @@ -557,6 +567,75 @@ void tst_NetworkSelfTest::httpServer() << Chat::discardUntil(" ") << Chat::expect("200 ") << Chat::DiscardUntilDisconnect + + // HTTP protected area + << Chat::Reconnect + << Chat::send("GET /qtest/protected/rfc3252.txt HTTP/1.0\r\n" + "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n" + "Connection: close\r\n" + "\r\n") + << Chat::expect("HTTP/1.") + << Chat::discardUntil(" ") + << Chat::expect("401 ") + << Chat::DiscardUntilDisconnect + + << Chat::Reconnect + << Chat::send("HEAD /qtest/protected/rfc3252.txt HTTP/1.0\r\n" + "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n" + "Connection: close\r\n" + "Authorization: Basic cXNvY2tzdGVzdDpwYXNzd29yZA==\r\n" + "\r\n") + << Chat::expect("HTTP/1.") + << Chat::discardUntil(" ") + << Chat::expect("200 ") + << Chat::DiscardUntilDisconnect + + // DAV area + << Chat::Reconnect + << Chat::send("HEAD /dav/ HTTP/1.0\r\n" + "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n" + "Connection: close\r\n" + "\r\n") + << Chat::expect("HTTP/1.") + << Chat::discardUntil(" ") + << Chat::expect("200 ") + << Chat::DiscardUntilDisconnect + + // HTTP/1.0 PUT + << Chat::Reconnect + << Chat::send("PUT /dav/networkselftest-" + uniqueExtension.toLatin1() + ".txt HTTP/1.0\r\n" + "Content-Length: 5\r\n" + "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n" + "Connection: close\r\n" + "\r\n" + "Hello") + << Chat::expect("HTTP/1.") + << Chat::discardUntil(" ") + << Chat::expect("201 ") + << Chat::DiscardUntilDisconnect + + // check that the file did get uploaded + << Chat::Reconnect + << Chat::send("HEAD /dav/networkselftest-" + uniqueExtension.toLatin1() + ".txt HTTP/1.0\r\n" + "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n" + "Connection: close\r\n" + "\r\n") + << Chat::expect("HTTP/1.") + << Chat::discardUntil(" ") + << Chat::expect("200 ") + << Chat::discardUntil("\r\nContent-Length: 5\r\n") + << Chat::DiscardUntilDisconnect + + // HTTP/1.0 DELETE + << Chat::Reconnect + << Chat::send("DELETE /dav/networkselftest-" + uniqueExtension.toLatin1() + ".txt HTTP/1.0\r\n" + "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n" + "Connection: close\r\n" + "\r\n") + << Chat::expect("HTTP/1.") + << Chat::discardUntil(" ") + << Chat::expect("204 ") + << Chat::DiscardUntilDisconnect ); } -- cgit v0.12 From fbc94a70f2f539d640c3a7785d11e4d6ebe70b16 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Apr 2010 20:48:48 +0200 Subject: [networkselftest] Verify the presence and size of some files on HTTP --- tests/auto/networkselftest/tst_networkselftest.cpp | 41 +++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index 6e07d4a..a4a130a 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -77,6 +77,8 @@ private slots: void ftpProxyServer(); void imapServer(); void httpServer(); + void httpServerFiles_data(); + void httpServerFiles(); void httpsServer(); void httpProxy(); void httpProxyBasicAuth(); @@ -162,7 +164,7 @@ static QString prettyByteArray(const QByteArray &array) static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout = 4000) { - QTime timer; + QElapsedTimer timer; timer.start(); forever { if (socket->bytesAvailable() >= minBytesAvailable) @@ -639,6 +641,43 @@ void tst_NetworkSelfTest::httpServer() ); } +void tst_NetworkSelfTest::httpServerFiles_data() +{ + QTest::addColumn("uri"); + QTest::addColumn("size"); + + QTest::newRow("fluke.gif") << "/qtest/fluke.gif" << -1; + QTest::newRow("bigfile") << "/qtest/bigfile" << 519240; + QTest::newRow("rfc3252.txt") << "/qtest/rfc3252.txt" << 25962; + QTest::newRow("protected/rfc3252.txt") << "/qtest/protected/rfc3252.txt" << 25962; + QTest::newRow("completelyEmptyQuery.xq") << "/qtest/qxmlquery/completelyEmptyQuery.xq" << -1; + QTest::newRow("notWellformedViaHttps.xml") << "/qtest/qxmlquery/notWellformedViaHttps.xml" << -1; + QTest::newRow("notWellformed.xml") << "/qtest/qxmlquery/notWellformed.xml" << -1; + QTest::newRow("viaHttp.xq") << "/qtest/qxmlquery/viaHttp.xq" << -1; + QTest::newRow("wellFormedViaHttps.xml") << "/qtest/qxmlquery/wellFormedViaHttps.xml" << -1; + QTest::newRow("wellFormed.xml") << "/qtest/qxmlquery/wellFormed.xml" << -1; +} + +void tst_NetworkSelfTest::httpServerFiles() +{ + QFETCH(QString, uri); + QFETCH(int, size); + + QList chat; + chat << Chat::send("HEAD " + QUrl::toPercentEncoding(uri, "/") + " HTTP/1.0\r\n" + "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n" + "Connection: close\r\n" + "Authorization: Basic cXNvY2tzdGVzdDpwYXNzd29yZA==\r\n" + "\r\n") + << Chat::expect("HTTP/1.") + << Chat::skipBytes(1) // HTTP/1.0 or 1.1 reply + << Chat::expect(" 200 "); + if (size != -1) + chat << Chat::discardUntil("\r\nContent-Length: " + QByteArray::number(size) + "\r\n"); + chat << Chat::DiscardUntilDisconnect; + netChat(80, chat); +} + void tst_NetworkSelfTest::httpsServer() { #ifndef QT_NO_OPENSSL -- cgit v0.12 From 9da275a24ae0b40ae29292a050c48915ac61099b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 20 Apr 2010 21:21:38 +0200 Subject: [networkselftest] Verify some CGIs on the test server --- tests/auto/networkselftest/tst_networkselftest.cpp | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index a4a130a..d25fcb6 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -79,6 +79,8 @@ private slots: void httpServer(); void httpServerFiles_data(); void httpServerFiles(); + void httpServerCGI_data(); + void httpServerCGI(); void httpsServer(); void httpProxy(); void httpProxyBasicAuth(); @@ -678,6 +680,76 @@ void tst_NetworkSelfTest::httpServerFiles() netChat(80, chat); } +void tst_NetworkSelfTest::httpServerCGI_data() +{ + QTest::addColumn("request"); + QTest::addColumn("result"); + QTest::addColumn("additionalHeader"); + + QTest::newRow("echo.cgi") + << QByteArray("GET /qtest/cgi-bin/echo.cgi?Hello+World HTTP/1.0\r\n" + "Connection: close\r\n" + "\r\n") + << QByteArray("Hello+World") + << QByteArray(); + + QTest::newRow("echo.cgi(POST)") + << QByteArray("POST /qtest/cgi-bin/echo.cgi?Hello+World HTTP/1.0\r\n" + "Connection: close\r\n" + "Content-Length: 15\r\n" + "\r\n" + "Hello, World!\r\n") + << QByteArray("Hello, World!\r\n") + << QByteArray(); + + QTest::newRow("md5sum.cgi") + << QByteArray("POST /qtest/cgi-bin/md5sum.cgi HTTP/1.0\r\n" + "Connection: close\r\n" + "Content-Length: 15\r\n" + "\r\n" + "Hello, World!\r\n") + << QByteArray("29b933a8d9a0fcef0af75f1713f4940e\n") + << QByteArray(); + + QTest::newRow("protected/md5sum.cgi") + << QByteArray("POST /qtest/protected/cgi-bin/md5sum.cgi HTTP/1.0\r\n" + "Connection: close\r\n" + "Authorization: Basic cXNvY2tzdGVzdDpwYXNzd29yZA==\r\n" + "Content-Length: 15\r\n" + "\r\n" + "Hello, World!\r\n") + << QByteArray("29b933a8d9a0fcef0af75f1713f4940e\n") + << QByteArray(); + + QTest::newRow("set-cookie.cgi") + << QByteArray("POST /qtest/cgi-bin/set-cookie.cgi HTTP/1.0\r\n" + "Connection: close\r\n" + "Content-Length: 8\r\n" + "\r\n" + "foo=bar\n") + << QByteArray("Success\n") + << QByteArray("\r\nSet-Cookie: foo=bar\r\n"); +} + +void tst_NetworkSelfTest::httpServerCGI() +{ + QFETCH(QByteArray, request); + QFETCH(QByteArray, result); + QFETCH(QByteArray, additionalHeader); + QList chat; + chat << Chat::send(request) + << Chat::expect("HTTP/1.") << Chat::skipBytes(1) + << Chat::expect(" 200 "); + + if (!additionalHeader.isEmpty()) + chat << Chat::discardUntil(additionalHeader); + + chat << Chat::discardUntil("\r\n\r\n") + << Chat::expect(result) + << Chat::RemoteDisconnect; + netChat(80, chat); +} + void tst_NetworkSelfTest::httpsServer() { #ifndef QT_NO_OPENSSL -- cgit v0.12 From 56891588a23adfe4ac6a8fbe01083464dc67e79b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 19 Apr 2010 14:26:23 +0200 Subject: Fix strerror_r in case it returns a pointer that is not our buffer Task-number: QTBUG-10014 Reviewed-by: Trust Me --- src/corelib/global/qglobal.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index dfa2c17..e29ad79 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2126,8 +2126,7 @@ QString qt_error_string(int errorCode) #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX) QByteArray buf(1024, '\0'); - strerror_r(errorCode, buf.data(), buf.size()); - ret = QString::fromLocal8Bit(buf.constData()); + ret = QString::fromLocal8Bit(strerror_r(errorCode, buf.data(), buf.size())); #else ret = QString::fromLocal8Bit(strerror(errorCode)); #endif -- cgit v0.12 From 7e627a0b71eda8028bc40fd38e3d5a27496872ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Thu, 22 Apr 2010 09:40:05 +0200 Subject: Mac: Remove Ctrl+Y as redo shortcut. --- src/gui/kernel/qkeysequence.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 9efcc4e..ec3df98 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -240,7 +240,7 @@ void Q_GUI_EXPORT qt_set_sequence_auto_mnemonic(bool b) { qt_sequence_no_mnemoni \row \i Paste \i Ctrl+V, Shift+Ins \i Ctrl+V \i Ctrl+V, F18, Shift+Ins \i Ctrl+V, F18, Shift+Ins \i Ctrl+V \row \i Preferences \i \i Ctrl+, \i \i \i (none) \row \i Undo \i Ctrl+Z, Alt+Backspace \i Ctrl+Z \i Ctrl+Z, F14 \i Ctrl+Z, F14 \i Ctrl+Z - \row \i Redo \i Ctrl+Y, Shift+Ctrl+Z, Alt+Shift+Backspace \i Ctrl+Shift+Z, Ctrl+Y \i Ctrl+Shift+Z \i Ctrl+Shift+Z \i (none) + \row \i Redo \i Ctrl+Y, Shift+Ctrl+Z, Alt+Shift+Backspace \i Ctrl+Shift+Z \i Ctrl+Shift+Z \i Ctrl+Shift+Z \i (none) \row \i Back \i Alt+Left, Backspace \i Ctrl+[ \i Alt+Left \i Alt+Left \i (none) \row \i Forward \i Alt+Right, Shift+Backspace \i Ctrl+] \i Alt+Right \i Alt+Right \i (none) \row \i Refresh \i F5 \i F5 \i F5 \i Ctrl+R, F5 \i (none) @@ -699,7 +699,6 @@ const QKeyBinding QKeySequencePrivate::keyBindings[] = { {QKeySequence::Close, 1, Qt::CTRL | Qt::Key_W, QApplicationPrivate::KB_Mac}, {QKeySequence::Cut, 1, Qt::CTRL | Qt::Key_X, QApplicationPrivate::KB_All}, {QKeySequence::Redo, 1, Qt::CTRL | Qt::Key_Y, QApplicationPrivate::KB_Win | QApplicationPrivate::KB_S60}, - {QKeySequence::Redo, 0, Qt::CTRL | Qt::Key_Y, QApplicationPrivate::KB_Mac},//different priority from above {QKeySequence::Undo, 1, Qt::CTRL | Qt::Key_Z, QApplicationPrivate::KB_All}, {QKeySequence::Back, 1, Qt::CTRL | Qt::Key_BracketLeft, QApplicationPrivate::KB_Mac}, {QKeySequence::Forward, 1, Qt::CTRL | Qt::Key_BracketRight, QApplicationPrivate::KB_Mac}, @@ -728,7 +727,7 @@ const QKeyBinding QKeySequencePrivate::keyBindings[] = { {QKeySequence::AddTab, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_N, QApplicationPrivate::KB_KDE}, {QKeySequence::SaveAs, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_S, QApplicationPrivate::KB_Gnome | QApplicationPrivate::KB_Mac}, {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, QApplicationPrivate::KB_Win | QApplicationPrivate::KB_X11 | QApplicationPrivate::KB_S60}, - {QKeySequence::Redo, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, QApplicationPrivate::KB_Mac}, //different priority from above + {QKeySequence::Redo, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Z, QApplicationPrivate::KB_Mac}, {QKeySequence::PreviousChild, 1, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, QApplicationPrivate::KB_Win | QApplicationPrivate::KB_X11}, {QKeySequence::PreviousChild, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Backtab, QApplicationPrivate::KB_Mac },//different priority from above {QKeySequence::Paste, 0, Qt::CTRL | Qt::SHIFT | Qt::Key_Insert, QApplicationPrivate::KB_X11}, -- cgit v0.12 From 5692527f418163d21e5e2f4a4dc76c65c30150ee Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 22 Apr 2010 10:19:23 +0200 Subject: [qtconfig app] Add an app icon. Thanks to Mario Carrion for the patch. Task-number: QTBUG-10099 Reviewed-by: Thiago Macieira --- tools/qtconfig/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/qtconfig/mainwindow.cpp b/tools/qtconfig/mainwindow.cpp index 0de4b43..1c490e2 100644 --- a/tools/qtconfig/mainwindow.cpp +++ b/tools/qtconfig/mainwindow.cpp @@ -63,6 +63,7 @@ #include #include #include +#include #include @@ -202,6 +203,7 @@ MainWindow::MainWindow() { modified = true; desktopThemeName = tr("Desktop Settings (Default)"); + setIcon(QPixmap(":/trolltech/qtconfig/images/appicon.png")); QStringList gstyles = QStyleFactory::keys(); gstyles.sort(); gstylecombo->addItem(desktopThemeName); -- cgit v0.12 From 193601b5d19881d8c031c5868e808dd75233e535 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 22 Apr 2010 15:21:29 +0200 Subject: Designer: Fix cardinality error in stringlist properties in ui4 schema. Task-number: QT-1621 --- tools/designer/data/ui4.xsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/designer/data/ui4.xsd b/tools/designer/data/ui4.xsd index de4253c..f44fa71 100644 --- a/tools/designer/data/ui4.xsd +++ b/tools/designer/data/ui4.xsd @@ -414,7 +414,7 @@ - + -- cgit v0.12 From e102acd25673f0fd6e281f3244093200c8802c90 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 22 Apr 2010 15:38:28 +0200 Subject: Fix merge of qtextureglyphcache.cpp The merge in 1ffc19d083a82c3f717e4f091a3af7b0241b6a6d introdcued two different versions of the m_cy calculation simultaneously. Remove the older version and keep the new. Reviewed-by: TrustMe --- src/gui/painting/qtextureglyphcache.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index bf57460..631a9cf 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -140,7 +140,6 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const // no room on the current line, start new glyph strip m_cx = 0; m_cy += m_currentRowHeight + paddingDoubled; - m_cy += rowHeight; m_currentRowHeight = 0; // New row } if (m_cy + c.h > m_h) { -- cgit v0.12 From 08537771bdf9a4759915deda2534337c5cbd12e1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 22 Apr 2010 20:49:49 +0200 Subject: Revert "Fix strerror_r in case it returns a pointer that is not our buffer" This reverts commit 56891588a23adfe4ac6a8fbe01083464dc67e79b. --- src/corelib/global/qglobal.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index e29ad79..dfa2c17 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2126,7 +2126,8 @@ QString qt_error_string(int errorCode) #elif !defined(QT_NO_THREAD) && defined(_POSIX_THREAD_SAFE_FUNCTIONS) && _POSIX_VERSION >= 200112L && !defined(Q_OS_INTEGRITY) && !defined(Q_OS_QNX) QByteArray buf(1024, '\0'); - ret = QString::fromLocal8Bit(strerror_r(errorCode, buf.data(), buf.size())); + strerror_r(errorCode, buf.data(), buf.size()); + ret = QString::fromLocal8Bit(buf.constData()); #else ret = QString::fromLocal8Bit(strerror(errorCode)); #endif -- cgit v0.12 From 387f3c10a9297b12e8f03c630d283abbe4caf22f Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Mon, 19 Apr 2010 12:53:00 +0200 Subject: Minor optimisation in QMenu Stops the QMenu re-painting itself for every mouse move event. Reviewed-By: gabi --- src/gui/widgets/qmenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index f9b132e..c157a2f 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -2812,7 +2812,7 @@ void QMenu::mouseMoveEvent(QMouseEvent *e) if (d->sloppyRegion.contains(e->pos())) { d->sloppyAction = action; QMenuPrivate::sloppyDelayTimer = startTimer(style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)*6); - } else { + } else if (action != d->currentAction) { d->setCurrentAction(action, style()->styleHint(QStyle::SH_Menu_SubMenuPopupDelay, 0, this)); } } -- cgit v0.12