From 90cf2f668136f32832405a17f355ab405882a99d Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 11 May 2009 13:27:43 +0200 Subject: Fixes a code snippet for QPainter::xFormDev() Reviewed-by: TrustMe --- src/gui/painting/qpainter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index baa9ce3..cc48d24 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7159,14 +7159,14 @@ QPoint QPainter::xFormDev(const QPoint &p) const \fn QRect QPainter::xFormDev(const QRect &rectangle) const \overload - Use combineMatrix() combined with QMatrix::inverted() instead. + Use mapRect() combined with QMatrix::inverted() instead. \oldcode QPainter painter(this); QRect transformed = painter.xFormDev(rectangle); \newcode QPainter painter(this); - QRect transformed = rectangle * painter.combinedMatrix().inverted(); + QRect transformed = painter.combinedMatrix().inverted(rectangle); \endcode */ -- cgit v0.12 From 60ff41273a58835466022f91d4f6eb195953c739 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Mon, 11 May 2009 13:25:21 +0200 Subject: Don't leak memory when assigning scriptvalue to iterator The d-pointer was not deleted as it should be. Reviewed-by: Harald Fernengel --- src/script/qscriptvalueiterator.cpp | 4 +-- .../tst_qscriptvalueiterator.cpp | 33 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/script/qscriptvalueiterator.cpp b/src/script/qscriptvalueiterator.cpp index fe5ef9f..1a60632 100644 --- a/src/script/qscriptvalueiterator.cpp +++ b/src/script/qscriptvalueiterator.cpp @@ -106,6 +106,7 @@ QScriptValueIteratorPrivate::QScriptValueIteratorPrivate() */ QScriptValueIteratorPrivate::~QScriptValueIteratorPrivate() { + delete it; } /*! @@ -130,7 +131,6 @@ QScriptValueIterator::QScriptValueIterator(const QScriptValue &object) QScriptValueIterator::~QScriptValueIterator() { if (d_ptr) { - delete d_ptr->it; delete d_ptr; d_ptr = 0; } @@ -312,7 +312,7 @@ void QScriptValueIterator::remove() QScriptValueIterator& QScriptValueIterator::operator=(QScriptValue &object) { if (d_ptr) { - delete d_ptr->it; + delete d_ptr; d_ptr = 0; } QScriptValueImpl val = QScriptValuePrivate::valueOf(object); diff --git a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp index 1413b0d..257ec0b 100644 --- a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp +++ b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp @@ -68,6 +68,7 @@ private slots: void iterateString(); void iterateGetterSetter(); void iterateArgumentsObject(); + void assignObjectToIterator(); void undefinedBehavior(); }; @@ -562,5 +563,37 @@ void tst_QScriptValueIterator::undefinedBehavior() QVERIFY(it.value().isNumber()); } +void tst_QScriptValueIterator::assignObjectToIterator() +{ + QScriptEngine eng; + QScriptValue obj1 = eng.newObject(); + obj1.setProperty("foo", 123); + QScriptValue obj2 = eng.newObject(); + obj2.setProperty("bar", 456); + + QScriptValueIterator it(obj1); + QVERIFY(it.hasNext()); + it.next(); + it = obj2; + QVERIFY(it.hasNext()); + it.next(); + QCOMPARE(it.name(), QString::fromLatin1("bar")); + + it = obj1; + QVERIFY(it.hasNext()); + it.next(); + QCOMPARE(it.name(), QString::fromLatin1("foo")); + + it = obj2; + QVERIFY(it.hasNext()); + it.next(); + QCOMPARE(it.name(), QString::fromLatin1("bar")); + + it = obj2; + QVERIFY(it.hasNext()); + it.next(); + QCOMPARE(it.name(), QString::fromLatin1("bar")); +} + QTEST_MAIN(tst_QScriptValueIterator) #include "tst_qscriptvalueiterator.moc" -- cgit v0.12 From 61ba9b2a920fd561b292886b3b75bfde4847e26f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 7 Nov 2008 22:50:31 +0100 Subject: Add a test for UTF-8 conditions --- tests/auto/utf8/tst_utf8.cpp | 309 +++++++++++++++++++++++++++++++++++++++++++ tests/auto/utf8/utf8.pro | 3 + 2 files changed, 312 insertions(+) create mode 100644 tests/auto/utf8/tst_utf8.cpp create mode 100644 tests/auto/utf8/utf8.pro diff --git a/tests/auto/utf8/tst_utf8.cpp b/tests/auto/utf8/tst_utf8.cpp new file mode 100644 index 0000000..3aef69f --- /dev/null +++ b/tests/auto/utf8/tst_utf8.cpp @@ -0,0 +1,309 @@ +/**************************************************************************** +** +** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Qt Software Information (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at qt-sales@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include + +#include +#include + +//TESTED_CLASS= +//TESTED_FILES= + +static const char utf8bom[] = "\xEF\xBB\xBF"; + +class tst_Utf8 : public QObject +{ + Q_OBJECT + +public: + // test data: + QTextCodec *codec; + QString (*from8BitPtr)(const char *, int); + QByteArray (QString:: *to8Bit)() const; + + inline QString from8Bit(const QByteArray &ba) + { return from8BitPtr(ba.constData(), ba.length()); } +public slots: + void initTestCase(); + void init(); + +private slots: + void roundTrip_data(); + void roundTrip(); + + void charByChar_data(); + void charByChar(); + + void invalidUtf8_data(); + void invalidUtf8(); +}; + +void tst_Utf8::initTestCase() +{ + QTest::addColumn("useLocale"); + QTest::newRow("utf8codec") << false; + + // is the locale UTF-8? + if (QString(QChar(QChar::ReplacementCharacter)).toLocal8Bit() == "\xEF\xBF\xBD") { + QTest::newRow("localecodec") << true; + qDebug() << "locale is utf8"; + } +} + +void tst_Utf8::init() +{ + QFETCH_GLOBAL(bool, useLocale); + if (useLocale) { + codec = QTextCodec::codecForLocale(); + from8BitPtr = &QString::fromLocal8Bit; + to8Bit = &QString::toLocal8Bit; + } else { + codec = QTextCodec::codecForMib(106); + from8BitPtr = &QString::fromUtf8; + to8Bit = &QString::toUtf8; + } +} + +void tst_Utf8::roundTrip_data() +{ + QTest::addColumn("utf8"); + QTest::addColumn("utf16"); + + QTest::newRow("empty") << QByteArray() << QString(); + QTest::newRow("nul") << QByteArray("", 1) << QString(QChar(QChar::Null)); + + static const char ascii[] = "This is a standard US-ASCII message"; + QTest::newRow("ascii") << QByteArray(ascii) << ascii; + + static const char ascii2[] = "\1This\2is\3an\4US-ASCII\020 message interspersed with control chars"; + QTest::newRow("ascii2") << QByteArray(ascii2) << ascii2; + + static const char utf8_1[] = "\302\240"; // NBSP + QTest::newRow("utf8_1") << QByteArray(utf8_1) << QString(QChar(QChar::Nbsp)); + + static const char utf8_2[] = "\342\202\254"; // Euro symbol + QTest::newRow("utf8_2") << QByteArray(utf8_2) << QString(QChar(0x20AC)); + +#if 0 + // Can't test this because QString::fromUtf8 consumes it + static const char utf8_3[] = "\357\273\277"; // byte order mark + QTest::newRow("utf8_3") << QByteArray(utf8_3) << QString(QChar(QChar::ByteOrderMark)); +#endif + + static const char utf8_4[] = "\357\277\275"; // replacement char + QTest::newRow("utf8_4") << QByteArray(utf8_4) << QString(QChar(QChar::ReplacementCharacter)); + + static const char utf8_5[] = "\360\220\210\203"; // U+010203 + static const uint utf32_5[] = { 0x010203 }; + QTest::newRow("utf8_5") << QByteArray(utf8_5) << QString::fromUcs4(utf32_5, 1); + + static const char utf8_6[] = "\364\217\277\277"; // U+10FFFF + static const uint utf32_6[] = { 0x10FFFF }; + QTest::newRow("utf8_6") << QByteArray(utf8_6) << QString::fromUcs4(utf32_6, 1); + + static const char utf8_7[] = "abc\302\240\303\241\303\251\307\275 \342\202\254def"; + static const ushort utf16_7[] = { 'a', 'b', 'c', 0x00A0, + 0x00E1, 0x00E9, 0x01FD, + ' ', 0x20AC, 'd', 'e', 'f', 0 }; + QTest::newRow("utf8_7") << QByteArray(utf8_7) << QString::fromUtf16(utf16_7); + + static const char utf8_8[] = "abc\302\240\303\241\303\251\307\275 \364\217\277\277 \342\202\254def"; + static const uint utf32_8[] = { 'a', 'b', 'c', 0x00A0, + 0x00E1, 0x00E9, 0x01FD, + ' ', 0x10FFFF, ' ', + 0x20AC, 'd', 'e', 'f', 0 }; + QTest::newRow("utf8_8") << QByteArray(utf8_8) << QString::fromUcs4(utf32_8); +} + +void tst_Utf8::roundTrip() +{ + QFETCH(QByteArray, utf8); + QFETCH(QString, utf16); + + QCOMPARE((utf16.*to8Bit)(), utf8); + QCOMPARE(from8Bit(utf8), utf16); + + QCOMPARE((from8Bit(utf8).*to8Bit)(), utf8); + QCOMPARE(from8Bit((utf16.*to8Bit)()), utf16); +} + +void tst_Utf8::charByChar_data() +{ + roundTrip_data(); +} + +void tst_Utf8::charByChar() +{ + QFETCH(QByteArray, utf8); + QFETCH(QString, utf16); + + { + // from utf16 to utf8 char by char: + QSharedPointer encoder = QSharedPointer(codec->makeEncoder()); + QByteArray encoded; + + for (int i = 0; i < utf16.length(); ++i) { + encoded += encoder->fromUnicode(utf16.constData() + i, 1); + QVERIFY(!encoder->hasFailure()); + } + + if (encoded.startsWith(utf8bom)) + encoded = encoded.mid(strlen(utf8bom)); + QCOMPARE(encoded, utf8); + } + { + // from utf8 to utf16 char by char: + QSharedPointer decoder = QSharedPointer(codec->makeDecoder()); + QString decoded; + + for (int i = 0; i < utf8.length(); ++i) { + decoded += decoder->toUnicode(utf8.constData() + i, 1); + QVERIFY(!decoder->hasFailure()); + } + + QCOMPARE(decoded, utf16); + } +} + +void tst_Utf8::invalidUtf8_data() +{ + QTest::addColumn("utf8"); + + QTest::newRow("1char") << QByteArray("\x80"); + QTest::newRow("2chars") << QByteArray("\xC2\xC0"); + QTest::newRow("3chars-1") << QByteArray("\xE0\xA0\xC0"); + QTest::newRow("3chars-2") << QByteArray("\xE0\xC0\xA0"); + QTest::newRow("4chars-1") << QByteArray("\xF0\x90\x80\xC0"); + QTest::newRow("4chars-2") << QByteArray("\xF0\x90\xC0\x80"); + QTest::newRow("4chars-3") << QByteArray("\xF0\xC0\x80\x80"); + + // U+FFFE and U+FFFF are non-characters and must not be present + // U+FFFE: 1111 11 1111 11 1110 + // encoding: xxxz:1111 xz11:1111 xz11:1110 + QTest::newRow("fffe") << QByteArray("\xEF\xBF\xBE"); + // U+FFFF: 1111 11 1111 11 1111 + // encoding: xxxz:1111 xz11:1111 xz11:1111 + QTest::newRow("ffff") << QByteArray("\xEF\xBF\xBF"); + + // Surrogate pairs must now be present either + // U+D800: 1101 10 0000 00 0000 + // encoding: xxxz:1101 xz10:0000 xz00:0000 + QTest::newRow("hi-surrogate") << QByteArray("\xED\xA0\x80"); + // U+DC00: 1101 11 0000 00 0000 + // encoding: xxxz:1101 xz11:0000 xz00:0000 + QTest::newRow("lo-surrogate") << QByteArray("\xED\xB0\x80"); + + // not even in pair: + QTest::newRow("surrogate-pair") << QByteArray("\xED\xA0\x80\xED\xB0\x80"); + + // Characters outside the Unicode range: + // 0x110000: 00 0100 01 0000 00 0000 00 0000 + // encoding: xxxx:z100 xz01:0000 xz00:0000 xz00:0000 + QTest::newRow("non-unicode-1") << QByteArray("\xF4\x90\x80\x80"); + // 0x200000: 00 1000 00 0000 00 0000 00 0000 + // encoding: xxxx:xz00 xz00:1000 xz00:0000 xz00:0000 xz00:0000 + QTest::newRow("non-unicode-2") << QByteArray("\xF8\x88\x80\x80\x80"); + // 0x04000000: 0100 00 0000 00 0000 00 0000 00 0000 + // encoding: xxxx:xxz0 xz00:0100 xz00:0000 xz00:0000 xz00:0001 xz00:0001 + QTest::newRow("non-unicode-3") << QByteArray("\xFC\x84\x80\x80\x80\x80"); + // 0x7fffffff: 1 11 1111 11 1111 11 1111 11 1111 11 1111 + // encoding: xxxx:xxz0 xz00:0100 xz00:0000 xz00:0000 xz00:0001 xz00:0001 + QTest::newRow("non-unicode-3") << QByteArray("\xFD\xBF\xBF\xBF\xBF\xBF"); + + // As seen above, 0xFE and 0xFF never appear: + QTest::newRow("fe") << QByteArray("\xFE"); + QTest::newRow("fe-bis") << QByteArray("\xFE\xBF\xBF\xBF\xBF\xBF\xBF"); + QTest::newRow("ff") << QByteArray("\xFF"); + QTest::newRow("ff-bis") << QByteArray("\xFF\xBF\xBF\xBF\xBF\xBF\xBF\xBF"); + + // some combinations in UTF-8 are invalid even though they have the proper bits set + // these are known as overlong sequences + + // "A": U+0041: 01 00 0001 + // overlong 2: xxz0:0001 xz00:0001 + QTest::newRow("overlong-1-2") << QByteArray("\xC1\x81"); + // overlong 3: xxxz:0000 xz00:0001 xz00:0001 + QTest::newRow("overlong-1-3") << QByteArray("\xE0\x81\x81"); + // overlong 4: xxxx:z000 xz00:0000 xz00:0001 xz00:0001 + QTest::newRow("overlong-1-4") << QByteArray("\xF0\x80\x81\x81"); + // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0001 xz00:0001 + QTest::newRow("overlong-1-5") << QByteArray("\xF8\x80\x80\x81\x81"); + // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0001 xz00:0001 + QTest::newRow("overlong-1-6") << QByteArray("\xFC\x80\x80\x80\x81\x81"); + + // NBSP: U+00A0: 10 00 0000 + // proper encoding: xxz0:0010 xz00:0000 + // overlong 3: xxxz:0000 xz00:0010 xz00:0000 + QTest::newRow("overlong-2-3") << QByteArray("\xC0\x82\x80"); + // overlong 4: xxxx:z000 xz00:0000 xz00:0010 xz00:0000 + QTest::newRow("overlong-2-4") << QByteArray("\xF0\x80\x82\x80"); + // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0010 xz00:0000 + QTest::newRow("overlong-2-4") << QByteArray("\xF8\x80\x80\x82\x80"); + // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0010 xz00:0000 + QTest::newRow("overlong-2-4") << QByteArray("\xFC\x80\x80\x80\x82\x80"); + + // U+0800: 10 0000 00 0000 + // proper encoding: xxxz:0000 xz10:0000 xz00:0000 + // overlong 4: xxxx:z000 xz00:0000 xz10:0000 xz00:0000 + QTest::newRow("overlong-3-4") << QByteArray("\xF0\x80\xA0\x80"); + // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz10:0000 xz00:0000 + QTest::newRow("overlong-3-5") << QByteArray("\xF8\x80\x80\xA0\x80"); + // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz10:0000 xz00:0000 + QTest::newRow("overlong-3-6") << QByteArray("\xFC\x80\x80\x80\xA0\x80"); + + // U+010000: 00 0100 00 0000 00 0000 + // proper encoding: xxxx:z000 xz00:0100 xz00:0000 xz00:0000 + // overlong 5: xxxx:xz00 xz00:0000 xz00:0100 xz00:0000 xz00:0000 + QTest::newRow("overlong-4-5") << QByteArray("\xF8\x80\x84\x80\x80"); + // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0100 xz00:0000 xz00:0000 + QTest::newRow("overlong-4-6") << QByteArray("\xFC\x80\x80\x84\x80\x80"); +} + +void tst_Utf8::invalidUtf8() +{ + QFETCH(QByteArray, utf8); + + QSharedPointer decoder = QSharedPointer(codec->makeDecoder()); + QString decoded = decoder->toUnicode(utf8); + QVERIFY(decoder->hasFailure()); +} + +QTEST_MAIN(tst_Utf8) +#include "tst_utf8.moc" diff --git a/tests/auto/utf8/utf8.pro b/tests/auto/utf8/utf8.pro new file mode 100644 index 0000000..4ec6851 --- /dev/null +++ b/tests/auto/utf8/utf8.pro @@ -0,0 +1,3 @@ +load(qttest_p4) +QT -= gui +SOURCES += tst_utf8.cpp -- cgit v0.12 From cbfe3be00f123f3e9c4a4463f255f596cfb41ef1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 11 May 2009 13:34:48 +0200 Subject: Document that we don't support NTLM version 2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: 236925 Reviewed-by: Tor Arne Vestbø --- src/network/kernel/qauthenticator.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index c9161f8..33795aa 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -73,6 +73,15 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas authentication information to the socket when accessing services that require authentication. + QAuthenticator supports the following authentication methods: + \list + \o Basic + \o NTLM version 1 + \o Digest-MD5 + \endlist + + Note that, in particular, NTLM version 2 is not supported. + \sa QSslSocket */ -- cgit v0.12 From 12a1662a8cf79ff6fd7bd16ef66f7f1e77edc9e8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 11 May 2009 13:40:17 +0200 Subject: Don't crash at runtime with when relaying a signal. We have this function called qDBusInterfaceFromMetaObject that calculates the interface name from a given meta object. There's no need to duplicate the code here (and not do it right). All tests still pss. Task-number: 236955 Reviewed-by: Trust Me --- src/dbus/qdbusintegrator.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 2c27381..f40a45f 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -1125,12 +1125,7 @@ void QDBusConnectionPrivate::objectDestroyed(QObject *obj) void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, int signalId, const QVariantList &args) { - int mciid = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTERFACE); - Q_ASSERT(mciid != -1); - - QMetaClassInfo mci = mo->classInfo(mciid); - Q_ASSERT(mci.value()); - const char *interface = mci.value(); + QString interface = qDBusInterfaceFromMetaObject(mo); QMetaMethod mm = mo->method(signalId); QByteArray memberName = mm.signature(); @@ -1146,12 +1141,12 @@ void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, in } QDBusReadLocker locker(RelaySignalAction, this); - QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/"), QLatin1String(interface), + QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/"), interface, QLatin1String(memberName)); message.setArguments(args); DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message); if (!msg) { - qWarning("QDBusConnection: Could not emit signal %s.%s", interface, memberName.constData()); + qWarning("QDBusConnection: Could not emit signal %s.%s", qPrintable(interface), memberName.constData()); return; } -- cgit v0.12 From 0f3a48850529e84c51e6ae0c23544f9cf8fca846 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 11 May 2009 13:43:39 +0200 Subject: Update the --help output of qdbusxml2cpp. Don't say we produce output when no options are passed if we don't. Task-number: 222778 Reviewed-by: Trust Me --- tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp index a871fe4..d7dab0b 100644 --- a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp +++ b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp @@ -82,7 +82,6 @@ static QStringList wantedInterfaces; static const char help[] = "Usage: " PROGRAMNAME " [options...] [xml-or-xml-file] [interfaces...]\n" "Produces the C++ code to implement the interfaces defined in the input file.\n" - "If no options are given, the code is written to the standard output.\n" "\n" "Options:\n" " -a Write the adaptor code to \n" @@ -99,7 +98,10 @@ static const char help[] = "If the file name given to the options -a and -p does not end in .cpp or .h, the\n" "program will automatically append the suffixes and produce both files.\n" "You can also use a colon (:) to separate the header name from the source file\n" - "name, as in '-a filename_p.h:filename.cpp'.\n"; + "name, as in '-a filename_p.h:filename.cpp'.\n" + "\n" + "If you pass a dash (-) as the argument to either -p or -a, the output is written\n" + "to the standard output\n"; static const char includeList[] = "#include \n" -- cgit v0.12 From 92c5c75a9840853fad4f30235f9bf86dc7133fc4 Mon Sep 17 00:00:00 2001 From: Morten Engvoldsen Date: Mon, 11 May 2009 13:44:44 +0200 Subject: Clarifying docs for QTextTable::splitCell() Clarifying details about QTextTable::splitCell() regarding splitting and merging over several rows and columns Task-number:193732 Rev-by: Geir Vattekar --- src/gui/text/qtexttable.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index ba1c04f..48708c9 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -525,7 +525,12 @@ void QTextTablePrivate::update() const Rows and columns within a QTextTable can be merged and split using the mergeCells() and splitCell() functions. However, only cells that span multiple rows or columns can be split. (Merging or splitting does not increase or decrease - the number of rows and columns.) + the number of rows and columns.) + + Note that if you have merged multiple columns and rows into one cell, you will not + be able to split the merged cell into new cells spanning over more than one row + or column. To be able to split cells spanning over several rows and columns you + need to do this over several iterations. \table 80% \row -- cgit v0.12