From 11bbfb5882856f47fc15be70be288bc8d00b5d0a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 9 Jun 2011 10:06:00 +0200 Subject: [PATCH 01/41] Fix missing empty lines in Qt HTML when displayed in compliant browsers When QTextDocument exports HTML, it makes an effort to be compatible with its own importer, hence it has to be compatible with the dialect of HTML which Qt has developed over the years. One incorrect interpretation in Qt is that an empty paragraph is interpreted as an empty line. So if you use a QTextDocument to produce HTML for text where an empty line has been added, this empty line will not be visible when the document is viewed in a compliant browser. The fix is to set the height of the empty paragraph to 1em, so that it will match the current pixel size of the font, thus look the same as a


but without altering the structure of the document. Reviewed-by: Gunnar (cherry picked from commit f541c78e1bc5b293466b40e6f10496199a4a5d73) Change-Id: Ic0eae2c81609b8872eb2eb9344a3ec416cd09149 Reviewed-on: http://codereview.qt.nokia.com/445 Reviewed-by: Qt Sanity Bot Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextdocument.cpp | 2 +- .../auto/qtextdocument/tst_qtextdocument.cpp | 26 ++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index cfe4aeec17..41b6fe24cf 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2553,7 +2553,7 @@ void QTextHtmlExporter::emitBlockAttributes(const QTextBlock &block) const bool emptyBlock = block.begin().atEnd(); if (emptyBlock) { - html += QLatin1String("-qt-paragraph-type:empty;"); + html += QLatin1String("-qt-paragraph-type:empty; height:1em;"); } emitMargins(QString::number(format.topMargin()), diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp index 1129219b1f..68252ef6ae 100644 --- a/tests/auto/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp @@ -182,6 +182,8 @@ private slots: void copiedFontSize(); + void htmlExportImportBlockCount(); + private: void backgroundImage_checkExpectedHtml(const QTextDocument &doc); @@ -1582,7 +1584,7 @@ void tst_QTextDocument::toHtml() expectedOutput.replace("OPENDEFAULTBLOCKSTYLE", "style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"); expectedOutput.replace("DEFAULTBLOCKSTYLE", "style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\""); - expectedOutput.replace("EMPTYBLOCK", "

\n"); + expectedOutput.replace("EMPTYBLOCK", "

\n"); if (expectedOutput.endsWith(QLatin1Char('\n'))) expectedOutput.chop(1); expectedOutput.append(htmlTail); @@ -2760,5 +2762,27 @@ void tst_QTextDocument::copiedFontSize() QCOMPARE(cursorOutput.charFormat().font().pixelSize(), 24); } +void tst_QTextDocument::htmlExportImportBlockCount() +{ + QTextDocument document; + { + QTextCursor cursor(&document); + cursor.insertText("Foo"); + cursor.insertBlock(); + cursor.insertBlock(); + cursor.insertBlock(); + cursor.insertBlock(); + cursor.insertText("Bar"); + } + + QCOMPARE(document.blockCount(), 5); + QString html = document.toHtml(); + + document.clear(); + document.setHtml(html); + + QCOMPARE(document.blockCount(), 5); +} + QTEST_MAIN(tst_QTextDocument) #include "tst_qtextdocument.moc" From c1ed7951acc29502a8eb7cc23942e5e455e6165d Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 10 Jun 2011 11:22:00 +0200 Subject: [PATCH 02/41] Fix a case of SP_MediaSkipForward returning the wrong pixmap. This fixes QTBUG-18311. Merge-request: 2621 Reviewed-by: Joao (cherry picked from commit a9364af090fd3209b92ed5e07a1374488d22b1c4) Change-Id: I0a0fc99060c64a9aab395a183f2faf9223e9a925 Reviewed-on: http://codereview.qt.nokia.com/449 Reviewed-by: Qt Sanity Bot Reviewed-by: Peter Hartmann --- src/gui/styles/qcommonstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index e5171d854a..ad0e151051 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -5292,7 +5292,7 @@ QPixmap QCommonStyle::standardPixmap(StandardPixmap sp, const QStyleOption *opti pixmap = QIcon::fromTheme(QLatin1String("media-seek-backward")).pixmap(16); break; case SP_MediaSkipForward: - pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16); + pixmap = QIcon::fromTheme(QLatin1String("media-skip-forward")).pixmap(16); break; case SP_MediaSkipBackward: pixmap = QIcon::fromTheme(QLatin1String("media-skip-backward")).pixmap(16); From fc74b4e56430ac6aa6c26a10eaa552df3aa34380 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Fri, 10 Jun 2011 11:10:49 +0200 Subject: [PATCH 03/41] fix an incorrect OpenMode flags handling in QBuffer::open() which leads to absurd statement (QBuffer::open() == !QBuffer::isOpen()) to be true. also treat Truncate as (Truncate | WriteOnly) to satisfy lazy ones Reviewed-by: Joao Merge-request: 2612 (cherry picked from commit 6b91affb9a355e668bc9d06dee580d95230ac63a) Change-Id: I657d4d0a33f7993313fe2a1a8ba408371991717f Reviewed-on: http://codereview.qt.nokia.com/447 Reviewed-by: Qt Sanity Bot Reviewed-by: Peter Hartmann --- src/corelib/io/qbuffer.cpp | 17 ++++------ tests/auto/qbuffer/tst_qbuffer.cpp | 50 ++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 11 deletions(-) diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp index 38e406b1a4..35e7b6809c 100644 --- a/src/corelib/io/qbuffer.cpp +++ b/src/corelib/io/qbuffer.cpp @@ -333,23 +333,18 @@ bool QBuffer::open(OpenMode flags) { Q_D(QBuffer); - if ((flags & Append) == Append) + if ((flags & (Append | Truncate)) != 0) flags |= WriteOnly; - setOpenMode(flags); - if (!(isReadable() || isWritable())) { - qWarning("QFile::open: File access not specified"); + if ((flags & (ReadOnly | WriteOnly)) == 0) { + qWarning("QBuffer::open: Buffer access not specified"); return false; } - if ((flags & QIODevice::Truncate) == QIODevice::Truncate) { + if ((flags & Truncate) == Truncate) d->buf->resize(0); - } - if ((flags & QIODevice::Append) == QIODevice::Append) // append to end of buffer - seek(d->buf->size()); - else - seek(0); + d->ioIndex = (flags & Append) == Append ? d->buf->size() : 0; - return true; + return QIODevice::open(flags); } /*! diff --git a/tests/auto/qbuffer/tst_qbuffer.cpp b/tests/auto/qbuffer/tst_qbuffer.cpp index 776935d6e0..bf4842ff94 100644 --- a/tests/auto/qbuffer/tst_qbuffer.cpp +++ b/tests/auto/qbuffer/tst_qbuffer.cpp @@ -56,6 +56,7 @@ public: tst_QBuffer(); private slots: + void open(); void getSetCheck(); void readBlock(); void readBlockPastEnd(); @@ -104,6 +105,55 @@ tst_QBuffer::tst_QBuffer() { } +void tst_QBuffer::open() +{ + QByteArray data(10, 'f'); + + QBuffer b; + + QTest::ignoreMessage(QtWarningMsg, "QBuffer::open: Buffer access not specified"); + QVERIFY(!b.open(QIODevice::NotOpen)); + QVERIFY(!b.isOpen()); + b.close(); + + QTest::ignoreMessage(QtWarningMsg, "QBuffer::open: Buffer access not specified"); + QVERIFY(!b.open(QIODevice::Text)); + QVERIFY(!b.isOpen()); + b.close(); + + QTest::ignoreMessage(QtWarningMsg, "QBuffer::open: Buffer access not specified"); + QVERIFY(!b.open(QIODevice::Unbuffered)); + QVERIFY(!b.isOpen()); + b.close(); + + QVERIFY(b.open(QIODevice::ReadOnly)); + QVERIFY(b.isReadable()); + b.close(); + + QVERIFY(b.open(QIODevice::WriteOnly)); + QVERIFY(b.isWritable()); + b.close(); + + b.setData(data); + QVERIFY(b.open(QIODevice::Append)); + QVERIFY(b.isWritable()); + QCOMPARE(b.size(), qint64(10)); + QCOMPARE(b.pos(), b.size()); + b.close(); + + b.setData(data); + QVERIFY(b.open(QIODevice::Truncate)); + QVERIFY(b.isWritable()); + QCOMPARE(b.size(), qint64(0)); + QCOMPARE(b.pos(), qint64(0)); + b.close(); + + QVERIFY(b.open(QIODevice::ReadWrite)); + QVERIFY(b.isReadable()); + QVERIFY(b.isWritable()); + b.close(); +} + // some status() tests, too void tst_QBuffer::readBlock() { From bdda694e86a791b76a5acee0712f5e470700542d Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 10 Jun 2011 11:59:01 +0200 Subject: [PATCH 04/41] Handle really global selection offers in wayland clipboard. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Handle selection offer globals properly even if they arrive during the initial blocking read. If such a global arrives so early, the platform integration is not yet available from QApplicationPrivate (as it is just being constructed). Therefore the handling of the selection offer has to be delayed. At the moment selection offers are typically posted as globals and not added to the global list, but that is likely to change in the future. Change-Id: Ib4ae804ad7f19e05978ee08828b88e028a3bf7b2 Reviewed-on: http://codereview.qt.nokia.com/446 Reviewed-by: Qt Sanity Bot Reviewed-by: Jørgen Lind --- .../platforms/wayland/qwaylanddisplay.cpp | 21 +++++++++++++++---- .../platforms/wayland/qwaylanddisplay.h | 4 ++++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 83516e9b4e..e6d39683fe 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -129,6 +129,8 @@ const struct wl_shell_listener QWaylandDisplay::shellListener = { QWaylandDisplay::QWaylandDisplay(void) : argb_visual(0), premultiplied_argb_visual(0), rgb_visual(0) { + qRegisterMetaType("uint32_t"); + mDisplay = wl_display_connect(NULL); if (mDisplay == NULL) { qErrnoWarning(errno, "Failed to create display"); @@ -147,8 +149,6 @@ QWaylandDisplay::QWaylandDisplay(void) blockingReadEvents(); - qRegisterMetaType("uint32_t"); - #ifdef QT_WAYLAND_GL_SUPPORT mEglIntegration->initialize(); #endif @@ -291,11 +291,24 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id, mInputDevices.append(inputDevice); } else if (interface == "wl_selection_offer") { QPlatformIntegration *plat = QApplicationPrivate::platformIntegration(); - QWaylandClipboard *clipboard = static_cast(plat->clipboard()); - clipboard->createSelectionOffer(id); + mSelectionOfferId = id; + if (plat) + handleSelectionOffer(id); + else + QMetaObject::invokeMethod(this, "handleSelectionOffer", + Qt::QueuedConnection, Q_ARG(uint32_t, id)); } } +void QWaylandDisplay::handleSelectionOffer(uint32_t id) +{ + if (mSelectionOfferId != id) + return; + QPlatformIntegration *plat = QApplicationPrivate::platformIntegration(); + QWaylandClipboard *clipboard = static_cast(plat->clipboard()); + clipboard->createSelectionOffer(id); +} + void QWaylandDisplay::handleVisual(void *data, struct wl_compositor *compositor, uint32_t id, uint32_t token) diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.h b/src/plugins/platforms/wayland/qwaylanddisplay.h index 765be62eb4..ff8c760557 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.h +++ b/src/plugins/platforms/wayland/qwaylanddisplay.h @@ -97,6 +97,9 @@ public slots: void blockingReadEvents(); void flushRequests(); +private slots: + void handleSelectionOffer(uint32_t id); + private: void waitForScreens(); void displayHandleGlobal(uint32_t id, @@ -115,6 +118,7 @@ private: bool mScreensInitialized; uint32_t mSocketMask; + uint32_t mSelectionOfferId; struct wl_visual *argb_visual, *premultiplied_argb_visual, *rgb_visual; From fd1411a8e5ec46f7841608f4baf13c7a16535a79 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Fri, 10 Jun 2011 14:26:51 -0500 Subject: [PATCH 05/41] Ensure we pass -developer-build to syncqt for -nokia-developer builds When the build directory is the install directory, separate modules should use qtbase as the path for libs, module pris etc. This fixes the logic in default_pre.prf so that syncqt is called correctly in these cases. Change-Id: Ib3798bfd145d3a3e43b9a222af46270245e6c2e6 Reviewed-on: http://codereview.qt.nokia.com/464 Reviewed-by: Qt Sanity Bot Reviewed-by: Marius Storm-Olsen Reviewed-by: Eckhart Koppen --- mkspecs/features/default_pre.prf | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/mkspecs/features/default_pre.prf b/mkspecs/features/default_pre.prf index c91d543d6c..ebb94e272e 100644 --- a/mkspecs/features/default_pre.prf +++ b/mkspecs/features/default_pre.prf @@ -12,13 +12,21 @@ exists($$_PRO_FILE_PWD_/sync.profile) { isEmpty(QTDIR) { QTDIR = $$(QTDIR) isEmpty(QTDIR):QTDIR = $$QT_BUILD_TREE + isEmpty(QTDIR) { # figure out QTDIR based on qmake binary + QMAKE_BASED_QTDIR = $$dirname(QMAKE_QMAKE) + QTDIR = $$dirname(QMAKE_BASED_QTDIR) + unset(QMAKE_BASED_QTDIR) + } } - QTFWD = - isEmpty(QTDIR) { - QTFWD += -module-fwd $$OUT_PWD/module-paths/modules -cache-module-fwd - } else { - QTFWD += -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build + QTFWD = -module-fwd $$OUT_PWD/module-paths/modules -cache-module-fwd + !isEmpty(QTDIR) { + # Only if QTDIR points to an actual build directory + # and this build directory is the install directory + # can we tell syncqt to do a -developer-build + exists($$QTDIR/.qmake.cache):contains(QTDIR, $$[QT_INSTALL_PREFIX]) { + QTFWD = -qtdir $$QTDIR -module-fwd $$QTDIR/mkspecs/modules -developer-build + } } qtPrepareTool(QMAKE_SYNCQT, syncqt) From a37f8e08ec295fe25b9ac663b8cda8109a1c38cf Mon Sep 17 00:00:00 2001 From: Eckhart Koppen Date: Mon, 13 Jun 2011 14:41:03 +0300 Subject: [PATCH 06/41] Include cycle_p.h only conditionally cycle_p.h is only needed when HAVE_TICK_COUNTER is defined, and should not be included otherwise. It is also a 3rd party header which is not exported as a private header so far, which makes compilation of dependenty modules fail. Change-Id: I5c2546eae7d65fc68b8411c20634aca541c327d6 Reviewed-on: http://codereview.qt.nokia.com/465 Reviewed-by: Qt Sanity Bot Reviewed-by: Marius Storm-Olsen --- src/testlib/qbenchmarkmeasurement_p.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/testlib/qbenchmarkmeasurement_p.h b/src/testlib/qbenchmarkmeasurement_p.h index a4b676fd72..8242365f20 100644 --- a/src/testlib/qbenchmarkmeasurement_p.h +++ b/src/testlib/qbenchmarkmeasurement_p.h @@ -54,7 +54,9 @@ // #include +#ifdef HAVE_TICK_COUNTER #include "3rdparty/cycle_p.h" +#endif #include "qbenchmark.h" QT_BEGIN_NAMESPACE From b9fcfa18f5e1d4cfebf0e1dae05b5a7a94843e4e Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 14 Jun 2011 08:09:14 +0200 Subject: [PATCH 07/41] Initialize member variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ica42c77614fa4fa9ae7692e00d3fc796219aacdc Reviewed-on: http://codereview.qt.nokia.com/466 Reviewed-by: Qt Sanity Bot Reviewed-by: Jørgen Lind --- src/gui/kernel/qplatformglcontext_qpa.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qplatformglcontext_qpa.cpp b/src/gui/kernel/qplatformglcontext_qpa.cpp index 5c56efbf2f..b0c6aeb27a 100644 --- a/src/gui/kernel/qplatformglcontext_qpa.cpp +++ b/src/gui/kernel/qplatformglcontext_qpa.cpp @@ -62,7 +62,8 @@ class QPlatformGLContextPrivate { public: QPlatformGLContextPrivate() - :qGLContextHandle(0) + : qGLContextHandle(0) + , qGLContextDeleteFunction(0) { } From f562b90518137997f6e06765ebc550394a0bf114 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 20 Jun 2011 10:01:55 +0200 Subject: [PATCH 08/41] Make it possible to set color of QStaticText with pixel size >= 64 Adding the fallback to QPainterPath for large QStaticTexts created a regression where all text would be painted in black regardless of the color you set on it. The color in QStaticTextItem is sometimes invalid, in which case the current painter color should be used. In either case, the color is already set on the current pen when entering drawStaticTextItem() so we can just use that. Task-number: QTBUG-19950 Reviewed-by: Jiang Jiang (cherry picked from commit ee77ee5c25f58271e6f2863225d08573da86c3ee) Change-Id: I955aa6526e5b14589430f8dccd006a9de9ae08c9 Reviewed-on: http://codereview.qt.nokia.com/491 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/painting/qpaintengineex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 8510416fcb..5105d9a963 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -1084,7 +1084,7 @@ void QPaintEngineEx::drawStaticTextItem(QStaticTextItem *staticTextItem) changedHints = true; } - fill(qtVectorPathForPath(path), staticTextItem->color); + fill(qtVectorPathForPath(path), s->pen.color()); if (changedHints) { s->renderHints = oldHints; From 18eb310d5bcbc4193bef0a5d45c01ed10f46579e Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 20 Jun 2011 10:45:36 +0200 Subject: [PATCH 09/41] Fix bug which caused repeated characters in a QML Text We would include too much in the characters displayed, since itemEnd is actually the start of the next item and not the end of the current one. Adding a minus one removes the duplicated characters at the end of text lines. Change-Id: I1e13470548fafaa692ae58e019e9e2469a947f5e Reviewed-on: http://codereview.qt.nokia.com/495 Reviewed-by: Qt Sanity Bot Reviewed-by: Gunnar Sletta --- src/gui/text/qtextlayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 781dd23a58..f9bfcbfce7 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2151,7 +2151,7 @@ QList QTextLine::glyphRuns(int from, int length) const } int relativeFrom = qMax(iterator.itemStart, from) - si.position; - int relativeTo = qMin(iterator.itemEnd, from + length - 1) - si.position; + int relativeTo = qMin(iterator.itemEnd - 1, from + length - 1) - si.position; unsigned short *logClusters = eng->logClusters(&si); int glyphsStart = logClusters[relativeFrom]; @@ -2170,7 +2170,7 @@ QList QTextLine::glyphRuns(int from, int length) const pos += QPointF((glyphLayout.advances_x[i] + justification).toReal(), glyphLayout.advances_y[i].toReal()); } - } else if (relativeTo != (iterator.itemEnd - si.position) && rtl) { + } else if (relativeTo != (iterator.itemEnd - si.position - 1) && rtl) { for (int i=glyphLayout.numGlyphs - 1; i>glyphsEnd; --i) { QFixed justification = QFixed::fromFixed(glyphLayout.justifications[i].space_18d6); pos += QPointF((glyphLayout.advances_x[i] + justification).toReal(), From 883b120d2f39c532cdd1a98d962af83be5adc4bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Fri, 3 Jun 2011 17:55:09 +0200 Subject: [PATCH 10/41] Fix QProcess emitting two started signals on X11 On X11 QProcess would emit two started signals when calling QProcess::waitForStarted(). We should expect that the private implementation of waitForStarted() should emit the started signal and return true or false appropriately. Task-number: QTBUG-7039 Change-Id: I3d381399ab7a39bf57db03a110fa6747a4fc6a24 Reviewed-by: pending Reviewed-on: http://codereview.qt.nokia.com/331 Reviewed-by: Thiago Macieira --- src/corelib/io/qprocess.cpp | 11 ++++------- tests/auto/qprocess/tst_qprocess.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 70a70c27d8..af43ab7320 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -1673,13 +1673,10 @@ QProcessEnvironment QProcess::processEnvironment() const bool QProcess::waitForStarted(int msecs) { Q_D(QProcess); - if (d->processState == QProcess::Starting) { - if (!d->waitForStarted(msecs)) - return false; - setProcessState(QProcess::Running); - emit started(); - } - return d->processState == QProcess::Running; + if (d->processState == QProcess::Running) + return true; + + return d->waitForStarted(msecs); } /*! \reimp diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp index 91e0abe677..f54dfa3f68 100644 --- a/tests/auto/qprocess/tst_qprocess.cpp +++ b/tests/auto/qprocess/tst_qprocess.cpp @@ -73,7 +73,7 @@ Q_DECLARE_METATYPE(QProcess::ProcessState); { \ const bool ret = Process.Fn; \ if (ret == false) \ - qWarning("QProcess error: %d: %s", Process.error(), qPrintable(Process.errorString())); \ + qWarning("QProcess error: %d: %s", Process.error(), qPrintable(Process.errorString())); \ QVERIFY(ret); \ } @@ -157,6 +157,7 @@ private slots: void startFinishStartFinish(); void invalidProgramString_data(); void invalidProgramString(); + void onlyOneStartedSignal(); // keep these at the end, since they use lots of processes and sometimes // caused obscure failures to occur in tests that followed them (esp. on the Mac) @@ -2089,7 +2090,7 @@ void tst_QProcess::setStandardInputFile() #endif QPROCESS_VERIFY(process, waitForFinished()); - QByteArray all = process.readAll(); + QByteArray all = process.readAll(); QCOMPARE(all.size(), int(sizeof data) - 1); // testProcessEcho drops the ending \0 QVERIFY(all == data); } @@ -2442,6 +2443,29 @@ void tst_QProcess::invalidProgramString() QVERIFY(!QProcess::startDetached(programString)); } +//----------------------------------------------------------------------------- +void tst_QProcess::onlyOneStartedSignal() +{ + QProcess process; + + QSignalSpy spyStarted(&process, SIGNAL(started())); + QSignalSpy spyFinished(&process, SIGNAL(finished(int, QProcess::ExitStatus))); + + process.start("testProcessNormal/testProcessNormal"); + QVERIFY(process.waitForStarted(5000)); + QVERIFY(process.waitForFinished(5000)); + QCOMPARE(spyStarted.count(), 1); + QCOMPARE(spyFinished.count(), 1); + + spyStarted.clear(); + spyFinished.clear(); + + process.start("testProcessNormal/testProcessNormal"); + QVERIFY(process.waitForFinished(5000)); + QCOMPARE(spyStarted.count(), 1); + QCOMPARE(spyFinished.count(), 1); +} + QTEST_MAIN(tst_QProcess) #include "tst_qprocess.moc" #endif From 1d450c6941d75e2074fb3083dcfab5a8db59e8e0 Mon Sep 17 00:00:00 2001 From: Martin Petersson Date: Mon, 20 Jun 2011 13:03:40 +0200 Subject: [PATCH 11/41] QAuthenticator::setUser() parse user name in form user@domain Task-number: QTBUG-19894 Change-Id: I063dbc66e5f47a83cc1c0aee8913062b4b5e42bc Reviewed-on: http://codereview.qt.nokia.com/507 Reviewed-by: Qt Sanity Bot Reviewed-by: Peter Hartmann --- src/network/kernel/qauthenticator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 818aab73a5..4f7f4ed80d 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -223,7 +223,7 @@ void QAuthenticator::setUser(const QString &user) } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) { //domain name is present d->realm.clear(); - d->userDomain = user.left(separatorPosn); + d->userDomain = user.mid(separatorPosn + 1); d->extractedUser = user.left(separatorPosn); d->user = user; } else { From 46ffabde50c42fda6b9959f8c99d1744ee6386fa Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 20 Jun 2011 10:40:01 +0200 Subject: [PATCH 12/41] Fix empty lines in Qt HTML when displayed in external browsers (again) This redoes f541c78e1bc5b293466b40e6f10496199a4a5d73 in a way which should be more compliant with different browsers. In particular, Outlook didn't support the CSS trick in the last fix, so we need the somewhat larger patch which adds an extra line break node to the tree and then ignores it when re-importing the document. Task-number: QTBUG-3669 Reviewed-by: Simon Hausmann (cherry picked from commit cb760eaef631abd49836ae5c8dc12a61ef5eff0d) Change-Id: Ia55bf39d52461aa9445a9a5d0bfb5b4c5bf1e9bd Reviewed-on: http://codereview.qt.nokia.com/492 Reviewed-by: Eskil Abrahamsen Blomfeldt Reviewed-by: Qt Sanity Bot --- src/gui/text/qtextdocument.cpp | 4 +++- src/gui/text/qtextdocumentfragment.cpp | 9 +++++++-- src/gui/text/qtextdocumentfragment_p.h | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 41b6fe24cf..0abafb81cc 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -2553,7 +2553,7 @@ void QTextHtmlExporter::emitBlockAttributes(const QTextBlock &block) const bool emptyBlock = block.begin().atEnd(); if (emptyBlock) { - html += QLatin1String("-qt-paragraph-type:empty; height:1em;"); + html += QLatin1String("-qt-paragraph-type:empty;"); } emitMargins(QString::number(format.topMargin()), @@ -2709,6 +2709,8 @@ void QTextHtmlExporter::emitBlock(const QTextBlock &block) emitBlockAttributes(block); html += QLatin1Char('>'); + if (block.begin().atEnd()) + html += "
"; QTextBlock::Iterator it = block.begin(); if (fragmentMarkers && !it.atEnd() && block == doc->begin()) diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp index 042b1d01c2..0c8860e98e 100644 --- a/src/gui/text/qtextdocumentfragment.cpp +++ b/src/gui/text/qtextdocumentfragment.cpp @@ -545,8 +545,13 @@ void QTextHtmlImporter::import() } if (currentNode->isBlock()) { - if (processBlockNode() == ContinueWithNextNode) + QTextHtmlImporter::ProcessNodeResult result = processBlockNode(); + if (result == ContinueWithNextNode) { continue; + } else if (result == ContinueWithNextSibling) { + currentNodeIdx += currentNode->children.size(); + continue; + } } if (currentNode->charFormat.isAnchor() && !currentNode->charFormat.anchorName().isEmpty()) { @@ -1157,7 +1162,7 @@ QTextHtmlImporter::ProcessNodeResult QTextHtmlImporter::processBlockNode() if (currentNode->isEmptyParagraph) { hasBlock = false; - return ContinueWithNextNode; + return ContinueWithNextSibling; } hasBlock = true; diff --git a/src/gui/text/qtextdocumentfragment_p.h b/src/gui/text/qtextdocumentfragment_p.h index bfbec3075c..227123ed80 100644 --- a/src/gui/text/qtextdocumentfragment_p.h +++ b/src/gui/text/qtextdocumentfragment_p.h @@ -135,7 +135,7 @@ private: Table scanTable(int tableNodeIdx); - enum ProcessNodeResult { ContinueWithNextNode, ContinueWithCurrentNode }; + enum ProcessNodeResult { ContinueWithNextNode, ContinueWithCurrentNode, ContinueWithNextSibling }; void appendBlock(const QTextBlockFormat &format, QTextCharFormat charFmt = QTextCharFormat()); bool appendNodeText(); From 26877d990b5f0c242448690ca957e98d64ae40e3 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 20 Jun 2011 11:50:18 +0200 Subject: [PATCH 13/41] Support -qtnamespace and -qtlibinfix again This fix is for qtbase libraries with -qtnamespace and -qtlibinfix options in configure. Task-number: QTBUG-19964 Change-Id: I2f2ff1748f2c1c2b20d5f73b6be36f68a7a26cef Reviewed-on: http://codereview.qt.nokia.com/505 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern Reviewed-by: Gunnar Sletta --- src/gui/kernel/qwidget_mac.mm | 2 +- src/gui/text/qfontdatabase.cpp | 2 +- src/gui/text/qfontengine_coretext_p.h | 8 ++++++++ src/gui/text/qharfbuzz_copy_p.h | 8 ++++---- src/gui/util/qscroller_mac.mm | 4 ++++ 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index 3a025e9237..4adaa6b288 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -5018,7 +5018,7 @@ void QWidgetPrivate::registerTouchWindow(bool enable) if (enable == touchEventsEnabled) return; - QCocoaView *view = static_cast(qt_mac_effectiveview_for(q)); + QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast(qt_mac_effectiveview_for(q)); if (!view) return; diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp index 98186dfd9b..1d07b567f8 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp @@ -1123,13 +1123,13 @@ QT_BEGIN_INCLUDE_NAMESPACE #elif defined(Q_OS_SYMBIAN) # include "qfontdatabase_s60.cpp" #endif +QT_END_INCLUDE_NAMESPACE #if !defined(Q_WS_X11) QString QFontDatabase::resolveFontFamilyAlias(const QString &family) { return family; } #endif -QT_END_INCLUDE_NAMESPACE static QtFontStyle *bestStyle(QtFontFoundry *foundry, const QtFontStyle::Key &styleKey) { diff --git a/src/gui/text/qfontengine_coretext_p.h b/src/gui/text/qfontengine_coretext_p.h index 3ca8a0ad60..b531856a27 100644 --- a/src/gui/text/qfontengine_coretext_p.h +++ b/src/gui/text/qfontengine_coretext_p.h @@ -46,6 +46,10 @@ #if !defined(Q_WS_MAC) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + class QRawFontPrivate; class QCoreTextFontEngineMulti; class QCoreTextFontEngine : public QFontEngine @@ -143,6 +147,10 @@ private: CGAffineTransform qt_transform_from_fontdef(const QFontDef &fontDef); +QT_END_NAMESPACE + +QT_END_HEADER + #endif// !defined(Q_WS_MAC) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) #endif // QFONTENGINE_CORETEXT_P_H diff --git a/src/gui/text/qharfbuzz_copy_p.h b/src/gui/text/qharfbuzz_copy_p.h index 74b824ab35..835d8fb1a6 100644 --- a/src/gui/text/qharfbuzz_copy_p.h +++ b/src/gui/text/qharfbuzz_copy_p.h @@ -43,7 +43,7 @@ extern "C" { #ifdef __xlC__ typedef unsigned hb_bitfield; #else -typedef quint8 hb_bitfield; +typedef QT_PREPEND_NAMESPACE(quint8) hb_bitfield; #endif typedef enum { @@ -66,12 +66,12 @@ typedef enum { HB_Err_Out_Of_Memory = 0xDEAD } HB_Error; -typedef quint32 HB_Glyph; +typedef QT_PREPEND_NAMESPACE(quint32) HB_Glyph; typedef void * HB_Font; typedef void * HB_Face; typedef void * HB_FontRec; -typedef quint32 hb_uint32; -typedef qint32 HB_Fixed; +typedef QT_PREPEND_NAMESPACE(quint32) hb_uint32; +typedef QT_PREPEND_NAMESPACE(qint32) HB_Fixed; typedef struct { HB_Fixed x; diff --git a/src/gui/util/qscroller_mac.mm b/src/gui/util/qscroller_mac.mm index c0ef4a1665..81d18aaf6b 100644 --- a/src/gui/util/qscroller_mac.mm +++ b/src/gui/util/qscroller_mac.mm @@ -47,6 +47,8 @@ #include "qscroller_p.h" +QT_BEGIN_NAMESPACE + QPointF QScrollerPrivate::realDpi(int screen) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @@ -68,4 +70,6 @@ QPointF QScrollerPrivate::realDpi(int screen) [pool release]; } +QT_END_NAMESPACE + #endif From 8c680aceaa0e1f132501ad15c48bc549fd3fd39d Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 20 Jun 2011 11:58:46 +0200 Subject: [PATCH 14/41] Support -debug build on Mac -Wl,-rpath-link is expected to work for all gcc except mac. Change-Id: I4b57e0088db49a8e35840d981e5d6edbb1012396 Reviewed-on: http://codereview.qt.nokia.com/506 Reviewed-by: Qt Sanity Bot Reviewed-by: Rohan McGovern --- mkspecs/features/qt_functions.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 50a85d86ce..86d80cb239 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -142,7 +142,7 @@ defineTest(qtAddModule) { # Make sure we can link to uninstalled libraries !isEqual(MODULE_LIBS, $[QT_INSTALL_LIBS]) { QMAKE_LIBDIR *= $$MODULE_LIBS - unix:QMAKE_LFLAGS *= "-Wl,-rpath-link,$$MODULE_LIBS" + unix:!mac:QMAKE_LFLAGS *= "-Wl,-rpath-link,$$MODULE_LIBS" } if(!debug_and_release|build_pass):CONFIG(debug, debug|release) { win32:LINKAGE = -l$${MODULE_NAME}$${QT_LIBINFIX}d From fa2bb6ab6412dd360ff9dfb890ace2f51e0eef86 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Mon, 20 Jun 2011 16:40:58 +0200 Subject: [PATCH 15/41] Clean-up the macros about Qt Mobility in bearer Remove the usages of QT_MOBILITY_BEARER, QTM_BEGIN_NAMESPACE and etc. Change-Id: I68e335c5caa65aa0aebe1a0db82d9633f1724556 Reviewed-on: http://codereview.qt.nokia.com/513 Reviewed-by: Qt Sanity Bot Reviewed-by: Shane Kearns --- src/network/bearer/qnetworkconfigmanager.h | 16 +--------------- src/network/bearer/qnetworkconfiguration.h | 22 +--------------------- src/network/bearer/qnetworksession.h | 13 +------------ 3 files changed, 3 insertions(+), 48 deletions(-) diff --git a/src/network/bearer/qnetworkconfigmanager.h b/src/network/bearer/qnetworkconfigmanager.h index 0323892923..e317cdfb44 100644 --- a/src/network/bearer/qnetworkconfigmanager.h +++ b/src/network/bearer/qnetworkconfigmanager.h @@ -42,10 +42,6 @@ #ifndef QNETWORKCONFIGURATIONMANAGER_H #define QNETWORKCONFIGURATIONMANAGER_H -#ifdef QT_MOBILITY_BEARER -# include "qmobilityglobal.h" -#endif - #include #include @@ -53,17 +49,11 @@ QT_BEGIN_HEADER -#ifndef QT_MOBILITY_BEARER QT_BEGIN_NAMESPACE -#define QNetworkConfigurationManagerExport Q_NETWORK_EXPORT QT_MODULE(Network) -#else -QTM_BEGIN_NAMESPACE -#define QNetworkConfigurationManagerExport Q_BEARER_EXPORT -#endif class QNetworkConfigurationManagerPrivate; -class QNetworkConfigurationManagerExport QNetworkConfigurationManager : public QObject +class Q_NETWORK_EXPORT QNetworkConfigurationManager : public QObject { Q_OBJECT @@ -104,11 +94,7 @@ Q_SIGNALS: Q_DECLARE_OPERATORS_FOR_FLAGS(QNetworkConfigurationManager::Capabilities) -#ifndef QT_MOBILITY_BEARER QT_END_NAMESPACE -#else -QTM_END_NAMESPACE -#endif QT_END_HEADER diff --git a/src/network/bearer/qnetworkconfiguration.h b/src/network/bearer/qnetworkconfiguration.h index 86de72b2df..4839b7b809 100644 --- a/src/network/bearer/qnetworkconfiguration.h +++ b/src/network/bearer/qnetworkconfiguration.h @@ -42,11 +42,7 @@ #ifndef QNETWORKCONFIGURATION_H #define QNETWORKCONFIGURATION_H -#ifndef QT_MOBILITY_BEARER # include -#else -# include "qmobilityglobal.h" -#endif #include #include @@ -58,17 +54,11 @@ QT_BEGIN_HEADER -#ifndef QT_MOBILITY_BEARER QT_BEGIN_NAMESPACE QT_MODULE(Network) -#define QNetworkConfigurationExport Q_NETWORK_EXPORT -#else -QTM_BEGIN_NAMESPACE -#define QNetworkConfigurationExport Q_BEARER_EXPORT -#endif class QNetworkConfigurationPrivate; -class QNetworkConfigurationExport QNetworkConfiguration +class Q_NETWORK_EXPORT QNetworkConfiguration { public: QNetworkConfiguration(); @@ -102,7 +92,6 @@ public: }; Q_DECLARE_FLAGS(StateFlags, StateFlag) -#ifndef QT_MOBILITY_BEARER enum BearerType { BearerUnknown, BearerEthernet, @@ -114,22 +103,17 @@ public: BearerBluetooth, BearerWiMAX }; -#endif StateFlags state() const; Type type() const; Purpose purpose() const; -#ifndef QT_MOBILITY_BEARER #ifdef QT_DEPRECATED // Required to maintain source compatibility with Qt Mobility. QT_DEPRECATED inline QString bearerName() const { return bearerTypeName(); } #endif BearerType bearerType() const; QString bearerTypeName() const; -#else - QString bearerName() const; -#endif QString identifier() const; bool isRoamingAvailable() const; @@ -146,11 +130,7 @@ private: QExplicitlySharedDataPointer d; }; -#ifndef QT_MOBILITY_BEARER QT_END_NAMESPACE -#else -QTM_END_NAMESPACE -#endif QT_END_HEADER diff --git a/src/network/bearer/qnetworksession.h b/src/network/bearer/qnetworksession.h index 4bc06eef2b..1eeea02ae1 100644 --- a/src/network/bearer/qnetworksession.h +++ b/src/network/bearer/qnetworksession.h @@ -56,19 +56,12 @@ QT_BEGIN_HEADER -#ifndef QT_MOBILITY_BEARER #include QT_BEGIN_NAMESPACE QT_MODULE(Network) -#define QNetworkSessionExport Q_NETWORK_EXPORT -#else -#include "qmobilityglobal.h" -QTM_BEGIN_NAMESPACE -#define QNetworkSessionExport Q_BEARER_EXPORT -#endif class QNetworkSessionPrivate; -class QNetworkSessionExport QNetworkSession : public QObject +class Q_NETWORK_EXPORT QNetworkSession : public QObject { Q_OBJECT @@ -140,13 +133,9 @@ private: QNetworkSessionPrivate *d; }; -#ifndef QT_MOBILITY_BEARER QT_END_NAMESPACE Q_DECLARE_METATYPE(QNetworkSession::State) Q_DECLARE_METATYPE(QNetworkSession::SessionError) -#else -QTM_END_NAMESPACE -#endif QT_END_HEADER From 84d0a2cc8ef0fbd58387b71ec53af25072d9ae90 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 21 Jun 2011 09:34:48 +0200 Subject: [PATCH 16/41] Fixed compile of tst_qsettings in debug-only mode on Mac, Windows This test was forcing on release mode, which does not work if the user requested to build Qt in debug mode only, and this affects the library name (as on Mac and Windows). Change-Id: I11111c0ffee11111111111111111111111111111 Reviewed-on: http://codereview.qt.nokia.com/532 Reviewed-by: Jo Asplin --- tests/auto/qsettings/qsettings.pro | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/auto/qsettings/qsettings.pro b/tests/auto/qsettings/qsettings.pro index 35bb56cc98..f15e40b267 100644 --- a/tests/auto/qsettings/qsettings.pro +++ b/tests/auto/qsettings/qsettings.pro @@ -5,8 +5,6 @@ QT += core-private SOURCES += tst_qsettings.cpp RESOURCES += qsettings.qrc -CONFIG -= debug -CONFIG += release win32-msvc*:LIBS += advapi32.lib CONFIG += parallel_test From f9ae26acf20dc90f578b191fe906ab680b4fc97b Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 21 Jun 2011 09:36:13 +0200 Subject: [PATCH 17/41] Fixed compile of autotests for Mac & QPA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several autotests were assuming that Q_OS_MAC == Mac cocoa port, which caused compile failures when QPA is used. Change-Id: I4480ed815c15b6d9ce83edf0057b7293f2e3ad7e Reviewed-on: http://codereview.qt.nokia.com/533 Reviewed-by: Qt Sanity Bot Reviewed-by: Morten Johan Sørvig --- tests/auto/other.pro | 2 +- tests/auto/qfontdialog/qfontdialog.pro | 2 +- tests/auto/qlayout/tst_qlayout.cpp | 4 ++-- tests/auto/qmacstyle/tst_qmacstyle.cpp | 2 +- tests/auto/qwidget/qwidget.pro | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/auto/other.pro b/tests/auto/other.pro index b50e1697b3..c4ddc83cdf 100644 --- a/tests/auto/other.pro +++ b/tests/auto/other.pro @@ -38,7 +38,7 @@ SUBDIRS=\ contains(QT_CONFIG, accessibility):SUBDIRS += qaccessibility contains(QT_CONFIG, OdfWriter):SUBDIRS += qzip qtextodfwriter -mac: { +mac:!qpa { SUBDIRS += macgui \ macnativeevents \ macplist \ diff --git a/tests/auto/qfontdialog/qfontdialog.pro b/tests/auto/qfontdialog/qfontdialog.pro index 637e896518..d4edaaca21 100644 --- a/tests/auto/qfontdialog/qfontdialog.pro +++ b/tests/auto/qfontdialog/qfontdialog.pro @@ -4,7 +4,7 @@ QT += core-private gui-private SOURCES += tst_qfontdialog.cpp -mac { +mac:!qpa { OBJECTIVE_SOURCES += tst_qfontdialog_mac_helpers.mm LIBS += -framework Cocoa } diff --git a/tests/auto/qlayout/tst_qlayout.cpp b/tests/auto/qlayout/tst_qlayout.cpp index eb651f485b..81b92cadec 100644 --- a/tests/auto/qlayout/tst_qlayout.cpp +++ b/tests/auto/qlayout/tst_qlayout.cpp @@ -56,7 +56,7 @@ #include #include -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC # include #endif @@ -280,7 +280,7 @@ public: void tst_QLayout::layoutItemRect() { -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC if (qobject_cast(QApplication::style())) { QWidget *window = new QWidget; QRadioButton *radio = new QRadioButton(window); diff --git a/tests/auto/qmacstyle/tst_qmacstyle.cpp b/tests/auto/qmacstyle/tst_qmacstyle.cpp index f9fc81ed58..6e03afd575 100644 --- a/tests/auto/qmacstyle/tst_qmacstyle.cpp +++ b/tests/auto/qmacstyle/tst_qmacstyle.cpp @@ -45,7 +45,7 @@ #include -#ifdef Q_OS_MAC +#ifdef Q_WS_MAC const int N = 1; diff --git a/tests/auto/qwidget/qwidget.pro b/tests/auto/qwidget/qwidget.pro index dfb7358127..50aa08deb4 100644 --- a/tests/auto/qwidget/qwidget.pro +++ b/tests/auto/qwidget/qwidget.pro @@ -9,7 +9,7 @@ aix-g++*:QMAKE_CXXFLAGS+=-fpermissive CONFIG += x11inc -mac { +mac:!qpa { LIBS += -framework Security -framework AppKit -framework Carbon OBJECTIVE_SOURCES += tst_qwidget_mac_helpers.mm } From f5a128bb0ed13425d7f153e36c053e3d3511ca08 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Mon, 20 Jun 2011 18:11:34 +0200 Subject: [PATCH 18/41] Add an autotest for the conversion of certificates to text. Loads one of the test certs then compares the result with a known good text version. Change-Id: I3a0d6a7f60ce0f48e0cd8032c9964e9c4217dca7 Merge-request: 2 Reviewed-by: Peter Hartmann Reviewed-on: http://codereview.qt.nokia.com/552 --- .../cert-large-expiration-date.txt | 42 +++++++++++++++++++ .../qsslcertificate/tst_qsslcertificate.cpp | 15 +++++++ 2 files changed, 57 insertions(+) create mode 100644 tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt diff --git a/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt b/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt new file mode 100644 index 0000000000..b2ccb2751e --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt @@ -0,0 +1,42 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + ce:db:31:28:45:c4:05:40 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd + Validity + Not Before: Aug 4 09:53:41 2010 GMT + Not After : Aug 29 09:53:41 2051 GMT + Subject: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (1024 bit) + Modulus: + 00:cd:aa:db:6f:d6:34:c9:a7:f1:c0:be:e4:41:18: + 19:e2:02:c9:22:e6:a7:d5:ba:03:2e:9e:28:7a:f4: + 5f:1a:77:5f:77:a9:11:3b:8f:7e:f0:2e:c6:9e:eb: + 3a:d9:12:d7:c1:0c:51:e8:24:52:3f:23:c3:42:0c: + 11:c6:f2:1c:a1:42:fe:b4:c2:69:83:ad:f7:70:b1: + 18:15:cc:20:28:62:30:f0:2c:15:e6:33:19:af:c3: + eb:1c:c0:91:f7:11:68:94:50:f8:49:37:08:32:d7: + 3e:75:df:a3:bc:69:00:15:de:cd:87:0f:5c:02:6b: + 82:c8:01:7d:6a:f0:1d:dc:73 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 8A:6E:19:E7:97:9B:8F:D9:7F:B3:BB:01:4F:E8:6A:2F:52:95:0D:D9 + X509v3 Authority Key Identifier: + keyid:8A:6E:19:E7:97:9B:8F:D9:7F:B3:BB:01:4F:E8:6A:2F:52:95:0D:D9 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + a1:74:8e:5d:36:96:2c:05:7e:ea:66:cc:2e:68:c7:3d:93:dc: + 8c:a3:11:ad:b5:7e:6e:d0:04:c4:09:bd:0a:f9:39:3b:97:d7: + f0:bb:0c:09:7b:83:fe:bf:87:b0:47:e8:94:b7:aa:9c:79:ad: + 71:9e:b7:c4:99:98:6f:1d:38:32:f8:a3:75:38:c4:e5:e7:37: + 37:21:ec:7b:50:8b:15:b0:97:1e:17:9c:50:17:3c:c1:df:94: + 55:fb:60:2e:50:40:d1:ea:23:c6:3c:21:6f:97:8c:06:16:a5: + 82:72:c1:63:14:64:86:eb:d7:ff:72:f6:09:f5:6d:e6:04:13: + 7a:6a diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index 9276685928..d199564bf7 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -113,6 +113,7 @@ private slots: void largeSerialNumber(); void largeExpirationDate(); void blacklistedCertificates(); + void toText(); // ### add tests for certificate bundles (multiple certificates concatenated into a single // structure); both PEM and DER formatted @@ -850,6 +851,20 @@ void tst_QSslCertificate::blacklistedCertificates() } } +void tst_QSslCertificate::toText() +{ + QList certList = + QSslCertificate::fromPath(SRCDIR "more-certificates/cert-large-expiration-date.pem"); + + QCOMPARE(certList.size(), 1); + const QSslCertificate &cert = certList.at(0); + + QFile f(SRCDIR "more-certificates/cert-large-expiration-date.txt"); + QVERIFY(f.open(QIODevice::ReadOnly)); + QByteArray txt = f.readAll(); + QVERIFY(txt == cert.toText()); +} + #endif // QT_NO_OPENSSL QTEST_MAIN(tst_QSslCertificate) From ae4b4696a53aba6e81491a5d9796ca03adfb2953 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Mon, 20 Jun 2011 18:11:33 +0200 Subject: [PATCH 19/41] Add the ability to convert a certificate to text Adds a function that will convert a certificate to human readable text format using the openssl print function. This is useful for debugging and for displaying the full details of a certificate (including those parts not supported by the Qt API). Change-Id: I27238d05df37f8b15ad09f8e761b06344631a9ce Merge-request: 2 Reviewed-by: Peter Hartmann Reviewed-on: http://codereview.qt.nokia.com/551 Reviewed-by: Qt Sanity Bot --- src/network/ssl/qsslcertificate.cpp | 37 +++++++++++++++++++ src/network/ssl/qsslcertificate.h | 1 + src/network/ssl/qsslcertificate_p.h | 1 + .../ssl/qsslsocket_openssl_symbols.cpp | 2 + .../ssl/qsslsocket_openssl_symbols_p.h | 1 + 5 files changed, 42 insertions(+) diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index 76b7d41e46..dc7b5bee1f 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -123,6 +123,7 @@ #include #include #include +#include QT_BEGIN_NAMESPACE @@ -521,6 +522,17 @@ QByteArray QSslCertificate::toDer() const return d->QByteArray_from_X509(d->x509, QSsl::Der); } +/*! + Returns this certificate converted to a human-readable text + representation. +*/ +QByteArray QSslCertificate::toText() const +{ + if (!d->x509) + return QByteArray(); + return d->text_from_X509(d->x509); +} + /*! Searches all files in the \a path for certificates encoded in the specified \a format and returns them in a list. \e must be a file or a @@ -666,6 +678,31 @@ QByteArray QSslCertificatePrivate::QByteArray_from_X509(X509 *x509, QSsl::Encodi return BEGINCERTSTRING "\n" + tmp + ENDCERTSTRING "\n"; } +QByteArray QSslCertificatePrivate::text_from_X509(X509 *x509) +{ + if (!x509) { + qWarning("QSslSocketBackendPrivate::text_from_X509: null X509"); + return QByteArray(); + } + + QByteArray result; + BIO *bio = q_BIO_new(q_BIO_s_mem()); + if (!bio) + return result; + + q_X509_print(bio, x509); + + QVarLengthArray data; + int count = q_BIO_read(bio, data.data(), 4096); + if ( count > 0 ) { + result = QByteArray( data.data(), count ); + } + + q_BIO_free(bio); + + return result; +} + static QMap _q_mapFromX509Name(X509_NAME *name) { QMap info; diff --git a/src/network/ssl/qsslcertificate.h b/src/network/ssl/qsslcertificate.h index e52f9c15c1..b942bd8a25 100644 --- a/src/network/ssl/qsslcertificate.h +++ b/src/network/ssl/qsslcertificate.h @@ -107,6 +107,7 @@ public: QByteArray toPem() const; QByteArray toDer() const; + QByteArray toText() const; static QList fromPath( const QString &path, QSsl::EncodingFormat format = QSsl::Pem, diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h index 448ca8dc58..eb192968c5 100644 --- a/src/network/ssl/qsslcertificate_p.h +++ b/src/network/ssl/qsslcertificate_p.h @@ -93,6 +93,7 @@ public: void init(const QByteArray &data, QSsl::EncodingFormat format); static QByteArray QByteArray_from_X509(X509 *x509, QSsl::EncodingFormat format); + static QByteArray text_from_X509(X509 *x509); static QSslCertificate QSslCertificate_from_X509(X509 *x509); static QList certificatesFromPem(const QByteArray &pem, int count = -1); static QList certificatesFromDer(const QByteArray &der, int count = -1); diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index a4cc3c493d..c73aae0d3c 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -241,6 +241,7 @@ DEFINEFUNC2(int, X509_cmp, X509 *a, a, X509 *b, b, return -1, return) #ifndef SSLEAY_MACROS DEFINEFUNC(X509 *, X509_dup, X509 *a, a, return 0, return) #endif +DEFINEFUNC2(void, X509_print, BIO *a, a, X509 *b, b, return, DUMMYARG); DEFINEFUNC(ASN1_OBJECT *, X509_EXTENSION_get_object, X509_EXTENSION *a, a, return 0, return) DEFINEFUNC(void, X509_free, X509 *a, a, return, DUMMYARG) DEFINEFUNC2(X509_EXTENSION *, X509_get_ext, X509 *a, a, int b, b, return 0, return) @@ -761,6 +762,7 @@ bool q_resolveOpenSslSymbols() #ifndef SSLEAY_MACROS RESOLVEFUNC(X509_dup) #endif + RESOLVEFUNC(X509_print) RESOLVEFUNC(X509_EXTENSION_get_object) RESOLVEFUNC(X509_free) RESOLVEFUNC(X509_get_ext) diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h index c0a3b4da6a..00f56d65af 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols_p.h +++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h @@ -353,6 +353,7 @@ void *q_ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, char *x); #else X509 *q_X509_dup(X509 *a); #endif +void q_X509_print(BIO *a, X509*b); ASN1_OBJECT *q_X509_EXTENSION_get_object(X509_EXTENSION *a); void q_X509_free(X509 *a); X509_EXTENSION *q_X509_get_ext(X509 *a, int b); From a93a81be7d9b3c4902451475d7c06201292f82ec Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 21 Jun 2011 14:04:01 +0200 Subject: [PATCH 20/41] Don't attempt to build benchmarks if release-mode Qt is not available All of the benchmarks explicitly turn on release mode. This fails on Mac and Windows if Qt is configured as debug-only. It is also possibly misleading on Linux, as compiling the benchmark in release mode does not imply that Qt is compiled in release mode. The results are generally not useful if release mode Qt is not available, so disable them by default in this case. Change-Id: Ifa2bb6ab6412dd360ff9dfb890ace2f51e0eef86 Reviewed-on: http://codereview.qt.nokia.com/549 Reviewed-by: Qt Sanity Bot Reviewed-by: Jo Asplin --- tests/tests.pro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/tests.pro b/tests/tests.pro index 75ca12094f..7a4af15fe2 100644 --- a/tests/tests.pro +++ b/tests/tests.pro @@ -1,3 +1,5 @@ TEMPLATE = subdirs -SUBDIRS = auto \ - benchmarks +SUBDIRS = auto + +# benchmarks in debug mode is rarely sensible +contains(QT_CONFIG,release):SUBDIRS += benchmarks From 366f757e84c872ca601b5f2907c01579a3b38b31 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 20 Jun 2011 18:19:17 +0200 Subject: [PATCH 21/41] SSL certificate printing: lookup Symbian ordinal Change-Id: I5358726f0457f00098c248326ed66fb54af1d177 Reviewed-on: http://codereview.qt.nokia.com/553 Reviewed-by: Qt Sanity Bot Reviewed-by: Martin Petersson --- src/network/ssl/qsslsocket_openssl_symbols.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index c73aae0d3c..6d29b294a1 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -630,6 +630,7 @@ bool q_resolveOpenSslSymbols() #ifndef SSLEAY_MACROS RESOLVEFUNC(X509_dup, 1997, libs.second ) #endif + RESOLVEFUNC(X509_print, 2046, libs.second ) RESOLVEFUNC(X509_EXTENSION_get_object, 1785, libs.second ) RESOLVEFUNC(X509_free, 2001, libs.second ) RESOLVEFUNC(X509_get_ext, 2012, libs.second ) From e01ce920e4a99edad31d2e6115a15d3b5afa2f26 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Tue, 21 Jun 2011 11:23:20 +0200 Subject: [PATCH 22/41] Update autotest case after toHtml change cb760eaef631abd49836ae5c8dc12a61ef5eff0d changed the way we generate HTML for empty blocks. tst_QTextDocument::toHtml has to be updated accordingly. Reviewed-by: Samuel (cherry picked from commit 2701802511d9c09a11212cc37838154245b0c0ca) Change-Id: I0664557f9d74e1aacd46cfcf4cfa2cde4f21a719 Reviewed-on: http://codereview.qt.nokia.com/581 Reviewed-by: Jiang Jiang Reviewed-by: Qt Sanity Bot --- tests/auto/qtextdocument/tst_qtextdocument.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qtextdocument/tst_qtextdocument.cpp b/tests/auto/qtextdocument/tst_qtextdocument.cpp index 68252ef6ae..c98a703acc 100644 --- a/tests/auto/qtextdocument/tst_qtextdocument.cpp +++ b/tests/auto/qtextdocument/tst_qtextdocument.cpp @@ -1584,7 +1584,7 @@ void tst_QTextDocument::toHtml() expectedOutput.replace("OPENDEFAULTBLOCKSTYLE", "style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"); expectedOutput.replace("DEFAULTBLOCKSTYLE", "style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\""); - expectedOutput.replace("EMPTYBLOCK", "

\n"); + expectedOutput.replace("EMPTYBLOCK", "


\n"); if (expectedOutput.endsWith(QLatin1Char('\n'))) expectedOutput.chop(1); expectedOutput.append(htmlTail); From 6ebb60158d83099f7a5c6a643b709424e34077cf Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Mon, 20 Jun 2011 13:47:01 +0200 Subject: [PATCH 23/41] Fix fontconfig usage in X11 font database We should do FcConfigSubstitute(0, pattern, FcMatchFont) on a FcPattern for query because the family list in it will contain almost all the families after FcConfigSubstitute(0, pattern, FcMatchPattern), then the test in will almost always succeed. In general, FcMatchFont substitute should only be done on the FcPattern that we got after FcFontMatch() or FcFontRenderPrepare(). Based on the suggestion of fontconfig author Behdad Esfahbod, this patch reorganized the tryPatternLoad logic so that it only does the QFontEngine creation part, FcPattern *match is retrieved outside of that function. In this way, the match pattern we got can be either from FcFontMatch() or after FcFontRenderPrepare() on one of the fonts we got from qt_fontSetForPattern(). Then we don't need to duplicate the pattern and add all criterias back with qt_addPatternProps(). It not only simplified the code a lot but also fix the way we apply FcMatchFont substitution. This substitution will either be done by FcFontMatch() or FcFontRenderPrepare, both implicitly. Task-number: QTBUG-2148, QTBUG-19947 Change-Id: I2e4dbbe7f448e81850176732b4a65028f2b912fa Reviewed-by: Eskil Reviewed-on: http://codereview.qt.nokia.com/579 Reviewed-by: Qt Sanity Bot Reviewed-by: Jiang Jiang --- src/gui/text/qfontdatabase_x11.cpp | 55 +++++++++++++----------------- src/gui/text/qfontengine_x11.cpp | 28 +++++---------- 2 files changed, 31 insertions(+), 52 deletions(-) diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp index 754334c0c4..958daa2506 100644 --- a/src/gui/text/qfontdatabase_x11.cpp +++ b/src/gui/text/qfontdatabase_x11.cpp @@ -1566,9 +1566,8 @@ static FcPattern *getFcPattern(const QFontPrivate *fp, int script, const QFontDe qt_addPatternProps(pattern, fp->screen, script, request); - FcDefaultSubstitute(pattern); FcConfigSubstitute(0, pattern, FcMatchPattern); - FcConfigSubstitute(0, pattern, FcMatchFont); + FcDefaultSubstitute(pattern); // these should only get added to the pattern _after_ substitution // append the default fallback font for the specified script @@ -1606,35 +1605,20 @@ static void FcFontSetRemove(FcFontSet *fs, int at) memmove(fs->fonts + at, fs->fonts + at + 1, len); } -static QFontEngine *tryPatternLoad(FcPattern *p, int screen, - const QFontDef &request, int script, FcPattern **matchedPattern = 0) +static QFontEngine *tryPatternLoad(FcPattern *match, int screen, + const QFontDef &request, int script) { #ifdef FONT_MATCH_DEBUG FcChar8 *fam; - FcPatternGetString(p, FC_FAMILY, 0, &fam); + FcPatternGetString(match, FC_FAMILY, 0, &fam); FM_DEBUG("==== trying %s\n", fam); #endif FM_DEBUG("passes charset test\n"); - FcPattern *pattern = FcPatternDuplicate(p); - // add properties back in as the font selected from the - // list doesn't contain them. - qt_addPatternProps(pattern, screen, script, request); - - FcConfigSubstitute(0, pattern, FcMatchPattern); - FcDefaultSubstitute(pattern); - FcResult res; - FcPattern *match = FcFontMatch(0, pattern, &res); - - if (matchedPattern) - *matchedPattern = 0; QFontEngineX11FT *engine = 0; if (!match) // probably no fonts available. goto done; - if (matchedPattern) - *matchedPattern = FcPatternDuplicate(match); - if (script != QUnicodeTables::Common) { // skip font if it doesn't support the language we want if (specialChars[script]) { @@ -1673,11 +1657,6 @@ static QFontEngine *tryPatternLoad(FcPattern *p, int screen, } } done: - FcPatternDestroy(pattern); - if (!engine && matchedPattern && *matchedPattern) { - FcPatternDestroy(*matchedPattern); - *matchedPattern = 0; - } return engine; } @@ -1726,14 +1705,26 @@ static QFontEngine *loadFc(const QFontPrivate *fp, int script, const QFontDef &r #endif QFontEngine *fe = 0; - FcPattern *matchedPattern = 0; - fe = tryPatternLoad(pattern, fp->screen, request, script, &matchedPattern); + FcResult res; + FcPattern *match = FcFontMatch(0, pattern, &res); + fe = tryPatternLoad(match, fp->screen, request, script); if (!fe) { FcFontSet *fs = qt_fontSetForPattern(pattern, request); + if (match) { + FcPatternDestroy(match); + match = 0; + } + if (fs) { - for (int i = 0; !fe && i < fs->nfont; ++i) - fe = tryPatternLoad(fs->fonts[i], fp->screen, request, script, &matchedPattern); + for (int i = 0; !fe && i < fs->nfont; ++i) { + match = FcFontRenderPrepare(NULL, pattern, fs->fonts[i]); + fe = tryPatternLoad(match, fp->screen, request, script); + if (fe) + break; + FcPatternDestroy(match); + match = 0; + } FcFontSetDestroy(fs); } FM_DEBUG("engine for script %d is %s\n", script, fe ? fe->fontDef.family.toLatin1().data(): "(null)"); @@ -1741,11 +1732,11 @@ static QFontEngine *loadFc(const QFontPrivate *fp, int script, const QFontDef &r if (fe && script == QUnicodeTables::Common && !(request.styleStrategy & QFont::NoFontMerging) && !fe->symbol) { - fe = new QFontEngineMultiFT(fe, matchedPattern, pattern, fp->screen, request); + fe = new QFontEngineMultiFT(fe, match, pattern, fp->screen, request); } else { FcPatternDestroy(pattern); - if (matchedPattern) - FcPatternDestroy(matchedPattern); + if (match) + FcPatternDestroy(match); } return fe; } diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp index e3bfa5df46..490866c9fe 100644 --- a/src/gui/text/qfontengine_x11.cpp +++ b/src/gui/text/qfontengine_x11.cpp @@ -863,11 +863,8 @@ glyph_t QFontEngineXLFD::glyphIndexToFreetypeGlyphIndex(glyph_t g) const // Multi FT engine // ------------------------------------------------------------------ -static QFontEngine *engineForPattern(FcPattern *pattern, const QFontDef &request, - int screen) +static QFontEngine *engineForPattern(FcPattern *match, const QFontDef &request, int screen) { - FcResult res; - FcPattern *match = FcFontMatch(0, pattern, &res); QFontEngineX11FT *engine = new QFontEngineX11FT(match, request, screen); if (!engine->invalid()) return engine; @@ -879,9 +876,9 @@ static QFontEngine *engineForPattern(FcPattern *pattern, const QFontDef &request } QFontEngineMultiFT::QFontEngineMultiFT(QFontEngine *fe, FcPattern *matchedPattern, FcPattern *p, int s, const QFontDef &req) - : QFontEngineMulti(2), request(req), pattern(p), firstEnginePattern(matchedPattern), fontSet(0), screen(s) + : QFontEngineMulti(2), request(req), pattern(p), fontSet(0), screen(s) { - + firstEnginePattern = FcPatternDuplicate(matchedPattern); engines[0] = fe; engines.at(0)->ref.ref(); fontDef = engines[0]->fontDef; @@ -907,8 +904,6 @@ void QFontEngineMultiFT::loadEngine(int at) extern QMutex *qt_fontdatabase_mutex(); QMutexLocker locker(qt_fontdatabase_mutex()); - extern void qt_addPatternProps(FcPattern *pattern, int screen, int script, - const QFontDef &request); extern QFontDef qt_FcPatternToQFontDef(FcPattern *pattern, const QFontDef &); extern FcFontSet *qt_fontSetForPattern(FcPattern *pattern, const QFontDef &request); @@ -940,22 +935,18 @@ void QFontEngineMultiFT::loadEngine(int at) Q_ASSERT(at < engines.size()); Q_ASSERT(engines.at(at) == 0); - FcPattern *pattern = FcPatternDuplicate(fontSet->fonts[at + firstFontIndex - 1]); - qt_addPatternProps(pattern, screen, QUnicodeTables::Common, request); - - QFontDef fontDef = qt_FcPatternToQFontDef(pattern, this->request); + FcPattern *match = FcFontRenderPrepare(NULL, pattern, fontSet->fonts[at + firstFontIndex - 1]); + QFontDef fontDef = qt_FcPatternToQFontDef(match, this->request); // note: we use -1 for the script to make sure that we keep real // FT engines separate from Multi engines in the font cache QFontCache::Key key(fontDef, -1, screen); QFontEngine *fontEngine = QFontCache::instance()->findEngine(key); if (!fontEngine) { - FcConfigSubstitute(0, pattern, FcMatchPattern); - FcDefaultSubstitute(pattern); - fontEngine = engineForPattern(pattern, request, screen); + fontEngine = engineForPattern(match, request, screen); QFontCache::instance()->insertEngine(key, fontEngine); } - FcPatternDestroy(pattern); + FcPatternDestroy(match); fontEngine->ref.ref(); engines[at] = fontEngine; } @@ -1123,17 +1114,14 @@ QFontEngineX11FT::QFontEngineX11FT(FcPattern *pattern, const QFontDef &fd, int s } #endif - if (!init(face_id, antialias, defaultFormat)) { - FcPatternDestroy(pattern); + if (!init(face_id, antialias, defaultFormat)) return; - } if (!freetype->charset) { FcCharSet *cs; FcPatternGetCharSet (pattern, FC_CHARSET, 0, &cs); freetype->charset = FcCharSetCopy(cs); } - FcPatternDestroy(pattern); } QFontEngineX11FT::~QFontEngineX11FT() From 0da3d7d5d34f86b7826045bd557f8733b7da5073 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Mon, 20 Jun 2011 18:23:25 +0200 Subject: [PATCH 24/41] SSL certificate printing: increase max certificate size apparently there are really big certificates around, so 4k might not always be enough. Change-Id: I84df82d117469a14b4c6db81e0ceecc1a8ba47b3 Reviewed-on: http://codereview.qt.nokia.com/554 Reviewed-by: Qt Sanity Bot Reviewed-by: Martin Petersson --- src/network/ssl/qsslcertificate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp index dc7b5bee1f..6100c68a2d 100644 --- a/src/network/ssl/qsslcertificate.cpp +++ b/src/network/ssl/qsslcertificate.cpp @@ -692,8 +692,8 @@ QByteArray QSslCertificatePrivate::text_from_X509(X509 *x509) q_X509_print(bio, x509); - QVarLengthArray data; - int count = q_BIO_read(bio, data.data(), 4096); + QVarLengthArray data; + int count = q_BIO_read(bio, data.data(), 16384); if ( count > 0 ) { result = QByteArray( data.data(), count ); } From 665d8a045455214d2cfca72076da6bc75d3058c7 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Sat, 18 Jun 2011 16:39:32 +0200 Subject: [PATCH 25/41] Make QPoint have the same layout on all platforms Change-Id: I8330295761a4440afd81c121039237fb651d9a9c Reviewed-on: http://codereview.qt.nokia.com/487 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/corelib/tools/qpoint.h | 6 ------ src/gui/painting/qpaintengine_raster.cpp | 7 ------- src/gui/painting/qpaintengineex.cpp | 7 ------- 3 files changed, 20 deletions(-) diff --git a/src/corelib/tools/qpoint.h b/src/corelib/tools/qpoint.h index c0cf2192c1..b394ece1a6 100644 --- a/src/corelib/tools/qpoint.h +++ b/src/corelib/tools/qpoint.h @@ -92,14 +92,8 @@ public: private: friend class QTransform; - // ### Qt 5; remove the ifdef and just have the same order on all platforms. -#if defined(Q_OS_MAC) - int yp; - int xp; -#else int xp; int yp; -#endif }; Q_DECLARE_TYPEINFO(QPoint, Q_MOVABLE_TYPE); diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 0a1b8bbd01..e2ce35af64 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -2006,15 +2006,8 @@ void QRasterPaintEngine::drawPolygon(const QPoint *points, int pointCount, Polyg if (s->penData.blend) { int count = pointCount * 2; QVarLengthArray fpoints(count); - #ifdef Q_WS_MAC - for (int i=0; iflags.fast_pen) { diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 5105d9a963..9427dd5105 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -789,15 +789,8 @@ void QPaintEngineEx::drawLines(const QLine *lines, int lineCount) qreal pts[64]; int count2 = count<<1; -#ifdef Q_WS_MAC - for (int i=0; ipen); From 85136496bc8517951dcc3e670d1a46d340819f0d Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Tue, 7 Jun 2011 14:38:38 +0100 Subject: [PATCH 26/41] IPv4 + IPv6 dual stack sockets Adds support for binding "dual stack" sockets (via QUdpSocket or QTcpServer). A dual stack socket will accept incoming connections on either IPv4 or IPv6 interfaces. QHostAddress::Any - use this to bind a dual stack socket QHostAddress::AnyIPv6 - use this to bind a socket for IPv6 only QHostAddress::AnyIPv4 - use this to bind a socket for IPv4 only Binding to a specific address rather than one of the "any" addresses is restricting you to a protocol anyway so no behaviour change there. IPv6 sockets were previously dual stack on some OS and v6 only on others Any previously meant IPv4 only This commit implemented & tested on Windows 7, Linux (Ubuntu 10.04) and Mac OS 10.6.7. Windows XP and server 2003 do not support dual stack sockets, even though they can support IPv6. On those versions, QHostAddress::Any will still bind to IPv4 0.0.0.0 (which is also the behaviour anywhere QT_NO_IPV6 is defined) Autotests run: qudpsocket (includes a new test case) qtcpserver (includes a new test case) qtcpsocket qnetworkreply qhostaddress Task-number: QTBUG-17080 Change-Id: Id486677c4f832e18dc0ff1a86c5f5fc422c9eb4f Reviewed-on: http://codereview.qt.nokia.com/421 Reviewed-by: Qt Sanity Bot Reviewed-by: Thiago Macieira Reviewed-by: Markus Goetz --- src/network/kernel/qhostaddress.cpp | 62 +++++++++++--- src/network/kernel/qhostaddress.h | 3 +- src/network/socket/qabstractsocket.h | 1 + src/network/socket/qnativesocketengine_p.h | 9 +++ .../socket/qnativesocketengine_unix.cpp | 14 +++- .../socket/qnativesocketengine_win.cpp | 39 ++++++--- src/network/socket/qsocks5socketengine.cpp | 10 ++- tests/auto/qhostaddress/tst_qhostaddress.cpp | 60 +++++++------- tests/auto/qtcpserver/tst_qtcpserver.cpp | 40 +++++++++ tests/auto/qtcpsocket/tst_qtcpsocket.cpp | 2 +- tests/auto/qudpsocket/tst_qudpsocket.cpp | 81 ++++++++++++++++--- 11 files changed, 256 insertions(+), 65 deletions(-) diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index 7eeb4e5a51..bff351c34f 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -134,15 +134,40 @@ QHostAddressPrivate::QHostAddressPrivate() void QHostAddressPrivate::setAddress(quint32 a_) { a = a_; + //create mapped address + memset(&a6, 0, sizeof(a6)); + int i; + for (i=15; a_ != 0; i--) { + a6[i] = a_ & 0xFF; + a_ >>=8; + } + Q_ASSERT(i >= 11); + a6[11] = 0xFF; + a6[10] = 0xFF; protocol = QAbstractSocket::IPv4Protocol; isParsed = true; } +static bool parseMappedAddress(quint32& a, const Q_IPV6ADDR &a6) +{ + int i; + for (i=0;i<10;i++) + if (a6[i]) return false; + for (;i<12;i++) + if (a6[i] != 0xFF) return false; + a=(a6[12] << 24) | (a6[13] << 16) | (a6[14] << 8) | a6[15]; + return true; +} + void QHostAddressPrivate::setAddress(const quint8 *a_) { for (int i = 0; i < 16; i++) a6[i] = a_[i]; - protocol = QAbstractSocket::IPv6Protocol; + a = 0; + if (parseMappedAddress(a, a6)) + protocol = QAbstractSocket::IPv4Protocol; + else + protocol = QAbstractSocket::IPv6Protocol; isParsed = true; } @@ -150,7 +175,10 @@ void QHostAddressPrivate::setAddress(const Q_IPV6ADDR &a_) { a6 = a_; a = 0; - protocol = QAbstractSocket::IPv6Protocol; + if (parseMappedAddress(a, a6)) + protocol = QAbstractSocket::IPv4Protocol; + else + protocol = QAbstractSocket::IPv6Protocol; isParsed = true; } @@ -447,8 +475,9 @@ void QNetmaskAddress::setPrefixLength(QAbstractSocket::NetworkLayerProtocol prot \value LocalHost The IPv4 localhost address. Equivalent to QHostAddress("127.0.0.1"). \value LocalHostIPv6 The IPv6 localhost address. Equivalent to QHostAddress("::1"). \value Broadcast The IPv4 broadcast address. Equivalent to QHostAddress("255.255.255.255"). - \value Any The IPv4 any-address. Equivalent to QHostAddress("0.0.0.0"). - \value AnyIPv6 The IPv6 any-address. Equivalent to QHostAddress("::"). + \value AnyIPv4 The IPv4 any-address. Equivalent to QHostAddress("0.0.0.0"). A socket bound with this address will listen only on IPv4 interaces. + \value AnyIPv6 The IPv6 any-address. Equivalent to QHostAddress("::"). A socket bound with this address will listen only on IPv6 interaces. + \value Any The dual stack any-address. A socket bound with this address will listen on both IPv4 and IPv6 interfaces. */ /*! Constructs a host address object with the IP address 0.0.0.0. @@ -548,12 +577,16 @@ QHostAddress::QHostAddress(SpecialAddress address) case LocalHostIPv6: setAddress(QLatin1String("::1")); break; - case Any: + case AnyIPv4: setAddress(QLatin1String("0.0.0.0")); break; case AnyIPv6: setAddress(QLatin1String("::")); break; + case Any: + d->clear(); + d->protocol = QAbstractSocket::AnyIPProtocol; + break; } } @@ -679,8 +712,11 @@ void QHostAddress::setAddress(const struct sockaddr *sockaddr) For example, if the address is 127.0.0.1, the returned value is 2130706433 (i.e. 0x7f000001). - This value is only valid if the Protocol() is - \l{QAbstractSocket::}{IPv4Protocol}. + This value is valid if the protocol() is + \l{QAbstractSocket::}{IPv4Protocol}, + or if the protocol is + \l{QAbstractSocket::}{IPv6Protocol}, + and the IPv6 address is an IPv4 mapped address. (RFC4291) \sa toString() */ @@ -705,8 +741,11 @@ QAbstractSocket::NetworkLayerProtocol QHostAddress::protocol() const \snippet doc/src/snippets/code/src_network_kernel_qhostaddress.cpp 0 - This value is only valid if the protocol() is + This value is valid if the protocol() is \l{QAbstractSocket::}{IPv6Protocol}. + If the protocol is + \l{QAbstractSocket::}{IPv4Protocol}, + then the address is returned an an IPv4 mapped IPv6 address. (RFC4291) \sa toString() */ @@ -722,13 +761,15 @@ Q_IPV6ADDR QHostAddress::toIPv6Address() const For example, if the address is the IPv4 address 127.0.0.1, the returned string is "127.0.0.1". For IPv6 the string format will follow the RFC5952 recommendation. + For QHostAddress::Any, its IPv4 address will be returned ("0.0.0.0") \sa toIPv4Address() */ QString QHostAddress::toString() const { QT_ENSURE_PARSED(this); - if (d->protocol == QAbstractSocket::IPv4Protocol) { + if (d->protocol == QAbstractSocket::IPv4Protocol + || d->protocol == QAbstractSocket::AnyIPProtocol) { quint32 i = toIPv4Address(); QString s; s.sprintf("%d.%d.%d.%d", (i>>24) & 0xff, (i>>16) & 0xff, @@ -1183,6 +1224,9 @@ QDataStream &operator>>(QDataStream &in, QHostAddress &address) address.setScopeId(scope); } break; + case QAbstractSocket::AnyIPProtocol: + address = QHostAddress::Any; + break; default: address.clear(); in.setStatus(QDataStream::ReadCorruptData); diff --git a/src/network/kernel/qhostaddress.h b/src/network/kernel/qhostaddress.h index 486f2322ae..efb3198fc0 100644 --- a/src/network/kernel/qhostaddress.h +++ b/src/network/kernel/qhostaddress.h @@ -76,7 +76,8 @@ public: LocalHost, LocalHostIPv6, Any, - AnyIPv6 + AnyIPv6, + AnyIPv4 }; QHostAddress(); diff --git a/src/network/socket/qabstractsocket.h b/src/network/socket/qabstractsocket.h index 1959fabdfc..2717ceb58a 100644 --- a/src/network/socket/qabstractsocket.h +++ b/src/network/socket/qabstractsocket.h @@ -74,6 +74,7 @@ public: enum NetworkLayerProtocol { IPv4Protocol, IPv6Protocol, + AnyIPProtocol, UnknownNetworkLayerProtocol = -1 }; enum SocketError { diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h index c5c4b325d0..a024cd42d1 100644 --- a/src/network/socket/qnativesocketengine_p.h +++ b/src/network/socket/qnativesocketengine_p.h @@ -74,6 +74,11 @@ struct qt_sockaddr_storage { char __ss_pad2[QT_SS_PAD2SIZE]; }; +#ifdef Q_OS_WIN +#define QT_SOCKLEN_T int +#define QT_SOCKOPTLEN_T int +#endif + // sockaddr_in6 size changed between old and new SDK // Only the new version is the correct one, so always // use this structure. @@ -265,6 +270,10 @@ public: int nativeSelect(int timeout, bool selectForRead) const; int nativeSelect(int timeout, bool checkRead, bool checkWrite, bool *selectForRead, bool *selectForWrite) const; +#ifdef Q_OS_WIN + void setPortAndAddress(sockaddr_in * sockAddrIPv4, qt_sockaddr_in6 * sockAddrIPv6, + quint16 port, const QHostAddress & address, sockaddr ** sockAddrPtr, QT_SOCKLEN_T *sockAddrSize); +#endif void nativeClose(); diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index 39570c8c04..26053981ce 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -163,7 +163,7 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc QAbstractSocket::NetworkLayerProtocol socketProtocol) { #ifndef QT_NO_IPV6 - int protocol = (socketProtocol == QAbstractSocket::IPv6Protocol) ? AF_INET6 : AF_INET; + int protocol = (socketProtocol == QAbstractSocket::IPv6Protocol || socketProtocol == QAbstractSocket::AnyIPProtocol) ? AF_INET6 : AF_INET; #else Q_UNUSED(socketProtocol); int protocol = AF_INET; @@ -495,7 +495,14 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &address, quint16 #if !defined(QT_NO_IPV6) struct sockaddr_in6 sockAddrIPv6; - if (address.protocol() == QAbstractSocket::IPv6Protocol) { + if (address.protocol() == QAbstractSocket::IPv6Protocol || address.protocol() == QAbstractSocket::AnyIPProtocol) { +#ifdef IPV6_V6ONLY + int ipv6only = 0; + if (address.protocol() == QAbstractSocket::IPv6Protocol) + ipv6only = 1; + //default value of this socket option varies depending on unix variant (or system configuration on BSD), so always set it explicitly + ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) ); +#endif memset(&sockAddrIPv6, 0, sizeof(sockAddrIPv6)); sockAddrIPv6.sin6_family = AF_INET6; sockAddrIPv6.sin6_port = htons(port); @@ -866,7 +873,8 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l #if !defined(QT_NO_IPV6) struct sockaddr_in6 sockAddrIPv6; - if (host.protocol() == QAbstractSocket::IPv6Protocol) { + if (host.protocol() == QAbstractSocket::IPv6Protocol + || socketProtocol == QAbstractSocket::IPv6Protocol) { memset(&sockAddrIPv6, 0, sizeof(sockAddrIPv6)); sockAddrIPv6.sin6_family = AF_INET6; sockAddrIPv6.sin6_port = htons(port); diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index 88b87b98fe..ba62bd6da2 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -159,11 +159,6 @@ static QByteArray qt_prettyDebug(const char *data, int len, int maxLength) #define SO_EXCLUSIVEADDRUSE ((int)(~SO_REUSEADDR)) /* disallow local address reuse */ #endif -//### -#define QT_SOCKLEN_T int -#define QT_SOCKOPTLEN_T int - - /* Extracts the port and address from a sockaddr, and stores them in \a port and \a addr if they are non-null. @@ -202,11 +197,13 @@ static inline void qt_socket_getPortAndAddress(SOCKET socketDescriptor, const qt Sets the port and address to a sockaddr. Requires that sa point to the IPv6 struct if the address is IPv6. */ -static inline void qt_socket_setPortAndAddress(SOCKET socketDescriptor, sockaddr_in * sockAddrIPv4, qt_sockaddr_in6 * sockAddrIPv6, +void QNativeSocketEnginePrivate::setPortAndAddress(sockaddr_in * sockAddrIPv4, qt_sockaddr_in6 * sockAddrIPv6, quint16 port, const QHostAddress & address, sockaddr ** sockAddrPtr, QT_SOCKLEN_T *sockAddrSize) { #if !defined(QT_NO_IPV6) - if (address.protocol() == QAbstractSocket::IPv6Protocol) { + if (address.protocol() == QAbstractSocket::IPv6Protocol + || address.protocol() == QAbstractSocket::AnyIPProtocol + || socketProtocol == QAbstractSocket::IPv6Protocol) { memset(sockAddrIPv6, 0, sizeof(qt_sockaddr_in6)); sockAddrIPv6->sin6_family = AF_INET6; sockAddrIPv6->sin6_scope_id = address.scopeId().toInt(); @@ -306,7 +303,9 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc } */ - int protocol = (socketProtocol == QAbstractSocket::IPv6Protocol) ? AF_INET6 : AF_INET; + //Windows XP and 2003 support IPv6 but not dual stack sockets + int protocol = (socketProtocol == QAbstractSocket::IPv6Protocol + || (socketProtocol == QAbstractSocket::AnyIPProtocol && QSysInfo::windowsVersion() >= QSysInfo::WV_6_0)) ? AF_INET6 : AF_INET; int type = (socketType == QAbstractSocket::UdpSocket) ? SOCK_DGRAM : SOCK_STREAM; // MSDN KB179942 states that on winnt 4 WSA_FLAG_OVERLAPPED is needed if socket is to be non blocking // and recomends alwasy doing it for cross windows version comapablity. @@ -602,7 +601,7 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin struct sockaddr *sockAddrPtr = 0; QT_SOCKLEN_T sockAddrSize = 0; - qt_socket_setPortAndAddress(socketDescriptor, &sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize); + setPortAndAddress(&sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize); forever { int connectResult = ::WSAConnect(socketDescriptor, sockAddrPtr, sockAddrSize, 0,0,0,0); @@ -708,19 +707,35 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &address, quin bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port) { QHostAddress address = a; + DWORD ipv6only = 0; switch (address.protocol()) { case QAbstractSocket::IPv6Protocol: if (address.toIPv6Address()[0] == 0xff) { // binding to a multicast address address = QHostAddress(QHostAddress::AnyIPv6); } +#if !defined (QT_NO_IPV6) && defined (IPV6_V6ONLY) + //This is default in current windows versions, it may change in future so set it explicitly + if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) { + ipv6only = 1; + ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) ); + } +#endif break; case QAbstractSocket::IPv4Protocol: if ((address.toIPv4Address() & 0xffff0000) == 0xefff0000) { // binding to a multicast address - address = QHostAddress(QHostAddress::Any); + address = QHostAddress(QHostAddress::AnyIPv4); } break; + case QAbstractSocket::AnyIPProtocol: +#if !defined (QT_NO_IPV6) && defined (IPV6_V6ONLY) + if (QSysInfo::windowsVersion() >= QSysInfo::WV_6_0) + ipv6only = ::setsockopt(socketDescriptor, IPPROTO_IPV6, IPV6_V6ONLY, (char*)&ipv6only, sizeof(ipv6only) ); + else +#endif + address = QHostAddress(QHostAddress::AnyIPv4); //xp/WS2003 and earlier don't support dual stack, so bind to IPv4 + break; default: break; } @@ -730,7 +745,7 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port) struct sockaddr *sockAddrPtr = 0; QT_SOCKLEN_T sockAddrSize = 0; - qt_socket_setPortAndAddress(socketDescriptor, &sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize); + setPortAndAddress(&sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize); int bindResult = ::bind(socketDescriptor, sockAddrPtr, sockAddrSize); @@ -1182,7 +1197,7 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l struct sockaddr *sockAddrPtr = 0; QT_SOCKLEN_T sockAddrSize = 0; - qt_socket_setPortAndAddress(socketDescriptor, &sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize); + setPortAndAddress(&sockAddrIPv4, &sockAddrIPv6, port, address, &sockAddrPtr, &sockAddrSize); WSABUF buf; #if !defined(Q_OS_WINCE) diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp index ab757987f6..514a7a0f6f 100644 --- a/src/network/socket/qsocks5socketengine.cpp +++ b/src/network/socket/qsocks5socketengine.cpp @@ -827,7 +827,7 @@ void QSocks5SocketEnginePrivate::sendRequestMethod() //### set error code .... return; } else if (!peerName.isEmpty() && !qt_socks5_set_host_name_and_port(peerName, port, &buf)) { - QSOCKS5_DEBUG << "error setting address" << address << " : " << port; + QSOCKS5_DEBUG << "error setting peer name" << peerName << " : " << port; //### set error code .... return; } @@ -1325,12 +1325,18 @@ void QSocks5SocketEnginePrivate::_q_udpSocketReadNotification() } #endif // QT_NO_UDPSOCKET -bool QSocks5SocketEngine::bind(const QHostAddress &address, quint16 port) +bool QSocks5SocketEngine::bind(const QHostAddress &addr, quint16 port) { Q_D(QSocks5SocketEngine); // when bind wee will block until the bind is finished as the info from the proxy server is needed + QHostAddress address; + if (addr.protocol() == QAbstractSocket::AnyIPProtocol) + address = QHostAddress::AnyIPv4; //SOCKS5 doesnt support dual stack, and there isn't any implementation of udp on ipv6 yet + else + address = addr; + if (!d->data) { if (socketType() == QAbstractSocket::TcpSocket) { d->initialize(QSocks5SocketEnginePrivate::BindMode); diff --git a/tests/auto/qhostaddress/tst_qhostaddress.cpp b/tests/auto/qhostaddress/tst_qhostaddress.cpp index 08eb63cff8..b20e07be03 100644 --- a/tests/auto/qhostaddress/tst_qhostaddress.cpp +++ b/tests/auto/qhostaddress/tst_qhostaddress.cpp @@ -269,7 +269,10 @@ void tst_QHostAddress::specialAddresses_data() QTest::newRow("broadcast_2") << QString("255.255.255.255") << (int)QHostAddress::Broadcast << true; QTest::newRow("any_ipv6") << QString("::") << (int)QHostAddress::AnyIPv6 << true; - QTest::newRow("any_ipv4") << QString("0.0.0.0") << (int)QHostAddress::Any << true; + QTest::newRow("any_ipv4") << QString("0.0.0.0") << (int)QHostAddress::AnyIPv4 << true; + + QTest::newRow("dual_not_ipv6") << QString("::") << (int)QHostAddress::Any << false; + QTest::newRow("dual_not_ipv4") << QString("0.0.0.0") << (int)QHostAddress::Any << false; } @@ -366,8 +369,9 @@ void tst_QHostAddress::streaming_data() QTest::newRow("8") << QHostAddress(QHostAddress::LocalHostIPv6); QTest::newRow("9") << QHostAddress(QHostAddress::Broadcast); QTest::newRow("10") << QHostAddress(QHostAddress::Any); - QTest::newRow("11") << QHostAddress(QHostAddress::AnyIPv6); - QTest::newRow("12") << QHostAddress("foo.bar.com"); + QTest::newRow("11") << QHostAddress(QHostAddress::AnyIPv4); + QTest::newRow("12") << QHostAddress(QHostAddress::AnyIPv6); + QTest::newRow("13") << QHostAddress("foo.bar.com"); } void tst_QHostAddress::streaming() @@ -409,26 +413,26 @@ void tst_QHostAddress::parseSubnet_data() QTest::newRow("invalid_23") << "ffff::/ff00::" << QHostAddress() << -1; // correct IPv4 with netmask - QTest::newRow("netmask_0") << "0.0.0.0/0.0.0.0" << QHostAddress(QHostAddress::Any) << 0; - QTest::newRow("netmask_1") << "0.0.0.0/255.128.0.0" << QHostAddress(QHostAddress::Any) << 9; - QTest::newRow("netmask_2") << "0.0.0.0/255.192.0.0" << QHostAddress(QHostAddress::Any) << 10; - QTest::newRow("netmask_3") << "0.0.0.0/255.224.0.0" << QHostAddress(QHostAddress::Any) << 11; - QTest::newRow("netmask_4") << "0.0.0.0/255.240.0.0" << QHostAddress(QHostAddress::Any) << 12; - QTest::newRow("netmask_5") << "0.0.0.0/255.248.0.0" << QHostAddress(QHostAddress::Any) << 13; - QTest::newRow("netmask_6") << "0.0.0.0/255.252.0.0" << QHostAddress(QHostAddress::Any) << 14; - QTest::newRow("netmask_7") << "0.0.0.0/255.254.0.0" << QHostAddress(QHostAddress::Any) << 15; - QTest::newRow("netmask_8") << "0.0.0.0/255.255.0.0" << QHostAddress(QHostAddress::Any) << 16; - QTest::newRow("netmask_16") << "0.0.0.0/255.255.0.0" << QHostAddress(QHostAddress::Any) << 16; - QTest::newRow("netmask_24") << "0.0.0.0/255.255.255.0" << QHostAddress(QHostAddress::Any) << 24; - QTest::newRow("netmask_31") << "0.0.0.0/255.255.255.254" << QHostAddress(QHostAddress::Any) << 31; - QTest::newRow("netmask_32") << "0.0.0.0/255.255.255.255" << QHostAddress(QHostAddress::Any) << 32; + QTest::newRow("netmask_0") << "0.0.0.0/0.0.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 0; + QTest::newRow("netmask_1") << "0.0.0.0/255.128.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 9; + QTest::newRow("netmask_2") << "0.0.0.0/255.192.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 10; + QTest::newRow("netmask_3") << "0.0.0.0/255.224.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 11; + QTest::newRow("netmask_4") << "0.0.0.0/255.240.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 12; + QTest::newRow("netmask_5") << "0.0.0.0/255.248.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 13; + QTest::newRow("netmask_6") << "0.0.0.0/255.252.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 14; + QTest::newRow("netmask_7") << "0.0.0.0/255.254.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 15; + QTest::newRow("netmask_8") << "0.0.0.0/255.255.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 16; + QTest::newRow("netmask_16") << "0.0.0.0/255.255.0.0" << QHostAddress(QHostAddress::AnyIPv4) << 16; + QTest::newRow("netmask_24") << "0.0.0.0/255.255.255.0" << QHostAddress(QHostAddress::AnyIPv4) << 24; + QTest::newRow("netmask_31") << "0.0.0.0/255.255.255.254" << QHostAddress(QHostAddress::AnyIPv4) << 31; + QTest::newRow("netmask_32") << "0.0.0.0/255.255.255.255" << QHostAddress(QHostAddress::AnyIPv4) << 32; // correct IPv4 with prefix - QTest::newRow("prefix_0") << "0.0.0.0/0" << QHostAddress(QHostAddress::Any) << 0; - QTest::newRow("prefix_1") << "0.0.0.0/1" << QHostAddress(QHostAddress::Any) << 1; - QTest::newRow("prefix_9") << "0.0.0.0/9" << QHostAddress(QHostAddress::Any) << 9; - QTest::newRow("prefix_31") << "0.0.0.0/31" << QHostAddress(QHostAddress::Any) << 31; - QTest::newRow("prefix_32") << "0.0.0.0/32" << QHostAddress(QHostAddress::Any) << 32; + QTest::newRow("prefix_0") << "0.0.0.0/0" << QHostAddress(QHostAddress::AnyIPv4) << 0; + QTest::newRow("prefix_1") << "0.0.0.0/1" << QHostAddress(QHostAddress::AnyIPv4) << 1; + QTest::newRow("prefix_9") << "0.0.0.0/9" << QHostAddress(QHostAddress::AnyIPv4) << 9; + QTest::newRow("prefix_31") << "0.0.0.0/31" << QHostAddress(QHostAddress::AnyIPv4) << 31; + QTest::newRow("prefix_32") << "0.0.0.0/32" << QHostAddress(QHostAddress::AnyIPv4) << 32; // correct IPv4 without prefix or netmask QTest::newRow("classA") << "10" << QHostAddress("10.0.0.0") << 8; @@ -533,22 +537,22 @@ void tst_QHostAddress::isInSubnet_data() // invalid QHostAddresses are never in any subnets QTest::newRow("invalid_01") << QHostAddress() << QHostAddress() << 32 << false; - QTest::newRow("invalid_02") << QHostAddress() << QHostAddress(QHostAddress::Any) << 32 << false; - QTest::newRow("invalid_03") << QHostAddress() << QHostAddress(QHostAddress::Any) << 8 << false; - QTest::newRow("invalid_04") << QHostAddress() << QHostAddress(QHostAddress::Any) << 0 << false; + QTest::newRow("invalid_02") << QHostAddress() << QHostAddress(QHostAddress::AnyIPv4) << 32 << false; + QTest::newRow("invalid_03") << QHostAddress() << QHostAddress(QHostAddress::AnyIPv4) << 8 << false; + QTest::newRow("invalid_04") << QHostAddress() << QHostAddress(QHostAddress::AnyIPv4) << 0 << false; QTest::newRow("invalid_05") << QHostAddress() << QHostAddress("255.255.255.0") << 24 << false; QTest::newRow("invalid_06") << QHostAddress() << QHostAddress(QHostAddress::AnyIPv6) << 0 << false; QTest::newRow("invalid_07") << QHostAddress() << QHostAddress(QHostAddress::AnyIPv6) << 32 << false; QTest::newRow("invalid_08") << QHostAddress() << QHostAddress(QHostAddress::AnyIPv6) << 128<< false; // and no host address can be in a subnet whose prefix is invalid - QTest::newRow("invalid_20") << QHostAddress(QHostAddress::Any) << QHostAddress() << 16 << false; + QTest::newRow("invalid_20") << QHostAddress(QHostAddress::AnyIPv4) << QHostAddress() << 16 << false; QTest::newRow("invalid_21") << QHostAddress(QHostAddress::AnyIPv6) << QHostAddress() << 16 << false; QTest::newRow("invalid_22") << QHostAddress(QHostAddress::LocalHost) << QHostAddress() << 16 << false; QTest::newRow("invalid_23") << QHostAddress(QHostAddress::LocalHostIPv6) << QHostAddress() << 16 << false; // negative netmasks don't make sense: - QTest::newRow("invalid_30") << QHostAddress(QHostAddress::Any) << QHostAddress(QHostAddress::Any) << -1 << false; + QTest::newRow("invalid_30") << QHostAddress(QHostAddress::AnyIPv4) << QHostAddress(QHostAddress::Any) << -1 << false; QTest::newRow("invalid_31") << QHostAddress(QHostAddress::AnyIPv6) << QHostAddress(QHostAddress::AnyIPv6) << -1 << false; // we don't support IPv4 belonging in an IPv6 netmask and vice-versa @@ -558,10 +562,10 @@ void tst_QHostAddress::isInSubnet_data() QTest::newRow("v4-in-v6mapped2") << QHostAddress(QHostAddress::LocalHost) << QHostAddress("::ffff:255.0.0.0") << 113 << false; // IPv4 correct ones - QTest::newRow("netmask_0") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::Any) << 0 << true; + QTest::newRow("netmask_0") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::AnyIPv4) << 0 << true; QTest::newRow("netmask_0bis") << QHostAddress(QHostAddress::LocalHost) << QHostAddress("255.255.0.0") << 0 << true; QTest::newRow("netmask_0ter") << QHostAddress(QHostAddress::LocalHost) << QHostAddress("1.2.3.4") << 0 << true; - QTest::newRow("netmask_1") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::Any) << 1 << true; + QTest::newRow("netmask_1") << QHostAddress(QHostAddress::LocalHost) << QHostAddress(QHostAddress::AnyIPv4) << 1 << true; QTest::newRow("~netmask_1") << QHostAddress(QHostAddress::LocalHost) << QHostAddress("128.0.0.0") << 1 << false; QTest::newRow("netmask_1bis") << QHostAddress("224.0.0.1") << QHostAddress("128.0.0.0") << 1 << true; QTest::newRow("~netmask_1bis") << QHostAddress("224.0.0.1") << QHostAddress("0.0.0.0") << 1 << false; diff --git a/tests/auto/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp index 3416a7cb23..beeb6c7655 100644 --- a/tests/auto/qtcpserver/tst_qtcpserver.cpp +++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp @@ -97,6 +97,8 @@ private slots: void constructing(); void clientServerLoop(); void ipv6Server(); + void dualStack_data(); + void dualStack(); void ipv6ServerMapped(); void crashTests(); void maxPendingConnections(); @@ -265,6 +267,44 @@ void tst_QTcpServer::ipv6Server() delete serverSocket; } +Q_DECLARE_METATYPE(QHostAddress); + +void tst_QTcpServer::dualStack_data() +{ + QTest::addColumn("bindAddress"); + QTest::addColumn("v4ok"); + QTest::addColumn("v6ok"); + QTest::newRow("any") << QHostAddress(QHostAddress::Any) << true << true; + QTest::newRow("anyIPv4") << QHostAddress(QHostAddress::AnyIPv4) << true << false; + QTest::newRow("anyIPv6") << QHostAddress(QHostAddress::AnyIPv6) << false << true; +} + +void tst_QTcpServer::dualStack() +{ +#ifdef QT_NO_IPV6 + QSKIP("test requires IPv6 support", SkipAll); +#else + QFETCH_GLOBAL(bool, setProxy); + if (setProxy) + QSKIP("test server proxy doesn't support ipv6", SkipSingle); + QFETCH(QHostAddress, bindAddress); + QFETCH(bool, v4ok); + QFETCH(bool, v6ok); + + QTcpServer server; + QVERIFY(server.listen(bindAddress)); + + QTcpSocket v4client; + v4client.connectToHost(QHostAddress::LocalHost, server.serverPort()); + + QTcpSocket v6client; + v6client.connectToHost(QHostAddress::LocalHostIPv6, server.serverPort()); + + QCOMPARE(v4client.waitForConnected(5000), v4ok); + QCOMPARE(v6client.waitForConnected(5000), v6ok); +#endif +} + //---------------------------------------------------------------------------------- void tst_QTcpServer::ipv6ServerMapped() { diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index a2f8bac517..39a64ab0dc 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -1506,7 +1506,7 @@ void tst_QTcpSocket::dontCloseOnTimeout() QVERIFY(server.listen()); QHostAddress serverAddress = QHostAddress::LocalHost; - if (!(server.serverAddress() == QHostAddress::Any) && !(server.serverAddress() == QHostAddress::AnyIPv6)) + if (!(server.serverAddress() == QHostAddress::AnyIPv4) && !(server.serverAddress() == QHostAddress::AnyIPv6)) serverAddress = server.serverAddress(); QTcpSocket *socket = newSocket(); diff --git a/tests/auto/qudpsocket/tst_qudpsocket.cpp b/tests/auto/qudpsocket/tst_qudpsocket.cpp index 9ca049bccf..03e224682f 100644 --- a/tests/auto/qudpsocket/tst_qudpsocket.cpp +++ b/tests/auto/qudpsocket/tst_qudpsocket.cpp @@ -90,6 +90,7 @@ private slots: void loop(); void ipv6Loop_data(); void ipv6Loop(); + void dualStack(); void readLine(); void pendingDatagramSize(); void writeDatagram(); @@ -212,7 +213,7 @@ void tst_QUdpSocket::unconnectedServerAndClientTest() const char *message[] = {"Yo mista", "Yo", "Wassap"}; QHostAddress serverAddress = QHostAddress::LocalHost; - if (!(serverSocket.localAddress() == QHostAddress::Any || serverSocket.localAddress() == QHostAddress::AnyIPv6)) + if (!(serverSocket.localAddress() == QHostAddress::AnyIPv4 || serverSocket.localAddress() == QHostAddress::AnyIPv6)) serverAddress = serverSocket.localAddress(); for (int i = 0; i < 3; ++i) { @@ -343,10 +344,10 @@ void tst_QUdpSocket::loop() QVERIFY2(paul.bind(), paul.errorString().toLatin1().constData()); QHostAddress peterAddress = QHostAddress::LocalHost; - if (!(peter.localAddress() == QHostAddress::Any || peter.localAddress() == QHostAddress::AnyIPv6)) + if (!(peter.localAddress() == QHostAddress::AnyIPv4 || peter.localAddress() == QHostAddress::AnyIPv6)) peterAddress = peter.localAddress(); QHostAddress pualAddress = QHostAddress::LocalHost; - if (!(paul.localAddress() == QHostAddress::Any || paul.localAddress() == QHostAddress::AnyIPv6)) + if (!(paul.localAddress() == QHostAddress::AnyIPv4 || paul.localAddress() == QHostAddress::AnyIPv6)) pualAddress = paul.localAddress(); QCOMPARE(peter.writeDatagram(peterMessage.data(), peterMessage.length(), @@ -428,6 +429,64 @@ void tst_QUdpSocket::ipv6Loop() } } +void tst_QUdpSocket::dualStack() +{ + QFETCH_GLOBAL(bool, setProxy); + if (setProxy) + QSKIP("test server SOCKS proxy doesn't support IPv6", SkipSingle); + QUdpSocket dualSock; + QByteArray dualData("dual"); + QVERIFY(dualSock.bind(QHostAddress(QHostAddress::Any), 0)); + + QUdpSocket v4Sock; + QByteArray v4Data("v4"); + QVERIFY(v4Sock.bind(QHostAddress(QHostAddress::AnyIPv4), 0)); + + QUdpSocket v6Sock; + QByteArray v6Data("v6"); + QVERIFY(v6Sock.bind(QHostAddress(QHostAddress::AnyIPv6), 0)); + + QHostAddress from; + quint16 port; + QByteArray buffer; + //test v4 -> dual + QCOMPARE((int)v4Sock.writeDatagram(v4Data.constData(), v4Data.length(), QHostAddress(QHostAddress::LocalHost), dualSock.localPort()), v4Data.length()); + QVERIFY(dualSock.waitForReadyRead(5000)); + buffer.reserve(100); + qint64 size = dualSock.readDatagram(buffer.data(), 100, &from, &port); + QCOMPARE((int)size, v4Data.length()); + buffer.resize(size); + QCOMPARE(buffer, v4Data); + + //test v6 -> dual + QCOMPARE((int)v6Sock.writeDatagram(v6Data.constData(), v6Data.length(), QHostAddress(QHostAddress::LocalHostIPv6), dualSock.localPort()), v6Data.length()); + QVERIFY(dualSock.waitForReadyRead(5000)); + buffer.reserve(100); + size = dualSock.readDatagram(buffer.data(), 100, &from, &port); + QCOMPARE((int)size, v6Data.length()); + buffer.resize(size); + QCOMPARE(buffer, v6Data); + + //test dual -> v4 + QCOMPARE((int)dualSock.writeDatagram(dualData.constData(), dualData.length(), QHostAddress(QHostAddress::LocalHost), v4Sock.localPort()), dualData.length()); + QVERIFY(v4Sock.waitForReadyRead(5000)); + buffer.reserve(100); + size = v4Sock.readDatagram(buffer.data(), 100, &from, &port); + QCOMPARE((int)size, dualData.length()); + buffer.resize(size); + QCOMPARE(buffer, dualData); + + //test dual -> v6 + QCOMPARE((int)dualSock.writeDatagram(dualData.constData(), dualData.length(), QHostAddress(QHostAddress::LocalHostIPv6), v6Sock.localPort()), dualData.length()); + QVERIFY(v6Sock.waitForReadyRead(5000)); + buffer.reserve(100); + size = v6Sock.readDatagram(buffer.data(), 100, &from, &port); + QCOMPARE((int)size, dualData.length()); + buffer.resize(size); + QCOMPARE(buffer, dualData); + +} + void tst_QUdpSocket::empty_readyReadSlot() { QTestEventLoop::instance().exitLoop(); @@ -465,7 +524,7 @@ void tst_QUdpSocket::pendingDatagramSize() QVERIFY2(server.bind(), server.errorString().toLatin1().constData()); QHostAddress serverAddress = QHostAddress::LocalHost; - if (!(server.localAddress() == QHostAddress::Any || server.localAddress() == QHostAddress::AnyIPv6)) + if (!(server.localAddress() == QHostAddress::AnyIPv4 || server.localAddress() == QHostAddress::AnyIPv6)) serverAddress = server.localAddress(); QUdpSocket client; @@ -519,7 +578,7 @@ void tst_QUdpSocket::writeDatagram() QVERIFY2(server.bind(), server.errorString().toLatin1().constData()); QHostAddress serverAddress = QHostAddress::LocalHost; - if (!(server.localAddress() == QHostAddress::Any || server.localAddress() == QHostAddress::AnyIPv6)) + if (!(server.localAddress() == QHostAddress::AnyIPv4 || server.localAddress() == QHostAddress::AnyIPv6)) serverAddress = server.localAddress(); QUdpSocket client; @@ -592,7 +651,7 @@ void tst_QUdpSocket::performance() QVERIFY2(server.bind(), server.errorString().toLatin1().constData()); QHostAddress serverAddress = QHostAddress::LocalHost; - if (!(server.localAddress() == QHostAddress::Any || server.localAddress() == QHostAddress::AnyIPv6)) + if (!(server.localAddress() == QHostAddress::AnyIPv4 || server.localAddress() == QHostAddress::AnyIPv6)) serverAddress = server.localAddress(); QUdpSocket client; @@ -1147,7 +1206,7 @@ void tst_QUdpSocket::setMulticastInterface() void tst_QUdpSocket::multicast_data() { - QHostAddress anyAddress = QHostAddress(QHostAddress::Any); + QHostAddress anyAddress = QHostAddress(QHostAddress::AnyIPv4); QHostAddress groupAddress = QHostAddress("239.255.118.62"); QHostAddress any6Address = QHostAddress(QHostAddress::AnyIPv6); QHostAddress group6Address = QHostAddress("FF01::114"); @@ -1173,8 +1232,12 @@ void tst_QUdpSocket::multicast() QFETCH(bool, joinResult); if (setProxy) { // UDP multicast does not work with proxies - if ((bindAddress.protocol() == QAbstractSocket::IPv4Protocol && (bindAddress.toIPv4Address() & 0xffff0000) == 0xefff0000) - || bindAddress.protocol() == QAbstractSocket::IPv6Protocol) { + if ( +#ifndef Q_OS_WIN + //windows native socket engine binds 0.0.0.0 instead of the requested multicast address + (bindAddress.protocol() == QAbstractSocket::IPv4Protocol && (bindAddress.toIPv4Address() & 0xffff0000) == 0xefff0000) || +#endif + bindAddress.protocol() == QAbstractSocket::IPv6Protocol) { // proxy cannot bind to IPv6 or multicast addresses bindResult = false; } From 4545b212afcdeaeb4022e43260390674960fc94a Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 21 Jun 2011 14:09:09 +0200 Subject: [PATCH 27/41] SSL certificate printing: fix auto test for different OpenSSL versions OpenSSL versions 0.9.8 and 1.0.0 produce slightly different output when dumping a certificate. Change-Id: I2cf27213237a2e1e08f1b0345c29ca2cd441f41c Reviewed-on: http://codereview.qt.nokia.com/555 Reviewed-by: Qt Sanity Bot Reviewed-by: Martin Petersson --- .../cert-large-expiration-date.txt.0.9.8 | 42 +++++++++++++++++++ ...t => cert-large-expiration-date.txt.1.0.0} | 0 .../qsslcertificate/tst_qsslcertificate.cpp | 14 +++++-- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt.0.9.8 rename tests/auto/qsslcertificate/more-certificates/{cert-large-expiration-date.txt => cert-large-expiration-date.txt.1.0.0} (100%) diff --git a/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt.0.9.8 b/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt.0.9.8 new file mode 100644 index 0000000000..20500b221f --- /dev/null +++ b/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt.0.9.8 @@ -0,0 +1,42 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + ce:db:31:28:45:c4:05:40 + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd + Validity + Not Before: Aug 4 09:53:41 2010 GMT + Not After : Aug 29 09:53:41 2051 GMT + Subject: C=AU, ST=Some-State, O=Internet Widgits Pty Ltd + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (1024 bit) + Modulus (1024 bit): + 00:cd:aa:db:6f:d6:34:c9:a7:f1:c0:be:e4:41:18: + 19:e2:02:c9:22:e6:a7:d5:ba:03:2e:9e:28:7a:f4: + 5f:1a:77:5f:77:a9:11:3b:8f:7e:f0:2e:c6:9e:eb: + 3a:d9:12:d7:c1:0c:51:e8:24:52:3f:23:c3:42:0c: + 11:c6:f2:1c:a1:42:fe:b4:c2:69:83:ad:f7:70:b1: + 18:15:cc:20:28:62:30:f0:2c:15:e6:33:19:af:c3: + eb:1c:c0:91:f7:11:68:94:50:f8:49:37:08:32:d7: + 3e:75:df:a3:bc:69:00:15:de:cd:87:0f:5c:02:6b: + 82:c8:01:7d:6a:f0:1d:dc:73 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: + 8A:6E:19:E7:97:9B:8F:D9:7F:B3:BB:01:4F:E8:6A:2F:52:95:0D:D9 + X509v3 Authority Key Identifier: + keyid:8A:6E:19:E7:97:9B:8F:D9:7F:B3:BB:01:4F:E8:6A:2F:52:95:0D:D9 + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption + a1:74:8e:5d:36:96:2c:05:7e:ea:66:cc:2e:68:c7:3d:93:dc: + 8c:a3:11:ad:b5:7e:6e:d0:04:c4:09:bd:0a:f9:39:3b:97:d7: + f0:bb:0c:09:7b:83:fe:bf:87:b0:47:e8:94:b7:aa:9c:79:ad: + 71:9e:b7:c4:99:98:6f:1d:38:32:f8:a3:75:38:c4:e5:e7:37: + 37:21:ec:7b:50:8b:15:b0:97:1e:17:9c:50:17:3c:c1:df:94: + 55:fb:60:2e:50:40:d1:ea:23:c6:3c:21:6f:97:8c:06:16:a5: + 82:72:c1:63:14:64:86:eb:d7:ff:72:f6:09:f5:6d:e6:04:13: + 7a:6a diff --git a/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt b/tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt.1.0.0 similarity index 100% rename from tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt rename to tests/auto/qsslcertificate/more-certificates/cert-large-expiration-date.txt.1.0.0 diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp index d199564bf7..6e29072d8f 100644 --- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp @@ -859,10 +859,16 @@ void tst_QSslCertificate::toText() QCOMPARE(certList.size(), 1); const QSslCertificate &cert = certList.at(0); - QFile f(SRCDIR "more-certificates/cert-large-expiration-date.txt"); - QVERIFY(f.open(QIODevice::ReadOnly)); - QByteArray txt = f.readAll(); - QVERIFY(txt == cert.toText()); + // Openssl's cert dump method changed slightly between 0.9.8 and 1.0.0 versions, so we want it to match any output + + QFile fOld(SRCDIR "more-certificates/cert-large-expiration-date.txt.0.9.8"); + QVERIFY(fOld.open(QIODevice::ReadOnly)); + QByteArray txtOld = fOld.readAll(); + + QFile fNew(SRCDIR "more-certificates/cert-large-expiration-date.txt.1.0.0"); + QVERIFY(fNew.open(QIODevice::ReadOnly)); + QByteArray txtNew = fNew.readAll(); + QVERIFY(txtOld == cert.toText() || txtNew == cert.toText()); } #endif // QT_NO_OPENSSL From e6b744fb4be6e975f0336a86bd1a0cd5c60cd85e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 10 Jun 2011 11:48:16 +0200 Subject: [PATCH 28/41] simplify relative path generation instead of hand-crafting the logic, simply use QDir::relativeFilePath() Change-Id: I5a495ad6bdfa8ec126741180770934e7ebee0495 Reviewed-on: http://codereview.qt.nokia.com/512 Reviewed-by: Qt Sanity Bot Reviewed-by: Olivier Goffart --- src/tools/moc/main.cpp | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/tools/moc/main.cpp b/src/tools/moc/main.cpp index 41a3a4fc93..eaafd0a9fd 100644 --- a/src/tools/moc/main.cpp +++ b/src/tools/moc/main.cpp @@ -67,34 +67,7 @@ static QByteArray combinePath(const char *infile, const char *outfile) { QFileInfo inFileInfo(QDir::current(), QFile::decodeName(infile)); QFileInfo outFileInfo(QDir::current(), QFile::decodeName(outfile)); - int numCommonComponents = 0; - - QStringList inSplitted = inFileInfo.dir().canonicalPath().split(QLatin1Char('/')); - QStringList outSplitted = outFileInfo.dir().canonicalPath().split(QLatin1Char('/')); - - while (!inSplitted.isEmpty() && !outSplitted.isEmpty() && - inSplitted.first() == outSplitted.first()) { - inSplitted.removeFirst(); - outSplitted.removeFirst(); - numCommonComponents++; - } - - if (numCommonComponents < 2) - /* - The paths don't have the same drive, or they don't have the - same root directory. Use an absolute path. - */ - return QFile::encodeName(inFileInfo.absoluteFilePath()); - /* - The paths have something in common. Use a path relative to - the output file. - */ - while (!outSplitted.isEmpty()) { - outSplitted.removeFirst(); - inSplitted.prepend(QLatin1String("..")); - } - inSplitted.append(inFileInfo.fileName()); - return QFile::encodeName(inSplitted.join(QLatin1String("/"))); + return QFile::encodeName(outFileInfo.dir().relativeFilePath(inFileInfo.filePath())); } From 61d22c932dc90926c991be47c121bdeee661b936 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 16 May 2011 16:07:10 +0200 Subject: [PATCH 29/41] fix autotest regressions introduced by 37c329a3 Add proper license headers and properly clip pixel drawing to the devices bounding rect. (cherry picked from commit 67d275542464c794ec4b650f10cca9a17e10c977) Change-Id: I52a166919e87e07168fa5f597b22398a1abefe14 Reviewed-on: http://codereview.qt.nokia.com/590 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/gui/painting/qcosmeticstroker.cpp | 45 +++++++++++++++++++++++++++ src/gui/painting/qcosmeticstroker_p.h | 41 ++++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp index 3ee262fcf1..d694b4b9a8 100644 --- a/src/gui/painting/qcosmeticstroker.cpp +++ b/src/gui/painting/qcosmeticstroker.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module 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 Technology Preview License Agreement accompanying +** this package. +** +** 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.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "qcosmeticstroker_p.h" #include "private/qpainterpath_p.h" #include @@ -99,6 +140,10 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, inline void drawPixel(QCosmeticStroker *stroker, int x, int y, int coverage) { + const QRect &cl = stroker->clip; + if (x < cl.x() || x > cl.right() || y < cl.y() || y > cl.bottom()) + return; + int lastx = stroker->spans[stroker->current_span-1].x + stroker->spans[stroker->current_span-1].len ; int lasty = stroker->spans[stroker->current_span-1].y; diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h index 1355a5ad13..0aa71fc9cd 100644 --- a/src/gui/painting/qcosmeticstroker_p.h +++ b/src/gui/painting/qcosmeticstroker_p.h @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module 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 Technology Preview License Agreement accompanying +** this package. +** +** 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.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + #ifndef QCOSMETICSTROKER_P_H #define QCOSMETICSTROKER_P_H From 1fab62b930edd4abed076e57ee997eae09159f22 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Wed, 22 Jun 2011 11:48:43 +0200 Subject: [PATCH 30/41] Remove all references to demos. Remove the references to demos from configure and qtbase.pro. This is done because of the merge of the demos and examples in Qt. Everything will be added as an example. Change-Id: Iec040f5c719384c7aabba971316de40195ed3a69 Reviewed-on: http://codereview.qt.nokia.com/619 Reviewed-by: Qt Sanity Bot Reviewed-by: Oswald Buddenhagen --- configure | 33 +++++--------------------------- qtbase.pro | 4 ---- tools/configure/configureapp.cpp | 18 ++--------------- 3 files changed, 7 insertions(+), 48 deletions(-) diff --git a/configure b/configure index 6124d6d8a5..c4754c2fc8 100755 --- a/configure +++ b/configure @@ -699,7 +699,7 @@ CFG_FONTCONFIG=auto CFG_QWS_FREETYPE=auto CFG_LIBFREETYPE=auto CFG_SQL_AVAILABLE= -QT_DEFAULT_BUILD_PARTS="libs examples demos tests" +QT_DEFAULT_BUILD_PARTS="libs examples tests" CFG_BUILD_PARTS="" CFG_NOBUILD_PARTS="" CFG_RELEASE_QMAKE=no @@ -849,7 +849,6 @@ QT_INSTALL_DATA= QT_INSTALL_TRANSLATIONS= QT_INSTALL_SETTINGS= QT_INSTALL_EXAMPLES= -QT_INSTALL_DEMOS= QT_HOST_PREFIX= #flags for SQL drivers @@ -1060,7 +1059,7 @@ while [ "$#" -gt 0 ]; do shift VAL=$1 ;; - -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config) + -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-depths|-make|-nomake|-platform|-xplatform|-buildkey|-sdk|-arch|-host-arch|-mysql_config) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` shift VAL="$1" @@ -1314,9 +1313,6 @@ while [ "$#" -gt 0 ]; do examplesdir) QT_INSTALL_EXAMPLES="$VAL" ;; - demosdir) - QT_INSTALL_DEMOS="$VAL" - ;; qconfig) CFG_QCONFIG="$VAL" ;; @@ -3545,7 +3541,6 @@ if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then [ -z "$QT_INSTALL_TRANSLATIONS" ] && QT_INSTALL_TRANSLATIONS="\\\\resource\\\\qt$QT_LIBINFIX\\\\translations" [ -z "$QT_INSTALL_SETTINGS" ] && QT_INSTALL_SETTINGS= [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES= - [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS= else #docs if [ -z "$QT_INSTALL_DOCS" ]; then #default @@ -3652,17 +3647,6 @@ else [ -z "$QT_INSTALL_EXAMPLES" ] && QT_INSTALL_EXAMPLES="$QT_INSTALL_PREFIX/examples" #fallback fi QT_INSTALL_EXAMPLES=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_EXAMPLES"` - - #demos - if [ -z "$QT_INSTALL_DEMOS" ]; then #default - if [ "$CFG_PREFIX_INSTALL" = "no" ]; then - if [ "$PLATFORM_MAC" = "yes" ]; then - QT_INSTALL_DEMOS="/Developer/Examples/Qt/Demos" - fi - fi - [ -z "$QT_INSTALL_DEMOS" ] && QT_INSTALL_DEMOS="$QT_INSTALL_PREFIX/demos" - fi - QT_INSTALL_DEMOS=`"$relpath/config.tests/unix/makeabs" "$QT_INSTALL_DEMOS"` fi #------------------------------------------------------------------------------- @@ -3731,8 +3715,8 @@ if [ "$OPT_HELP" = "yes" ]; then Usage: $relconf [-h] [-prefix ] [-prefix-install] [-bindir ] [-libdir ] [-docdir ] [-headerdir ] [-plugindir ] [-importdir ] [-datadir ] [-translationdir ] [-sysconfdir ] [-examplesdir ] - [-demosdir ] [-buildkey ] [-release] [-debug] - [-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile] + [-buildkey ] [-release] [-debug] [-debug-and-release] + [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile] [-largefile] [-no-exceptions] [-exceptions] [-no-accessibility] [-accessibility] [-no-stl] [-stl] [-no-sql-] [-sql-] [-plugin-sql-] [-system-sqlite] [-no-qt3support] [-qt3support] @@ -3808,8 +3792,6 @@ cat < .... Examples will be installed to (default PREFIX/examples) - -demosdir ....... Demos will be installed to - (default PREFIX/demos) You may use these options to turn on strict plugin loading. @@ -4657,7 +4639,6 @@ DATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_INSTA TRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_INSTALL_TRANSLATIONS"` SETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"` EXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"` -DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"` TODAY=`date +%Y-%m-%d` cat > "$outpath/src/corelib/global/qconfig.cpp.new" <> "$outpath/src/corelib/global/qconfig.cpp.new" <> "$outpath/src/corelib/global/qconfig.cpp.new" <] [-libdir ]\n" // "[-docdir ] [-headerdir ] [-plugindir ]\n" // "[-importdir ] [-datadir ] [-translationdir ]\n" -// "[-examplesdir ] [-demosdir ][-buildkey ]\n" +// "[-examplesdir ] [-buildkey ]\n" "[-release] [-debug] [-debug-and-release] [-shared] [-static]\n" "[-no-fast] [-fast] [-no-exceptions] [-exceptions]\n" "[-no-accessibility] [-accessibility] [-no-rtti] [-rtti]\n" @@ -1709,7 +1702,6 @@ bool Configure::displayHelp() desc( "-datadir ", "Data used by Qt programs will be installed to dir\n(default PREFIX)"); desc( "-translationdir ","Translations of Qt programs will be installed to dir\n(default PREFIX/translations)\n"); desc( "-examplesdir ", "Examples will be installed to dir\n(default PREFIX/examples)"); - desc( "-demosdir ", "Demos will be installed to dir\n(default PREFIX/demos)"); */ desc(" You may use these options to turn on strict plugin loading:\n\n", 0, 1); @@ -2828,8 +2820,6 @@ void Configure::generateOutputVars() dictionary[ "QT_INSTALL_TRANSLATIONS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/translations"); if (!dictionary[ "QT_INSTALL_EXAMPLES" ].size()) dictionary[ "QT_INSTALL_EXAMPLES" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/examples"); - if (!dictionary[ "QT_INSTALL_DEMOS" ].size()) - dictionary[ "QT_INSTALL_DEMOS" ] = qipempty ? "" : fixSeparators(dictionary[ "QT_INSTALL_PREFIX" ] + "/demos"); if (dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux")) dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ]; @@ -2930,7 +2920,7 @@ void Configure::generateCachefile() moduleStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl; moduleStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl; QStringList buildParts; - buildParts << "libs" << "examples" << "demos"; + buildParts << "libs" << "examples"; foreach (const QString &item, disabledBuildParts) { buildParts.removeAll(item); } @@ -3356,7 +3346,6 @@ void Configure::generateConfigfiles() << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << escapeSeparators(dictionary["QT_INSTALL_DATA"]) << "\";" << endl << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\";" << endl << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\";" << endl - << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << escapeSeparators(dictionary["QT_INSTALL_DEMOS"]) << "\";" << endl //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl ; if (!dictionary[ "QT_HOST_PREFIX" ].isNull()) { @@ -3371,7 +3360,6 @@ void Configure::generateConfigfiles() << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ], true) <<"\";" << endl << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations", true) <<"\";" << endl << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example", true) <<"\";" << endl - << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos", true) <<"\";" << endl << "#endif //QT_BOOTSTRAPPED" << endl; } tmpStream << "/* strlen( \"qt_lcnsxxxx\") == 12 */" << endl @@ -3387,7 +3375,6 @@ void Configure::generateConfigfiles() << "#define QT_CONFIGURE_DATA_PATH qt_configure_data_path_str + 12;" << endl << "#define QT_CONFIGURE_TRANSLATIONS_PATH qt_configure_translations_path_str + 12;" << endl << "#define QT_CONFIGURE_EXAMPLES_PATH qt_configure_examples_path_str + 12;" << endl - << "#define QT_CONFIGURE_DEMOS_PATH qt_configure_demos_path_str + 12;" << endl //<< "#define QT_CONFIGURE_SETTINGS_PATH qt_configure_settings_path_str + 12;" << endl << endl; @@ -3547,7 +3534,6 @@ void Configure::displayConfig() cout << "Data installed to..........." << dictionary[ "QT_INSTALL_DATA" ] << endl; cout << "Translations installed to..." << dictionary[ "QT_INSTALL_TRANSLATIONS" ] << endl; cout << "Examples installed to......." << dictionary[ "QT_INSTALL_EXAMPLES" ] << endl; - cout << "Demos installed to.........." << dictionary[ "QT_INSTALL_DEMOS" ] << endl << endl; if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith(QLatin1String("wince"))) { cout << "Using c runtime detection..." << dictionary[ "CE_CRT" ] << endl; From e9d36991233278d68257f5d9632ceace6d7b243d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Wed, 22 Jun 2011 10:00:28 +0200 Subject: [PATCH 31/41] Update the wayland plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to sha1 bfea3d6befdb688d5354e6f15a9400ea637febf9 Change-Id: Ie855cfbc6b786f1e738e205d403478614774ad34 Reviewed-on: http://codereview.qt.nokia.com/682 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- .../platforms/wayland/qwaylanddisplay.cpp | 27 ++++++++++++++++--- .../platforms/wayland/qwaylanddisplay.h | 11 +++++++- .../platforms/wayland/qwaylandwindow.cpp | 9 +++---- .../platforms/wayland/wayland_sha1.txt | 2 +- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index e6d39683fe..93c98e3d7c 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -232,17 +232,36 @@ int QWaylandDisplay::sourceUpdate(uint32_t mask, void *data) } void QWaylandDisplay::outputHandleGeometry(void *data, - struct wl_output *output, + wl_output *output, int32_t x, int32_t y, - int32_t width, int32_t height) + int32_t physicalWidth, + int32_t physicalHeight, + int subpixel, + const char *make, const char *model) { QWaylandDisplay *waylandDisplay = static_cast(data); - QRect outputRect = QRect(x, y, width, height); + QRect outputRect = QRect(x, y, physicalWidth, physicalHeight); waylandDisplay->createNewScreen(output,outputRect); } +void QWaylandDisplay::mode(void *data, + struct wl_output *wl_output, + uint32_t flags, + int width, + int height, + int refresh) +{ + Q_UNUSED(data); + Q_UNUSED(wl_output); + Q_UNUSED(flags); + Q_UNUSED(width); + Q_UNUSED(height); + Q_UNUSED(refresh); +} + const struct wl_output_listener QWaylandDisplay::outputListener = { - QWaylandDisplay::outputHandleGeometry + QWaylandDisplay::outputHandleGeometry, + QWaylandDisplay::mode }; const struct wl_compositor_listener QWaylandDisplay::compositorListener = { diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.h b/src/plugins/platforms/wayland/qwaylanddisplay.h index ff8c760557..87a3167a6d 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.h +++ b/src/plugins/platforms/wayland/qwaylanddisplay.h @@ -132,7 +132,16 @@ private: static void outputHandleGeometry(void *data, struct wl_output *output, int32_t x, int32_t y, - int32_t width, int32_t height); + int32_t width, int32_t height, + int subpixel, + const char *make, + const char *model); + static void mode(void *data, + struct wl_output *wl_output, + uint32_t flags, + int width, + int height, + int refresh); static void handleVisual(void *data, struct wl_compositor *compositor, diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index eda8c94516..3afe907a4a 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -58,6 +58,7 @@ QWaylandWindow::QWaylandWindow(QWidget *window) : QPlatformWindow(window) + , mSurface(0) , mDisplay(QWaylandScreen::waylandScreenFromWidget(window)->display()) , mBuffer(0) , mWaitingForFrameSync(false) @@ -69,8 +70,6 @@ QWaylandWindow::QWaylandWindow(QWidget *window) mDisplay->windowManagerIntegration()->mapClientToProcess(qApp->applicationPid()); mDisplay->windowManagerIntegration()->authenticateWithToken(); #endif - - mSurface = mDisplay->createSurface(this); } QWaylandWindow::~QWaylandWindow() @@ -101,9 +100,7 @@ void QWaylandWindow::setVisible(bool visible) newSurfaceCreated(); } - if (visible) { - wl_surface_map_toplevel(mSurface); - } else { + if (!visible) { wl_surface_destroy(mSurface); mSurface = NULL; } @@ -143,6 +140,8 @@ void QWaylandWindow::damage(const QRegion ®ion) wl_buffer_damage(mBuffer->buffer(), rect.x(), rect.y(), rect.width(), rect.height()); wl_surface_damage(mSurface, rect.x(), rect.y(), rect.width(), rect.height()); + wl_buffer_damage(mBuffer->buffer(), + rect.x(), rect.y(), rect.width(), rect.height()); } } diff --git a/src/plugins/platforms/wayland/wayland_sha1.txt b/src/plugins/platforms/wayland/wayland_sha1.txt index d2624378e0..a696e760d5 100644 --- a/src/plugins/platforms/wayland/wayland_sha1.txt +++ b/src/plugins/platforms/wayland/wayland_sha1.txt @@ -1,3 +1,3 @@ This version of the Qt Wayland plugin is checked against the following sha1 from the Wayland repository: -eff7fc0d99be2e51eaa351785030c8d374ac71de +bfea3d6befdb688d5354e6f15a9400ea637febf9 From 1b9c679eb5efe0e4ab746f02127de6456796f642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Thu, 23 Jun 2011 10:14:51 +0200 Subject: [PATCH 32/41] Make sure to call damage on the buffer when we damage it Change-Id: Id325a1dee322c2b37215e6577870068260f5f7cc Reviewed-on: http://codereview.qt.nokia.com/683 Reviewed-by: Qt Sanity Bot Reviewed-by: Laszlo Agocs --- .../qwaylandxcompositeeglcontext.cpp | 2 +- .../qwaylandxcompositeglxcontext.cpp | 2 +- .../platforms/wayland/qwaylandshmsurface.cpp | 7 ++++++- .../platforms/wayland/qwaylandwindow.cpp | 21 ++++++++----------- .../platforms/wayland/qwaylandwindow.h | 2 +- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp index 72de02a868..999a411397 100644 --- a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp +++ b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp @@ -91,7 +91,7 @@ void QWaylandXCompositeEGLContext::swapBuffers() QSize size = mWindow->geometry().size(); eglSwapBuffers(mEglIntegration->eglDisplay(),mEglWindowSurface); - mWindow->damage(QRegion(QRect(QPoint(0,0),size))); + mWindow->damage(QRect(QPoint(0,0),size)); mWindow->waitForFrameSync(); } diff --git a/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/qwaylandxcompositeglxcontext.cpp b/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/qwaylandxcompositeglxcontext.cpp index dff6ffab66..3d49790f3a 100644 --- a/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/qwaylandxcompositeglxcontext.cpp +++ b/src/plugins/platforms/wayland/gl_integration/xcomposite_glx/qwaylandxcompositeglxcontext.cpp @@ -81,7 +81,7 @@ void QWaylandXCompositeGLXContext::swapBuffers() QSize size = mWindow->geometry().size(); glXSwapBuffers(mGlxIntegration->xDisplay(),mXWindow); - mWindow->damage(QRegion(QRect(QPoint(0,0),size))); + mWindow->damage(QRect(QPoint(0,0),size)); mWindow->waitForFrameSync(); } diff --git a/src/plugins/platforms/wayland/qwaylandshmsurface.cpp b/src/plugins/platforms/wayland/qwaylandshmsurface.cpp index efc56bb5d4..b24c419424 100644 --- a/src/plugins/platforms/wayland/qwaylandshmsurface.cpp +++ b/src/plugins/platforms/wayland/qwaylandshmsurface.cpp @@ -120,7 +120,12 @@ void QWaylandShmWindowSurface::flush(QWidget *widget, const QRegion ®ion, con Q_UNUSED(offset); QWaylandShmWindow *waylandWindow = static_cast(window()->platformWindow()); Q_ASSERT(waylandWindow->windowType() == QWaylandWindow::Shm); - waylandWindow->damage(region); + QVector rects = region.rects(); + for (int i = 0; i < rects.size(); i++) { + const QRect rect = rects.at(i); + wl_buffer_damage(mBuffer->buffer(),rect.x(),rect.y(),rect.width(),rect.height()); + waylandWindow->damage(rect); + } } void QWaylandShmWindowSurface::resize(const QSize &size) diff --git a/src/plugins/platforms/wayland/qwaylandwindow.cpp b/src/plugins/platforms/wayland/qwaylandwindow.cpp index 3afe907a4a..e79a712a3c 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.cpp +++ b/src/plugins/platforms/wayland/qwaylandwindow.cpp @@ -127,28 +127,25 @@ void QWaylandWindow::attach(QWaylandBuffer *buffer) } } -void QWaylandWindow::damage(const QRegion ®ion) +void QWaylandWindow::damage(const QRect &rect) { //We have to do sync stuff before calling damage, or we might //get a frame callback before we get the timestamp - mDisplay->frameCallback(QWaylandWindow::frameCallback, mSurface, this); - mWaitingForFrameSync = true; - - QVector rects = region.rects(); - for (int i = 0; i < rects.size(); i++) { - const QRect rect = rects.at(i); - wl_buffer_damage(mBuffer->buffer(), rect.x(), rect.y(), rect.width(), rect.height()); - wl_surface_damage(mSurface, - rect.x(), rect.y(), rect.width(), rect.height()); - wl_buffer_damage(mBuffer->buffer(), - rect.x(), rect.y(), rect.width(), rect.height()); + if (!mWaitingForFrameSync) { + mDisplay->frameCallback(QWaylandWindow::frameCallback, mSurface, this); + mWaitingForFrameSync = true; } + + wl_surface_damage(mSurface, + rect.x(), rect.y(), rect.width(), rect.height()); } void QWaylandWindow::newSurfaceCreated() { if (mBuffer) { wl_surface_attach(mSurface,mBuffer->buffer(),0,0); + wl_surface_damage(mSurface, + 0,0,mBuffer->size().width(),mBuffer->size().height()); } } diff --git a/src/plugins/platforms/wayland/qwaylandwindow.h b/src/plugins/platforms/wayland/qwaylandwindow.h index b8eae96e5e..b91f6b6eb8 100644 --- a/src/plugins/platforms/wayland/qwaylandwindow.h +++ b/src/plugins/platforms/wayland/qwaylandwindow.h @@ -71,7 +71,7 @@ public: int32_t x, int32_t y, int32_t width, int32_t height); void attach(QWaylandBuffer *buffer); - void damage(const QRegion ®ion); + void damage(const QRect &rect); void waitForFrameSync(); From ea933359b738e1e8a4d16ebb14f11cda1ac23be7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Jun 2011 21:14:01 +0200 Subject: [PATCH 33/41] Add a function that returns the D-Bus local machine ID Cherry-picked from 4.8 59bd3bcd961fb3198dc9ba24996f7f9af67aeda3 Change-Id: Id3c8f9edbcbe9bbea83d4d54a6eb25500ab80b68 Reviewed-on: http://codereview.qt.nokia.com/655 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/dbus/qdbus_symbols_p.h | 2 ++ src/dbus/qdbusconnection.cpp | 21 +++++++++++++++++++++ src/dbus/qdbusconnection.h | 2 ++ 3 files changed, 25 insertions(+) diff --git a/src/dbus/qdbus_symbols_p.h b/src/dbus/qdbus_symbols_p.h index 8b46e6ac89..a59c08a8ab 100644 --- a/src/dbus/qdbus_symbols_p.h +++ b/src/dbus/qdbus_symbols_p.h @@ -301,6 +301,8 @@ DEFINEFUNC(void , dbus_get_version , (int *major_version_p, int *minor_version_p, int *micro_version_p), (major_version_p, minor_version_p, micro_version_p), ) +DEFINEFUNC(char* , dbus_get_local_machine_id , (void), (), return) + /* dbus-pending-call.h */ DEFINEFUNC(dbus_bool_t , dbus_pending_call_set_notify, (DBusPendingCall *pending, diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp index 58c1caa5dc..0b4133c8dd 100644 --- a/src/dbus/qdbusconnection.cpp +++ b/src/dbus/qdbusconnection.cpp @@ -1123,6 +1123,27 @@ void QDBusConnectionPrivate::setBusService(const QDBusConnection &connection) Qt::QueuedConnection); } +/*! + \since 4.8 + Returns the local machine ID as known to the D-Bus system. Each + node or host that runs D-Bus has a unique identifier that can be + used to distinguish it from other hosts if they are sharing + resources like the filesystem. + + Note that the local machine ID is not guaranteed to be persistent + across boots of the system, so this identifier should not be + stored in persistent storage (like the filesystem). It is + guaranteed to remain constant only during the lifetime of this + boot session. +*/ +QByteArray QDBusConnection::localMachineId() +{ + char *dbus_machine_id = q_dbus_get_local_machine_id(); + QByteArray result = dbus_machine_id; + q_dbus_free(dbus_machine_id); + return result; +} + /*! \namespace QDBus \inmodule QtDBus diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h index 19418d61a6..4bdd055f52 100644 --- a/src/dbus/qdbusconnection.h +++ b/src/dbus/qdbusconnection.h @@ -176,6 +176,8 @@ public: static void disconnectFromBus(const QString &name); static void disconnectFromPeer(const QString &name); + static QByteArray localMachineId(); + static QDBusConnection sessionBus(); static QDBusConnection systemBus(); From 73746a5a897297fe499e90e972bbbf736f0cfbba Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 23 Jun 2011 18:07:20 +0200 Subject: [PATCH 34/41] Have the selection offer global handled always without delay. In a previous attempt to solve the problem of selection offer globals arriving too early, the handling was delayed. This solved the issue of crashing but introduced a timing issue, because the offers (the mime types) will arrive immediately after the global and therefore will simply be ignored in case the delayed processing of the selection offer had not yet been done. The visibility of the problem depended on the implementation of the compositor, with recent changes to qt-compositor the issue is very visible. The patch solves the issue properly: The wayland clipboard instance is created right away, as early when needed, and the integration will simply pick up the already created instance. Change-Id: I75aaba4b0590c05cc0091bed7bb3593186c1188f Reviewed-on: http://codereview.qt.nokia.com/687 Reviewed-by: Qt Sanity Bot Reviewed-by: Paul Olav Tvete --- .../platforms/wayland/qwaylandclipboard.cpp | 10 ++++++++-- .../platforms/wayland/qwaylandclipboard.h | 5 ++++- .../platforms/wayland/qwaylanddisplay.cpp | 20 ++++--------------- .../platforms/wayland/qwaylanddisplay.h | 4 ---- .../platforms/wayland/qwaylandintegration.cpp | 5 +---- .../platforms/wayland/qwaylandintegration.h | 1 - 6 files changed, 17 insertions(+), 28 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandclipboard.cpp b/src/plugins/platforms/wayland/qwaylandclipboard.cpp index b7f6ae535b..1ef063fec1 100644 --- a/src/plugins/platforms/wayland/qwaylandclipboard.cpp +++ b/src/plugins/platforms/wayland/qwaylandclipboard.cpp @@ -50,7 +50,7 @@ #include #include -static QWaylandClipboard *clipboard; +static QWaylandClipboard *clipboard = 0; class QWaylandMimeData : public QInternalMimeData { @@ -162,10 +162,16 @@ void QWaylandSelection::cancelled(void *data, struct wl_selection *selection) delete static_cast(data); } +QWaylandClipboard *QWaylandClipboard::instance(QWaylandDisplay *display) +{ + if (!clipboard) + clipboard = new QWaylandClipboard(display); + return clipboard; +} + QWaylandClipboard::QWaylandClipboard(QWaylandDisplay *display) : mDisplay(display), mMimeDataIn(0), mOffer(0) { - clipboard = this; } QWaylandClipboard::~QWaylandClipboard() diff --git a/src/plugins/platforms/wayland/qwaylandclipboard.h b/src/plugins/platforms/wayland/qwaylandclipboard.h index f45fb8da4c..87294342d7 100644 --- a/src/plugins/platforms/wayland/qwaylandclipboard.h +++ b/src/plugins/platforms/wayland/qwaylandclipboard.h @@ -61,7 +61,8 @@ public slots: class QWaylandClipboard : public QPlatformClipboard { public: - QWaylandClipboard(QWaylandDisplay *display); + static QWaylandClipboard *instance(QWaylandDisplay *display); + ~QWaylandClipboard(); QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard); @@ -75,6 +76,8 @@ public: QVariant retrieveData(const QString &mimeType, QVariant::Type type) const; private: + QWaylandClipboard(QWaylandDisplay *display); + static void offer(void *data, struct wl_selection_offer *selection_offer, const char *type); diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.cpp b/src/plugins/platforms/wayland/qwaylanddisplay.cpp index 93c98e3d7c..69ec6adc0c 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.cpp +++ b/src/plugins/platforms/wayland/qwaylanddisplay.cpp @@ -126,9 +126,12 @@ const struct wl_shell_listener QWaylandDisplay::shellListener = { QWaylandDisplay::shellHandleConfigure, }; +static QWaylandDisplay *display = 0; + QWaylandDisplay::QWaylandDisplay(void) : argb_visual(0), premultiplied_argb_visual(0), rgb_visual(0) { + display = this; qRegisterMetaType("uint32_t"); mDisplay = wl_display_connect(NULL); @@ -309,25 +312,10 @@ void QWaylandDisplay::displayHandleGlobal(uint32_t id, new QWaylandInputDevice(mDisplay, id); mInputDevices.append(inputDevice); } else if (interface == "wl_selection_offer") { - QPlatformIntegration *plat = QApplicationPrivate::platformIntegration(); - mSelectionOfferId = id; - if (plat) - handleSelectionOffer(id); - else - QMetaObject::invokeMethod(this, "handleSelectionOffer", - Qt::QueuedConnection, Q_ARG(uint32_t, id)); + QWaylandClipboard::instance(display)->createSelectionOffer(id); } } -void QWaylandDisplay::handleSelectionOffer(uint32_t id) -{ - if (mSelectionOfferId != id) - return; - QPlatformIntegration *plat = QApplicationPrivate::platformIntegration(); - QWaylandClipboard *clipboard = static_cast(plat->clipboard()); - clipboard->createSelectionOffer(id); -} - void QWaylandDisplay::handleVisual(void *data, struct wl_compositor *compositor, uint32_t id, uint32_t token) diff --git a/src/plugins/platforms/wayland/qwaylanddisplay.h b/src/plugins/platforms/wayland/qwaylanddisplay.h index 87a3167a6d..4dff24d086 100644 --- a/src/plugins/platforms/wayland/qwaylanddisplay.h +++ b/src/plugins/platforms/wayland/qwaylanddisplay.h @@ -97,9 +97,6 @@ public slots: void blockingReadEvents(); void flushRequests(); -private slots: - void handleSelectionOffer(uint32_t id); - private: void waitForScreens(); void displayHandleGlobal(uint32_t id, @@ -118,7 +115,6 @@ private: bool mScreensInitialized; uint32_t mSocketMask; - uint32_t mSelectionOfferId; struct wl_visual *argb_visual, *premultiplied_argb_visual, *rgb_visual; diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 8257bca557..5df71dc936 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -65,7 +65,6 @@ QWaylandIntegration::QWaylandIntegration(bool useOpenGL) , mDisplay(new QWaylandDisplay()) , mUseOpenGL(useOpenGL) , mNativeInterface(new QWaylandNativeInterface) - , mClipboard(0) { } @@ -137,7 +136,5 @@ bool QWaylandIntegration::hasOpenGL() const QPlatformClipboard *QWaylandIntegration::clipboard() const { - if (!mClipboard) - mClipboard = new QWaylandClipboard(mDisplay); - return mClipboard; + return QWaylandClipboard::instance(mDisplay); } diff --git a/src/plugins/platforms/wayland/qwaylandintegration.h b/src/plugins/platforms/wayland/qwaylandintegration.h index c7dc89d928..f617d9697b 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.h +++ b/src/plugins/platforms/wayland/qwaylandintegration.h @@ -74,7 +74,6 @@ private: QWaylandDisplay *mDisplay; bool mUseOpenGL; QPlatformNativeInterface *mNativeInterface; - mutable QPlatformClipboard *mClipboard; }; QT_END_NAMESPACE From d7c37d9bacc016b1156e15780080cfc8c24f6e6a Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Wed, 22 Jun 2011 12:33:28 +0200 Subject: [PATCH 35/41] Move the affine example. Change-Id: I27a164495e469cb2a5c82688f35062b54be5e62f Reviewed-on: http://codereview.qt.nokia.com/598 Reviewed-by: Qt Sanity Bot Reviewed-by: David Boddie --- {demos => examples/painting}/affine/affine.pro | 0 {demos => examples/painting}/affine/affine.qrc | 0 {demos => examples/painting}/affine/bg1.jpg | Bin {demos => examples/painting}/affine/main.cpp | 0 {demos => examples/painting}/affine/xform.cpp | 0 {demos => examples/painting}/affine/xform.h | 0 {demos => examples/painting}/affine/xform.html | 0 7 files changed, 0 insertions(+), 0 deletions(-) rename {demos => examples/painting}/affine/affine.pro (100%) rename {demos => examples/painting}/affine/affine.qrc (100%) rename {demos => examples/painting}/affine/bg1.jpg (100%) rename {demos => examples/painting}/affine/main.cpp (100%) rename {demos => examples/painting}/affine/xform.cpp (100%) rename {demos => examples/painting}/affine/xform.h (100%) rename {demos => examples/painting}/affine/xform.html (100%) diff --git a/demos/affine/affine.pro b/examples/painting/affine/affine.pro similarity index 100% rename from demos/affine/affine.pro rename to examples/painting/affine/affine.pro diff --git a/demos/affine/affine.qrc b/examples/painting/affine/affine.qrc similarity index 100% rename from demos/affine/affine.qrc rename to examples/painting/affine/affine.qrc diff --git a/demos/affine/bg1.jpg b/examples/painting/affine/bg1.jpg similarity index 100% rename from demos/affine/bg1.jpg rename to examples/painting/affine/bg1.jpg diff --git a/demos/affine/main.cpp b/examples/painting/affine/main.cpp similarity index 100% rename from demos/affine/main.cpp rename to examples/painting/affine/main.cpp diff --git a/demos/affine/xform.cpp b/examples/painting/affine/xform.cpp similarity index 100% rename from demos/affine/xform.cpp rename to examples/painting/affine/xform.cpp diff --git a/demos/affine/xform.h b/examples/painting/affine/xform.h similarity index 100% rename from demos/affine/xform.h rename to examples/painting/affine/xform.h diff --git a/demos/affine/xform.html b/examples/painting/affine/xform.html similarity index 100% rename from demos/affine/xform.html rename to examples/painting/affine/xform.html From e0d5221957bf0d7857f924f1f2ae63d490de0a0a Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Wed, 22 Jun 2011 13:54:56 +0200 Subject: [PATCH 36/41] Move all other demos in qtbase to examples. Change-Id: Iab0e7364d1f6b348d0e3033ea9304139f5bd6d0d Reviewed-on: http://codereview.qt.nokia.com/617 Reviewed-by: Qt Sanity Bot Reviewed-by: David Boddie --- demos/README | 39 ------- demos/demos.pro | 98 ------------------ .../animation}/sub-attaq/animationmanager.cpp | 0 .../animation}/sub-attaq/animationmanager.h | 0 .../animation}/sub-attaq/boat.cpp | 0 .../animation}/sub-attaq/boat.h | 0 .../animation}/sub-attaq/boat_p.h | 0 .../animation}/sub-attaq/bomb.cpp | 0 .../animation}/sub-attaq/bomb.h | 0 .../animation}/sub-attaq/data.xml | 0 .../animation}/sub-attaq/graphicsscene.cpp | 0 .../animation}/sub-attaq/graphicsscene.h | 0 .../animation}/sub-attaq/main.cpp | 0 .../animation}/sub-attaq/mainwindow.cpp | 0 .../animation}/sub-attaq/mainwindow.h | 0 .../sub-attaq/pics/big/background.png | Bin .../animation}/sub-attaq/pics/big/boat.png | Bin .../animation}/sub-attaq/pics/big/bomb.png | Bin .../pics/big/explosion/boat/step1.png | Bin .../pics/big/explosion/boat/step2.png | Bin .../pics/big/explosion/boat/step3.png | Bin .../pics/big/explosion/boat/step4.png | Bin .../pics/big/explosion/submarine/step1.png | Bin .../pics/big/explosion/submarine/step2.png | Bin .../pics/big/explosion/submarine/step3.png | Bin .../pics/big/explosion/submarine/step4.png | Bin .../sub-attaq/pics/big/submarine.png | Bin .../animation}/sub-attaq/pics/big/surface.png | Bin .../animation}/sub-attaq/pics/big/torpedo.png | Bin .../pics/scalable/background-n810.svg | 0 .../sub-attaq/pics/scalable/background.svg | 0 .../sub-attaq/pics/scalable/boat.svg | 0 .../sub-attaq/pics/scalable/bomb.svg | 0 .../sub-attaq/pics/scalable/sand.svg | 0 .../sub-attaq/pics/scalable/see.svg | 0 .../sub-attaq/pics/scalable/sky.svg | 0 .../sub-attaq/pics/scalable/sub-attaq.svg | 0 .../sub-attaq/pics/scalable/submarine.svg | 0 .../sub-attaq/pics/scalable/surface.svg | 0 .../sub-attaq/pics/scalable/torpedo.svg | 0 .../sub-attaq/pics/small/background.png | Bin .../animation}/sub-attaq/pics/small/boat.png | Bin .../animation}/sub-attaq/pics/small/bomb.png | Bin .../sub-attaq/pics/small/submarine.png | Bin .../sub-attaq/pics/small/surface.png | Bin .../sub-attaq/pics/small/torpedo.png | Bin .../sub-attaq/pics/welcome/logo-a.png | Bin .../sub-attaq/pics/welcome/logo-a2.png | Bin .../sub-attaq/pics/welcome/logo-b.png | Bin .../sub-attaq/pics/welcome/logo-dash.png | Bin .../sub-attaq/pics/welcome/logo-excl.png | Bin .../sub-attaq/pics/welcome/logo-q.png | Bin .../sub-attaq/pics/welcome/logo-s.png | Bin .../sub-attaq/pics/welcome/logo-t.png | Bin .../sub-attaq/pics/welcome/logo-t2.png | Bin .../sub-attaq/pics/welcome/logo-u.png | Bin .../animation}/sub-attaq/pixmapitem.cpp | 0 .../animation}/sub-attaq/pixmapitem.h | 0 .../animation}/sub-attaq/progressitem.cpp | 0 .../animation}/sub-attaq/progressitem.h | 0 .../animation}/sub-attaq/qanimationstate.cpp | 0 .../animation}/sub-attaq/qanimationstate.h | 0 .../animation}/sub-attaq/states.cpp | 0 .../animation}/sub-attaq/states.h | 0 .../animation}/sub-attaq/sub-attaq.pro | 0 .../animation}/sub-attaq/subattaq.qrc | 0 .../animation}/sub-attaq/submarine.cpp | 0 .../animation}/sub-attaq/submarine.h | 0 .../animation}/sub-attaq/submarine_p.h | 0 .../sub-attaq/textinformationitem.cpp | 0 .../sub-attaq/textinformationitem.h | 0 .../animation}/sub-attaq/torpedo.cpp | 0 .../animation}/sub-attaq/torpedo.h | 0 .../embedded/digiflip/digiflip.cpp | 0 .../embedded/digiflip/digiflip.pro | 0 {demos => examples}/embedded/embedded.pro | 0 .../embedded/flickable/flickable.cpp | 0 .../embedded/flickable/flickable.h | 0 .../embedded/flickable/flickable.pro | 0 .../embedded/flickable/main.cpp | 0 .../embedded/flightinfo/aircraft.png | Bin .../embedded/flightinfo/flightinfo.cpp | 0 .../embedded/flightinfo/flightinfo.pro | 0 .../embedded/flightinfo/flightinfo.qrc | 0 .../embedded/flightinfo/form.ui | 0 .../embedded/lightmaps/lightmaps.cpp | 0 .../embedded/lightmaps/lightmaps.h | 0 .../embedded/lightmaps/lightmaps.pro | 0 .../embedded/lightmaps/main.cpp | 0 .../embedded/lightmaps/mapzoom.cpp | 0 .../embedded/lightmaps/mapzoom.h | 0 .../embedded/lightmaps/slippymap.cpp | 0 .../embedded/lightmaps/slippymap.h | 0 .../embedded/raycasting/raycasting.cpp | 0 .../embedded/raycasting/raycasting.pro | 0 .../embedded/raycasting/raycasting.qrc | 0 .../embedded/raycasting/textures.png | Bin .../embedded/styledemo/files/add.png | Bin .../embedded/styledemo/files/application.qss | 0 .../embedded/styledemo/files/blue.qss | 0 .../embedded/styledemo/files/khaki.qss | 0 .../embedded/styledemo/files/nature_1.jpg | Bin .../embedded/styledemo/files/nostyle.qss | 0 .../embedded/styledemo/files/remove.png | Bin .../embedded/styledemo/files/transparent.qss | 0 .../embedded/styledemo/main.cpp | 0 .../embedded/styledemo/styledemo.pro | 0 .../embedded/styledemo/styledemo.qrc | 0 .../embedded/styledemo/stylewidget.cpp | 0 .../embedded/styledemo/stylewidget.h | 0 .../embedded/styledemo/stylewidget.ui | 0 .../graphicsview}/boxes/3rdparty/fbm.c | 0 .../graphicsview}/boxes/3rdparty/fbm.h | 0 .../graphicsview}/boxes/basic.fsh | 0 .../graphicsview}/boxes/basic.vsh | 0 .../graphicsview}/boxes/boxes.pro | 0 .../graphicsview}/boxes/boxes.qrc | 0 .../graphicsview}/boxes/cubemap_negx.jpg | Bin .../graphicsview}/boxes/cubemap_negy.jpg | Bin .../graphicsview}/boxes/cubemap_negz.jpg | Bin .../graphicsview}/boxes/cubemap_posx.jpg | Bin .../graphicsview}/boxes/cubemap_posy.jpg | Bin .../graphicsview}/boxes/cubemap_posz.jpg | Bin .../graphicsview}/boxes/dotted.fsh | 0 .../graphicsview}/boxes/fresnel.fsh | 0 .../graphicsview}/boxes/glass.fsh | 0 .../graphicsview}/boxes/glbuffers.cpp | 0 .../graphicsview}/boxes/glbuffers.h | 0 .../graphicsview}/boxes/glextensions.cpp | 0 .../graphicsview}/boxes/glextensions.h | 0 .../graphicsview}/boxes/gltrianglemesh.h | 0 .../graphicsview}/boxes/granite.fsh | 0 .../graphicsview}/boxes/main.cpp | 0 .../graphicsview}/boxes/marble.fsh | 0 .../graphicsview}/boxes/parameters.par | 0 .../graphicsview}/boxes/qt-logo.jpg | Bin .../graphicsview}/boxes/qt-logo.png | Bin .../graphicsview}/boxes/qtbox.cpp | 0 .../graphicsview}/boxes/qtbox.h | 0 .../graphicsview}/boxes/reflection.fsh | 0 .../graphicsview}/boxes/refraction.fsh | 0 .../graphicsview}/boxes/roundedbox.cpp | 0 .../graphicsview}/boxes/roundedbox.h | 0 .../graphicsview}/boxes/scene.cpp | 0 .../graphicsview}/boxes/scene.h | 0 .../graphicsview}/boxes/smiley.png | Bin .../graphicsview}/boxes/square.jpg | Bin .../graphicsview}/boxes/trackball.cpp | 0 .../graphicsview}/boxes/trackball.h | 0 .../graphicsview}/boxes/wood.fsh | 0 .../graphicsview}/chip/chip.cpp | 0 {demos => examples/graphicsview}/chip/chip.h | 0 .../graphicsview}/chip/chip.pro | 0 .../graphicsview}/chip/fileprint.png | Bin .../graphicsview}/chip/images.qrc | 0 .../graphicsview}/chip/main.cpp | 0 .../graphicsview}/chip/mainwindow.cpp | 0 .../graphicsview}/chip/mainwindow.h | 0 .../graphicsview}/chip/qt4logo.png | Bin .../graphicsview}/chip/rotateleft.png | Bin .../graphicsview}/chip/rotateright.png | Bin .../graphicsview}/chip/view.cpp | 0 {demos => examples/graphicsview}/chip/view.h | 0 .../graphicsview}/chip/zoomin.png | Bin .../graphicsview}/chip/zoomout.png | Bin .../embeddeddialogs/No-Ones-Laughing-3.jpg | Bin .../embeddeddialogs/customproxy.cpp | 0 .../embeddeddialogs/customproxy.h | 0 .../embeddeddialogs/embeddeddialog.cpp | 0 .../embeddeddialogs/embeddeddialog.h | 0 .../embeddeddialogs/embeddeddialog.ui | 0 .../embeddeddialogs/embeddeddialogs.pro | 0 .../embeddeddialogs/embeddeddialogs.qrc | 0 .../graphicsview}/embeddeddialogs/main.cpp | 0 .../itemviews}/interview/README | 0 .../itemviews}/interview/images/folder.png | Bin .../itemviews}/interview/images/interview.png | Bin .../itemviews}/interview/images/services.png | Bin .../itemviews}/interview/interview.pro | 0 .../itemviews}/interview/interview.qrc | 0 .../itemviews}/interview/main.cpp | 0 .../itemviews}/interview/model.cpp | 0 .../itemviews}/interview/model.h | 0 .../spreadsheet/images/interview.png | Bin .../itemviews}/spreadsheet/main.cpp | 0 .../itemviews}/spreadsheet/printview.cpp | 0 .../itemviews}/spreadsheet/printview.h | 0 .../itemviews}/spreadsheet/spreadsheet.cpp | 0 .../itemviews}/spreadsheet/spreadsheet.h | 0 .../itemviews}/spreadsheet/spreadsheet.pro | 0 .../itemviews}/spreadsheet/spreadsheet.qrc | 0 .../spreadsheet/spreadsheetdelegate.cpp | 0 .../spreadsheet/spreadsheetdelegate.h | 0 .../spreadsheet/spreadsheetitem.cpp | 0 .../itemviews}/spreadsheet/spreadsheetitem.h | 0 .../macmainwindow/macmainwindow.h | 0 .../macmainwindow/macmainwindow.mm | 0 .../macmainwindow/macmainwindow.pro | 0 .../mainwindows}/macmainwindow/main.cpp | 0 .../mainwindows}/mainwindow/colorswatch.cpp | 0 .../mainwindows}/mainwindow/colorswatch.h | 0 .../mainwindows}/mainwindow/main.cpp | 0 .../mainwindows}/mainwindow/mainwindow.cpp | 0 .../mainwindows}/mainwindow/mainwindow.h | 0 .../mainwindows}/mainwindow/mainwindow.pro | 0 .../mainwindows}/mainwindow/mainwindow.qrc | 0 .../mainwindows}/mainwindow/qt.png | Bin .../mainwindow/titlebarCenter.png | Bin .../mainwindows}/mainwindow/titlebarLeft.png | Bin .../mainwindows}/mainwindow/titlebarRight.png | Bin .../mainwindows}/mainwindow/toolbar.cpp | 0 .../mainwindows}/mainwindow/toolbar.h | 0 .../painting}/composition/composition.cpp | 0 .../painting}/composition/composition.h | 0 .../painting}/composition/composition.html | 0 .../painting}/composition/composition.pro | 0 .../painting}/composition/composition.qrc | 0 .../painting}/composition/flower.jpg | Bin .../painting}/composition/flower_alpha.jpg | Bin .../painting}/composition/main.cpp | 0 .../painting}/deform/deform.pro | 0 .../painting}/deform/deform.qrc | 0 {demos => examples/painting}/deform/main.cpp | 0 .../painting}/deform/pathdeform.cpp | 0 .../painting}/deform/pathdeform.h | 0 .../painting}/deform/pathdeform.html | 0 .../painting}/gradients/gradients.cpp | 0 .../painting}/gradients/gradients.h | 0 .../painting}/gradients/gradients.html | 0 .../painting}/gradients/gradients.pro | 0 .../painting}/gradients/gradients.qrc | 0 .../painting}/gradients/main.cpp | 0 .../painting}/pathstroke/main.cpp | 0 .../painting}/pathstroke/pathstroke.cpp | 0 .../painting}/pathstroke/pathstroke.h | 0 .../painting}/pathstroke/pathstroke.html | 0 .../painting}/pathstroke/pathstroke.pro | 0 .../painting}/pathstroke/pathstroke.qrc | 0 .../painting}/shared/arthurstyle.cpp | 0 .../painting}/shared/arthurstyle.h | 0 .../painting}/shared/arthurwidgets.cpp | 0 .../painting}/shared/arthurwidgets.h | 0 .../painting}/shared/hoverpoints.cpp | 0 .../painting}/shared/hoverpoints.h | 0 .../painting}/shared/images/bg_pattern.png | Bin .../shared/images/button_normal_cap_left.png | Bin .../shared/images/button_normal_cap_right.png | Bin .../shared/images/button_normal_stretch.png | Bin .../shared/images/button_pressed_cap_left.png | Bin .../images/button_pressed_cap_right.png | Bin .../shared/images/button_pressed_stretch.png | Bin .../shared/images/curve_thing_edit-6.png | Bin .../painting}/shared/images/frame_bottom.png | Bin .../shared/images/frame_bottomleft.png | Bin .../shared/images/frame_bottomright.png | Bin .../painting}/shared/images/frame_left.png | Bin .../painting}/shared/images/frame_right.png | Bin .../painting}/shared/images/frame_top.png | Bin .../painting}/shared/images/frame_topleft.png | Bin .../shared/images/frame_topright.png | Bin .../shared/images/groupframe_bottom_left.png | Bin .../shared/images/groupframe_bottom_right.png | Bin .../images/groupframe_bottom_stretch.png | Bin .../shared/images/groupframe_left_stretch.png | Bin .../images/groupframe_right_stretch.png | Bin .../shared/images/groupframe_top_stretch.png | Bin .../shared/images/groupframe_topleft.png | Bin .../shared/images/groupframe_topright.png | Bin .../painting}/shared/images/line_dash_dot.png | Bin .../shared/images/line_dash_dot_dot.png | Bin .../painting}/shared/images/line_dashed.png | Bin .../painting}/shared/images/line_dotted.png | Bin .../painting}/shared/images/line_solid.png | Bin .../shared/images/radiobutton-off.png | Bin .../shared/images/radiobutton-on.png | Bin .../shared/images/radiobutton_off.png | Bin .../shared/images/radiobutton_on.png | Bin .../painting}/shared/images/slider_bar.png | Bin .../shared/images/slider_thumb_off.png | Bin .../shared/images/slider_thumb_on.png | Bin .../shared/images/title_cap_left.png | Bin .../shared/images/title_cap_right.png | Bin .../painting}/shared/images/title_stretch.png | Bin .../painting}/shared/shared.pri | 0 .../painting}/shared/shared.pro | 0 .../painting}/shared/shared.qrc | 0 .../richtext}/textedit/example.html | 0 .../richtext}/textedit/images/logo32.png | Bin .../textedit/images/mac/editcopy.png | Bin .../richtext}/textedit/images/mac/editcut.png | Bin .../textedit/images/mac/editpaste.png | Bin .../textedit/images/mac/editredo.png | Bin .../textedit/images/mac/editundo.png | Bin .../textedit/images/mac/exportpdf.png | Bin .../richtext}/textedit/images/mac/filenew.png | Bin .../textedit/images/mac/fileopen.png | Bin .../textedit/images/mac/fileprint.png | Bin .../textedit/images/mac/filesave.png | Bin .../textedit/images/mac/textbold.png | Bin .../textedit/images/mac/textcenter.png | Bin .../textedit/images/mac/textitalic.png | Bin .../textedit/images/mac/textjustify.png | Bin .../textedit/images/mac/textleft.png | Bin .../textedit/images/mac/textright.png | Bin .../textedit/images/mac/textunder.png | Bin .../richtext}/textedit/images/mac/zoomin.png | Bin .../richtext}/textedit/images/mac/zoomout.png | Bin .../textedit/images/win/editcopy.png | Bin .../richtext}/textedit/images/win/editcut.png | Bin .../textedit/images/win/editpaste.png | Bin .../textedit/images/win/editredo.png | Bin .../textedit/images/win/editundo.png | Bin .../textedit/images/win/exportpdf.png | Bin .../richtext}/textedit/images/win/filenew.png | Bin .../textedit/images/win/fileopen.png | Bin .../textedit/images/win/fileprint.png | Bin .../textedit/images/win/filesave.png | Bin .../textedit/images/win/textbold.png | Bin .../textedit/images/win/textcenter.png | Bin .../textedit/images/win/textitalic.png | Bin .../textedit/images/win/textjustify.png | Bin .../textedit/images/win/textleft.png | Bin .../textedit/images/win/textright.png | Bin .../textedit/images/win/textunder.png | Bin .../richtext}/textedit/images/win/zoomin.png | Bin .../richtext}/textedit/images/win/zoomout.png | Bin .../richtext}/textedit/main.cpp | 0 .../richtext}/textedit/textedit.cpp | 0 .../richtext}/textedit/textedit.h | 0 .../richtext}/textedit/textedit.pro | 0 .../richtext}/textedit/textedit.qdoc | 0 .../richtext}/textedit/textedit.qrc | 0 .../sql}/books/bookdelegate.cpp | 0 {demos => examples/sql}/books/bookdelegate.h | 0 {demos => examples/sql}/books/books.pro | 0 {demos => examples/sql}/books/books.qrc | 0 {demos => examples/sql}/books/bookwindow.cpp | 0 {demos => examples/sql}/books/bookwindow.h | 0 {demos => examples/sql}/books/bookwindow.ui | 0 {demos => examples/sql}/books/images/star.png | Bin {demos => examples/sql}/books/initdb.h | 0 {demos => examples/sql}/books/main.cpp | 0 .../sql}/sqlbrowser/browser.cpp | 0 {demos => examples/sql}/sqlbrowser/browser.h | 0 .../sql}/sqlbrowser/browserwidget.ui | 0 .../sql}/sqlbrowser/connectionwidget.cpp | 0 .../sql}/sqlbrowser/connectionwidget.h | 0 {demos => examples/sql}/sqlbrowser/main.cpp | 0 .../sql}/sqlbrowser/qsqlconnectiondialog.cpp | 0 .../sql}/sqlbrowser/qsqlconnectiondialog.h | 0 .../sql}/sqlbrowser/qsqlconnectiondialog.ui | 0 .../sql}/sqlbrowser/sqlbrowser.pro | 0 {demos => examples/tools}/undo/commands.cpp | 0 {demos => examples/tools}/undo/commands.h | 0 {demos => examples/tools}/undo/document.cpp | 0 {demos => examples/tools}/undo/document.h | 0 .../tools}/undo/icons/background.png | Bin {demos => examples/tools}/undo/icons/blue.png | Bin .../tools}/undo/icons/circle.png | Bin {demos => examples/tools}/undo/icons/exit.png | Bin .../tools}/undo/icons/fileclose.png | Bin .../tools}/undo/icons/filenew.png | Bin .../tools}/undo/icons/fileopen.png | Bin .../tools}/undo/icons/filesave.png | Bin .../tools}/undo/icons/green.png | Bin {demos => examples/tools}/undo/icons/ok.png | Bin .../tools}/undo/icons/rectangle.png | Bin {demos => examples/tools}/undo/icons/red.png | Bin {demos => examples/tools}/undo/icons/redo.png | Bin .../tools}/undo/icons/remove.png | Bin .../tools}/undo/icons/triangle.png | Bin {demos => examples/tools}/undo/icons/undo.png | Bin {demos => examples/tools}/undo/main.cpp | 0 {demos => examples/tools}/undo/mainwindow.cpp | 0 {demos => examples/tools}/undo/mainwindow.h | 0 {demos => examples/tools}/undo/mainwindow.ui | 0 {demos => examples/tools}/undo/undo.pro | 0 {demos => examples/tools}/undo/undo.qrc | 0 378 files changed, 137 deletions(-) delete mode 100644 demos/README delete mode 100644 demos/demos.pro rename {demos => examples/animation}/sub-attaq/animationmanager.cpp (100%) rename {demos => examples/animation}/sub-attaq/animationmanager.h (100%) rename {demos => examples/animation}/sub-attaq/boat.cpp (100%) rename {demos => examples/animation}/sub-attaq/boat.h (100%) rename {demos => examples/animation}/sub-attaq/boat_p.h (100%) rename {demos => examples/animation}/sub-attaq/bomb.cpp (100%) rename {demos => examples/animation}/sub-attaq/bomb.h (100%) rename {demos => examples/animation}/sub-attaq/data.xml (100%) rename {demos => examples/animation}/sub-attaq/graphicsscene.cpp (100%) rename {demos => examples/animation}/sub-attaq/graphicsscene.h (100%) rename {demos => examples/animation}/sub-attaq/main.cpp (100%) rename {demos => examples/animation}/sub-attaq/mainwindow.cpp (100%) rename {demos => examples/animation}/sub-attaq/mainwindow.h (100%) rename {demos => examples/animation}/sub-attaq/pics/big/background.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/boat.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/bomb.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/boat/step1.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/boat/step2.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/boat/step3.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/boat/step4.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/submarine/step1.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/submarine/step2.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/submarine/step3.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/explosion/submarine/step4.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/submarine.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/surface.png (100%) rename {demos => examples/animation}/sub-attaq/pics/big/torpedo.png (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/background-n810.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/background.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/boat.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/bomb.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/sand.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/see.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/sky.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/sub-attaq.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/submarine.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/surface.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/scalable/torpedo.svg (100%) rename {demos => examples/animation}/sub-attaq/pics/small/background.png (100%) rename {demos => examples/animation}/sub-attaq/pics/small/boat.png (100%) rename {demos => examples/animation}/sub-attaq/pics/small/bomb.png (100%) rename {demos => examples/animation}/sub-attaq/pics/small/submarine.png (100%) rename {demos => examples/animation}/sub-attaq/pics/small/surface.png (100%) rename {demos => examples/animation}/sub-attaq/pics/small/torpedo.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-a.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-a2.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-b.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-dash.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-excl.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-q.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-s.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-t.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-t2.png (100%) rename {demos => examples/animation}/sub-attaq/pics/welcome/logo-u.png (100%) rename {demos => examples/animation}/sub-attaq/pixmapitem.cpp (100%) rename {demos => examples/animation}/sub-attaq/pixmapitem.h (100%) rename {demos => examples/animation}/sub-attaq/progressitem.cpp (100%) rename {demos => examples/animation}/sub-attaq/progressitem.h (100%) rename {demos => examples/animation}/sub-attaq/qanimationstate.cpp (100%) rename {demos => examples/animation}/sub-attaq/qanimationstate.h (100%) rename {demos => examples/animation}/sub-attaq/states.cpp (100%) rename {demos => examples/animation}/sub-attaq/states.h (100%) rename {demos => examples/animation}/sub-attaq/sub-attaq.pro (100%) rename {demos => examples/animation}/sub-attaq/subattaq.qrc (100%) rename {demos => examples/animation}/sub-attaq/submarine.cpp (100%) rename {demos => examples/animation}/sub-attaq/submarine.h (100%) rename {demos => examples/animation}/sub-attaq/submarine_p.h (100%) rename {demos => examples/animation}/sub-attaq/textinformationitem.cpp (100%) rename {demos => examples/animation}/sub-attaq/textinformationitem.h (100%) rename {demos => examples/animation}/sub-attaq/torpedo.cpp (100%) rename {demos => examples/animation}/sub-attaq/torpedo.h (100%) rename {demos => examples}/embedded/digiflip/digiflip.cpp (100%) rename {demos => examples}/embedded/digiflip/digiflip.pro (100%) rename {demos => examples}/embedded/embedded.pro (100%) rename {demos => examples}/embedded/flickable/flickable.cpp (100%) rename {demos => examples}/embedded/flickable/flickable.h (100%) rename {demos => examples}/embedded/flickable/flickable.pro (100%) rename {demos => examples}/embedded/flickable/main.cpp (100%) rename {demos => examples}/embedded/flightinfo/aircraft.png (100%) rename {demos => examples}/embedded/flightinfo/flightinfo.cpp (100%) rename {demos => examples}/embedded/flightinfo/flightinfo.pro (100%) rename {demos => examples}/embedded/flightinfo/flightinfo.qrc (100%) rename {demos => examples}/embedded/flightinfo/form.ui (100%) rename {demos => examples}/embedded/lightmaps/lightmaps.cpp (100%) rename {demos => examples}/embedded/lightmaps/lightmaps.h (100%) rename {demos => examples}/embedded/lightmaps/lightmaps.pro (100%) rename {demos => examples}/embedded/lightmaps/main.cpp (100%) rename {demos => examples}/embedded/lightmaps/mapzoom.cpp (100%) rename {demos => examples}/embedded/lightmaps/mapzoom.h (100%) rename {demos => examples}/embedded/lightmaps/slippymap.cpp (100%) rename {demos => examples}/embedded/lightmaps/slippymap.h (100%) rename {demos => examples}/embedded/raycasting/raycasting.cpp (100%) rename {demos => examples}/embedded/raycasting/raycasting.pro (100%) rename {demos => examples}/embedded/raycasting/raycasting.qrc (100%) rename {demos => examples}/embedded/raycasting/textures.png (100%) rename {demos => examples}/embedded/styledemo/files/add.png (100%) rename {demos => examples}/embedded/styledemo/files/application.qss (100%) rename {demos => examples}/embedded/styledemo/files/blue.qss (100%) rename {demos => examples}/embedded/styledemo/files/khaki.qss (100%) rename {demos => examples}/embedded/styledemo/files/nature_1.jpg (100%) rename {demos => examples}/embedded/styledemo/files/nostyle.qss (100%) rename {demos => examples}/embedded/styledemo/files/remove.png (100%) rename {demos => examples}/embedded/styledemo/files/transparent.qss (100%) rename {demos => examples}/embedded/styledemo/main.cpp (100%) rename {demos => examples}/embedded/styledemo/styledemo.pro (100%) rename {demos => examples}/embedded/styledemo/styledemo.qrc (100%) rename {demos => examples}/embedded/styledemo/stylewidget.cpp (100%) rename {demos => examples}/embedded/styledemo/stylewidget.h (100%) rename {demos => examples}/embedded/styledemo/stylewidget.ui (100%) rename {demos => examples/graphicsview}/boxes/3rdparty/fbm.c (100%) rename {demos => examples/graphicsview}/boxes/3rdparty/fbm.h (100%) rename {demos => examples/graphicsview}/boxes/basic.fsh (100%) rename {demos => examples/graphicsview}/boxes/basic.vsh (100%) rename {demos => examples/graphicsview}/boxes/boxes.pro (100%) rename {demos => examples/graphicsview}/boxes/boxes.qrc (100%) rename {demos => examples/graphicsview}/boxes/cubemap_negx.jpg (100%) rename {demos => examples/graphicsview}/boxes/cubemap_negy.jpg (100%) rename {demos => examples/graphicsview}/boxes/cubemap_negz.jpg (100%) rename {demos => examples/graphicsview}/boxes/cubemap_posx.jpg (100%) rename {demos => examples/graphicsview}/boxes/cubemap_posy.jpg (100%) rename {demos => examples/graphicsview}/boxes/cubemap_posz.jpg (100%) rename {demos => examples/graphicsview}/boxes/dotted.fsh (100%) rename {demos => examples/graphicsview}/boxes/fresnel.fsh (100%) rename {demos => examples/graphicsview}/boxes/glass.fsh (100%) rename {demos => examples/graphicsview}/boxes/glbuffers.cpp (100%) rename {demos => examples/graphicsview}/boxes/glbuffers.h (100%) rename {demos => examples/graphicsview}/boxes/glextensions.cpp (100%) rename {demos => examples/graphicsview}/boxes/glextensions.h (100%) rename {demos => examples/graphicsview}/boxes/gltrianglemesh.h (100%) rename {demos => examples/graphicsview}/boxes/granite.fsh (100%) rename {demos => examples/graphicsview}/boxes/main.cpp (100%) rename {demos => examples/graphicsview}/boxes/marble.fsh (100%) rename {demos => examples/graphicsview}/boxes/parameters.par (100%) rename {demos => examples/graphicsview}/boxes/qt-logo.jpg (100%) rename {demos => examples/graphicsview}/boxes/qt-logo.png (100%) rename {demos => examples/graphicsview}/boxes/qtbox.cpp (100%) rename {demos => examples/graphicsview}/boxes/qtbox.h (100%) rename {demos => examples/graphicsview}/boxes/reflection.fsh (100%) rename {demos => examples/graphicsview}/boxes/refraction.fsh (100%) rename {demos => examples/graphicsview}/boxes/roundedbox.cpp (100%) rename {demos => examples/graphicsview}/boxes/roundedbox.h (100%) rename {demos => examples/graphicsview}/boxes/scene.cpp (100%) rename {demos => examples/graphicsview}/boxes/scene.h (100%) rename {demos => examples/graphicsview}/boxes/smiley.png (100%) rename {demos => examples/graphicsview}/boxes/square.jpg (100%) rename {demos => examples/graphicsview}/boxes/trackball.cpp (100%) rename {demos => examples/graphicsview}/boxes/trackball.h (100%) rename {demos => examples/graphicsview}/boxes/wood.fsh (100%) rename {demos => examples/graphicsview}/chip/chip.cpp (100%) rename {demos => examples/graphicsview}/chip/chip.h (100%) rename {demos => examples/graphicsview}/chip/chip.pro (100%) rename {demos => examples/graphicsview}/chip/fileprint.png (100%) rename {demos => examples/graphicsview}/chip/images.qrc (100%) rename {demos => examples/graphicsview}/chip/main.cpp (100%) rename {demos => examples/graphicsview}/chip/mainwindow.cpp (100%) rename {demos => examples/graphicsview}/chip/mainwindow.h (100%) rename {demos => examples/graphicsview}/chip/qt4logo.png (100%) rename {demos => examples/graphicsview}/chip/rotateleft.png (100%) rename {demos => examples/graphicsview}/chip/rotateright.png (100%) rename {demos => examples/graphicsview}/chip/view.cpp (100%) rename {demos => examples/graphicsview}/chip/view.h (100%) rename {demos => examples/graphicsview}/chip/zoomin.png (100%) rename {demos => examples/graphicsview}/chip/zoomout.png (100%) rename {demos => examples/graphicsview}/embeddeddialogs/No-Ones-Laughing-3.jpg (100%) rename {demos => examples/graphicsview}/embeddeddialogs/customproxy.cpp (100%) rename {demos => examples/graphicsview}/embeddeddialogs/customproxy.h (100%) rename {demos => examples/graphicsview}/embeddeddialogs/embeddeddialog.cpp (100%) rename {demos => examples/graphicsview}/embeddeddialogs/embeddeddialog.h (100%) rename {demos => examples/graphicsview}/embeddeddialogs/embeddeddialog.ui (100%) rename {demos => examples/graphicsview}/embeddeddialogs/embeddeddialogs.pro (100%) rename {demos => examples/graphicsview}/embeddeddialogs/embeddeddialogs.qrc (100%) rename {demos => examples/graphicsview}/embeddeddialogs/main.cpp (100%) rename {demos => examples/itemviews}/interview/README (100%) rename {demos => examples/itemviews}/interview/images/folder.png (100%) rename {demos => examples/itemviews}/interview/images/interview.png (100%) rename {demos => examples/itemviews}/interview/images/services.png (100%) rename {demos => examples/itemviews}/interview/interview.pro (100%) rename {demos => examples/itemviews}/interview/interview.qrc (100%) rename {demos => examples/itemviews}/interview/main.cpp (100%) rename {demos => examples/itemviews}/interview/model.cpp (100%) rename {demos => examples/itemviews}/interview/model.h (100%) rename {demos => examples/itemviews}/spreadsheet/images/interview.png (100%) rename {demos => examples/itemviews}/spreadsheet/main.cpp (100%) rename {demos => examples/itemviews}/spreadsheet/printview.cpp (100%) rename {demos => examples/itemviews}/spreadsheet/printview.h (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheet.cpp (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheet.h (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheet.pro (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheet.qrc (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheetdelegate.cpp (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheetdelegate.h (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheetitem.cpp (100%) rename {demos => examples/itemviews}/spreadsheet/spreadsheetitem.h (100%) rename {demos => examples/mainwindows}/macmainwindow/macmainwindow.h (100%) rename {demos => examples/mainwindows}/macmainwindow/macmainwindow.mm (100%) rename {demos => examples/mainwindows}/macmainwindow/macmainwindow.pro (100%) rename {demos => examples/mainwindows}/macmainwindow/main.cpp (100%) rename {demos => examples/mainwindows}/mainwindow/colorswatch.cpp (100%) rename {demos => examples/mainwindows}/mainwindow/colorswatch.h (100%) rename {demos => examples/mainwindows}/mainwindow/main.cpp (100%) rename {demos => examples/mainwindows}/mainwindow/mainwindow.cpp (100%) rename {demos => examples/mainwindows}/mainwindow/mainwindow.h (100%) rename {demos => examples/mainwindows}/mainwindow/mainwindow.pro (100%) rename {demos => examples/mainwindows}/mainwindow/mainwindow.qrc (100%) rename {demos => examples/mainwindows}/mainwindow/qt.png (100%) rename {demos => examples/mainwindows}/mainwindow/titlebarCenter.png (100%) rename {demos => examples/mainwindows}/mainwindow/titlebarLeft.png (100%) rename {demos => examples/mainwindows}/mainwindow/titlebarRight.png (100%) rename {demos => examples/mainwindows}/mainwindow/toolbar.cpp (100%) rename {demos => examples/mainwindows}/mainwindow/toolbar.h (100%) rename {demos => examples/painting}/composition/composition.cpp (100%) rename {demos => examples/painting}/composition/composition.h (100%) rename {demos => examples/painting}/composition/composition.html (100%) rename {demos => examples/painting}/composition/composition.pro (100%) rename {demos => examples/painting}/composition/composition.qrc (100%) rename {demos => examples/painting}/composition/flower.jpg (100%) rename {demos => examples/painting}/composition/flower_alpha.jpg (100%) rename {demos => examples/painting}/composition/main.cpp (100%) rename {demos => examples/painting}/deform/deform.pro (100%) rename {demos => examples/painting}/deform/deform.qrc (100%) rename {demos => examples/painting}/deform/main.cpp (100%) rename {demos => examples/painting}/deform/pathdeform.cpp (100%) rename {demos => examples/painting}/deform/pathdeform.h (100%) rename {demos => examples/painting}/deform/pathdeform.html (100%) rename {demos => examples/painting}/gradients/gradients.cpp (100%) rename {demos => examples/painting}/gradients/gradients.h (100%) rename {demos => examples/painting}/gradients/gradients.html (100%) rename {demos => examples/painting}/gradients/gradients.pro (100%) rename {demos => examples/painting}/gradients/gradients.qrc (100%) rename {demos => examples/painting}/gradients/main.cpp (100%) rename {demos => examples/painting}/pathstroke/main.cpp (100%) rename {demos => examples/painting}/pathstroke/pathstroke.cpp (100%) rename {demos => examples/painting}/pathstroke/pathstroke.h (100%) rename {demos => examples/painting}/pathstroke/pathstroke.html (100%) rename {demos => examples/painting}/pathstroke/pathstroke.pro (100%) rename {demos => examples/painting}/pathstroke/pathstroke.qrc (100%) rename {demos => examples/painting}/shared/arthurstyle.cpp (100%) rename {demos => examples/painting}/shared/arthurstyle.h (100%) rename {demos => examples/painting}/shared/arthurwidgets.cpp (100%) rename {demos => examples/painting}/shared/arthurwidgets.h (100%) rename {demos => examples/painting}/shared/hoverpoints.cpp (100%) rename {demos => examples/painting}/shared/hoverpoints.h (100%) rename {demos => examples/painting}/shared/images/bg_pattern.png (100%) rename {demos => examples/painting}/shared/images/button_normal_cap_left.png (100%) rename {demos => examples/painting}/shared/images/button_normal_cap_right.png (100%) rename {demos => examples/painting}/shared/images/button_normal_stretch.png (100%) rename {demos => examples/painting}/shared/images/button_pressed_cap_left.png (100%) rename {demos => examples/painting}/shared/images/button_pressed_cap_right.png (100%) rename {demos => examples/painting}/shared/images/button_pressed_stretch.png (100%) rename {demos => examples/painting}/shared/images/curve_thing_edit-6.png (100%) rename {demos => examples/painting}/shared/images/frame_bottom.png (100%) rename {demos => examples/painting}/shared/images/frame_bottomleft.png (100%) rename {demos => examples/painting}/shared/images/frame_bottomright.png (100%) rename {demos => examples/painting}/shared/images/frame_left.png (100%) rename {demos => examples/painting}/shared/images/frame_right.png (100%) rename {demos => examples/painting}/shared/images/frame_top.png (100%) rename {demos => examples/painting}/shared/images/frame_topleft.png (100%) rename {demos => examples/painting}/shared/images/frame_topright.png (100%) rename {demos => examples/painting}/shared/images/groupframe_bottom_left.png (100%) rename {demos => examples/painting}/shared/images/groupframe_bottom_right.png (100%) rename {demos => examples/painting}/shared/images/groupframe_bottom_stretch.png (100%) rename {demos => examples/painting}/shared/images/groupframe_left_stretch.png (100%) rename {demos => examples/painting}/shared/images/groupframe_right_stretch.png (100%) rename {demos => examples/painting}/shared/images/groupframe_top_stretch.png (100%) rename {demos => examples/painting}/shared/images/groupframe_topleft.png (100%) rename {demos => examples/painting}/shared/images/groupframe_topright.png (100%) rename {demos => examples/painting}/shared/images/line_dash_dot.png (100%) rename {demos => examples/painting}/shared/images/line_dash_dot_dot.png (100%) rename {demos => examples/painting}/shared/images/line_dashed.png (100%) rename {demos => examples/painting}/shared/images/line_dotted.png (100%) rename {demos => examples/painting}/shared/images/line_solid.png (100%) rename {demos => examples/painting}/shared/images/radiobutton-off.png (100%) rename {demos => examples/painting}/shared/images/radiobutton-on.png (100%) rename {demos => examples/painting}/shared/images/radiobutton_off.png (100%) rename {demos => examples/painting}/shared/images/radiobutton_on.png (100%) rename {demos => examples/painting}/shared/images/slider_bar.png (100%) rename {demos => examples/painting}/shared/images/slider_thumb_off.png (100%) rename {demos => examples/painting}/shared/images/slider_thumb_on.png (100%) rename {demos => examples/painting}/shared/images/title_cap_left.png (100%) rename {demos => examples/painting}/shared/images/title_cap_right.png (100%) rename {demos => examples/painting}/shared/images/title_stretch.png (100%) rename {demos => examples/painting}/shared/shared.pri (100%) rename {demos => examples/painting}/shared/shared.pro (100%) rename {demos => examples/painting}/shared/shared.qrc (100%) rename {demos => examples/richtext}/textedit/example.html (100%) rename {demos => examples/richtext}/textedit/images/logo32.png (100%) rename {demos => examples/richtext}/textedit/images/mac/editcopy.png (100%) rename {demos => examples/richtext}/textedit/images/mac/editcut.png (100%) rename {demos => examples/richtext}/textedit/images/mac/editpaste.png (100%) rename {demos => examples/richtext}/textedit/images/mac/editredo.png (100%) rename {demos => examples/richtext}/textedit/images/mac/editundo.png (100%) rename {demos => examples/richtext}/textedit/images/mac/exportpdf.png (100%) rename {demos => examples/richtext}/textedit/images/mac/filenew.png (100%) rename {demos => examples/richtext}/textedit/images/mac/fileopen.png (100%) rename {demos => examples/richtext}/textedit/images/mac/fileprint.png (100%) rename {demos => examples/richtext}/textedit/images/mac/filesave.png (100%) rename {demos => examples/richtext}/textedit/images/mac/textbold.png (100%) rename {demos => examples/richtext}/textedit/images/mac/textcenter.png (100%) rename {demos => examples/richtext}/textedit/images/mac/textitalic.png (100%) rename {demos => examples/richtext}/textedit/images/mac/textjustify.png (100%) rename {demos => examples/richtext}/textedit/images/mac/textleft.png (100%) rename {demos => examples/richtext}/textedit/images/mac/textright.png (100%) rename {demos => examples/richtext}/textedit/images/mac/textunder.png (100%) rename {demos => examples/richtext}/textedit/images/mac/zoomin.png (100%) rename {demos => examples/richtext}/textedit/images/mac/zoomout.png (100%) rename {demos => examples/richtext}/textedit/images/win/editcopy.png (100%) rename {demos => examples/richtext}/textedit/images/win/editcut.png (100%) rename {demos => examples/richtext}/textedit/images/win/editpaste.png (100%) rename {demos => examples/richtext}/textedit/images/win/editredo.png (100%) rename {demos => examples/richtext}/textedit/images/win/editundo.png (100%) rename {demos => examples/richtext}/textedit/images/win/exportpdf.png (100%) rename {demos => examples/richtext}/textedit/images/win/filenew.png (100%) rename {demos => examples/richtext}/textedit/images/win/fileopen.png (100%) rename {demos => examples/richtext}/textedit/images/win/fileprint.png (100%) rename {demos => examples/richtext}/textedit/images/win/filesave.png (100%) rename {demos => examples/richtext}/textedit/images/win/textbold.png (100%) rename {demos => examples/richtext}/textedit/images/win/textcenter.png (100%) rename {demos => examples/richtext}/textedit/images/win/textitalic.png (100%) rename {demos => examples/richtext}/textedit/images/win/textjustify.png (100%) rename {demos => examples/richtext}/textedit/images/win/textleft.png (100%) rename {demos => examples/richtext}/textedit/images/win/textright.png (100%) rename {demos => examples/richtext}/textedit/images/win/textunder.png (100%) rename {demos => examples/richtext}/textedit/images/win/zoomin.png (100%) rename {demos => examples/richtext}/textedit/images/win/zoomout.png (100%) rename {demos => examples/richtext}/textedit/main.cpp (100%) rename {demos => examples/richtext}/textedit/textedit.cpp (100%) rename {demos => examples/richtext}/textedit/textedit.h (100%) rename {demos => examples/richtext}/textedit/textedit.pro (100%) rename {demos => examples/richtext}/textedit/textedit.qdoc (100%) rename {demos => examples/richtext}/textedit/textedit.qrc (100%) rename {demos => examples/sql}/books/bookdelegate.cpp (100%) rename {demos => examples/sql}/books/bookdelegate.h (100%) rename {demos => examples/sql}/books/books.pro (100%) rename {demos => examples/sql}/books/books.qrc (100%) rename {demos => examples/sql}/books/bookwindow.cpp (100%) rename {demos => examples/sql}/books/bookwindow.h (100%) rename {demos => examples/sql}/books/bookwindow.ui (100%) rename {demos => examples/sql}/books/images/star.png (100%) rename {demos => examples/sql}/books/initdb.h (100%) rename {demos => examples/sql}/books/main.cpp (100%) rename {demos => examples/sql}/sqlbrowser/browser.cpp (100%) rename {demos => examples/sql}/sqlbrowser/browser.h (100%) rename {demos => examples/sql}/sqlbrowser/browserwidget.ui (100%) rename {demos => examples/sql}/sqlbrowser/connectionwidget.cpp (100%) rename {demos => examples/sql}/sqlbrowser/connectionwidget.h (100%) rename {demos => examples/sql}/sqlbrowser/main.cpp (100%) rename {demos => examples/sql}/sqlbrowser/qsqlconnectiondialog.cpp (100%) rename {demos => examples/sql}/sqlbrowser/qsqlconnectiondialog.h (100%) rename {demos => examples/sql}/sqlbrowser/qsqlconnectiondialog.ui (100%) rename {demos => examples/sql}/sqlbrowser/sqlbrowser.pro (100%) rename {demos => examples/tools}/undo/commands.cpp (100%) rename {demos => examples/tools}/undo/commands.h (100%) rename {demos => examples/tools}/undo/document.cpp (100%) rename {demos => examples/tools}/undo/document.h (100%) rename {demos => examples/tools}/undo/icons/background.png (100%) rename {demos => examples/tools}/undo/icons/blue.png (100%) rename {demos => examples/tools}/undo/icons/circle.png (100%) rename {demos => examples/tools}/undo/icons/exit.png (100%) rename {demos => examples/tools}/undo/icons/fileclose.png (100%) rename {demos => examples/tools}/undo/icons/filenew.png (100%) rename {demos => examples/tools}/undo/icons/fileopen.png (100%) rename {demos => examples/tools}/undo/icons/filesave.png (100%) rename {demos => examples/tools}/undo/icons/green.png (100%) rename {demos => examples/tools}/undo/icons/ok.png (100%) rename {demos => examples/tools}/undo/icons/rectangle.png (100%) rename {demos => examples/tools}/undo/icons/red.png (100%) rename {demos => examples/tools}/undo/icons/redo.png (100%) rename {demos => examples/tools}/undo/icons/remove.png (100%) rename {demos => examples/tools}/undo/icons/triangle.png (100%) rename {demos => examples/tools}/undo/icons/undo.png (100%) rename {demos => examples/tools}/undo/main.cpp (100%) rename {demos => examples/tools}/undo/mainwindow.cpp (100%) rename {demos => examples/tools}/undo/mainwindow.h (100%) rename {demos => examples/tools}/undo/mainwindow.ui (100%) rename {demos => examples/tools}/undo/undo.pro (100%) rename {demos => examples/tools}/undo/undo.qrc (100%) diff --git a/demos/README b/demos/README deleted file mode 100644 index b1619908e2..0000000000 --- a/demos/README +++ /dev/null @@ -1,39 +0,0 @@ -These demonstrations are intended to highlight Qt's capabilities in different -application areas, and provide examples that are more advanced than those in -the examples directory. - -Beginners to Qt may wish to try out the Qt tutorial and some of the examples -before examining the demonstrations in detail. - - -The example launcher can be used to explore the different categories -available. It provides an overview of each example, lets you view the -documentation in Qt Assistant, and is able to launch examples. - - -Finding the Qt Examples and Demos launcher -========================================== - -On Windows: - -The launcher can be accessed via the Windows Start menu. Select the menu -entry entitled "Qt Examples and Demos" entry in the submenu containing -the Qt tools. - -On Mac OS X: - -For the binary distribution, the qtdemo executable is installed in the -/Developer/Applications/Qt directory. For the source distribution, it is -installed alongside the other Qt tools on the path specified when Qt is -configured. - -On Unix/Linux: - -The qtdemo executable is installed alongside the other Qt tools on the path -specified when Qt is configured. - -On all platforms: - -The source code for the launcher can be found in the demos/qtdemo directory -in the Qt package. This example is built at the same time as the Qt libraries, -tools, examples, and demonstrations. diff --git a/demos/demos.pro b/demos/demos.pro deleted file mode 100644 index 81968fd61d..0000000000 --- a/demos/demos.pro +++ /dev/null @@ -1,98 +0,0 @@ -TEMPLATE = subdirs - -!contains(QT_CONFIG, no-gui) { -SUBDIRS = \ - demos_shared \ - demos_deform \ - demos_gradients \ - demos_pathstroke \ - demos_affine \ - demos_composition \ - demos_books \ - demos_interview \ - demos_mainwindow \ - demos_spreadsheet \ - demos_textedit \ - demos_chip \ - demos_embeddeddialogs \ - demos_undo \ - demos_sub-attaq - -symbian: SUBDIRS = \ - demos_shared \ - demos_deform \ - demos_pathstroke - - -wince*: SUBDIRS = \ - demos_shared \ - demos_deform \ - demos_gradients \ - demos_pathstroke \ - demos_affine \ - demos_composition \ - demos_books \ - demos_interview \ - demos_mainwindow \ - demos_spreadsheet \ - demos_textedit \ - # demos_chip \ - demos_embeddeddialogs \ - demos_undo \ - demos_sub-attaq - -contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{ -SUBDIRS += demos_boxes -} - -mac* && !qpa: SUBDIRS += demos_macmainwindow -wince*|symbian|embedded|x11: SUBDIRS += demos_embedded - -!cross_compile:{ -contains(QT_BUILD_PARTS, tools):{ -SUBDIRS += demos_sqlbrowser -} -} - -# install -sources.files = README *.pro -sources.path = $$[QT_INSTALL_DEMOS] -INSTALLS += sources - -symbian: CONFIG += qt_demo - -demos_chip.subdir = chip -demos_embeddeddialogs.subdir = embeddeddialogs -demos_embedded.subdir = embedded -# Because of fluidlauncher -demos_embedded.depends = demos_deform demos_pathstroke -demos_shared.subdir = shared -demos_deform.subdir = deform -demos_gradients.subdir = gradients -demos_pathstroke.subdir = pathstroke -demos_affine.subdir = affine -demos_composition.subdir = composition -demos_books.subdir = books -demos_interview.subdir = interview -demos_macmainwindow.subdir = macmainwindow -demos_mainwindow.subdir = mainwindow -demos_spreadsheet.subdir = spreadsheet -demos_textedit.subdir = textedit -demos_arthurplugin.subdir = arthurplugin -demos_sqlbrowser.subdir = sqlbrowser -demos_undo.subdir = undo -demos_qtdemo.subdir = qtdemo - -demos_boxes.subdir = boxes -demos_sub-attaq.subdir = sub-attaq - -#CONFIG += ordered -!ordered { - demos_affine.depends = demos_shared - demos_deform.depends = demos_shared - demos_gradients.depends = demos_shared - demos_composition.depends = demos_shared - demos_arthurplugin.depends = demos_shared - demos_pathstroke.depends = demos_shared -} -} diff --git a/demos/sub-attaq/animationmanager.cpp b/examples/animation/sub-attaq/animationmanager.cpp similarity index 100% rename from demos/sub-attaq/animationmanager.cpp rename to examples/animation/sub-attaq/animationmanager.cpp diff --git a/demos/sub-attaq/animationmanager.h b/examples/animation/sub-attaq/animationmanager.h similarity index 100% rename from demos/sub-attaq/animationmanager.h rename to examples/animation/sub-attaq/animationmanager.h diff --git a/demos/sub-attaq/boat.cpp b/examples/animation/sub-attaq/boat.cpp similarity index 100% rename from demos/sub-attaq/boat.cpp rename to examples/animation/sub-attaq/boat.cpp diff --git a/demos/sub-attaq/boat.h b/examples/animation/sub-attaq/boat.h similarity index 100% rename from demos/sub-attaq/boat.h rename to examples/animation/sub-attaq/boat.h diff --git a/demos/sub-attaq/boat_p.h b/examples/animation/sub-attaq/boat_p.h similarity index 100% rename from demos/sub-attaq/boat_p.h rename to examples/animation/sub-attaq/boat_p.h diff --git a/demos/sub-attaq/bomb.cpp b/examples/animation/sub-attaq/bomb.cpp similarity index 100% rename from demos/sub-attaq/bomb.cpp rename to examples/animation/sub-attaq/bomb.cpp diff --git a/demos/sub-attaq/bomb.h b/examples/animation/sub-attaq/bomb.h similarity index 100% rename from demos/sub-attaq/bomb.h rename to examples/animation/sub-attaq/bomb.h diff --git a/demos/sub-attaq/data.xml b/examples/animation/sub-attaq/data.xml similarity index 100% rename from demos/sub-attaq/data.xml rename to examples/animation/sub-attaq/data.xml diff --git a/demos/sub-attaq/graphicsscene.cpp b/examples/animation/sub-attaq/graphicsscene.cpp similarity index 100% rename from demos/sub-attaq/graphicsscene.cpp rename to examples/animation/sub-attaq/graphicsscene.cpp diff --git a/demos/sub-attaq/graphicsscene.h b/examples/animation/sub-attaq/graphicsscene.h similarity index 100% rename from demos/sub-attaq/graphicsscene.h rename to examples/animation/sub-attaq/graphicsscene.h diff --git a/demos/sub-attaq/main.cpp b/examples/animation/sub-attaq/main.cpp similarity index 100% rename from demos/sub-attaq/main.cpp rename to examples/animation/sub-attaq/main.cpp diff --git a/demos/sub-attaq/mainwindow.cpp b/examples/animation/sub-attaq/mainwindow.cpp similarity index 100% rename from demos/sub-attaq/mainwindow.cpp rename to examples/animation/sub-attaq/mainwindow.cpp diff --git a/demos/sub-attaq/mainwindow.h b/examples/animation/sub-attaq/mainwindow.h similarity index 100% rename from demos/sub-attaq/mainwindow.h rename to examples/animation/sub-attaq/mainwindow.h diff --git a/demos/sub-attaq/pics/big/background.png b/examples/animation/sub-attaq/pics/big/background.png similarity index 100% rename from demos/sub-attaq/pics/big/background.png rename to examples/animation/sub-attaq/pics/big/background.png diff --git a/demos/sub-attaq/pics/big/boat.png b/examples/animation/sub-attaq/pics/big/boat.png similarity index 100% rename from demos/sub-attaq/pics/big/boat.png rename to examples/animation/sub-attaq/pics/big/boat.png diff --git a/demos/sub-attaq/pics/big/bomb.png b/examples/animation/sub-attaq/pics/big/bomb.png similarity index 100% rename from demos/sub-attaq/pics/big/bomb.png rename to examples/animation/sub-attaq/pics/big/bomb.png diff --git a/demos/sub-attaq/pics/big/explosion/boat/step1.png b/examples/animation/sub-attaq/pics/big/explosion/boat/step1.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/boat/step1.png rename to examples/animation/sub-attaq/pics/big/explosion/boat/step1.png diff --git a/demos/sub-attaq/pics/big/explosion/boat/step2.png b/examples/animation/sub-attaq/pics/big/explosion/boat/step2.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/boat/step2.png rename to examples/animation/sub-attaq/pics/big/explosion/boat/step2.png diff --git a/demos/sub-attaq/pics/big/explosion/boat/step3.png b/examples/animation/sub-attaq/pics/big/explosion/boat/step3.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/boat/step3.png rename to examples/animation/sub-attaq/pics/big/explosion/boat/step3.png diff --git a/demos/sub-attaq/pics/big/explosion/boat/step4.png b/examples/animation/sub-attaq/pics/big/explosion/boat/step4.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/boat/step4.png rename to examples/animation/sub-attaq/pics/big/explosion/boat/step4.png diff --git a/demos/sub-attaq/pics/big/explosion/submarine/step1.png b/examples/animation/sub-attaq/pics/big/explosion/submarine/step1.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/submarine/step1.png rename to examples/animation/sub-attaq/pics/big/explosion/submarine/step1.png diff --git a/demos/sub-attaq/pics/big/explosion/submarine/step2.png b/examples/animation/sub-attaq/pics/big/explosion/submarine/step2.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/submarine/step2.png rename to examples/animation/sub-attaq/pics/big/explosion/submarine/step2.png diff --git a/demos/sub-attaq/pics/big/explosion/submarine/step3.png b/examples/animation/sub-attaq/pics/big/explosion/submarine/step3.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/submarine/step3.png rename to examples/animation/sub-attaq/pics/big/explosion/submarine/step3.png diff --git a/demos/sub-attaq/pics/big/explosion/submarine/step4.png b/examples/animation/sub-attaq/pics/big/explosion/submarine/step4.png similarity index 100% rename from demos/sub-attaq/pics/big/explosion/submarine/step4.png rename to examples/animation/sub-attaq/pics/big/explosion/submarine/step4.png diff --git a/demos/sub-attaq/pics/big/submarine.png b/examples/animation/sub-attaq/pics/big/submarine.png similarity index 100% rename from demos/sub-attaq/pics/big/submarine.png rename to examples/animation/sub-attaq/pics/big/submarine.png diff --git a/demos/sub-attaq/pics/big/surface.png b/examples/animation/sub-attaq/pics/big/surface.png similarity index 100% rename from demos/sub-attaq/pics/big/surface.png rename to examples/animation/sub-attaq/pics/big/surface.png diff --git a/demos/sub-attaq/pics/big/torpedo.png b/examples/animation/sub-attaq/pics/big/torpedo.png similarity index 100% rename from demos/sub-attaq/pics/big/torpedo.png rename to examples/animation/sub-attaq/pics/big/torpedo.png diff --git a/demos/sub-attaq/pics/scalable/background-n810.svg b/examples/animation/sub-attaq/pics/scalable/background-n810.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/background-n810.svg rename to examples/animation/sub-attaq/pics/scalable/background-n810.svg diff --git a/demos/sub-attaq/pics/scalable/background.svg b/examples/animation/sub-attaq/pics/scalable/background.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/background.svg rename to examples/animation/sub-attaq/pics/scalable/background.svg diff --git a/demos/sub-attaq/pics/scalable/boat.svg b/examples/animation/sub-attaq/pics/scalable/boat.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/boat.svg rename to examples/animation/sub-attaq/pics/scalable/boat.svg diff --git a/demos/sub-attaq/pics/scalable/bomb.svg b/examples/animation/sub-attaq/pics/scalable/bomb.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/bomb.svg rename to examples/animation/sub-attaq/pics/scalable/bomb.svg diff --git a/demos/sub-attaq/pics/scalable/sand.svg b/examples/animation/sub-attaq/pics/scalable/sand.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/sand.svg rename to examples/animation/sub-attaq/pics/scalable/sand.svg diff --git a/demos/sub-attaq/pics/scalable/see.svg b/examples/animation/sub-attaq/pics/scalable/see.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/see.svg rename to examples/animation/sub-attaq/pics/scalable/see.svg diff --git a/demos/sub-attaq/pics/scalable/sky.svg b/examples/animation/sub-attaq/pics/scalable/sky.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/sky.svg rename to examples/animation/sub-attaq/pics/scalable/sky.svg diff --git a/demos/sub-attaq/pics/scalable/sub-attaq.svg b/examples/animation/sub-attaq/pics/scalable/sub-attaq.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/sub-attaq.svg rename to examples/animation/sub-attaq/pics/scalable/sub-attaq.svg diff --git a/demos/sub-attaq/pics/scalable/submarine.svg b/examples/animation/sub-attaq/pics/scalable/submarine.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/submarine.svg rename to examples/animation/sub-attaq/pics/scalable/submarine.svg diff --git a/demos/sub-attaq/pics/scalable/surface.svg b/examples/animation/sub-attaq/pics/scalable/surface.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/surface.svg rename to examples/animation/sub-attaq/pics/scalable/surface.svg diff --git a/demos/sub-attaq/pics/scalable/torpedo.svg b/examples/animation/sub-attaq/pics/scalable/torpedo.svg similarity index 100% rename from demos/sub-attaq/pics/scalable/torpedo.svg rename to examples/animation/sub-attaq/pics/scalable/torpedo.svg diff --git a/demos/sub-attaq/pics/small/background.png b/examples/animation/sub-attaq/pics/small/background.png similarity index 100% rename from demos/sub-attaq/pics/small/background.png rename to examples/animation/sub-attaq/pics/small/background.png diff --git a/demos/sub-attaq/pics/small/boat.png b/examples/animation/sub-attaq/pics/small/boat.png similarity index 100% rename from demos/sub-attaq/pics/small/boat.png rename to examples/animation/sub-attaq/pics/small/boat.png diff --git a/demos/sub-attaq/pics/small/bomb.png b/examples/animation/sub-attaq/pics/small/bomb.png similarity index 100% rename from demos/sub-attaq/pics/small/bomb.png rename to examples/animation/sub-attaq/pics/small/bomb.png diff --git a/demos/sub-attaq/pics/small/submarine.png b/examples/animation/sub-attaq/pics/small/submarine.png similarity index 100% rename from demos/sub-attaq/pics/small/submarine.png rename to examples/animation/sub-attaq/pics/small/submarine.png diff --git a/demos/sub-attaq/pics/small/surface.png b/examples/animation/sub-attaq/pics/small/surface.png similarity index 100% rename from demos/sub-attaq/pics/small/surface.png rename to examples/animation/sub-attaq/pics/small/surface.png diff --git a/demos/sub-attaq/pics/small/torpedo.png b/examples/animation/sub-attaq/pics/small/torpedo.png similarity index 100% rename from demos/sub-attaq/pics/small/torpedo.png rename to examples/animation/sub-attaq/pics/small/torpedo.png diff --git a/demos/sub-attaq/pics/welcome/logo-a.png b/examples/animation/sub-attaq/pics/welcome/logo-a.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-a.png rename to examples/animation/sub-attaq/pics/welcome/logo-a.png diff --git a/demos/sub-attaq/pics/welcome/logo-a2.png b/examples/animation/sub-attaq/pics/welcome/logo-a2.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-a2.png rename to examples/animation/sub-attaq/pics/welcome/logo-a2.png diff --git a/demos/sub-attaq/pics/welcome/logo-b.png b/examples/animation/sub-attaq/pics/welcome/logo-b.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-b.png rename to examples/animation/sub-attaq/pics/welcome/logo-b.png diff --git a/demos/sub-attaq/pics/welcome/logo-dash.png b/examples/animation/sub-attaq/pics/welcome/logo-dash.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-dash.png rename to examples/animation/sub-attaq/pics/welcome/logo-dash.png diff --git a/demos/sub-attaq/pics/welcome/logo-excl.png b/examples/animation/sub-attaq/pics/welcome/logo-excl.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-excl.png rename to examples/animation/sub-attaq/pics/welcome/logo-excl.png diff --git a/demos/sub-attaq/pics/welcome/logo-q.png b/examples/animation/sub-attaq/pics/welcome/logo-q.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-q.png rename to examples/animation/sub-attaq/pics/welcome/logo-q.png diff --git a/demos/sub-attaq/pics/welcome/logo-s.png b/examples/animation/sub-attaq/pics/welcome/logo-s.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-s.png rename to examples/animation/sub-attaq/pics/welcome/logo-s.png diff --git a/demos/sub-attaq/pics/welcome/logo-t.png b/examples/animation/sub-attaq/pics/welcome/logo-t.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-t.png rename to examples/animation/sub-attaq/pics/welcome/logo-t.png diff --git a/demos/sub-attaq/pics/welcome/logo-t2.png b/examples/animation/sub-attaq/pics/welcome/logo-t2.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-t2.png rename to examples/animation/sub-attaq/pics/welcome/logo-t2.png diff --git a/demos/sub-attaq/pics/welcome/logo-u.png b/examples/animation/sub-attaq/pics/welcome/logo-u.png similarity index 100% rename from demos/sub-attaq/pics/welcome/logo-u.png rename to examples/animation/sub-attaq/pics/welcome/logo-u.png diff --git a/demos/sub-attaq/pixmapitem.cpp b/examples/animation/sub-attaq/pixmapitem.cpp similarity index 100% rename from demos/sub-attaq/pixmapitem.cpp rename to examples/animation/sub-attaq/pixmapitem.cpp diff --git a/demos/sub-attaq/pixmapitem.h b/examples/animation/sub-attaq/pixmapitem.h similarity index 100% rename from demos/sub-attaq/pixmapitem.h rename to examples/animation/sub-attaq/pixmapitem.h diff --git a/demos/sub-attaq/progressitem.cpp b/examples/animation/sub-attaq/progressitem.cpp similarity index 100% rename from demos/sub-attaq/progressitem.cpp rename to examples/animation/sub-attaq/progressitem.cpp diff --git a/demos/sub-attaq/progressitem.h b/examples/animation/sub-attaq/progressitem.h similarity index 100% rename from demos/sub-attaq/progressitem.h rename to examples/animation/sub-attaq/progressitem.h diff --git a/demos/sub-attaq/qanimationstate.cpp b/examples/animation/sub-attaq/qanimationstate.cpp similarity index 100% rename from demos/sub-attaq/qanimationstate.cpp rename to examples/animation/sub-attaq/qanimationstate.cpp diff --git a/demos/sub-attaq/qanimationstate.h b/examples/animation/sub-attaq/qanimationstate.h similarity index 100% rename from demos/sub-attaq/qanimationstate.h rename to examples/animation/sub-attaq/qanimationstate.h diff --git a/demos/sub-attaq/states.cpp b/examples/animation/sub-attaq/states.cpp similarity index 100% rename from demos/sub-attaq/states.cpp rename to examples/animation/sub-attaq/states.cpp diff --git a/demos/sub-attaq/states.h b/examples/animation/sub-attaq/states.h similarity index 100% rename from demos/sub-attaq/states.h rename to examples/animation/sub-attaq/states.h diff --git a/demos/sub-attaq/sub-attaq.pro b/examples/animation/sub-attaq/sub-attaq.pro similarity index 100% rename from demos/sub-attaq/sub-attaq.pro rename to examples/animation/sub-attaq/sub-attaq.pro diff --git a/demos/sub-attaq/subattaq.qrc b/examples/animation/sub-attaq/subattaq.qrc similarity index 100% rename from demos/sub-attaq/subattaq.qrc rename to examples/animation/sub-attaq/subattaq.qrc diff --git a/demos/sub-attaq/submarine.cpp b/examples/animation/sub-attaq/submarine.cpp similarity index 100% rename from demos/sub-attaq/submarine.cpp rename to examples/animation/sub-attaq/submarine.cpp diff --git a/demos/sub-attaq/submarine.h b/examples/animation/sub-attaq/submarine.h similarity index 100% rename from demos/sub-attaq/submarine.h rename to examples/animation/sub-attaq/submarine.h diff --git a/demos/sub-attaq/submarine_p.h b/examples/animation/sub-attaq/submarine_p.h similarity index 100% rename from demos/sub-attaq/submarine_p.h rename to examples/animation/sub-attaq/submarine_p.h diff --git a/demos/sub-attaq/textinformationitem.cpp b/examples/animation/sub-attaq/textinformationitem.cpp similarity index 100% rename from demos/sub-attaq/textinformationitem.cpp rename to examples/animation/sub-attaq/textinformationitem.cpp diff --git a/demos/sub-attaq/textinformationitem.h b/examples/animation/sub-attaq/textinformationitem.h similarity index 100% rename from demos/sub-attaq/textinformationitem.h rename to examples/animation/sub-attaq/textinformationitem.h diff --git a/demos/sub-attaq/torpedo.cpp b/examples/animation/sub-attaq/torpedo.cpp similarity index 100% rename from demos/sub-attaq/torpedo.cpp rename to examples/animation/sub-attaq/torpedo.cpp diff --git a/demos/sub-attaq/torpedo.h b/examples/animation/sub-attaq/torpedo.h similarity index 100% rename from demos/sub-attaq/torpedo.h rename to examples/animation/sub-attaq/torpedo.h diff --git a/demos/embedded/digiflip/digiflip.cpp b/examples/embedded/digiflip/digiflip.cpp similarity index 100% rename from demos/embedded/digiflip/digiflip.cpp rename to examples/embedded/digiflip/digiflip.cpp diff --git a/demos/embedded/digiflip/digiflip.pro b/examples/embedded/digiflip/digiflip.pro similarity index 100% rename from demos/embedded/digiflip/digiflip.pro rename to examples/embedded/digiflip/digiflip.pro diff --git a/demos/embedded/embedded.pro b/examples/embedded/embedded.pro similarity index 100% rename from demos/embedded/embedded.pro rename to examples/embedded/embedded.pro diff --git a/demos/embedded/flickable/flickable.cpp b/examples/embedded/flickable/flickable.cpp similarity index 100% rename from demos/embedded/flickable/flickable.cpp rename to examples/embedded/flickable/flickable.cpp diff --git a/demos/embedded/flickable/flickable.h b/examples/embedded/flickable/flickable.h similarity index 100% rename from demos/embedded/flickable/flickable.h rename to examples/embedded/flickable/flickable.h diff --git a/demos/embedded/flickable/flickable.pro b/examples/embedded/flickable/flickable.pro similarity index 100% rename from demos/embedded/flickable/flickable.pro rename to examples/embedded/flickable/flickable.pro diff --git a/demos/embedded/flickable/main.cpp b/examples/embedded/flickable/main.cpp similarity index 100% rename from demos/embedded/flickable/main.cpp rename to examples/embedded/flickable/main.cpp diff --git a/demos/embedded/flightinfo/aircraft.png b/examples/embedded/flightinfo/aircraft.png similarity index 100% rename from demos/embedded/flightinfo/aircraft.png rename to examples/embedded/flightinfo/aircraft.png diff --git a/demos/embedded/flightinfo/flightinfo.cpp b/examples/embedded/flightinfo/flightinfo.cpp similarity index 100% rename from demos/embedded/flightinfo/flightinfo.cpp rename to examples/embedded/flightinfo/flightinfo.cpp diff --git a/demos/embedded/flightinfo/flightinfo.pro b/examples/embedded/flightinfo/flightinfo.pro similarity index 100% rename from demos/embedded/flightinfo/flightinfo.pro rename to examples/embedded/flightinfo/flightinfo.pro diff --git a/demos/embedded/flightinfo/flightinfo.qrc b/examples/embedded/flightinfo/flightinfo.qrc similarity index 100% rename from demos/embedded/flightinfo/flightinfo.qrc rename to examples/embedded/flightinfo/flightinfo.qrc diff --git a/demos/embedded/flightinfo/form.ui b/examples/embedded/flightinfo/form.ui similarity index 100% rename from demos/embedded/flightinfo/form.ui rename to examples/embedded/flightinfo/form.ui diff --git a/demos/embedded/lightmaps/lightmaps.cpp b/examples/embedded/lightmaps/lightmaps.cpp similarity index 100% rename from demos/embedded/lightmaps/lightmaps.cpp rename to examples/embedded/lightmaps/lightmaps.cpp diff --git a/demos/embedded/lightmaps/lightmaps.h b/examples/embedded/lightmaps/lightmaps.h similarity index 100% rename from demos/embedded/lightmaps/lightmaps.h rename to examples/embedded/lightmaps/lightmaps.h diff --git a/demos/embedded/lightmaps/lightmaps.pro b/examples/embedded/lightmaps/lightmaps.pro similarity index 100% rename from demos/embedded/lightmaps/lightmaps.pro rename to examples/embedded/lightmaps/lightmaps.pro diff --git a/demos/embedded/lightmaps/main.cpp b/examples/embedded/lightmaps/main.cpp similarity index 100% rename from demos/embedded/lightmaps/main.cpp rename to examples/embedded/lightmaps/main.cpp diff --git a/demos/embedded/lightmaps/mapzoom.cpp b/examples/embedded/lightmaps/mapzoom.cpp similarity index 100% rename from demos/embedded/lightmaps/mapzoom.cpp rename to examples/embedded/lightmaps/mapzoom.cpp diff --git a/demos/embedded/lightmaps/mapzoom.h b/examples/embedded/lightmaps/mapzoom.h similarity index 100% rename from demos/embedded/lightmaps/mapzoom.h rename to examples/embedded/lightmaps/mapzoom.h diff --git a/demos/embedded/lightmaps/slippymap.cpp b/examples/embedded/lightmaps/slippymap.cpp similarity index 100% rename from demos/embedded/lightmaps/slippymap.cpp rename to examples/embedded/lightmaps/slippymap.cpp diff --git a/demos/embedded/lightmaps/slippymap.h b/examples/embedded/lightmaps/slippymap.h similarity index 100% rename from demos/embedded/lightmaps/slippymap.h rename to examples/embedded/lightmaps/slippymap.h diff --git a/demos/embedded/raycasting/raycasting.cpp b/examples/embedded/raycasting/raycasting.cpp similarity index 100% rename from demos/embedded/raycasting/raycasting.cpp rename to examples/embedded/raycasting/raycasting.cpp diff --git a/demos/embedded/raycasting/raycasting.pro b/examples/embedded/raycasting/raycasting.pro similarity index 100% rename from demos/embedded/raycasting/raycasting.pro rename to examples/embedded/raycasting/raycasting.pro diff --git a/demos/embedded/raycasting/raycasting.qrc b/examples/embedded/raycasting/raycasting.qrc similarity index 100% rename from demos/embedded/raycasting/raycasting.qrc rename to examples/embedded/raycasting/raycasting.qrc diff --git a/demos/embedded/raycasting/textures.png b/examples/embedded/raycasting/textures.png similarity index 100% rename from demos/embedded/raycasting/textures.png rename to examples/embedded/raycasting/textures.png diff --git a/demos/embedded/styledemo/files/add.png b/examples/embedded/styledemo/files/add.png similarity index 100% rename from demos/embedded/styledemo/files/add.png rename to examples/embedded/styledemo/files/add.png diff --git a/demos/embedded/styledemo/files/application.qss b/examples/embedded/styledemo/files/application.qss similarity index 100% rename from demos/embedded/styledemo/files/application.qss rename to examples/embedded/styledemo/files/application.qss diff --git a/demos/embedded/styledemo/files/blue.qss b/examples/embedded/styledemo/files/blue.qss similarity index 100% rename from demos/embedded/styledemo/files/blue.qss rename to examples/embedded/styledemo/files/blue.qss diff --git a/demos/embedded/styledemo/files/khaki.qss b/examples/embedded/styledemo/files/khaki.qss similarity index 100% rename from demos/embedded/styledemo/files/khaki.qss rename to examples/embedded/styledemo/files/khaki.qss diff --git a/demos/embedded/styledemo/files/nature_1.jpg b/examples/embedded/styledemo/files/nature_1.jpg similarity index 100% rename from demos/embedded/styledemo/files/nature_1.jpg rename to examples/embedded/styledemo/files/nature_1.jpg diff --git a/demos/embedded/styledemo/files/nostyle.qss b/examples/embedded/styledemo/files/nostyle.qss similarity index 100% rename from demos/embedded/styledemo/files/nostyle.qss rename to examples/embedded/styledemo/files/nostyle.qss diff --git a/demos/embedded/styledemo/files/remove.png b/examples/embedded/styledemo/files/remove.png similarity index 100% rename from demos/embedded/styledemo/files/remove.png rename to examples/embedded/styledemo/files/remove.png diff --git a/demos/embedded/styledemo/files/transparent.qss b/examples/embedded/styledemo/files/transparent.qss similarity index 100% rename from demos/embedded/styledemo/files/transparent.qss rename to examples/embedded/styledemo/files/transparent.qss diff --git a/demos/embedded/styledemo/main.cpp b/examples/embedded/styledemo/main.cpp similarity index 100% rename from demos/embedded/styledemo/main.cpp rename to examples/embedded/styledemo/main.cpp diff --git a/demos/embedded/styledemo/styledemo.pro b/examples/embedded/styledemo/styledemo.pro similarity index 100% rename from demos/embedded/styledemo/styledemo.pro rename to examples/embedded/styledemo/styledemo.pro diff --git a/demos/embedded/styledemo/styledemo.qrc b/examples/embedded/styledemo/styledemo.qrc similarity index 100% rename from demos/embedded/styledemo/styledemo.qrc rename to examples/embedded/styledemo/styledemo.qrc diff --git a/demos/embedded/styledemo/stylewidget.cpp b/examples/embedded/styledemo/stylewidget.cpp similarity index 100% rename from demos/embedded/styledemo/stylewidget.cpp rename to examples/embedded/styledemo/stylewidget.cpp diff --git a/demos/embedded/styledemo/stylewidget.h b/examples/embedded/styledemo/stylewidget.h similarity index 100% rename from demos/embedded/styledemo/stylewidget.h rename to examples/embedded/styledemo/stylewidget.h diff --git a/demos/embedded/styledemo/stylewidget.ui b/examples/embedded/styledemo/stylewidget.ui similarity index 100% rename from demos/embedded/styledemo/stylewidget.ui rename to examples/embedded/styledemo/stylewidget.ui diff --git a/demos/boxes/3rdparty/fbm.c b/examples/graphicsview/boxes/3rdparty/fbm.c similarity index 100% rename from demos/boxes/3rdparty/fbm.c rename to examples/graphicsview/boxes/3rdparty/fbm.c diff --git a/demos/boxes/3rdparty/fbm.h b/examples/graphicsview/boxes/3rdparty/fbm.h similarity index 100% rename from demos/boxes/3rdparty/fbm.h rename to examples/graphicsview/boxes/3rdparty/fbm.h diff --git a/demos/boxes/basic.fsh b/examples/graphicsview/boxes/basic.fsh similarity index 100% rename from demos/boxes/basic.fsh rename to examples/graphicsview/boxes/basic.fsh diff --git a/demos/boxes/basic.vsh b/examples/graphicsview/boxes/basic.vsh similarity index 100% rename from demos/boxes/basic.vsh rename to examples/graphicsview/boxes/basic.vsh diff --git a/demos/boxes/boxes.pro b/examples/graphicsview/boxes/boxes.pro similarity index 100% rename from demos/boxes/boxes.pro rename to examples/graphicsview/boxes/boxes.pro diff --git a/demos/boxes/boxes.qrc b/examples/graphicsview/boxes/boxes.qrc similarity index 100% rename from demos/boxes/boxes.qrc rename to examples/graphicsview/boxes/boxes.qrc diff --git a/demos/boxes/cubemap_negx.jpg b/examples/graphicsview/boxes/cubemap_negx.jpg similarity index 100% rename from demos/boxes/cubemap_negx.jpg rename to examples/graphicsview/boxes/cubemap_negx.jpg diff --git a/demos/boxes/cubemap_negy.jpg b/examples/graphicsview/boxes/cubemap_negy.jpg similarity index 100% rename from demos/boxes/cubemap_negy.jpg rename to examples/graphicsview/boxes/cubemap_negy.jpg diff --git a/demos/boxes/cubemap_negz.jpg b/examples/graphicsview/boxes/cubemap_negz.jpg similarity index 100% rename from demos/boxes/cubemap_negz.jpg rename to examples/graphicsview/boxes/cubemap_negz.jpg diff --git a/demos/boxes/cubemap_posx.jpg b/examples/graphicsview/boxes/cubemap_posx.jpg similarity index 100% rename from demos/boxes/cubemap_posx.jpg rename to examples/graphicsview/boxes/cubemap_posx.jpg diff --git a/demos/boxes/cubemap_posy.jpg b/examples/graphicsview/boxes/cubemap_posy.jpg similarity index 100% rename from demos/boxes/cubemap_posy.jpg rename to examples/graphicsview/boxes/cubemap_posy.jpg diff --git a/demos/boxes/cubemap_posz.jpg b/examples/graphicsview/boxes/cubemap_posz.jpg similarity index 100% rename from demos/boxes/cubemap_posz.jpg rename to examples/graphicsview/boxes/cubemap_posz.jpg diff --git a/demos/boxes/dotted.fsh b/examples/graphicsview/boxes/dotted.fsh similarity index 100% rename from demos/boxes/dotted.fsh rename to examples/graphicsview/boxes/dotted.fsh diff --git a/demos/boxes/fresnel.fsh b/examples/graphicsview/boxes/fresnel.fsh similarity index 100% rename from demos/boxes/fresnel.fsh rename to examples/graphicsview/boxes/fresnel.fsh diff --git a/demos/boxes/glass.fsh b/examples/graphicsview/boxes/glass.fsh similarity index 100% rename from demos/boxes/glass.fsh rename to examples/graphicsview/boxes/glass.fsh diff --git a/demos/boxes/glbuffers.cpp b/examples/graphicsview/boxes/glbuffers.cpp similarity index 100% rename from demos/boxes/glbuffers.cpp rename to examples/graphicsview/boxes/glbuffers.cpp diff --git a/demos/boxes/glbuffers.h b/examples/graphicsview/boxes/glbuffers.h similarity index 100% rename from demos/boxes/glbuffers.h rename to examples/graphicsview/boxes/glbuffers.h diff --git a/demos/boxes/glextensions.cpp b/examples/graphicsview/boxes/glextensions.cpp similarity index 100% rename from demos/boxes/glextensions.cpp rename to examples/graphicsview/boxes/glextensions.cpp diff --git a/demos/boxes/glextensions.h b/examples/graphicsview/boxes/glextensions.h similarity index 100% rename from demos/boxes/glextensions.h rename to examples/graphicsview/boxes/glextensions.h diff --git a/demos/boxes/gltrianglemesh.h b/examples/graphicsview/boxes/gltrianglemesh.h similarity index 100% rename from demos/boxes/gltrianglemesh.h rename to examples/graphicsview/boxes/gltrianglemesh.h diff --git a/demos/boxes/granite.fsh b/examples/graphicsview/boxes/granite.fsh similarity index 100% rename from demos/boxes/granite.fsh rename to examples/graphicsview/boxes/granite.fsh diff --git a/demos/boxes/main.cpp b/examples/graphicsview/boxes/main.cpp similarity index 100% rename from demos/boxes/main.cpp rename to examples/graphicsview/boxes/main.cpp diff --git a/demos/boxes/marble.fsh b/examples/graphicsview/boxes/marble.fsh similarity index 100% rename from demos/boxes/marble.fsh rename to examples/graphicsview/boxes/marble.fsh diff --git a/demos/boxes/parameters.par b/examples/graphicsview/boxes/parameters.par similarity index 100% rename from demos/boxes/parameters.par rename to examples/graphicsview/boxes/parameters.par diff --git a/demos/boxes/qt-logo.jpg b/examples/graphicsview/boxes/qt-logo.jpg similarity index 100% rename from demos/boxes/qt-logo.jpg rename to examples/graphicsview/boxes/qt-logo.jpg diff --git a/demos/boxes/qt-logo.png b/examples/graphicsview/boxes/qt-logo.png similarity index 100% rename from demos/boxes/qt-logo.png rename to examples/graphicsview/boxes/qt-logo.png diff --git a/demos/boxes/qtbox.cpp b/examples/graphicsview/boxes/qtbox.cpp similarity index 100% rename from demos/boxes/qtbox.cpp rename to examples/graphicsview/boxes/qtbox.cpp diff --git a/demos/boxes/qtbox.h b/examples/graphicsview/boxes/qtbox.h similarity index 100% rename from demos/boxes/qtbox.h rename to examples/graphicsview/boxes/qtbox.h diff --git a/demos/boxes/reflection.fsh b/examples/graphicsview/boxes/reflection.fsh similarity index 100% rename from demos/boxes/reflection.fsh rename to examples/graphicsview/boxes/reflection.fsh diff --git a/demos/boxes/refraction.fsh b/examples/graphicsview/boxes/refraction.fsh similarity index 100% rename from demos/boxes/refraction.fsh rename to examples/graphicsview/boxes/refraction.fsh diff --git a/demos/boxes/roundedbox.cpp b/examples/graphicsview/boxes/roundedbox.cpp similarity index 100% rename from demos/boxes/roundedbox.cpp rename to examples/graphicsview/boxes/roundedbox.cpp diff --git a/demos/boxes/roundedbox.h b/examples/graphicsview/boxes/roundedbox.h similarity index 100% rename from demos/boxes/roundedbox.h rename to examples/graphicsview/boxes/roundedbox.h diff --git a/demos/boxes/scene.cpp b/examples/graphicsview/boxes/scene.cpp similarity index 100% rename from demos/boxes/scene.cpp rename to examples/graphicsview/boxes/scene.cpp diff --git a/demos/boxes/scene.h b/examples/graphicsview/boxes/scene.h similarity index 100% rename from demos/boxes/scene.h rename to examples/graphicsview/boxes/scene.h diff --git a/demos/boxes/smiley.png b/examples/graphicsview/boxes/smiley.png similarity index 100% rename from demos/boxes/smiley.png rename to examples/graphicsview/boxes/smiley.png diff --git a/demos/boxes/square.jpg b/examples/graphicsview/boxes/square.jpg similarity index 100% rename from demos/boxes/square.jpg rename to examples/graphicsview/boxes/square.jpg diff --git a/demos/boxes/trackball.cpp b/examples/graphicsview/boxes/trackball.cpp similarity index 100% rename from demos/boxes/trackball.cpp rename to examples/graphicsview/boxes/trackball.cpp diff --git a/demos/boxes/trackball.h b/examples/graphicsview/boxes/trackball.h similarity index 100% rename from demos/boxes/trackball.h rename to examples/graphicsview/boxes/trackball.h diff --git a/demos/boxes/wood.fsh b/examples/graphicsview/boxes/wood.fsh similarity index 100% rename from demos/boxes/wood.fsh rename to examples/graphicsview/boxes/wood.fsh diff --git a/demos/chip/chip.cpp b/examples/graphicsview/chip/chip.cpp similarity index 100% rename from demos/chip/chip.cpp rename to examples/graphicsview/chip/chip.cpp diff --git a/demos/chip/chip.h b/examples/graphicsview/chip/chip.h similarity index 100% rename from demos/chip/chip.h rename to examples/graphicsview/chip/chip.h diff --git a/demos/chip/chip.pro b/examples/graphicsview/chip/chip.pro similarity index 100% rename from demos/chip/chip.pro rename to examples/graphicsview/chip/chip.pro diff --git a/demos/chip/fileprint.png b/examples/graphicsview/chip/fileprint.png similarity index 100% rename from demos/chip/fileprint.png rename to examples/graphicsview/chip/fileprint.png diff --git a/demos/chip/images.qrc b/examples/graphicsview/chip/images.qrc similarity index 100% rename from demos/chip/images.qrc rename to examples/graphicsview/chip/images.qrc diff --git a/demos/chip/main.cpp b/examples/graphicsview/chip/main.cpp similarity index 100% rename from demos/chip/main.cpp rename to examples/graphicsview/chip/main.cpp diff --git a/demos/chip/mainwindow.cpp b/examples/graphicsview/chip/mainwindow.cpp similarity index 100% rename from demos/chip/mainwindow.cpp rename to examples/graphicsview/chip/mainwindow.cpp diff --git a/demos/chip/mainwindow.h b/examples/graphicsview/chip/mainwindow.h similarity index 100% rename from demos/chip/mainwindow.h rename to examples/graphicsview/chip/mainwindow.h diff --git a/demos/chip/qt4logo.png b/examples/graphicsview/chip/qt4logo.png similarity index 100% rename from demos/chip/qt4logo.png rename to examples/graphicsview/chip/qt4logo.png diff --git a/demos/chip/rotateleft.png b/examples/graphicsview/chip/rotateleft.png similarity index 100% rename from demos/chip/rotateleft.png rename to examples/graphicsview/chip/rotateleft.png diff --git a/demos/chip/rotateright.png b/examples/graphicsview/chip/rotateright.png similarity index 100% rename from demos/chip/rotateright.png rename to examples/graphicsview/chip/rotateright.png diff --git a/demos/chip/view.cpp b/examples/graphicsview/chip/view.cpp similarity index 100% rename from demos/chip/view.cpp rename to examples/graphicsview/chip/view.cpp diff --git a/demos/chip/view.h b/examples/graphicsview/chip/view.h similarity index 100% rename from demos/chip/view.h rename to examples/graphicsview/chip/view.h diff --git a/demos/chip/zoomin.png b/examples/graphicsview/chip/zoomin.png similarity index 100% rename from demos/chip/zoomin.png rename to examples/graphicsview/chip/zoomin.png diff --git a/demos/chip/zoomout.png b/examples/graphicsview/chip/zoomout.png similarity index 100% rename from demos/chip/zoomout.png rename to examples/graphicsview/chip/zoomout.png diff --git a/demos/embeddeddialogs/No-Ones-Laughing-3.jpg b/examples/graphicsview/embeddeddialogs/No-Ones-Laughing-3.jpg similarity index 100% rename from demos/embeddeddialogs/No-Ones-Laughing-3.jpg rename to examples/graphicsview/embeddeddialogs/No-Ones-Laughing-3.jpg diff --git a/demos/embeddeddialogs/customproxy.cpp b/examples/graphicsview/embeddeddialogs/customproxy.cpp similarity index 100% rename from demos/embeddeddialogs/customproxy.cpp rename to examples/graphicsview/embeddeddialogs/customproxy.cpp diff --git a/demos/embeddeddialogs/customproxy.h b/examples/graphicsview/embeddeddialogs/customproxy.h similarity index 100% rename from demos/embeddeddialogs/customproxy.h rename to examples/graphicsview/embeddeddialogs/customproxy.h diff --git a/demos/embeddeddialogs/embeddeddialog.cpp b/examples/graphicsview/embeddeddialogs/embeddeddialog.cpp similarity index 100% rename from demos/embeddeddialogs/embeddeddialog.cpp rename to examples/graphicsview/embeddeddialogs/embeddeddialog.cpp diff --git a/demos/embeddeddialogs/embeddeddialog.h b/examples/graphicsview/embeddeddialogs/embeddeddialog.h similarity index 100% rename from demos/embeddeddialogs/embeddeddialog.h rename to examples/graphicsview/embeddeddialogs/embeddeddialog.h diff --git a/demos/embeddeddialogs/embeddeddialog.ui b/examples/graphicsview/embeddeddialogs/embeddeddialog.ui similarity index 100% rename from demos/embeddeddialogs/embeddeddialog.ui rename to examples/graphicsview/embeddeddialogs/embeddeddialog.ui diff --git a/demos/embeddeddialogs/embeddeddialogs.pro b/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro similarity index 100% rename from demos/embeddeddialogs/embeddeddialogs.pro rename to examples/graphicsview/embeddeddialogs/embeddeddialogs.pro diff --git a/demos/embeddeddialogs/embeddeddialogs.qrc b/examples/graphicsview/embeddeddialogs/embeddeddialogs.qrc similarity index 100% rename from demos/embeddeddialogs/embeddeddialogs.qrc rename to examples/graphicsview/embeddeddialogs/embeddeddialogs.qrc diff --git a/demos/embeddeddialogs/main.cpp b/examples/graphicsview/embeddeddialogs/main.cpp similarity index 100% rename from demos/embeddeddialogs/main.cpp rename to examples/graphicsview/embeddeddialogs/main.cpp diff --git a/demos/interview/README b/examples/itemviews/interview/README similarity index 100% rename from demos/interview/README rename to examples/itemviews/interview/README diff --git a/demos/interview/images/folder.png b/examples/itemviews/interview/images/folder.png similarity index 100% rename from demos/interview/images/folder.png rename to examples/itemviews/interview/images/folder.png diff --git a/demos/interview/images/interview.png b/examples/itemviews/interview/images/interview.png similarity index 100% rename from demos/interview/images/interview.png rename to examples/itemviews/interview/images/interview.png diff --git a/demos/interview/images/services.png b/examples/itemviews/interview/images/services.png similarity index 100% rename from demos/interview/images/services.png rename to examples/itemviews/interview/images/services.png diff --git a/demos/interview/interview.pro b/examples/itemviews/interview/interview.pro similarity index 100% rename from demos/interview/interview.pro rename to examples/itemviews/interview/interview.pro diff --git a/demos/interview/interview.qrc b/examples/itemviews/interview/interview.qrc similarity index 100% rename from demos/interview/interview.qrc rename to examples/itemviews/interview/interview.qrc diff --git a/demos/interview/main.cpp b/examples/itemviews/interview/main.cpp similarity index 100% rename from demos/interview/main.cpp rename to examples/itemviews/interview/main.cpp diff --git a/demos/interview/model.cpp b/examples/itemviews/interview/model.cpp similarity index 100% rename from demos/interview/model.cpp rename to examples/itemviews/interview/model.cpp diff --git a/demos/interview/model.h b/examples/itemviews/interview/model.h similarity index 100% rename from demos/interview/model.h rename to examples/itemviews/interview/model.h diff --git a/demos/spreadsheet/images/interview.png b/examples/itemviews/spreadsheet/images/interview.png similarity index 100% rename from demos/spreadsheet/images/interview.png rename to examples/itemviews/spreadsheet/images/interview.png diff --git a/demos/spreadsheet/main.cpp b/examples/itemviews/spreadsheet/main.cpp similarity index 100% rename from demos/spreadsheet/main.cpp rename to examples/itemviews/spreadsheet/main.cpp diff --git a/demos/spreadsheet/printview.cpp b/examples/itemviews/spreadsheet/printview.cpp similarity index 100% rename from demos/spreadsheet/printview.cpp rename to examples/itemviews/spreadsheet/printview.cpp diff --git a/demos/spreadsheet/printview.h b/examples/itemviews/spreadsheet/printview.h similarity index 100% rename from demos/spreadsheet/printview.h rename to examples/itemviews/spreadsheet/printview.h diff --git a/demos/spreadsheet/spreadsheet.cpp b/examples/itemviews/spreadsheet/spreadsheet.cpp similarity index 100% rename from demos/spreadsheet/spreadsheet.cpp rename to examples/itemviews/spreadsheet/spreadsheet.cpp diff --git a/demos/spreadsheet/spreadsheet.h b/examples/itemviews/spreadsheet/spreadsheet.h similarity index 100% rename from demos/spreadsheet/spreadsheet.h rename to examples/itemviews/spreadsheet/spreadsheet.h diff --git a/demos/spreadsheet/spreadsheet.pro b/examples/itemviews/spreadsheet/spreadsheet.pro similarity index 100% rename from demos/spreadsheet/spreadsheet.pro rename to examples/itemviews/spreadsheet/spreadsheet.pro diff --git a/demos/spreadsheet/spreadsheet.qrc b/examples/itemviews/spreadsheet/spreadsheet.qrc similarity index 100% rename from demos/spreadsheet/spreadsheet.qrc rename to examples/itemviews/spreadsheet/spreadsheet.qrc diff --git a/demos/spreadsheet/spreadsheetdelegate.cpp b/examples/itemviews/spreadsheet/spreadsheetdelegate.cpp similarity index 100% rename from demos/spreadsheet/spreadsheetdelegate.cpp rename to examples/itemviews/spreadsheet/spreadsheetdelegate.cpp diff --git a/demos/spreadsheet/spreadsheetdelegate.h b/examples/itemviews/spreadsheet/spreadsheetdelegate.h similarity index 100% rename from demos/spreadsheet/spreadsheetdelegate.h rename to examples/itemviews/spreadsheet/spreadsheetdelegate.h diff --git a/demos/spreadsheet/spreadsheetitem.cpp b/examples/itemviews/spreadsheet/spreadsheetitem.cpp similarity index 100% rename from demos/spreadsheet/spreadsheetitem.cpp rename to examples/itemviews/spreadsheet/spreadsheetitem.cpp diff --git a/demos/spreadsheet/spreadsheetitem.h b/examples/itemviews/spreadsheet/spreadsheetitem.h similarity index 100% rename from demos/spreadsheet/spreadsheetitem.h rename to examples/itemviews/spreadsheet/spreadsheetitem.h diff --git a/demos/macmainwindow/macmainwindow.h b/examples/mainwindows/macmainwindow/macmainwindow.h similarity index 100% rename from demos/macmainwindow/macmainwindow.h rename to examples/mainwindows/macmainwindow/macmainwindow.h diff --git a/demos/macmainwindow/macmainwindow.mm b/examples/mainwindows/macmainwindow/macmainwindow.mm similarity index 100% rename from demos/macmainwindow/macmainwindow.mm rename to examples/mainwindows/macmainwindow/macmainwindow.mm diff --git a/demos/macmainwindow/macmainwindow.pro b/examples/mainwindows/macmainwindow/macmainwindow.pro similarity index 100% rename from demos/macmainwindow/macmainwindow.pro rename to examples/mainwindows/macmainwindow/macmainwindow.pro diff --git a/demos/macmainwindow/main.cpp b/examples/mainwindows/macmainwindow/main.cpp similarity index 100% rename from demos/macmainwindow/main.cpp rename to examples/mainwindows/macmainwindow/main.cpp diff --git a/demos/mainwindow/colorswatch.cpp b/examples/mainwindows/mainwindow/colorswatch.cpp similarity index 100% rename from demos/mainwindow/colorswatch.cpp rename to examples/mainwindows/mainwindow/colorswatch.cpp diff --git a/demos/mainwindow/colorswatch.h b/examples/mainwindows/mainwindow/colorswatch.h similarity index 100% rename from demos/mainwindow/colorswatch.h rename to examples/mainwindows/mainwindow/colorswatch.h diff --git a/demos/mainwindow/main.cpp b/examples/mainwindows/mainwindow/main.cpp similarity index 100% rename from demos/mainwindow/main.cpp rename to examples/mainwindows/mainwindow/main.cpp diff --git a/demos/mainwindow/mainwindow.cpp b/examples/mainwindows/mainwindow/mainwindow.cpp similarity index 100% rename from demos/mainwindow/mainwindow.cpp rename to examples/mainwindows/mainwindow/mainwindow.cpp diff --git a/demos/mainwindow/mainwindow.h b/examples/mainwindows/mainwindow/mainwindow.h similarity index 100% rename from demos/mainwindow/mainwindow.h rename to examples/mainwindows/mainwindow/mainwindow.h diff --git a/demos/mainwindow/mainwindow.pro b/examples/mainwindows/mainwindow/mainwindow.pro similarity index 100% rename from demos/mainwindow/mainwindow.pro rename to examples/mainwindows/mainwindow/mainwindow.pro diff --git a/demos/mainwindow/mainwindow.qrc b/examples/mainwindows/mainwindow/mainwindow.qrc similarity index 100% rename from demos/mainwindow/mainwindow.qrc rename to examples/mainwindows/mainwindow/mainwindow.qrc diff --git a/demos/mainwindow/qt.png b/examples/mainwindows/mainwindow/qt.png similarity index 100% rename from demos/mainwindow/qt.png rename to examples/mainwindows/mainwindow/qt.png diff --git a/demos/mainwindow/titlebarCenter.png b/examples/mainwindows/mainwindow/titlebarCenter.png similarity index 100% rename from demos/mainwindow/titlebarCenter.png rename to examples/mainwindows/mainwindow/titlebarCenter.png diff --git a/demos/mainwindow/titlebarLeft.png b/examples/mainwindows/mainwindow/titlebarLeft.png similarity index 100% rename from demos/mainwindow/titlebarLeft.png rename to examples/mainwindows/mainwindow/titlebarLeft.png diff --git a/demos/mainwindow/titlebarRight.png b/examples/mainwindows/mainwindow/titlebarRight.png similarity index 100% rename from demos/mainwindow/titlebarRight.png rename to examples/mainwindows/mainwindow/titlebarRight.png diff --git a/demos/mainwindow/toolbar.cpp b/examples/mainwindows/mainwindow/toolbar.cpp similarity index 100% rename from demos/mainwindow/toolbar.cpp rename to examples/mainwindows/mainwindow/toolbar.cpp diff --git a/demos/mainwindow/toolbar.h b/examples/mainwindows/mainwindow/toolbar.h similarity index 100% rename from demos/mainwindow/toolbar.h rename to examples/mainwindows/mainwindow/toolbar.h diff --git a/demos/composition/composition.cpp b/examples/painting/composition/composition.cpp similarity index 100% rename from demos/composition/composition.cpp rename to examples/painting/composition/composition.cpp diff --git a/demos/composition/composition.h b/examples/painting/composition/composition.h similarity index 100% rename from demos/composition/composition.h rename to examples/painting/composition/composition.h diff --git a/demos/composition/composition.html b/examples/painting/composition/composition.html similarity index 100% rename from demos/composition/composition.html rename to examples/painting/composition/composition.html diff --git a/demos/composition/composition.pro b/examples/painting/composition/composition.pro similarity index 100% rename from demos/composition/composition.pro rename to examples/painting/composition/composition.pro diff --git a/demos/composition/composition.qrc b/examples/painting/composition/composition.qrc similarity index 100% rename from demos/composition/composition.qrc rename to examples/painting/composition/composition.qrc diff --git a/demos/composition/flower.jpg b/examples/painting/composition/flower.jpg similarity index 100% rename from demos/composition/flower.jpg rename to examples/painting/composition/flower.jpg diff --git a/demos/composition/flower_alpha.jpg b/examples/painting/composition/flower_alpha.jpg similarity index 100% rename from demos/composition/flower_alpha.jpg rename to examples/painting/composition/flower_alpha.jpg diff --git a/demos/composition/main.cpp b/examples/painting/composition/main.cpp similarity index 100% rename from demos/composition/main.cpp rename to examples/painting/composition/main.cpp diff --git a/demos/deform/deform.pro b/examples/painting/deform/deform.pro similarity index 100% rename from demos/deform/deform.pro rename to examples/painting/deform/deform.pro diff --git a/demos/deform/deform.qrc b/examples/painting/deform/deform.qrc similarity index 100% rename from demos/deform/deform.qrc rename to examples/painting/deform/deform.qrc diff --git a/demos/deform/main.cpp b/examples/painting/deform/main.cpp similarity index 100% rename from demos/deform/main.cpp rename to examples/painting/deform/main.cpp diff --git a/demos/deform/pathdeform.cpp b/examples/painting/deform/pathdeform.cpp similarity index 100% rename from demos/deform/pathdeform.cpp rename to examples/painting/deform/pathdeform.cpp diff --git a/demos/deform/pathdeform.h b/examples/painting/deform/pathdeform.h similarity index 100% rename from demos/deform/pathdeform.h rename to examples/painting/deform/pathdeform.h diff --git a/demos/deform/pathdeform.html b/examples/painting/deform/pathdeform.html similarity index 100% rename from demos/deform/pathdeform.html rename to examples/painting/deform/pathdeform.html diff --git a/demos/gradients/gradients.cpp b/examples/painting/gradients/gradients.cpp similarity index 100% rename from demos/gradients/gradients.cpp rename to examples/painting/gradients/gradients.cpp diff --git a/demos/gradients/gradients.h b/examples/painting/gradients/gradients.h similarity index 100% rename from demos/gradients/gradients.h rename to examples/painting/gradients/gradients.h diff --git a/demos/gradients/gradients.html b/examples/painting/gradients/gradients.html similarity index 100% rename from demos/gradients/gradients.html rename to examples/painting/gradients/gradients.html diff --git a/demos/gradients/gradients.pro b/examples/painting/gradients/gradients.pro similarity index 100% rename from demos/gradients/gradients.pro rename to examples/painting/gradients/gradients.pro diff --git a/demos/gradients/gradients.qrc b/examples/painting/gradients/gradients.qrc similarity index 100% rename from demos/gradients/gradients.qrc rename to examples/painting/gradients/gradients.qrc diff --git a/demos/gradients/main.cpp b/examples/painting/gradients/main.cpp similarity index 100% rename from demos/gradients/main.cpp rename to examples/painting/gradients/main.cpp diff --git a/demos/pathstroke/main.cpp b/examples/painting/pathstroke/main.cpp similarity index 100% rename from demos/pathstroke/main.cpp rename to examples/painting/pathstroke/main.cpp diff --git a/demos/pathstroke/pathstroke.cpp b/examples/painting/pathstroke/pathstroke.cpp similarity index 100% rename from demos/pathstroke/pathstroke.cpp rename to examples/painting/pathstroke/pathstroke.cpp diff --git a/demos/pathstroke/pathstroke.h b/examples/painting/pathstroke/pathstroke.h similarity index 100% rename from demos/pathstroke/pathstroke.h rename to examples/painting/pathstroke/pathstroke.h diff --git a/demos/pathstroke/pathstroke.html b/examples/painting/pathstroke/pathstroke.html similarity index 100% rename from demos/pathstroke/pathstroke.html rename to examples/painting/pathstroke/pathstroke.html diff --git a/demos/pathstroke/pathstroke.pro b/examples/painting/pathstroke/pathstroke.pro similarity index 100% rename from demos/pathstroke/pathstroke.pro rename to examples/painting/pathstroke/pathstroke.pro diff --git a/demos/pathstroke/pathstroke.qrc b/examples/painting/pathstroke/pathstroke.qrc similarity index 100% rename from demos/pathstroke/pathstroke.qrc rename to examples/painting/pathstroke/pathstroke.qrc diff --git a/demos/shared/arthurstyle.cpp b/examples/painting/shared/arthurstyle.cpp similarity index 100% rename from demos/shared/arthurstyle.cpp rename to examples/painting/shared/arthurstyle.cpp diff --git a/demos/shared/arthurstyle.h b/examples/painting/shared/arthurstyle.h similarity index 100% rename from demos/shared/arthurstyle.h rename to examples/painting/shared/arthurstyle.h diff --git a/demos/shared/arthurwidgets.cpp b/examples/painting/shared/arthurwidgets.cpp similarity index 100% rename from demos/shared/arthurwidgets.cpp rename to examples/painting/shared/arthurwidgets.cpp diff --git a/demos/shared/arthurwidgets.h b/examples/painting/shared/arthurwidgets.h similarity index 100% rename from demos/shared/arthurwidgets.h rename to examples/painting/shared/arthurwidgets.h diff --git a/demos/shared/hoverpoints.cpp b/examples/painting/shared/hoverpoints.cpp similarity index 100% rename from demos/shared/hoverpoints.cpp rename to examples/painting/shared/hoverpoints.cpp diff --git a/demos/shared/hoverpoints.h b/examples/painting/shared/hoverpoints.h similarity index 100% rename from demos/shared/hoverpoints.h rename to examples/painting/shared/hoverpoints.h diff --git a/demos/shared/images/bg_pattern.png b/examples/painting/shared/images/bg_pattern.png similarity index 100% rename from demos/shared/images/bg_pattern.png rename to examples/painting/shared/images/bg_pattern.png diff --git a/demos/shared/images/button_normal_cap_left.png b/examples/painting/shared/images/button_normal_cap_left.png similarity index 100% rename from demos/shared/images/button_normal_cap_left.png rename to examples/painting/shared/images/button_normal_cap_left.png diff --git a/demos/shared/images/button_normal_cap_right.png b/examples/painting/shared/images/button_normal_cap_right.png similarity index 100% rename from demos/shared/images/button_normal_cap_right.png rename to examples/painting/shared/images/button_normal_cap_right.png diff --git a/demos/shared/images/button_normal_stretch.png b/examples/painting/shared/images/button_normal_stretch.png similarity index 100% rename from demos/shared/images/button_normal_stretch.png rename to examples/painting/shared/images/button_normal_stretch.png diff --git a/demos/shared/images/button_pressed_cap_left.png b/examples/painting/shared/images/button_pressed_cap_left.png similarity index 100% rename from demos/shared/images/button_pressed_cap_left.png rename to examples/painting/shared/images/button_pressed_cap_left.png diff --git a/demos/shared/images/button_pressed_cap_right.png b/examples/painting/shared/images/button_pressed_cap_right.png similarity index 100% rename from demos/shared/images/button_pressed_cap_right.png rename to examples/painting/shared/images/button_pressed_cap_right.png diff --git a/demos/shared/images/button_pressed_stretch.png b/examples/painting/shared/images/button_pressed_stretch.png similarity index 100% rename from demos/shared/images/button_pressed_stretch.png rename to examples/painting/shared/images/button_pressed_stretch.png diff --git a/demos/shared/images/curve_thing_edit-6.png b/examples/painting/shared/images/curve_thing_edit-6.png similarity index 100% rename from demos/shared/images/curve_thing_edit-6.png rename to examples/painting/shared/images/curve_thing_edit-6.png diff --git a/demos/shared/images/frame_bottom.png b/examples/painting/shared/images/frame_bottom.png similarity index 100% rename from demos/shared/images/frame_bottom.png rename to examples/painting/shared/images/frame_bottom.png diff --git a/demos/shared/images/frame_bottomleft.png b/examples/painting/shared/images/frame_bottomleft.png similarity index 100% rename from demos/shared/images/frame_bottomleft.png rename to examples/painting/shared/images/frame_bottomleft.png diff --git a/demos/shared/images/frame_bottomright.png b/examples/painting/shared/images/frame_bottomright.png similarity index 100% rename from demos/shared/images/frame_bottomright.png rename to examples/painting/shared/images/frame_bottomright.png diff --git a/demos/shared/images/frame_left.png b/examples/painting/shared/images/frame_left.png similarity index 100% rename from demos/shared/images/frame_left.png rename to examples/painting/shared/images/frame_left.png diff --git a/demos/shared/images/frame_right.png b/examples/painting/shared/images/frame_right.png similarity index 100% rename from demos/shared/images/frame_right.png rename to examples/painting/shared/images/frame_right.png diff --git a/demos/shared/images/frame_top.png b/examples/painting/shared/images/frame_top.png similarity index 100% rename from demos/shared/images/frame_top.png rename to examples/painting/shared/images/frame_top.png diff --git a/demos/shared/images/frame_topleft.png b/examples/painting/shared/images/frame_topleft.png similarity index 100% rename from demos/shared/images/frame_topleft.png rename to examples/painting/shared/images/frame_topleft.png diff --git a/demos/shared/images/frame_topright.png b/examples/painting/shared/images/frame_topright.png similarity index 100% rename from demos/shared/images/frame_topright.png rename to examples/painting/shared/images/frame_topright.png diff --git a/demos/shared/images/groupframe_bottom_left.png b/examples/painting/shared/images/groupframe_bottom_left.png similarity index 100% rename from demos/shared/images/groupframe_bottom_left.png rename to examples/painting/shared/images/groupframe_bottom_left.png diff --git a/demos/shared/images/groupframe_bottom_right.png b/examples/painting/shared/images/groupframe_bottom_right.png similarity index 100% rename from demos/shared/images/groupframe_bottom_right.png rename to examples/painting/shared/images/groupframe_bottom_right.png diff --git a/demos/shared/images/groupframe_bottom_stretch.png b/examples/painting/shared/images/groupframe_bottom_stretch.png similarity index 100% rename from demos/shared/images/groupframe_bottom_stretch.png rename to examples/painting/shared/images/groupframe_bottom_stretch.png diff --git a/demos/shared/images/groupframe_left_stretch.png b/examples/painting/shared/images/groupframe_left_stretch.png similarity index 100% rename from demos/shared/images/groupframe_left_stretch.png rename to examples/painting/shared/images/groupframe_left_stretch.png diff --git a/demos/shared/images/groupframe_right_stretch.png b/examples/painting/shared/images/groupframe_right_stretch.png similarity index 100% rename from demos/shared/images/groupframe_right_stretch.png rename to examples/painting/shared/images/groupframe_right_stretch.png diff --git a/demos/shared/images/groupframe_top_stretch.png b/examples/painting/shared/images/groupframe_top_stretch.png similarity index 100% rename from demos/shared/images/groupframe_top_stretch.png rename to examples/painting/shared/images/groupframe_top_stretch.png diff --git a/demos/shared/images/groupframe_topleft.png b/examples/painting/shared/images/groupframe_topleft.png similarity index 100% rename from demos/shared/images/groupframe_topleft.png rename to examples/painting/shared/images/groupframe_topleft.png diff --git a/demos/shared/images/groupframe_topright.png b/examples/painting/shared/images/groupframe_topright.png similarity index 100% rename from demos/shared/images/groupframe_topright.png rename to examples/painting/shared/images/groupframe_topright.png diff --git a/demos/shared/images/line_dash_dot.png b/examples/painting/shared/images/line_dash_dot.png similarity index 100% rename from demos/shared/images/line_dash_dot.png rename to examples/painting/shared/images/line_dash_dot.png diff --git a/demos/shared/images/line_dash_dot_dot.png b/examples/painting/shared/images/line_dash_dot_dot.png similarity index 100% rename from demos/shared/images/line_dash_dot_dot.png rename to examples/painting/shared/images/line_dash_dot_dot.png diff --git a/demos/shared/images/line_dashed.png b/examples/painting/shared/images/line_dashed.png similarity index 100% rename from demos/shared/images/line_dashed.png rename to examples/painting/shared/images/line_dashed.png diff --git a/demos/shared/images/line_dotted.png b/examples/painting/shared/images/line_dotted.png similarity index 100% rename from demos/shared/images/line_dotted.png rename to examples/painting/shared/images/line_dotted.png diff --git a/demos/shared/images/line_solid.png b/examples/painting/shared/images/line_solid.png similarity index 100% rename from demos/shared/images/line_solid.png rename to examples/painting/shared/images/line_solid.png diff --git a/demos/shared/images/radiobutton-off.png b/examples/painting/shared/images/radiobutton-off.png similarity index 100% rename from demos/shared/images/radiobutton-off.png rename to examples/painting/shared/images/radiobutton-off.png diff --git a/demos/shared/images/radiobutton-on.png b/examples/painting/shared/images/radiobutton-on.png similarity index 100% rename from demos/shared/images/radiobutton-on.png rename to examples/painting/shared/images/radiobutton-on.png diff --git a/demos/shared/images/radiobutton_off.png b/examples/painting/shared/images/radiobutton_off.png similarity index 100% rename from demos/shared/images/radiobutton_off.png rename to examples/painting/shared/images/radiobutton_off.png diff --git a/demos/shared/images/radiobutton_on.png b/examples/painting/shared/images/radiobutton_on.png similarity index 100% rename from demos/shared/images/radiobutton_on.png rename to examples/painting/shared/images/radiobutton_on.png diff --git a/demos/shared/images/slider_bar.png b/examples/painting/shared/images/slider_bar.png similarity index 100% rename from demos/shared/images/slider_bar.png rename to examples/painting/shared/images/slider_bar.png diff --git a/demos/shared/images/slider_thumb_off.png b/examples/painting/shared/images/slider_thumb_off.png similarity index 100% rename from demos/shared/images/slider_thumb_off.png rename to examples/painting/shared/images/slider_thumb_off.png diff --git a/demos/shared/images/slider_thumb_on.png b/examples/painting/shared/images/slider_thumb_on.png similarity index 100% rename from demos/shared/images/slider_thumb_on.png rename to examples/painting/shared/images/slider_thumb_on.png diff --git a/demos/shared/images/title_cap_left.png b/examples/painting/shared/images/title_cap_left.png similarity index 100% rename from demos/shared/images/title_cap_left.png rename to examples/painting/shared/images/title_cap_left.png diff --git a/demos/shared/images/title_cap_right.png b/examples/painting/shared/images/title_cap_right.png similarity index 100% rename from demos/shared/images/title_cap_right.png rename to examples/painting/shared/images/title_cap_right.png diff --git a/demos/shared/images/title_stretch.png b/examples/painting/shared/images/title_stretch.png similarity index 100% rename from demos/shared/images/title_stretch.png rename to examples/painting/shared/images/title_stretch.png diff --git a/demos/shared/shared.pri b/examples/painting/shared/shared.pri similarity index 100% rename from demos/shared/shared.pri rename to examples/painting/shared/shared.pri diff --git a/demos/shared/shared.pro b/examples/painting/shared/shared.pro similarity index 100% rename from demos/shared/shared.pro rename to examples/painting/shared/shared.pro diff --git a/demos/shared/shared.qrc b/examples/painting/shared/shared.qrc similarity index 100% rename from demos/shared/shared.qrc rename to examples/painting/shared/shared.qrc diff --git a/demos/textedit/example.html b/examples/richtext/textedit/example.html similarity index 100% rename from demos/textedit/example.html rename to examples/richtext/textedit/example.html diff --git a/demos/textedit/images/logo32.png b/examples/richtext/textedit/images/logo32.png similarity index 100% rename from demos/textedit/images/logo32.png rename to examples/richtext/textedit/images/logo32.png diff --git a/demos/textedit/images/mac/editcopy.png b/examples/richtext/textedit/images/mac/editcopy.png similarity index 100% rename from demos/textedit/images/mac/editcopy.png rename to examples/richtext/textedit/images/mac/editcopy.png diff --git a/demos/textedit/images/mac/editcut.png b/examples/richtext/textedit/images/mac/editcut.png similarity index 100% rename from demos/textedit/images/mac/editcut.png rename to examples/richtext/textedit/images/mac/editcut.png diff --git a/demos/textedit/images/mac/editpaste.png b/examples/richtext/textedit/images/mac/editpaste.png similarity index 100% rename from demos/textedit/images/mac/editpaste.png rename to examples/richtext/textedit/images/mac/editpaste.png diff --git a/demos/textedit/images/mac/editredo.png b/examples/richtext/textedit/images/mac/editredo.png similarity index 100% rename from demos/textedit/images/mac/editredo.png rename to examples/richtext/textedit/images/mac/editredo.png diff --git a/demos/textedit/images/mac/editundo.png b/examples/richtext/textedit/images/mac/editundo.png similarity index 100% rename from demos/textedit/images/mac/editundo.png rename to examples/richtext/textedit/images/mac/editundo.png diff --git a/demos/textedit/images/mac/exportpdf.png b/examples/richtext/textedit/images/mac/exportpdf.png similarity index 100% rename from demos/textedit/images/mac/exportpdf.png rename to examples/richtext/textedit/images/mac/exportpdf.png diff --git a/demos/textedit/images/mac/filenew.png b/examples/richtext/textedit/images/mac/filenew.png similarity index 100% rename from demos/textedit/images/mac/filenew.png rename to examples/richtext/textedit/images/mac/filenew.png diff --git a/demos/textedit/images/mac/fileopen.png b/examples/richtext/textedit/images/mac/fileopen.png similarity index 100% rename from demos/textedit/images/mac/fileopen.png rename to examples/richtext/textedit/images/mac/fileopen.png diff --git a/demos/textedit/images/mac/fileprint.png b/examples/richtext/textedit/images/mac/fileprint.png similarity index 100% rename from demos/textedit/images/mac/fileprint.png rename to examples/richtext/textedit/images/mac/fileprint.png diff --git a/demos/textedit/images/mac/filesave.png b/examples/richtext/textedit/images/mac/filesave.png similarity index 100% rename from demos/textedit/images/mac/filesave.png rename to examples/richtext/textedit/images/mac/filesave.png diff --git a/demos/textedit/images/mac/textbold.png b/examples/richtext/textedit/images/mac/textbold.png similarity index 100% rename from demos/textedit/images/mac/textbold.png rename to examples/richtext/textedit/images/mac/textbold.png diff --git a/demos/textedit/images/mac/textcenter.png b/examples/richtext/textedit/images/mac/textcenter.png similarity index 100% rename from demos/textedit/images/mac/textcenter.png rename to examples/richtext/textedit/images/mac/textcenter.png diff --git a/demos/textedit/images/mac/textitalic.png b/examples/richtext/textedit/images/mac/textitalic.png similarity index 100% rename from demos/textedit/images/mac/textitalic.png rename to examples/richtext/textedit/images/mac/textitalic.png diff --git a/demos/textedit/images/mac/textjustify.png b/examples/richtext/textedit/images/mac/textjustify.png similarity index 100% rename from demos/textedit/images/mac/textjustify.png rename to examples/richtext/textedit/images/mac/textjustify.png diff --git a/demos/textedit/images/mac/textleft.png b/examples/richtext/textedit/images/mac/textleft.png similarity index 100% rename from demos/textedit/images/mac/textleft.png rename to examples/richtext/textedit/images/mac/textleft.png diff --git a/demos/textedit/images/mac/textright.png b/examples/richtext/textedit/images/mac/textright.png similarity index 100% rename from demos/textedit/images/mac/textright.png rename to examples/richtext/textedit/images/mac/textright.png diff --git a/demos/textedit/images/mac/textunder.png b/examples/richtext/textedit/images/mac/textunder.png similarity index 100% rename from demos/textedit/images/mac/textunder.png rename to examples/richtext/textedit/images/mac/textunder.png diff --git a/demos/textedit/images/mac/zoomin.png b/examples/richtext/textedit/images/mac/zoomin.png similarity index 100% rename from demos/textedit/images/mac/zoomin.png rename to examples/richtext/textedit/images/mac/zoomin.png diff --git a/demos/textedit/images/mac/zoomout.png b/examples/richtext/textedit/images/mac/zoomout.png similarity index 100% rename from demos/textedit/images/mac/zoomout.png rename to examples/richtext/textedit/images/mac/zoomout.png diff --git a/demos/textedit/images/win/editcopy.png b/examples/richtext/textedit/images/win/editcopy.png similarity index 100% rename from demos/textedit/images/win/editcopy.png rename to examples/richtext/textedit/images/win/editcopy.png diff --git a/demos/textedit/images/win/editcut.png b/examples/richtext/textedit/images/win/editcut.png similarity index 100% rename from demos/textedit/images/win/editcut.png rename to examples/richtext/textedit/images/win/editcut.png diff --git a/demos/textedit/images/win/editpaste.png b/examples/richtext/textedit/images/win/editpaste.png similarity index 100% rename from demos/textedit/images/win/editpaste.png rename to examples/richtext/textedit/images/win/editpaste.png diff --git a/demos/textedit/images/win/editredo.png b/examples/richtext/textedit/images/win/editredo.png similarity index 100% rename from demos/textedit/images/win/editredo.png rename to examples/richtext/textedit/images/win/editredo.png diff --git a/demos/textedit/images/win/editundo.png b/examples/richtext/textedit/images/win/editundo.png similarity index 100% rename from demos/textedit/images/win/editundo.png rename to examples/richtext/textedit/images/win/editundo.png diff --git a/demos/textedit/images/win/exportpdf.png b/examples/richtext/textedit/images/win/exportpdf.png similarity index 100% rename from demos/textedit/images/win/exportpdf.png rename to examples/richtext/textedit/images/win/exportpdf.png diff --git a/demos/textedit/images/win/filenew.png b/examples/richtext/textedit/images/win/filenew.png similarity index 100% rename from demos/textedit/images/win/filenew.png rename to examples/richtext/textedit/images/win/filenew.png diff --git a/demos/textedit/images/win/fileopen.png b/examples/richtext/textedit/images/win/fileopen.png similarity index 100% rename from demos/textedit/images/win/fileopen.png rename to examples/richtext/textedit/images/win/fileopen.png diff --git a/demos/textedit/images/win/fileprint.png b/examples/richtext/textedit/images/win/fileprint.png similarity index 100% rename from demos/textedit/images/win/fileprint.png rename to examples/richtext/textedit/images/win/fileprint.png diff --git a/demos/textedit/images/win/filesave.png b/examples/richtext/textedit/images/win/filesave.png similarity index 100% rename from demos/textedit/images/win/filesave.png rename to examples/richtext/textedit/images/win/filesave.png diff --git a/demos/textedit/images/win/textbold.png b/examples/richtext/textedit/images/win/textbold.png similarity index 100% rename from demos/textedit/images/win/textbold.png rename to examples/richtext/textedit/images/win/textbold.png diff --git a/demos/textedit/images/win/textcenter.png b/examples/richtext/textedit/images/win/textcenter.png similarity index 100% rename from demos/textedit/images/win/textcenter.png rename to examples/richtext/textedit/images/win/textcenter.png diff --git a/demos/textedit/images/win/textitalic.png b/examples/richtext/textedit/images/win/textitalic.png similarity index 100% rename from demos/textedit/images/win/textitalic.png rename to examples/richtext/textedit/images/win/textitalic.png diff --git a/demos/textedit/images/win/textjustify.png b/examples/richtext/textedit/images/win/textjustify.png similarity index 100% rename from demos/textedit/images/win/textjustify.png rename to examples/richtext/textedit/images/win/textjustify.png diff --git a/demos/textedit/images/win/textleft.png b/examples/richtext/textedit/images/win/textleft.png similarity index 100% rename from demos/textedit/images/win/textleft.png rename to examples/richtext/textedit/images/win/textleft.png diff --git a/demos/textedit/images/win/textright.png b/examples/richtext/textedit/images/win/textright.png similarity index 100% rename from demos/textedit/images/win/textright.png rename to examples/richtext/textedit/images/win/textright.png diff --git a/demos/textedit/images/win/textunder.png b/examples/richtext/textedit/images/win/textunder.png similarity index 100% rename from demos/textedit/images/win/textunder.png rename to examples/richtext/textedit/images/win/textunder.png diff --git a/demos/textedit/images/win/zoomin.png b/examples/richtext/textedit/images/win/zoomin.png similarity index 100% rename from demos/textedit/images/win/zoomin.png rename to examples/richtext/textedit/images/win/zoomin.png diff --git a/demos/textedit/images/win/zoomout.png b/examples/richtext/textedit/images/win/zoomout.png similarity index 100% rename from demos/textedit/images/win/zoomout.png rename to examples/richtext/textedit/images/win/zoomout.png diff --git a/demos/textedit/main.cpp b/examples/richtext/textedit/main.cpp similarity index 100% rename from demos/textedit/main.cpp rename to examples/richtext/textedit/main.cpp diff --git a/demos/textedit/textedit.cpp b/examples/richtext/textedit/textedit.cpp similarity index 100% rename from demos/textedit/textedit.cpp rename to examples/richtext/textedit/textedit.cpp diff --git a/demos/textedit/textedit.h b/examples/richtext/textedit/textedit.h similarity index 100% rename from demos/textedit/textedit.h rename to examples/richtext/textedit/textedit.h diff --git a/demos/textedit/textedit.pro b/examples/richtext/textedit/textedit.pro similarity index 100% rename from demos/textedit/textedit.pro rename to examples/richtext/textedit/textedit.pro diff --git a/demos/textedit/textedit.qdoc b/examples/richtext/textedit/textedit.qdoc similarity index 100% rename from demos/textedit/textedit.qdoc rename to examples/richtext/textedit/textedit.qdoc diff --git a/demos/textedit/textedit.qrc b/examples/richtext/textedit/textedit.qrc similarity index 100% rename from demos/textedit/textedit.qrc rename to examples/richtext/textedit/textedit.qrc diff --git a/demos/books/bookdelegate.cpp b/examples/sql/books/bookdelegate.cpp similarity index 100% rename from demos/books/bookdelegate.cpp rename to examples/sql/books/bookdelegate.cpp diff --git a/demos/books/bookdelegate.h b/examples/sql/books/bookdelegate.h similarity index 100% rename from demos/books/bookdelegate.h rename to examples/sql/books/bookdelegate.h diff --git a/demos/books/books.pro b/examples/sql/books/books.pro similarity index 100% rename from demos/books/books.pro rename to examples/sql/books/books.pro diff --git a/demos/books/books.qrc b/examples/sql/books/books.qrc similarity index 100% rename from demos/books/books.qrc rename to examples/sql/books/books.qrc diff --git a/demos/books/bookwindow.cpp b/examples/sql/books/bookwindow.cpp similarity index 100% rename from demos/books/bookwindow.cpp rename to examples/sql/books/bookwindow.cpp diff --git a/demos/books/bookwindow.h b/examples/sql/books/bookwindow.h similarity index 100% rename from demos/books/bookwindow.h rename to examples/sql/books/bookwindow.h diff --git a/demos/books/bookwindow.ui b/examples/sql/books/bookwindow.ui similarity index 100% rename from demos/books/bookwindow.ui rename to examples/sql/books/bookwindow.ui diff --git a/demos/books/images/star.png b/examples/sql/books/images/star.png similarity index 100% rename from demos/books/images/star.png rename to examples/sql/books/images/star.png diff --git a/demos/books/initdb.h b/examples/sql/books/initdb.h similarity index 100% rename from demos/books/initdb.h rename to examples/sql/books/initdb.h diff --git a/demos/books/main.cpp b/examples/sql/books/main.cpp similarity index 100% rename from demos/books/main.cpp rename to examples/sql/books/main.cpp diff --git a/demos/sqlbrowser/browser.cpp b/examples/sql/sqlbrowser/browser.cpp similarity index 100% rename from demos/sqlbrowser/browser.cpp rename to examples/sql/sqlbrowser/browser.cpp diff --git a/demos/sqlbrowser/browser.h b/examples/sql/sqlbrowser/browser.h similarity index 100% rename from demos/sqlbrowser/browser.h rename to examples/sql/sqlbrowser/browser.h diff --git a/demos/sqlbrowser/browserwidget.ui b/examples/sql/sqlbrowser/browserwidget.ui similarity index 100% rename from demos/sqlbrowser/browserwidget.ui rename to examples/sql/sqlbrowser/browserwidget.ui diff --git a/demos/sqlbrowser/connectionwidget.cpp b/examples/sql/sqlbrowser/connectionwidget.cpp similarity index 100% rename from demos/sqlbrowser/connectionwidget.cpp rename to examples/sql/sqlbrowser/connectionwidget.cpp diff --git a/demos/sqlbrowser/connectionwidget.h b/examples/sql/sqlbrowser/connectionwidget.h similarity index 100% rename from demos/sqlbrowser/connectionwidget.h rename to examples/sql/sqlbrowser/connectionwidget.h diff --git a/demos/sqlbrowser/main.cpp b/examples/sql/sqlbrowser/main.cpp similarity index 100% rename from demos/sqlbrowser/main.cpp rename to examples/sql/sqlbrowser/main.cpp diff --git a/demos/sqlbrowser/qsqlconnectiondialog.cpp b/examples/sql/sqlbrowser/qsqlconnectiondialog.cpp similarity index 100% rename from demos/sqlbrowser/qsqlconnectiondialog.cpp rename to examples/sql/sqlbrowser/qsqlconnectiondialog.cpp diff --git a/demos/sqlbrowser/qsqlconnectiondialog.h b/examples/sql/sqlbrowser/qsqlconnectiondialog.h similarity index 100% rename from demos/sqlbrowser/qsqlconnectiondialog.h rename to examples/sql/sqlbrowser/qsqlconnectiondialog.h diff --git a/demos/sqlbrowser/qsqlconnectiondialog.ui b/examples/sql/sqlbrowser/qsqlconnectiondialog.ui similarity index 100% rename from demos/sqlbrowser/qsqlconnectiondialog.ui rename to examples/sql/sqlbrowser/qsqlconnectiondialog.ui diff --git a/demos/sqlbrowser/sqlbrowser.pro b/examples/sql/sqlbrowser/sqlbrowser.pro similarity index 100% rename from demos/sqlbrowser/sqlbrowser.pro rename to examples/sql/sqlbrowser/sqlbrowser.pro diff --git a/demos/undo/commands.cpp b/examples/tools/undo/commands.cpp similarity index 100% rename from demos/undo/commands.cpp rename to examples/tools/undo/commands.cpp diff --git a/demos/undo/commands.h b/examples/tools/undo/commands.h similarity index 100% rename from demos/undo/commands.h rename to examples/tools/undo/commands.h diff --git a/demos/undo/document.cpp b/examples/tools/undo/document.cpp similarity index 100% rename from demos/undo/document.cpp rename to examples/tools/undo/document.cpp diff --git a/demos/undo/document.h b/examples/tools/undo/document.h similarity index 100% rename from demos/undo/document.h rename to examples/tools/undo/document.h diff --git a/demos/undo/icons/background.png b/examples/tools/undo/icons/background.png similarity index 100% rename from demos/undo/icons/background.png rename to examples/tools/undo/icons/background.png diff --git a/demos/undo/icons/blue.png b/examples/tools/undo/icons/blue.png similarity index 100% rename from demos/undo/icons/blue.png rename to examples/tools/undo/icons/blue.png diff --git a/demos/undo/icons/circle.png b/examples/tools/undo/icons/circle.png similarity index 100% rename from demos/undo/icons/circle.png rename to examples/tools/undo/icons/circle.png diff --git a/demos/undo/icons/exit.png b/examples/tools/undo/icons/exit.png similarity index 100% rename from demos/undo/icons/exit.png rename to examples/tools/undo/icons/exit.png diff --git a/demos/undo/icons/fileclose.png b/examples/tools/undo/icons/fileclose.png similarity index 100% rename from demos/undo/icons/fileclose.png rename to examples/tools/undo/icons/fileclose.png diff --git a/demos/undo/icons/filenew.png b/examples/tools/undo/icons/filenew.png similarity index 100% rename from demos/undo/icons/filenew.png rename to examples/tools/undo/icons/filenew.png diff --git a/demos/undo/icons/fileopen.png b/examples/tools/undo/icons/fileopen.png similarity index 100% rename from demos/undo/icons/fileopen.png rename to examples/tools/undo/icons/fileopen.png diff --git a/demos/undo/icons/filesave.png b/examples/tools/undo/icons/filesave.png similarity index 100% rename from demos/undo/icons/filesave.png rename to examples/tools/undo/icons/filesave.png diff --git a/demos/undo/icons/green.png b/examples/tools/undo/icons/green.png similarity index 100% rename from demos/undo/icons/green.png rename to examples/tools/undo/icons/green.png diff --git a/demos/undo/icons/ok.png b/examples/tools/undo/icons/ok.png similarity index 100% rename from demos/undo/icons/ok.png rename to examples/tools/undo/icons/ok.png diff --git a/demos/undo/icons/rectangle.png b/examples/tools/undo/icons/rectangle.png similarity index 100% rename from demos/undo/icons/rectangle.png rename to examples/tools/undo/icons/rectangle.png diff --git a/demos/undo/icons/red.png b/examples/tools/undo/icons/red.png similarity index 100% rename from demos/undo/icons/red.png rename to examples/tools/undo/icons/red.png diff --git a/demos/undo/icons/redo.png b/examples/tools/undo/icons/redo.png similarity index 100% rename from demos/undo/icons/redo.png rename to examples/tools/undo/icons/redo.png diff --git a/demos/undo/icons/remove.png b/examples/tools/undo/icons/remove.png similarity index 100% rename from demos/undo/icons/remove.png rename to examples/tools/undo/icons/remove.png diff --git a/demos/undo/icons/triangle.png b/examples/tools/undo/icons/triangle.png similarity index 100% rename from demos/undo/icons/triangle.png rename to examples/tools/undo/icons/triangle.png diff --git a/demos/undo/icons/undo.png b/examples/tools/undo/icons/undo.png similarity index 100% rename from demos/undo/icons/undo.png rename to examples/tools/undo/icons/undo.png diff --git a/demos/undo/main.cpp b/examples/tools/undo/main.cpp similarity index 100% rename from demos/undo/main.cpp rename to examples/tools/undo/main.cpp diff --git a/demos/undo/mainwindow.cpp b/examples/tools/undo/mainwindow.cpp similarity index 100% rename from demos/undo/mainwindow.cpp rename to examples/tools/undo/mainwindow.cpp diff --git a/demos/undo/mainwindow.h b/examples/tools/undo/mainwindow.h similarity index 100% rename from demos/undo/mainwindow.h rename to examples/tools/undo/mainwindow.h diff --git a/demos/undo/mainwindow.ui b/examples/tools/undo/mainwindow.ui similarity index 100% rename from demos/undo/mainwindow.ui rename to examples/tools/undo/mainwindow.ui diff --git a/demos/undo/undo.pro b/examples/tools/undo/undo.pro similarity index 100% rename from demos/undo/undo.pro rename to examples/tools/undo/undo.pro diff --git a/demos/undo/undo.qrc b/examples/tools/undo/undo.qrc similarity index 100% rename from demos/undo/undo.qrc rename to examples/tools/undo/undo.qrc From 21aba7991592e792808ba4dfeb26fe2b9754544d Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Wed, 22 Jun 2011 14:58:03 +0200 Subject: [PATCH 37/41] Update sql and animation demos to be an example. Change-Id: I683383e2dab9428ea3fe4cfffba24bb7fefbc7c7 Reviewed-on: http://codereview.qt.nokia.com/618 Reviewed-by: Qt Sanity Bot Reviewed-by: David Boddie --- examples/animation/animation.pro | 1 + examples/animation/sub-attaq/sub-attaq.pro | 4 ++-- examples/sql/books/books.pro | 6 +++--- examples/sql/sql.pro | 8 +++++++- examples/sql/sqlbrowser/sqlbrowser.pro | 6 +++--- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/examples/animation/animation.pro b/examples/animation/animation.pro index 4a9064d97e..e5fa7c4a56 100644 --- a/examples/animation/animation.pro +++ b/examples/animation/animation.pro @@ -7,6 +7,7 @@ SUBDIRS += \ moveblocks \ states \ stickman \ + sub-attaq \ # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation diff --git a/examples/animation/sub-attaq/sub-attaq.pro b/examples/animation/sub-attaq/sub-attaq.pro index 5575f5e65f..ff3040490c 100644 --- a/examples/animation/sub-attaq/sub-attaq.pro +++ b/examples/animation/sub-attaq/sub-attaq.pro @@ -29,13 +29,13 @@ SOURCES += boat.cpp \ RESOURCES += subattaq.qrc # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/sub-attaq +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/sub-attaq sources.files = $$SOURCES \ $$HEADERS \ $$RESOURCES \ $$FORMS \ sub-attaq.pro \ pics -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/sub-attaq +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/animation/sub-attaq INSTALLS += target \ sources diff --git a/examples/sql/books/books.pro b/examples/sql/books/books.pro index 1588288f3e..42bb2c2ea3 100644 --- a/examples/sql/books/books.pro +++ b/examples/sql/books/books.pro @@ -8,12 +8,12 @@ FORMS = bookwindow.ui QT += sql -target.path = $$[QT_INSTALL_DEMOS]/qtbase/books +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/books sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro images -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/books +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/books INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian: CONFIG += qt_example wince*: { CONFIG(debug, debug|release):sqlPlugins.files = $$QT_BUILD_TREE/plugins/sqldrivers/*d4.dll diff --git a/examples/sql/sql.pro b/examples/sql/sql.pro index 56e4f89d9b..43f15e57eb 100644 --- a/examples/sql/sql.pro +++ b/examples/sql/sql.pro @@ -1,6 +1,7 @@ TEMPLATE = subdirs -SUBDIRS = drilldown +SUBDIRS = books \ + drilldown !symbian: SUBDIRS += cachedtable \ relationaltablemodel \ sqlwidgetmapper @@ -11,6 +12,11 @@ SUBDIRS = drilldown querymodel \ tablemodel +!cross_compile:{ + contains(QT_BUILD_PARTS, tools):{ + SUBDIRS += sqlbrowser + } +} # install sources.files = connection.h sql.pro README diff --git a/examples/sql/sqlbrowser/sqlbrowser.pro b/examples/sql/sqlbrowser/sqlbrowser.pro index dc6214622c..9ec26900ad 100644 --- a/examples/sql/sqlbrowser/sqlbrowser.pro +++ b/examples/sql/sqlbrowser/sqlbrowser.pro @@ -13,12 +13,12 @@ build_all:!build_pass { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/sqlbrowser +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/sqlbrowser sources.files = $$SOURCES $$HEADERS $$FORMS *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/sqlbrowser +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/sql/sqlbrowser INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian: CONFIG += qt_example wince*: { DEPLOYMENT_PLUGIN += qsqlite From 64cb29a25244348f9d4cd92aaa2b90d8d52120a2 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 23 Jun 2011 11:15:43 +0200 Subject: [PATCH 38/41] Add the graphicsview demo-examples to the build. Change-Id: I2f97985db9e547c37db00c32b2e1a1658f076f75 Reviewed-on: http://codereview.qt.nokia.com/684 Reviewed-by: Qt Sanity Bot Reviewed-by: David Boddie --- examples/graphicsview/boxes/boxes.pro | 4 ++-- examples/graphicsview/chip/chip.pro | 6 +++--- examples/graphicsview/embeddeddialogs/embeddeddialogs.pro | 6 +++--- examples/graphicsview/graphicsview.pro | 6 ++++++ 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/examples/graphicsview/boxes/boxes.pro b/examples/graphicsview/boxes/boxes.pro index d599a3a0ac..49de5a9e50 100644 --- a/examples/graphicsview/boxes/boxes.pro +++ b/examples/graphicsview/boxes/boxes.pro @@ -30,11 +30,11 @@ RESOURCES += boxes.qrc QT += opengl # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/boxes +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/boxes sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.html *.jpg *.png *.fsh *.vsh *.par sources.files -= 3rdparty/fbm.h 3rdparty/fbm.c sources.files += 3rdparty -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/boxes +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/boxes INSTALLS += target sources wince*: { diff --git a/examples/graphicsview/chip/chip.pro b/examples/graphicsview/chip/chip.pro index 1e1a7de735..aff551ef9f 100644 --- a/examples/graphicsview/chip/chip.pro +++ b/examples/graphicsview/chip/chip.pro @@ -12,9 +12,9 @@ build_all:!build_pass { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/chip +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/chip sources.files = $$SOURCES $$HEADERS $$RESOURCES *.png *.pro *.html *.doc images -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/chip +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/chip INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian: CONFIG += qt_example diff --git a/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro b/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro index 675a9889a2..31386063f6 100644 --- a/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro +++ b/examples/graphicsview/embeddeddialogs/embeddeddialogs.pro @@ -11,9 +11,9 @@ build_all:!build_pass { } # install -target.path = $$[QT_INSTALL_DEMOS]/qtbase/embeddeddialogs +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/embeddeddialogs sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.png *.jpg *.plist *.icns *.ico *.rc *.pro *.html *.doc images -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/embeddeddialogs +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview/embeddeddialogs INSTALLS += target sources -symbian: CONFIG += qt_demo +symbian: CONFIG += qt_example diff --git a/examples/graphicsview/graphicsview.pro b/examples/graphicsview/graphicsview.pro index d1b0e86e7f..190c48a596 100644 --- a/examples/graphicsview/graphicsview.pro +++ b/examples/graphicsview/graphicsview.pro @@ -1,6 +1,8 @@ TEMPLATE = subdirs SUBDIRS = \ + chip \ elasticnodes \ + embeddeddialogs \ collidingmice \ padnavigator \ basicgraphicslayouts @@ -15,6 +17,10 @@ SUBDIRS = \ contains(DEFINES, QT_NO_CURSOR)|contains(DEFINES, QT_NO_DRAGANDDROP): SUBDIRS -= dragdroprobot +contains(QT_CONFIG, opengl):!contains(QT_CONFIG, opengles1):!contains(QT_CONFIG, opengles2):{ + SUBDIRS += boxes +} + # install target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/graphicsview sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS graphicsview.pro README From ebfbac6145e75b5f6c9d2f6cf2befce41c7fadd2 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 23 Jun 2011 16:59:09 +0200 Subject: [PATCH 39/41] Add the embedded demos-examples to the build. Change-Id: Ib0a1e650913416e3ec05f1a86c139844a814f8bf Reviewed-on: http://codereview.qt.nokia.com/686 Reviewed-by: Qt Sanity Bot Reviewed-by: David Boddie --- examples/embedded/digiflip/digiflip.pro | 6 +++--- examples/embedded/embedded.pro | 2 +- examples/embedded/flickable/flickable.pro | 6 +++--- examples/embedded/flightinfo/flightinfo.pro | 6 +++--- examples/embedded/lightmaps/lightmaps.pro | 6 +++--- examples/embedded/raycasting/raycasting.pro | 6 +++--- examples/examples.pro | 2 ++ 7 files changed, 18 insertions(+), 16 deletions(-) diff --git a/examples/embedded/digiflip/digiflip.pro b/examples/embedded/digiflip/digiflip.pro index 7fa06fa90a..cd64f7cba6 100644 --- a/examples/embedded/digiflip/digiflip.pro +++ b/examples/embedded/digiflip/digiflip.pro @@ -2,10 +2,10 @@ SOURCES = digiflip.cpp symbian { TARGET.UID3 = 0xA000CF72 - CONFIG += qt_demo + CONFIG += qt_example } -target.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/digiflip +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/digiflip sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/digiflip +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/digiflip INSTALLS += target sources diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro index e9a448b1e3..2159b1931a 100644 --- a/examples/embedded/embedded.pro +++ b/examples/embedded/embedded.pro @@ -6,7 +6,7 @@ SUBDIRS += flightinfo # install sources.files = README *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded INSTALLS += sources symbian: CONFIG += qt_demo diff --git a/examples/embedded/flickable/flickable.pro b/examples/embedded/flickable/flickable.pro index 6ee744bc63..e90e64f89f 100644 --- a/examples/embedded/flickable/flickable.pro +++ b/examples/embedded/flickable/flickable.pro @@ -3,10 +3,10 @@ HEADERS = flickable.h symbian { TARGET.UID3 = 0xA000CF73 - CONFIG += qt_demo + CONFIG += qt_example } -target.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/flickable +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/flickable +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flickable INSTALLS += target sources diff --git a/examples/embedded/flightinfo/flightinfo.pro b/examples/embedded/flightinfo/flightinfo.pro index a33423f543..9fce741b9c 100644 --- a/examples/embedded/flightinfo/flightinfo.pro +++ b/examples/embedded/flightinfo/flightinfo.pro @@ -7,11 +7,11 @@ QT += network symbian { TARGET.UID3 = 0xA000CF74 - CONFIG += qt_demo + CONFIG += qt_example TARGET.CAPABILITY = NetworkServices } -target.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/flightinfo +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flightinfo sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/flightinfo +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/flightinfo INSTALLS += target sources diff --git a/examples/embedded/lightmaps/lightmaps.pro b/examples/embedded/lightmaps/lightmaps.pro index 2751c3a647..7622f88511 100644 --- a/examples/embedded/lightmaps/lightmaps.pro +++ b/examples/embedded/lightmaps/lightmaps.pro @@ -10,12 +10,12 @@ QT += network symbian { TARGET.UID3 = 0xA000CF75 - CONFIG += qt_demo + CONFIG += qt_example TARGET.CAPABILITY = NetworkServices TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } -target.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/lightmaps +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/lightmaps sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/lightmaps +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/lightmaps INSTALLS += target sources diff --git a/examples/embedded/raycasting/raycasting.pro b/examples/embedded/raycasting/raycasting.pro index a4bb1826b9..83103a5aad 100644 --- a/examples/embedded/raycasting/raycasting.pro +++ b/examples/embedded/raycasting/raycasting.pro @@ -4,10 +4,10 @@ RESOURCES += raycasting.qrc symbian { TARGET.UID3 = 0xA000CF76 - CONFIG += qt_demo + CONFIG += qt_example } -target.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/raycasting +target.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro -sources.path = $$[QT_INSTALL_DEMOS]/qtbase/embedded/raycasting +sources.path = $$[QT_INSTALL_EXAMPLES]/qtbase/embedded/raycasting INSTALLS += target sources diff --git a/examples/examples.pro b/examples/examples.pro index 9da2085675..3abcf22af7 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -48,6 +48,8 @@ symbian: SUBDIRS = \ SUBDIRS += multimedia } +wince*|symbian|embedded|x11:!contains(QT_CONFIG, no-gui): SUBDIRS += embedded + embedded:SUBDIRS += qws contains(QT_BUILD_PARTS, tools):!contains(QT_CONFIG, no-gui):SUBDIRS += qtestlib contains(QT_CONFIG, opengl): SUBDIRS += opengl From 3ff0f5f06d42913a749213a6ce1a88832f517273 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 23 Jun 2011 14:56:45 +0200 Subject: [PATCH 40/41] my changelog for 4.8.0 (cherry picked from commit 9d5b0e31f287ce502eaf9a2c0876d900424c80ab) Change-Id: If3d87498b7df94285d16982df55de9f318a26af2 Reviewed-on: http://codereview.qt.nokia.com/711 Reviewed-by: Qt Sanity Bot Reviewed-by: Peter Hartmann --- dist/changes-4.8.0 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index 170363352d..0fa44514d1 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -53,6 +53,7 @@ QtCore - QStringBuilder: added support for QByteArray - qSwap now uses std::swap, specialized std::swap for our container to work better with stl algoritms - QVariant: deprecated global function qVariantSetValue, qVariantValue, qVariantCanConvert, qVariantFromValue + - QUrl: add method for retrieving effective top level domain [QTBUG-13601] (MR-1205) QtGui ----- @@ -63,6 +64,21 @@ QtGui - QListView diverses optimisations [QTBUG-11438] - QTreeWidget/QListWidget: use localeAwareCompare for string comparisons [QTBUG-10839] +QtNetwork +--------- + + - SSL: Switch default version to TLS 1.0 + - SSL: enable Server Name Indication (SNI) by default + - QSslCertificate: report fraudulent certificates as invalid ("Comodogate") [QTBUG-18338] + - QSslCertificate: display non-ASCII names from subject and issuerInfo (MR-922) + - QSslCertificate: loat root certificates on demand on Unix (excluding Mac) [QTBUG-14016] + - QNetworkCookie: retain quotes in value attribute [QTBUG-17746] + - QNetworkCookie: allow spaces in unquoted values [QTBUG-18876] + - HTTP API: add support for HTTP multipart messages [QTBUG-6222] + - HTTP cache: do not load resources from cache that must be revalidated [QTBUG-18983] + - HTTP cache: change file organization (MR-2505) + + QtOpenGL -------- - Removed dependency of OpenGL Utility Library (GLU) From a06c8405d053b16327d65415f3335eceb37abd3b Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Thu, 23 Jun 2011 14:19:48 +0200 Subject: [PATCH 41/41] Add styleName to QFontDef comparison To make sure we cache different font engines with different style names. Task-number: QTBUG-19366 Change-Id: Iefaebd5418f212ff759e03c1745f839a7f23d013 Reviewed-on: http://codereview.qt.nokia.com/738 Reviewed-by: Qt Sanity Bot Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qfont.cpp | 1 + src/gui/text/qfont_p.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index d4c81b90db..e771b070ed 100644 --- a/src/gui/text/qfont.cpp +++ b/src/gui/text/qfont.cpp @@ -147,6 +147,7 @@ bool QFontDef::exactMatch(const QFontDef &other) const && weight == other.weight && style == other.style && this_family == other_family + && styleName == other.styleName && (this_foundry.isEmpty() || other_foundry.isEmpty() || this_foundry == other_foundry) diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h index 8eeae6ffc1..4ae31c38d6 100644 --- a/src/gui/text/qfont_p.h +++ b/src/gui/text/qfont_p.h @@ -113,6 +113,7 @@ struct QFontDef && styleStrategy == other.styleStrategy && ignorePitch == other.ignorePitch && fixedPitch == other.fixedPitch && family == other.family + && styleName == other.styleName && hintingPreference == other.hintingPreference #ifdef Q_WS_X11 && addStyle == other.addStyle @@ -128,6 +129,8 @@ struct QFontDef if (styleHint != other.styleHint) return styleHint < other.styleHint; if (styleStrategy != other.styleStrategy) return styleStrategy < other.styleStrategy; if (family != other.family) return family < other.family; + if (!styleName.isEmpty() && !other.styleName.isEmpty() && styleName != other.styleName) + return styleName < other.styleName; if (hintingPreference != other.hintingPreference) return hintingPreference < other.hintingPreference; #ifdef Q_WS_X11