From 4739a241722c20a4dade8f02b18a809fda94e942 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 24 Aug 2011 15:51:04 +0200 Subject: tests: Use CONFIG option instead of QDeclarativeDebugHelper class Change-Id: I84119a3164018a4179f8a7187348865a30b3237a --- tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro | 2 +- tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp | 4 ---- .../declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro | 2 ++ .../qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp | 4 ---- tests/auto/declarative/qdeclarativedebugjs/app/app.pro | 1 + tests/auto/declarative/qdeclarativedebugjs/app/main.cpp | 3 --- .../declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro | 2 +- .../qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp | 4 ---- 8 files changed, 5 insertions(+), 17 deletions(-) diff --git a/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro b/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro index 1214fcf..d488b53 100644 --- a/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro +++ b/tests/auto/declarative/qdeclarativedebug/qdeclarativedebug.pro @@ -6,5 +6,5 @@ HEADERS += ../shared/debugutil_p.h SOURCES += tst_qdeclarativedebug.cpp \ ../shared/debugutil.cpp -CONFIG += parallel_test +CONFIG += parallel_test declarative_debug diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 9c20bd6..d5ae040 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -59,7 +59,6 @@ #include #include #include -#include #include "../../../shared/util.h" #include "../shared/debugutil_p.h" @@ -296,9 +295,6 @@ void tst_QDeclarativeDebug::initTestCase() qRegisterMetaType(); qmlRegisterType("Test", 1, 0, "NonScriptPropertyElement"); - QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); - QDeclarativeDebugHelper::enableDebugging(); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 3768..."); m_engine = new QDeclarativeEngine(this); diff --git a/tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro b/tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro index a3afd99..8fa87d2 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro +++ b/tests/auto/declarative/qdeclarativedebugclient/qdeclarativedebugclient.pro @@ -5,3 +5,5 @@ macx:CONFIG -= app_bundle HEADERS += ../shared/debugutil_p.h SOURCES += tst_qdeclarativedebugclient.cpp \ ../shared/debugutil.cpp + +CONFIG += declarative_debug diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index d41cfa3..1599cab 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -51,7 +51,6 @@ #include #include #include -#include #include "../../../shared/util.h" #include "../shared/debugutil_p.h" @@ -73,9 +72,6 @@ private slots: void tst_QDeclarativeDebugClient::initTestCase() { - QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); - QDeclarativeDebugHelper::enableDebugging(); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 13770..."); new QDeclarativeEngine(this); diff --git a/tests/auto/declarative/qdeclarativedebugjs/app/app.pro b/tests/auto/declarative/qdeclarativedebugjs/app/app.pro index 800c033..d1c0cdd 100644 --- a/tests/auto/declarative/qdeclarativedebugjs/app/app.pro +++ b/tests/auto/declarative/qdeclarativedebugjs/app/app.pro @@ -1,6 +1,7 @@ TEMPLATE = app QT += declarative +CONFIG += declarative_debug CONFIG += console CONFIG -= app_bundle diff --git a/tests/auto/declarative/qdeclarativedebugjs/app/main.cpp b/tests/auto/declarative/qdeclarativedebugjs/app/main.cpp index f5b830e..fe58502 100644 --- a/tests/auto/declarative/qdeclarativedebugjs/app/main.cpp +++ b/tests/auto/declarative/qdeclarativedebugjs/app/main.cpp @@ -44,13 +44,10 @@ #include #include #include -#include #include int main(int argc, char *argv[]) { - QDeclarativeDebugHelper::enableDebugging(); - QApplication app(argc, argv); const QUrl path = QUrl::fromLocalFile(app.arguments().last()); diff --git a/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro index a62e148..ca5a398 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro +++ b/tests/auto/declarative/qdeclarativedebugservice/qdeclarativedebugservice.pro @@ -6,5 +6,5 @@ HEADERS += ../shared/debugutil_p.h SOURCES += tst_qdeclarativedebugservice.cpp \ ../shared/debugutil.cpp -CONFIG += parallel_test +CONFIG += parallel_test declarative_debug diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 3fa8bba..74f549c 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -46,7 +46,6 @@ #include #include -#include #include #include @@ -76,9 +75,6 @@ private slots: void tst_QDeclarativeDebugService::initTestCase() { - QTest::ignoreMessage(QtWarningMsg, "Qml debugging is enabled. Only use this in a safe environment!"); - QDeclarativeDebugHelper::enableDebugging(); - QTest::ignoreMessage(QtWarningMsg, "QDeclarativeDebugServer: Waiting for connection on port 13769..."); new QDeclarativeEngine(this); -- cgit v0.12 From 4b52d866748c848184c3d5f314ba6d84fd8f8d5c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 24 Aug 2011 15:53:12 +0200 Subject: Add qdeclarativedebugjs autotests to declarative.pro We forgot about this in the original commit. Change-Id: Ic88c6155e0f95bb8d93629489ab6c95b1844bca7 Reviewed-by: TrustMe --- tests/auto/declarative/declarative.pro | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 72c32cb..08d59d3 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -39,6 +39,7 @@ contains(QT_CONFIG, private_tests) { qdeclarativedebug \ qdeclarativedebugclient \ qdeclarativedebugservice \ + qdeclarativedebugjs \ qdeclarativedom \ qdeclarativeecmascript \ qdeclarativeflickable \ -- cgit v0.12 From 3074b010734f8bc3e982c42473e6c39a63e4cce0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 25 Aug 2011 15:37:05 +0200 Subject: QDeclarativeDebugJs: Disable unstable autotest The application might get the COVERAGE false message before anything is executed. Change-Id: Iafa26e527757a76a1e8502c362ba767acfe87e75 Reviewed-by: Aurindam Jana --- .../declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp index 1990c0d..f841272 100644 --- a/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp +++ b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp @@ -1431,8 +1431,10 @@ void tst_QDeclarativeDebugJS::testCoverageRun() client.startCoverageRun(); client.startCoverageCompleted(); - QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(coverageScriptLoaded()))); - QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(coveragePosChanged()))); + + // The app might get "COVERAGE false" before anything is actually executed + //QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(coverageScriptLoaded()))); + //QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(coveragePosChanged()))); //QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(coverageFuncEntered()))); //QVERIFY(QDeclarativeDebugTest::waitForSignal(&client, SIGNAL(coverageFuncExited()))); } -- cgit v0.12 From 01f09542782ce87483979d9e817b95d55a3b28d3 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 15 Aug 2011 13:44:44 +1000 Subject: FocusScope's focusItem must always be a descendent Task-number: QTBUG-20699 Reviewed-by: Michael Brasser --- src/gui/graphicsview/qgraphicsitem.cpp | 34 ++++++++++++++------------ tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 32 ++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 16 deletions(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 2ac2bdf..0c218fc 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1171,24 +1171,26 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q // Update focus scope item ptr in new scope. QGraphicsItem *newFocusScopeItem = subFocusItem ? subFocusItem : parentFocusScopeItem; if (newFocusScopeItem && newParent) { - if (subFocusItem) { - // Find the subFocusItem's topmost focus scope. - QGraphicsItem *ancestorScope = 0; - QGraphicsItem *p = subFocusItem->d_ptr->parent; - while (p) { - if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) - ancestorScope = p; - if (p->d_ptr->flags & QGraphicsItem::ItemIsPanel) - break; - p = p->d_ptr->parent; - } - if (ancestorScope) - newFocusScopeItem = ancestorScope; - } - QGraphicsItem *p = newParent; while (p) { if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) { + if (subFocusItem && subFocusItem != q_ptr) { + // Find the subFocusItem's topmost focus scope within the new parent's focusscope + QGraphicsItem *ancestorScope = 0; + QGraphicsItem *p2 = subFocusItem->d_ptr->parent; + while (p2 && p2 != p) { + if (p2->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) + ancestorScope = p2; + if (p2->d_ptr->flags & QGraphicsItem::ItemIsPanel) + break; + if (p2 == q_ptr) + break; + p2 = p2->d_ptr->parent; + } + if (ancestorScope) + newFocusScopeItem = ancestorScope; + } + p->d_ptr->focusScopeItem = newFocusScopeItem; newFocusScopeItem->d_ptr->focusScopeItemChange(true); // Ensure the new item is no longer the subFocusItem. The @@ -3297,7 +3299,7 @@ void QGraphicsItemPrivate::setFocusHelper(Qt::FocusReason focusReason, bool clim } if (climb) { - while (f->d_ptr->focusScopeItem && f->d_ptr->focusScopeItem->isVisible() && f->d_ptr->focusScopeItem != f) + while (f->d_ptr->focusScopeItem && f->d_ptr->focusScopeItem->isVisible()) f = f->d_ptr->focusScopeItem; } diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 3665b10..9b834d5 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -475,6 +475,7 @@ private slots: void QTBUG_12112_focusItem(); void QTBUG_13473_sceneposchange(); void QTBUG_16374_crashInDestructor(); + void QTBUG_20699_focusScopeCrash(); private: QList paintedItems; @@ -11265,5 +11266,36 @@ void tst_QGraphicsItem::QTBUG_16374_crashInDestructor() QTest::qWaitForWindowShown(&view); } +void tst_QGraphicsItem::QTBUG_20699_focusScopeCrash() +{ + QGraphicsScene scene; + QGraphicsView view(&scene); + QGraphicsPixmapItem fs; + fs.setFlags(QGraphicsItem::ItemIsFocusScope | QGraphicsItem::ItemIsFocusable); + scene.addItem(&fs); + QGraphicsPixmapItem* fs2 = new QGraphicsPixmapItem(&fs); + fs2->setFlags(QGraphicsItem::ItemIsFocusScope | QGraphicsItem::ItemIsFocusable); + QGraphicsPixmapItem* fi2 = new QGraphicsPixmapItem(&fs); + fi2->setFlags(QGraphicsItem::ItemIsFocusable); + QGraphicsPixmapItem* fi = new QGraphicsPixmapItem(fs2); + fi->setFlags(QGraphicsItem::ItemIsFocusable); + fs.setFocus(); + fi->setFocus(); + + view.show(); + QTest::qWaitForWindowShown(&view); + + fi->setParentItem(fi2); + fi->setFocus(); + fs.setFocus(); + fi->setParentItem(fs2); + fi->setFocus(); + fs2->setFocus(); + fs.setFocus(); + fi->setParentItem(fi2); + fi->setFocus(); + fs.setFocus(); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From f79ce83f487b384133a2657f33f7c2853d8e89a2 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 1 Sep 2011 15:14:42 +0200 Subject: Add a brief to all demos and examples for manifest Conflicts: doc/src/examples/broadcastreceiver.qdoc doc/src/examples/combowidgetmapper.qdoc doc/src/examples/dragdroprobot.qdoc doc/src/examples/elasticnodes.qdoc doc/src/examples/fademessage.qdoc doc/src/examples/fingerpaint.qdoc doc/src/examples/portedasteroids.qdoc doc/src/examples/portedcanvas.qdoc doc/src/examples/qml-examples.qdoc doc/src/examples/recipes.qdoc doc/src/examples/rsslisting.qdoc doc/src/examples/schema.qdoc --- doc/src/demos/affine.qdoc | 2 +- doc/src/demos/anomaly.qdoc | 2 + doc/src/demos/arthurplugin.qdoc | 2 +- doc/src/demos/books.qdoc | 2 +- doc/src/demos/boxes.qdoc | 2 +- doc/src/demos/browser.qdoc | 2 +- doc/src/demos/chip.qdoc | 2 +- doc/src/demos/composition.qdoc | 2 +- doc/src/demos/deform.qdoc | 2 +- doc/src/demos/desktopservices.qdoc | 2 + doc/src/demos/digiflip.qdoc | 3 + doc/src/demos/embeddeddialogs.qdoc | 2 +- doc/src/demos/embeddedsvgviewer.qdoc | 2 + doc/src/demos/flickable.qdoc | 2 + doc/src/demos/flightinfo.qdoc | 2 + doc/src/demos/fluidlauncher.qdoc | 2 + doc/src/demos/gradients.qdoc | 2 +- doc/src/demos/interview.qdoc | 2 +- doc/src/demos/lightmaps.qdoc | 2 + doc/src/demos/macmainwindow.qdoc | 2 +- doc/src/demos/mainwindow.qdoc | 2 +- doc/src/demos/mediaplayer.qdoc | 2 +- doc/src/demos/pathstroke.qdoc | 2 +- doc/src/demos/qtdemo.qdoc | 2 +- doc/src/demos/raycasting.qdoc | 2 + doc/src/demos/spectrum.qdoc | 2 +- doc/src/demos/spreadsheet.qdoc | 2 +- doc/src/demos/sqlbrowser.qdoc | 2 +- doc/src/demos/styledemo.qdoc | 2 + doc/src/demos/sub-attaq.qdoc | 2 +- doc/src/demos/textedit.qdoc | 2 +- doc/src/demos/undo.qdoc | 2 +- doc/src/demos/weatherinfo.qdoc | 2 + doc/src/examples/2dpainting.qdoc | 2 +- doc/src/examples/activeqt/comapp.qdoc | 10 +- doc/src/examples/activeqt/dotnet.qdoc | 2 +- doc/src/examples/activeqt/hierarchy.qdoc | 2 +- doc/src/examples/activeqt/multiple.qdoc | 3 +- doc/src/examples/activeqt/qutlook.qdoc | 2 +- doc/src/examples/activeqt/webbrowser.qdoc | 2 +- doc/src/examples/activeqt/wrapper.qdoc | 6 +- doc/src/examples/analogclock.qdoc | 2 +- doc/src/examples/animatedtiles.qdoc | 2 +- doc/src/examples/appchooser.qdoc | 2 +- doc/src/examples/application.qdoc | 2 +- doc/src/examples/applicationicon.qdoc | 3 +- doc/src/examples/arrowpad.qdoc | 2 +- doc/src/examples/audiodevices.qdoc | 2 +- doc/src/examples/audioinput.qdoc | 2 +- doc/src/examples/audiooutput.qdoc | 2 +- doc/src/examples/basicdrawing.qdoc | 2 +- doc/src/examples/basicgraphicslayouts.qdoc | 4 +- doc/src/examples/basiclayouts.qdoc | 2 +- doc/src/examples/basicsortfiltermodel.qdoc | 2 +- doc/src/examples/bearercloud.qdoc | 2 +- doc/src/examples/bearermonitor.qdoc | 2 +- doc/src/examples/blockingfortuneclient.qdoc | 2 +- doc/src/examples/blurpicker.qdoc | 2 + doc/src/examples/borderlayout.qdoc | 2 +- doc/src/examples/broadcastreceiver.qdoc | 2 +- doc/src/examples/broadcastsender.qdoc | 2 +- doc/src/examples/cachedtable.qdoc | 2 +- doc/src/examples/calculator.qdoc | 2 +- doc/src/examples/calculatorbuilder.qdoc | 2 +- doc/src/examples/calculatorform.qdoc | 6 +- doc/src/examples/calendar.qdoc | 2 +- doc/src/examples/calendarwidget.qdoc | 2 +- doc/src/examples/capabilitiesexample.qdoc | 2 +- doc/src/examples/charactermap.qdoc | 2 +- doc/src/examples/chart.qdoc | 2 +- doc/src/examples/classwizard.qdoc | 2 +- doc/src/examples/codecs.qdoc | 2 +- doc/src/examples/codeeditor.qdoc | 2 +- doc/src/examples/collidingmice-example.qdoc | 4 +- doc/src/examples/coloreditorfactory.qdoc | 4 +- doc/src/examples/combowidgetmapper.qdoc | 2 +- doc/src/examples/completer.qdoc | 2 +- doc/src/examples/complexpingpong.qdoc | 2 +- doc/src/examples/concentriccircles.qdoc | 2 +- doc/src/examples/configdialog.qdoc | 2 +- doc/src/examples/containerextension.qdoc | 2 +- doc/src/examples/context2d.qdoc | 2 +- doc/src/examples/contextsensitivehelp.qdoc | 2 +- doc/src/examples/contiguouscache.qdoc | 6 +- doc/src/examples/cube.qdoc | 6 +- doc/src/examples/customcompleter.qdoc | 6 +- doc/src/examples/customsortfiltermodel.qdoc | 2 +- doc/src/examples/customtype.qdoc | 2 +- doc/src/examples/customtypesending.qdoc | 2 +- doc/src/examples/customwidgetplugin.qdoc | 2 +- doc/src/examples/dbscreen.qdoc | 2 +- doc/src/examples/dbus-chat.qdoc | 2 +- doc/src/examples/dbus-listnames.qdoc | 2 +- doc/src/examples/dbus-pingpong.qdoc | 2 +- doc/src/examples/dbus-remotecontrolledcar.qdoc | 2 +- doc/src/examples/defaultprototypes.qdoc | 2 +- doc/src/examples/delayedencoding.qdoc | 2 +- doc/src/examples/diagramscene.qdoc | 6 +- doc/src/examples/digitalclock.qdoc | 2 +- doc/src/examples/dirview.qdoc | 2 +- doc/src/examples/dockwidgets.qdoc | 2 +- doc/src/examples/dombookmarks.qdoc | 7 +- doc/src/examples/domtraversal.qdoc | 2 +- doc/src/examples/draganddroppuzzle.qdoc | 2 +- doc/src/examples/dragdroprobot.qdoc | 2 +- doc/src/examples/draggableicons.qdoc | 2 +- doc/src/examples/draggabletext.qdoc | 2 +- doc/src/examples/drilldown.qdoc | 2 +- doc/src/examples/dropsite.qdoc | 2 +- doc/src/examples/dynamiclayouts.qdoc | 2 +- doc/src/examples/easing.qdoc | 2 +- doc/src/examples/echoplugin.qdoc | 2 +- doc/src/examples/editabletreemodel.qdoc | 4 +- doc/src/examples/elasticnodes.qdoc | 6 +- doc/src/examples/elidedlabel.qdoc | 2 +- doc/src/examples/eventtransitions.qdoc | 2 +- doc/src/examples/extension.qdoc | 2 +- doc/src/examples/factorial.qdoc | 2 +- doc/src/examples/fademessage.qdoc | 9 +- doc/src/examples/fancybrowser.qdoc | 2 +- doc/src/examples/fetchmore.qdoc | 2 +- doc/src/examples/filetree.qdoc | 2 +- doc/src/examples/findfiles.qdoc | 6 +- doc/src/examples/fingerpaint.qdoc | 2 +- doc/src/examples/flowlayout.qdoc | 2 +- doc/src/examples/fontsampler.qdoc | 2 +- doc/src/examples/formextractor.qdoc | 2 +- doc/src/examples/fortuneclient.qdoc | 6 +- doc/src/examples/fortuneserver.qdoc | 6 +- doc/src/examples/framebufferobject.qdoc | 2 +- doc/src/examples/framebufferobject2.qdoc | 2 +- doc/src/examples/fridgemagnets.qdoc | 2 +- doc/src/examples/frozencolumn.qdoc | 2 +- doc/src/examples/ftp.qdoc | 2 +- doc/src/examples/globalVariables.qdoc | 2 +- doc/src/examples/googlechat.qdoc | 2 +- doc/src/examples/googlesuggest.qdoc | 2 +- doc/src/examples/grabber.qdoc | 2 +- doc/src/examples/graphicsview-anchorlayout.qdoc | 2 +- doc/src/examples/graphicsview-flowlayout.qdoc | 2 +- .../examples/graphicsview-simpleanchorlayout.qdoc | 2 +- .../examples/graphicsview-weatheranchorlayout.qdoc | 2 +- doc/src/examples/groupbox.qdoc | 2 +- doc/src/examples/hellogl.qdoc | 2 +- doc/src/examples/hellogl_es.qdoc | 2 +- doc/src/examples/helloscript.qdoc | 6 +- doc/src/examples/hellotr.qdoc | 5 +- doc/src/examples/htmlinfo.qdoc | 2 +- doc/src/examples/http.qdoc | 2 +- doc/src/examples/i18n.qdoc | 6 +- doc/src/examples/icons.qdoc | 6 +- doc/src/examples/imagecomposition.qdoc | 2 +- doc/src/examples/imagegestures.qdoc | 2 +- doc/src/examples/imageviewer.qdoc | 6 +- doc/src/examples/inputpanel.qdoc | 2 +- doc/src/examples/itemviewspuzzle.qdoc | 2 +- doc/src/examples/licensewizard.qdoc | 2 +- doc/src/examples/lighting.qdoc | 2 + doc/src/examples/lineedits.qdoc | 2 +- doc/src/examples/localfortuneclient.qdoc | 6 +- doc/src/examples/localfortuneserver.qdoc | 6 +- doc/src/examples/loopback.qdoc | 2 +- doc/src/examples/maemovibration.qdoc | 2 +- doc/src/examples/mandelbrot.qdoc | 2 +- doc/src/examples/masterdetail.qdoc | 6 +- doc/src/examples/mdi.qdoc | 2 +- doc/src/examples/menus.qdoc | 2 +- doc/src/examples/mousecalibration.qdoc | 2 +- doc/src/examples/moveblocks.qdoc | 2 +- doc/src/examples/movie.qdoc | 6 +- doc/src/examples/multipleinheritance.qdoc | 2 +- doc/src/examples/musicplayerexample.qdoc | 3 +- doc/src/examples/network-chat.qdoc | 2 +- doc/src/examples/network-download.qdoc | 2 +- doc/src/examples/network-downloadmanager.qdoc | 2 +- doc/src/examples/openvg-star.qdoc | 2 +- doc/src/examples/orderform.qdoc | 7 +- doc/src/examples/orientation.qdoc | 2 +- doc/src/examples/overpainting.qdoc | 2 +- doc/src/examples/padnavigator.qdoc | 2 +- doc/src/examples/painterpaths.qdoc | 2 +- doc/src/examples/pbuffers.qdoc | 2 +- doc/src/examples/pbuffers2.qdoc | 2 +- doc/src/examples/pinchzoom.qdoc | 2 +- doc/src/examples/pingpong.qdoc | 2 +- doc/src/examples/pixelator.qdoc | 2 +- doc/src/examples/plugandpaint.qdoc | 2 +- doc/src/examples/portedasteroids.qdoc | 2 +- doc/src/examples/portedcanvas.qdoc | 2 +- doc/src/examples/previewer.qdoc | 4 +- doc/src/examples/qml-calculator.qdoc | 2 +- doc/src/examples/qml-examples.qdoc | 194 +++++++++++++++------ doc/src/examples/qml-extending.qdoc | 3 +- doc/src/examples/qml-flickr.qdoc | 2 +- doc/src/examples/qml-folderlistmodel.qdoc | 4 +- doc/src/examples/qml-minehunt.qdoc | 2 +- doc/src/examples/qml-photoviewer.qdoc | 2 +- doc/src/examples/qml-rssnews.qdoc | 2 +- doc/src/examples/qml-samegame.qdoc | 2 +- doc/src/examples/qml-snake.qdoc | 2 +- doc/src/examples/qml-twitter.qdoc | 2 +- doc/src/examples/qml-webbrowser.qdoc | 4 +- doc/src/examples/qobjectxmlmodel.qdoc | 2 +- doc/src/examples/qtconcurrent-imagescaling.qdoc | 2 +- doc/src/examples/qtconcurrent-map.qdoc | 2 +- doc/src/examples/qtconcurrent-progressdialog.qdoc | 2 +- doc/src/examples/qtconcurrent-runfunction.qdoc | 2 +- doc/src/examples/qtconcurrent-wordcount.qdoc | 2 +- doc/src/examples/qtscriptcalculator.qdoc | 2 +- doc/src/examples/qtscriptcustomclass.qdoc | 2 +- doc/src/examples/qtscripttetrix.qdoc | 2 +- doc/src/examples/querymodel.qdoc | 2 +- doc/src/examples/queuedcustomtype.qdoc | 2 +- doc/src/examples/qxmlstreambookmarks.qdoc | 2 +- doc/src/examples/recentfiles.qdoc | 2 +- doc/src/examples/recipes.qdoc | 2 +- doc/src/examples/regexp.qdoc | 2 +- doc/src/examples/relationaltablemodel.qdoc | 2 +- doc/src/examples/remotecontrol.qdoc | 4 +- doc/src/examples/rogue.qdoc | 2 +- doc/src/examples/rsslisting.qdoc | 2 +- doc/src/examples/samplebuffers.qdoc | 2 +- doc/src/examples/saxbookmarks.qdoc | 6 +- doc/src/examples/schema.qdoc | 2 +- doc/src/examples/screenshot.qdoc | 2 +- doc/src/examples/scribble.qdoc | 2 +- doc/src/examples/script-marshal.qdoc | 2 +- doc/src/examples/script-qscript.qdoc | 2 +- doc/src/examples/script-qsdbg.qdoc | 2 +- doc/src/examples/sdi.qdoc | 2 +- doc/src/examples/securesocketclient.qdoc | 2 +- doc/src/examples/semaphores.qdoc | 2 +- doc/src/examples/settingseditor.qdoc | 2 +- doc/src/examples/shapedclock.qdoc | 2 +- doc/src/examples/sharedmemory.qdoc | 7 +- doc/src/examples/simpledecoration.qdoc | 2 +- doc/src/examples/simpledommodel.qdoc | 2 +- doc/src/examples/simpleselector.qdoc | 2 +- doc/src/examples/simpletextviewer.qdoc | 2 +- doc/src/examples/simpletreemodel.qdoc | 7 +- doc/src/examples/simplewidgetmapper.qdoc | 2 +- doc/src/examples/sipdialog.qdoc | 2 +- doc/src/examples/sliders.qdoc | 2 +- doc/src/examples/spinboxdelegate.qdoc | 2 +- doc/src/examples/spinboxes.qdoc | 2 +- doc/src/examples/sqlwidgetmapper.qdoc | 2 +- doc/src/examples/standarddialogs.qdoc | 2 +- doc/src/examples/stardelegate.qdoc | 2 +- doc/src/examples/states.qdoc | 2 +- doc/src/examples/stickman.qdoc | 2 +- doc/src/examples/styleplugin.qdoc | 2 +- doc/src/examples/styles.qdoc | 2 +- doc/src/examples/stylesheet.qdoc | 2 +- doc/src/examples/svgalib.qdoc | 6 +- doc/src/examples/svggenerator.qdoc | 2 +- doc/src/examples/svgviewer.qdoc | 2 +- doc/src/examples/symbianvibration.qdoc | 2 +- doc/src/examples/syntaxhighlighter.qdoc | 2 +- doc/src/examples/systray.qdoc | 3 +- doc/src/examples/tabdialog.qdoc | 2 +- doc/src/examples/tablemodel.qdoc | 2 +- doc/src/examples/tablet.qdoc | 2 +- doc/src/examples/taskmenuextension.qdoc | 2 +- doc/src/examples/tetrix.qdoc | 2 +- doc/src/examples/textfinder.qdoc | 6 +- doc/src/examples/textobject.qdoc | 2 +- doc/src/examples/textures.qdoc | 2 +- doc/src/examples/threadedfortuneserver.qdoc | 6 +- doc/src/examples/tooltips.qdoc | 2 +- doc/src/examples/torrent.qdoc | 2 +- doc/src/examples/touch-dials.qdoc | 2 +- doc/src/examples/touch-knobs.qdoc | 2 +- doc/src/examples/trafficinfo.qdoc | 2 +- doc/src/examples/trafficlight.qdoc | 2 +- doc/src/examples/transformations.qdoc | 2 +- doc/src/examples/treemodelcompleter.qdoc | 2 +- doc/src/examples/trivialwizard.qdoc | 2 +- doc/src/examples/trollprint.qdoc | 2 +- doc/src/examples/twowaybutton.qdoc | 2 +- doc/src/examples/undoframework.qdoc | 2 +- doc/src/examples/videographicsitem.qdoc | 2 +- doc/src/examples/videowidget.qdoc | 2 +- doc/src/examples/waitconditions.qdoc | 2 +- doc/src/examples/webkit-bridge-imageanalyzer.qdoc | 7 +- doc/src/examples/webkit-framecapture.qdoc | 2 +- doc/src/examples/widgets-softkeys.qdoc | 2 +- doc/src/examples/widgets-validators.qdoc | 2 +- doc/src/examples/wiggly.qdoc | 2 +- doc/src/examples/windowflags.qdoc | 2 +- doc/src/examples/worldtimeclockbuilder.qdoc | 2 +- doc/src/examples/worldtimeclockplugin.qdoc | 2 +- doc/src/examples/xmlstreamlint.qdoc | 2 +- 292 files changed, 549 insertions(+), 380 deletions(-) diff --git a/doc/src/demos/affine.qdoc b/doc/src/demos/affine.qdoc index adc1a78..912e412 100644 --- a/doc/src/demos/affine.qdoc +++ b/doc/src/demos/affine.qdoc @@ -29,7 +29,7 @@ \example demos/affine \title Affine Transformations - In this demo we show Qt's ability to perform affine transformations + \brief The Affine Transformations demo shows Qt's ability to perform affine transformations on painting operations. \image affine-demo.png diff --git a/doc/src/demos/anomaly.qdoc b/doc/src/demos/anomaly.qdoc index 9d19099..c6dfcf2 100644 --- a/doc/src/demos/anomaly.qdoc +++ b/doc/src/demos/anomaly.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/anomaly \title Anomaly Demonstration + \brief The anomaly demo shows a QtWebKit browser for mobile devices. + \image anomaly-demo.png */ diff --git a/doc/src/demos/arthurplugin.qdoc b/doc/src/demos/arthurplugin.qdoc index c5daf18..3d168e3 100644 --- a/doc/src/demos/arthurplugin.qdoc +++ b/doc/src/demos/arthurplugin.qdoc @@ -29,7 +29,7 @@ \example demos/arthurplugin \title Arthur Plugin - In this demo we demonstrate the abilities of Qt's painting system + \brief The Arthur Plugin demo demonstrates the abilities of Qt's painting system in combination with \QD's custom widget plugin facilities. \image arthurplugin-demo.png diff --git a/doc/src/demos/books.qdoc b/doc/src/demos/books.qdoc index 7eccd5b..220f5eb 100644 --- a/doc/src/demos/books.qdoc +++ b/doc/src/demos/books.qdoc @@ -29,7 +29,7 @@ \example demos/books \title Books Demonstration - The Books demonstration shows how Qt's SQL classes can be used with the model/view + \brief The Books demonstration shows how Qt's SQL classes can be used with the model/view framework to create rich user interfaces for information stored in a database. \image books-demo.png diff --git a/doc/src/demos/boxes.qdoc b/doc/src/demos/boxes.qdoc index 52ee63b..ae2cbe6 100644 --- a/doc/src/demos/boxes.qdoc +++ b/doc/src/demos/boxes.qdoc @@ -29,7 +29,7 @@ \example demos/boxes \title Boxes - This demo shows Qt's ability to combine advanced OpenGL rendering with the + \brief The Boxes demo shows Qt's ability to combine advanced OpenGL rendering with the the \l{Graphics View Framework}. \image boxes-demo.png diff --git a/doc/src/demos/browser.qdoc b/doc/src/demos/browser.qdoc index 2cfc933..61b869c 100644 --- a/doc/src/demos/browser.qdoc +++ b/doc/src/demos/browser.qdoc @@ -29,7 +29,7 @@ \page demos-browser.html \title Web Browser - The Web Browser demonstration shows Qt's WebKit module in action, + \brief The Web Browser demonstration shows Qt's WebKit module in action, providing a little Web browser application. \image browser-demo.png diff --git a/doc/src/demos/chip.qdoc b/doc/src/demos/chip.qdoc index eda0bed..fd1b3c7 100644 --- a/doc/src/demos/chip.qdoc +++ b/doc/src/demos/chip.qdoc @@ -29,7 +29,7 @@ \example demos/chip \title 40000 Chips - This demo shows how to visualize a huge scene with 40000 chip items + \brief The 40000 Chips demo shows how to visualize a huge scene with 40000 chip items using Graphics View. It also shows Graphics View's powerful navigation and interaction features, allowing you to zoom and rotate each of four views independently, and you can select and move items around the scene. diff --git a/doc/src/demos/composition.qdoc b/doc/src/demos/composition.qdoc index c2eadc7..23a2815 100644 --- a/doc/src/demos/composition.qdoc +++ b/doc/src/demos/composition.qdoc @@ -29,7 +29,7 @@ \example demos/composition \title Composition Modes - This demo shows some of the more advanced composition modes supported by Qt. + \brief The Composition Modes demo shows some of the more advanced composition modes supported by Qt. \image composition-demo.png diff --git a/doc/src/demos/deform.qdoc b/doc/src/demos/deform.qdoc index 7b11a9a..aa2a1ae 100644 --- a/doc/src/demos/deform.qdoc +++ b/doc/src/demos/deform.qdoc @@ -29,7 +29,7 @@ \example demos/deform \title Vector Deformation - This demo shows how to use advanced vector techniques to draw text + \brief The Vector Deformation demo shows how to use advanced vector techniques to draw text using a \c QPainterPath. \image deform-demo.png diff --git a/doc/src/demos/desktopservices.qdoc b/doc/src/demos/desktopservices.qdoc index f1abed8..c83605d 100644 --- a/doc/src/demos/desktopservices.qdoc +++ b/doc/src/demos/desktopservices.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/desktopservices \title Embedded Desktop Services Demonstration + \brief The Embedded Desktop Services demo shows the Qt Desktop Services API. + \image embeddeddesktopservices-demo.png */ diff --git a/doc/src/demos/digiflip.qdoc b/doc/src/demos/digiflip.qdoc index 33f083f..40172f2 100644 --- a/doc/src/demos/digiflip.qdoc +++ b/doc/src/demos/digiflip.qdoc @@ -27,5 +27,8 @@ /*! \example demos/embedded/digiflip + + \brief The Digiflip demo shows the Animation Framework in an embedded context. + \title Digiflip Demonstration */ diff --git a/doc/src/demos/embeddeddialogs.qdoc b/doc/src/demos/embeddeddialogs.qdoc index e80f76c..50ae6b6 100644 --- a/doc/src/demos/embeddeddialogs.qdoc +++ b/doc/src/demos/embeddeddialogs.qdoc @@ -29,7 +29,7 @@ \example demos/embeddeddialogs \title Embedded Dialogs - This example shows how to embed standard dialogs into + \brief The Embedded Dialogs demo shows how to embed standard dialogs into Graphics View. It also shows how you can customize the proxy class and add window shadows. diff --git a/doc/src/demos/embeddedsvgviewer.qdoc b/doc/src/demos/embeddedsvgviewer.qdoc index 044923a..063119f 100644 --- a/doc/src/demos/embeddedsvgviewer.qdoc +++ b/doc/src/demos/embeddedsvgviewer.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/embeddedsvgviewer \title Embedded SVG Viewer Demonstration + \brief The Embedded SVG Viewer demo shows Graphics View SVG rendering in an embedded context. + \image embeddedsvgviewer-demo.png */ diff --git a/doc/src/demos/flickable.qdoc b/doc/src/demos/flickable.qdoc index 540857b..4baea5b 100644 --- a/doc/src/demos/flickable.qdoc +++ b/doc/src/demos/flickable.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/flickable \title Flickable List Demonstration + \brief The Flickable List demo shows a flickable list in an embedded context. + \image flickable-demo.png */ diff --git a/doc/src/demos/flightinfo.qdoc b/doc/src/demos/flightinfo.qdoc index e812dbf..2942603 100644 --- a/doc/src/demos/flightinfo.qdoc +++ b/doc/src/demos/flightinfo.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/flightinfo \title Flight Info Demonstration + \brief The Flight Info demo shows requesting data from an external server in a mbile device context. + \image flightinfo-demo.png */ diff --git a/doc/src/demos/fluidlauncher.qdoc b/doc/src/demos/fluidlauncher.qdoc index 42623e8..2fe602a 100644 --- a/doc/src/demos/fluidlauncher.qdoc +++ b/doc/src/demos/fluidlauncher.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/fluidlauncher \title Fluid Launcher Demonstration + \brief The Fluid Launcher demo demonstrates an application launcher for mobile devices + \image fluidlauncher-demo.png */ diff --git a/doc/src/demos/gradients.qdoc b/doc/src/demos/gradients.qdoc index 1f29a4a..5c400a1 100644 --- a/doc/src/demos/gradients.qdoc +++ b/doc/src/demos/gradients.qdoc @@ -29,7 +29,7 @@ \example demos/gradients \title Gradients - In this demo we show the various types of gradients that can + \brief The Gradients demo shows the various types of gradients that can be used in Qt. \image gradients-demo.png diff --git a/doc/src/demos/interview.qdoc b/doc/src/demos/interview.qdoc index fa40ed2..7050cc3 100644 --- a/doc/src/demos/interview.qdoc +++ b/doc/src/demos/interview.qdoc @@ -29,7 +29,7 @@ \example demos/interview \title Interview - The Interview demonstration explores the flexibility and scalability of the + \brief The Interview demonstration explores the flexibility and scalability of the model/view framework by presenting an infinitely deep data structure using a model and three different types of view. diff --git a/doc/src/demos/lightmaps.qdoc b/doc/src/demos/lightmaps.qdoc index a8594f9..11eb3c3 100644 --- a/doc/src/demos/lightmaps.qdoc +++ b/doc/src/demos/lightmaps.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/lightmaps \title Light Maps Demonstration + \brief The Light Maps demo shows graphics effects in an embedded context. + \image lightmaps-demo.png */ diff --git a/doc/src/demos/macmainwindow.qdoc b/doc/src/demos/macmainwindow.qdoc index 31c0230..aaed304 100644 --- a/doc/src/demos/macmainwindow.qdoc +++ b/doc/src/demos/macmainwindow.qdoc @@ -29,7 +29,7 @@ \example demos/macmainwindow \title Mac Main Window Demo - This demo shows how to create a main window that has the + \brief The Mac Main Window demo shows how to create a main window that has the same appearance as other Mac OS X applications such as Mail or iTunes. This includes customizing the item views and QSplitter and wrapping native widgets such as the search field. diff --git a/doc/src/demos/mainwindow.qdoc b/doc/src/demos/mainwindow.qdoc index dee7202..0bd084f 100644 --- a/doc/src/demos/mainwindow.qdoc +++ b/doc/src/demos/mainwindow.qdoc @@ -29,7 +29,7 @@ \example demos/mainwindow \title Main Window - The Main Window demonstration shows Qt's extensive support for tool bars, + \brief The Main Window demonstration shows Qt's extensive support for tool bars, dock windows, menus, and other standard application features. \image mainwindow-demo.png diff --git a/doc/src/demos/mediaplayer.qdoc b/doc/src/demos/mediaplayer.qdoc index 8f35ee5..227b346 100644 --- a/doc/src/demos/mediaplayer.qdoc +++ b/doc/src/demos/mediaplayer.qdoc @@ -29,7 +29,7 @@ \example demos/qmediaplayer \title Media Player - The Media Player demonstration shows how \l{Phonon Module}{Phonon} + \brief The Media Player demonstration shows how \l{Phonon Module}{Phonon} can be used in Qt applications to handle audio and video playback. \image qmediaplayer-demo.png diff --git a/doc/src/demos/pathstroke.qdoc b/doc/src/demos/pathstroke.qdoc index 8e864e2..97ee8ab 100644 --- a/doc/src/demos/pathstroke.qdoc +++ b/doc/src/demos/pathstroke.qdoc @@ -29,7 +29,7 @@ \example demos/pathstroke \title Path Stroking - In this demo we show some of the various types of pens that can be + \brief This Path Stroking demo shows some of the various types of pens that can be used in Qt. \image pathstroke-demo.png diff --git a/doc/src/demos/qtdemo.qdoc b/doc/src/demos/qtdemo.qdoc index f4d3cbf..9ecb824 100644 --- a/doc/src/demos/qtdemo.qdoc +++ b/doc/src/demos/qtdemo.qdoc @@ -31,7 +31,7 @@ \ingroup qttools \keyword qtdemo - The Examples and Demos Launcher (\c qtdemo) allows the user to browse the + \brief The Examples and Demos Launcher (\c qtdemo) allows the user to browse the examples and demonstrations included with Qt, access the documentation associated with each of them, and launch them as separate applications. diff --git a/doc/src/demos/raycasting.qdoc b/doc/src/demos/raycasting.qdoc index 5c03e20..6517e97 100644 --- a/doc/src/demos/raycasting.qdoc +++ b/doc/src/demos/raycasting.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/raycasting \title Ray Casting Demonstration + \brief The Ray Casting demo shows how to use ray casting to build a mid-1990s style first-person game. + \image raycasting-demo.png */ diff --git a/doc/src/demos/spectrum.qdoc b/doc/src/demos/spectrum.qdoc index 7e98426..64eab09 100644 --- a/doc/src/demos/spectrum.qdoc +++ b/doc/src/demos/spectrum.qdoc @@ -29,7 +29,7 @@ \example demos/spectrum \title Spectrum Analyzer - The Spectrum Analyzer demo shows how the \l{QtMultimedia Module} can be + \brief The Spectrum Analyzer demo shows how the \l{QtMultimedia Module} can be used in Qt applications to capture and then play back an audio stream. \image spectrum-demo.png diff --git a/doc/src/demos/spreadsheet.qdoc b/doc/src/demos/spreadsheet.qdoc index 5c6b4df..3b74d8e 100644 --- a/doc/src/demos/spreadsheet.qdoc +++ b/doc/src/demos/spreadsheet.qdoc @@ -29,7 +29,7 @@ \example demos/spreadsheet \title Spreadsheet - The Spreadsheet demonstration shows how a table view can be used to create a + \brief The Spreadsheet demonstration shows how a table view can be used to create a simple spreadsheet application. Custom delegates are used to render different types of data in distinctive colors. diff --git a/doc/src/demos/sqlbrowser.qdoc b/doc/src/demos/sqlbrowser.qdoc index 53af037..b87d86f 100644 --- a/doc/src/demos/sqlbrowser.qdoc +++ b/doc/src/demos/sqlbrowser.qdoc @@ -29,7 +29,7 @@ \example demos/sqlbrowser \title SQL Browser - The SQL Browser demonstration shows how a data browser can be used to visualize + \brief The SQL Browser demonstration shows how a data browser can be used to visualize the results of SQL statements on a live database. \image sqlbrowser-demo.png diff --git a/doc/src/demos/styledemo.qdoc b/doc/src/demos/styledemo.qdoc index 415d284..13cab2b 100644 --- a/doc/src/demos/styledemo.qdoc +++ b/doc/src/demos/styledemo.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/styledemo \title Embedded Styles Demonstration + The Embedded Styles demo shows how to use Qt Style APIs in embedded contexts + \image styledemo-demo.png */ diff --git a/doc/src/demos/sub-attaq.qdoc b/doc/src/demos/sub-attaq.qdoc index 247d0d1..2874473 100644 --- a/doc/src/demos/sub-attaq.qdoc +++ b/doc/src/demos/sub-attaq.qdoc @@ -29,7 +29,7 @@ \example demos/sub-attaq \title Sub-Attaq - This demo shows Qt's ability to combine \l{The Animation Framework}{the animation framework} + \brief The Sub-Attaq demo shows Qt's ability to combine \l{The Animation Framework}{the animation framework} and \l{The State Machine Framework}{the state machine framework} to create a game. \image sub-attaq-demo.png diff --git a/doc/src/demos/textedit.qdoc b/doc/src/demos/textedit.qdoc index 8c50dba..f068593 100644 --- a/doc/src/demos/textedit.qdoc +++ b/doc/src/demos/textedit.qdoc @@ -29,7 +29,7 @@ \example demos/textedit \title Text Edit - The Text Edit demonstration shows Qt's rich text editing facilities in action, + \brief The Text Edit demonstration shows Qt's rich text editing facilities in action, providing an example document for you to experiment with. \image textedit-demo.png diff --git a/doc/src/demos/undo.qdoc b/doc/src/demos/undo.qdoc index 7b64371..78804c0 100644 --- a/doc/src/demos/undo.qdoc +++ b/doc/src/demos/undo.qdoc @@ -29,7 +29,7 @@ \example demos/undo \title Undo Framework - This demo shows Qt's undo framework in action. + \brief This demo shows Qt's undo framework in action. \image undodemo.png diff --git a/doc/src/demos/weatherinfo.qdoc b/doc/src/demos/weatherinfo.qdoc index 1f8a3e8..21b8fc8 100644 --- a/doc/src/demos/weatherinfo.qdoc +++ b/doc/src/demos/weatherinfo.qdoc @@ -29,5 +29,7 @@ \example demos/embedded/weatherinfo \title Weather Info Demonstration + \brief The Weather Info demo shows how to use XML files to build an embedded UI. + \image weatherinfo-demo.png */ diff --git a/doc/src/examples/2dpainting.qdoc b/doc/src/examples/2dpainting.qdoc index c4a2695..bce9958 100644 --- a/doc/src/examples/2dpainting.qdoc +++ b/doc/src/examples/2dpainting.qdoc @@ -29,7 +29,7 @@ \example opengl/2dpainting \title 2D Painting Example - The 2D Painting example shows how QPainter and QGLWidget can be used + \brief The 2D Painting example shows how QPainter and QGLWidget can be used together to display accelerated 2D graphics on supported hardware. \image 2dpainting-example.png diff --git a/doc/src/examples/activeqt/comapp.qdoc b/doc/src/examples/activeqt/comapp.qdoc index 22cec65..3c74b60 100644 --- a/doc/src/examples/activeqt/comapp.qdoc +++ b/doc/src/examples/activeqt/comapp.qdoc @@ -29,10 +29,12 @@ \example activeqt/comapp \title COM App Example (ActiveQt) - The COM App example shows how to use ActiveQt to develop a Qt - application that can be automated via COM. Different QObject - based classes are exposed as COM objects that communicate with the - GUI of the running Qt application. The APIs of those COM objects + \brief The COM App example shows how to use ActiveQt to develop a Qt + application that can be automated via COM. + + Different QObject based classes are exposed as COM objects that + communicate with the GUI of the running Qt application. + The APIs of those COM objects has been designed to resemble the APIs of standard COM applications; i.e. those from Microsoft Office. diff --git a/doc/src/examples/activeqt/dotnet.qdoc b/doc/src/examples/activeqt/dotnet.qdoc index 24b9cd1..31ca490 100644 --- a/doc/src/examples/activeqt/dotnet.qdoc +++ b/doc/src/examples/activeqt/dotnet.qdoc @@ -29,7 +29,7 @@ \page activeqt-dotnet.html \title Dot Net Example (ActiveQt) - The Dot Net example demonstrates how Qt objects can be used in a + \brief The Dot Net example demonstrates how Qt objects can be used in a .NET environment, and how .NET objects can be used in a Qt environment. diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc index 50fb025..e4fa60f 100644 --- a/doc/src/examples/activeqt/hierarchy.qdoc +++ b/doc/src/examples/activeqt/hierarchy.qdoc @@ -36,7 +36,7 @@ \example activeqt/hierarchy \title Hierarchy Example (ActiveQt) - The Hierarchy example is shows how to write an in-process ActiveX + \brief The Hierarchy example is shows how to write an in-process ActiveX control. The control is a QWidget subclass with child widgets that are accessible as sub-types. diff --git a/doc/src/examples/activeqt/multiple.qdoc b/doc/src/examples/activeqt/multiple.qdoc index 96bb6f5..fb069a9 100644 --- a/doc/src/examples/activeqt/multiple.qdoc +++ b/doc/src/examples/activeqt/multiple.qdoc @@ -36,9 +36,10 @@ \example activeqt/multiple \title Multiple Example (ActiveQt) - The Multiple example demonstrates the implementation of a + \brief The Multiple example demonstrates the implementation of a QAxFactory to provide multiple ActiveX controls in a single in process ActiveX server using the \c QAXFACTORY_EXPORT() macro. + The ActiveX controls in this example are simple QWidget subclasses that reimplement QWidget::paintEvent(). diff --git a/doc/src/examples/activeqt/qutlook.qdoc b/doc/src/examples/activeqt/qutlook.qdoc index fe77fd5..82e3424 100644 --- a/doc/src/examples/activeqt/qutlook.qdoc +++ b/doc/src/examples/activeqt/qutlook.qdoc @@ -29,7 +29,7 @@ \example activeqt/qutlook \title Qutlook Example (ActiveQt) - The Qutlook example demonstrates the use of ActiveQt to automate + \brief The Qutlook example demonstrates the use of ActiveQt to automate Outlook. The example makes use of the \l dumpcpp tool to generate a C++ namespace for the type library describing the Outlook Object Model. diff --git a/doc/src/examples/activeqt/webbrowser.qdoc b/doc/src/examples/activeqt/webbrowser.qdoc index 7eca270..35e4524 100644 --- a/doc/src/examples/activeqt/webbrowser.qdoc +++ b/doc/src/examples/activeqt/webbrowser.qdoc @@ -29,7 +29,7 @@ \example activeqt/webbrowser \title Web Browser Example (ActiveQt) - The Web Browser example uses the Microsoft Web Browser + \brief The Web Browser example uses the Microsoft Web Browser ActiveX control to implement a fully functional Web Browser application. The user interface has been developed using the Qt Designer integration of the QAxWidget class. diff --git a/doc/src/examples/activeqt/wrapper.qdoc b/doc/src/examples/activeqt/wrapper.qdoc index caecae9..8c7755e 100644 --- a/doc/src/examples/activeqt/wrapper.qdoc +++ b/doc/src/examples/activeqt/wrapper.qdoc @@ -37,9 +37,11 @@ \example activeqt/wrapper \title Wrapper Example (ActiveQt) - The Wrapper example demonstrates how to export existing QWidget + \brief The Wrapper example demonstrates how to export existing QWidget classes as ActiveX controls, and the use of QAxFactory together - with the \c QAXFACTORY_EXPORT() macro. ActiveX controls in this + with the \c QAXFACTORY_EXPORT() macro. + + ActiveX controls in this example are the standard button classes QPushButton, QCheckBox and QRadioButton as provided by Qt. diff --git a/doc/src/examples/analogclock.qdoc b/doc/src/examples/analogclock.qdoc index 18dc479..3b12ebe 100644 --- a/doc/src/examples/analogclock.qdoc +++ b/doc/src/examples/analogclock.qdoc @@ -29,7 +29,7 @@ \example widgets/analogclock \title Analog Clock Example - The Analog Clock example shows how to draw the contents of a custom + \brief The Analog Clock example shows how to draw the contents of a custom widget. \image analogclock-example.png Screenshot of the Analog Clock example diff --git a/doc/src/examples/animatedtiles.qdoc b/doc/src/examples/animatedtiles.qdoc index f562829..8155c4a 100644 --- a/doc/src/examples/animatedtiles.qdoc +++ b/doc/src/examples/animatedtiles.qdoc @@ -29,7 +29,7 @@ \example animation/animatedtiles \title Animated Tiles Example - The Animated Tiles example animates items in a graphics scene. + \brief The Animated Tiles example animates items in a graphics scene. \image animatedtiles-example.png */ diff --git a/doc/src/examples/appchooser.qdoc b/doc/src/examples/appchooser.qdoc index 63cbb0e..64c5144 100644 --- a/doc/src/examples/appchooser.qdoc +++ b/doc/src/examples/appchooser.qdoc @@ -29,7 +29,7 @@ \example animation/appchooser \title Application Chooser Example - The Application Chooser example shows how to use the Qt state + \brief The Application Chooser example shows how to use the Qt state machine and the animation framework to select between applications. diff --git a/doc/src/examples/application.qdoc b/doc/src/examples/application.qdoc index 9e03bc4..5f7b9fe 100644 --- a/doc/src/examples/application.qdoc +++ b/doc/src/examples/application.qdoc @@ -29,7 +29,7 @@ \example mainwindows/application \title Application Example - The Application example shows how to implement a standard GUI + \brief The Application example shows how to implement a standard GUI application with menus, toolbars, and a status bar. The example itself is a simple text editor program built around QPlainTextEdit. diff --git a/doc/src/examples/applicationicon.qdoc b/doc/src/examples/applicationicon.qdoc index 87942e5..f3f222e 100644 --- a/doc/src/examples/applicationicon.qdoc +++ b/doc/src/examples/applicationicon.qdoc @@ -29,7 +29,8 @@ \group all-examples \title Application Icon Example - The example shows how to add an application icon to a mobile application. + \brief The Application Icon example shows how to add an application icon to a + mobile application. \image appicon_screenshot.png The icon on a Nokia XPressMusic 5800 diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc index f3ba332..ef0bd27 100644 --- a/doc/src/examples/arrowpad.qdoc +++ b/doc/src/examples/arrowpad.qdoc @@ -29,7 +29,7 @@ \example linguist/arrowpad \title Arrow Pad Example - This example is a slightly more involved and introduces a key \e + \brief ThArrow Pad Linguist example is a slightly more involved and introduces a key \e {Qt Linguist} concept: "contexts". It also shows how to use two or more languages. diff --git a/doc/src/examples/audiodevices.qdoc b/doc/src/examples/audiodevices.qdoc index 7c95678..1690f34 100644 --- a/doc/src/examples/audiodevices.qdoc +++ b/doc/src/examples/audiodevices.qdoc @@ -29,7 +29,7 @@ \example multimedia/audiodevices \title Audio Devices Example - The Audio Devices example demonstrates the basic use of QAudioDeviceInfo class + \brief The Audio Devices example demonstrates the basic use of QAudioDeviceInfo class provided with Qt. \image audiodevices-example.png diff --git a/doc/src/examples/audioinput.qdoc b/doc/src/examples/audioinput.qdoc index 1b6d461..d5af63f 100644 --- a/doc/src/examples/audioinput.qdoc +++ b/doc/src/examples/audioinput.qdoc @@ -29,7 +29,7 @@ \example multimedia/audioinput \title AudioInput Example - The Audio Input example demonstrates the basic use of QAudioInput class + \brief The Audio Input example demonstrates the basic use of QAudioInput class provided with Qt. \image audioinput-example.png diff --git a/doc/src/examples/audiooutput.qdoc b/doc/src/examples/audiooutput.qdoc index 47a09fa..9362029 100644 --- a/doc/src/examples/audiooutput.qdoc +++ b/doc/src/examples/audiooutput.qdoc @@ -29,7 +29,7 @@ \example multimedia/audiooutput \title Audio Output Example - The Audio Output example demonstrates the basic use of the QAudioOutput class + \brief The Audio Output example demonstrates the basic use of the QAudioOutput class provided with Qt. \image audiooutput-example.png diff --git a/doc/src/examples/basicdrawing.qdoc b/doc/src/examples/basicdrawing.qdoc index fbc34e6..f18907c 100644 --- a/doc/src/examples/basicdrawing.qdoc +++ b/doc/src/examples/basicdrawing.qdoc @@ -29,7 +29,7 @@ \example painting/basicdrawing \title Basic Drawing Example - The Basic Drawing example shows how to display basic graphics + \brief The Basic Drawing example shows how to display basic graphics primitives in a variety of styles using the QPainter class. QPainter performs low-level painting on widgets and other paint diff --git a/doc/src/examples/basicgraphicslayouts.qdoc b/doc/src/examples/basicgraphicslayouts.qdoc index 2742870..27c9cb6 100644 --- a/doc/src/examples/basicgraphicslayouts.qdoc +++ b/doc/src/examples/basicgraphicslayouts.qdoc @@ -29,7 +29,7 @@ \example graphicsview/basicgraphicslayouts \title Basic Graphics Layouts Example - The Basic Graphics Layouts example shows how to use the layout classes + \brief The Basic Graphics Layouts example shows how to use the layout classes in QGraphicsView: QGraphicsLinearLayout and QGraphicsGridLayout. In addition to that it shows how to write your own custom layout item. @@ -161,4 +161,4 @@ \snippet examples/graphicsview/basicgraphicslayouts/layoutitem.cpp 5 -*/ \ No newline at end of file +*/ diff --git a/doc/src/examples/basiclayouts.qdoc b/doc/src/examples/basiclayouts.qdoc index a8c64f0..ade0b08 100644 --- a/doc/src/examples/basiclayouts.qdoc +++ b/doc/src/examples/basiclayouts.qdoc @@ -29,7 +29,7 @@ \example layouts/basiclayouts \title Basic Layouts Example - The Basic Layouts example shows how to use the standard layout + \brief The Basic Layouts example shows how to use the standard layout managers that are available in Qt: QBoxLayout, QGridLayout and QFormLayout. diff --git a/doc/src/examples/basicsortfiltermodel.qdoc b/doc/src/examples/basicsortfiltermodel.qdoc index dbe9f02..92c000e 100644 --- a/doc/src/examples/basicsortfiltermodel.qdoc +++ b/doc/src/examples/basicsortfiltermodel.qdoc @@ -29,7 +29,7 @@ \example itemviews/basicsortfiltermodel \title Basic Sort/Filter Model Example - The Basic Sort/Filter Model example illustrates how to use + \brief The Basic Sort/Filter Model example illustrates how to use QSortFilterProxyModel to perform basic sorting and filtering. \image basicsortfiltermodel-example.png Screenshot of the Basic Sort/Filter Model Example diff --git a/doc/src/examples/bearercloud.qdoc b/doc/src/examples/bearercloud.qdoc index 18a4ddf..f549eb4 100644 --- a/doc/src/examples/bearercloud.qdoc +++ b/doc/src/examples/bearercloud.qdoc @@ -29,7 +29,7 @@ \example network/bearercloud \title Bearer Cloud Example - The Bearer Cloud example shows how to use the Bearer Management API to monitor the + \brief The Bearer Cloud example shows how to use the Bearer Management API to monitor the connectivity state of the local device. \image bearercloud-example.png Screenshot of the Bearer Cloud example diff --git a/doc/src/examples/bearermonitor.qdoc b/doc/src/examples/bearermonitor.qdoc index a638d12..ec5d091 100644 --- a/doc/src/examples/bearermonitor.qdoc +++ b/doc/src/examples/bearermonitor.qdoc @@ -29,7 +29,7 @@ \example network/bearermonitor \title Bearer Monitor Example - The Bearer Monitor example shows how to use the Bearer Management API. + \brief The Bearer Monitor example shows how to use the Bearer Management API. \image bearermonitor-example.png Screenshot of the Bearer Monitor example */ diff --git a/doc/src/examples/blockingfortuneclient.qdoc b/doc/src/examples/blockingfortuneclient.qdoc index d35ed4c..5549ebb 100644 --- a/doc/src/examples/blockingfortuneclient.qdoc +++ b/doc/src/examples/blockingfortuneclient.qdoc @@ -29,7 +29,7 @@ \example network/blockingfortuneclient \title Blocking Fortune Client Example - The Blocking Fortune Client example shows how to create a client for a + \brief The Blocking Fortune Client example shows how to create a client for a network service using QTcpSocket's synchronous API in a non-GUI thread. \image blockingfortuneclient-example.png diff --git a/doc/src/examples/blurpicker.qdoc b/doc/src/examples/blurpicker.qdoc index 3a6d433..00c822d 100644 --- a/doc/src/examples/blurpicker.qdoc +++ b/doc/src/examples/blurpicker.qdoc @@ -29,5 +29,7 @@ \example effects/blurpicker \title Blur Picker Effect Example + \brief The Blur Picker Example shows the QGraphicsBlurEffect in action. + \image blurpickereffect-example.png */ diff --git a/doc/src/examples/borderlayout.qdoc b/doc/src/examples/borderlayout.qdoc index 94cd3d9..cf8a4fc 100644 --- a/doc/src/examples/borderlayout.qdoc +++ b/doc/src/examples/borderlayout.qdoc @@ -29,7 +29,7 @@ \example layouts/borderlayout \title Border Layout Example - The Border Layout example shows how to create a custom layout that arranges + \brief The Border Layout example shows how to create a custom layout that arranges child widgets according to a simple set of rules. \image borderlayout-example.png diff --git a/doc/src/examples/broadcastreceiver.qdoc b/doc/src/examples/broadcastreceiver.qdoc index 409b491..e716a74 100644 --- a/doc/src/examples/broadcastreceiver.qdoc +++ b/doc/src/examples/broadcastreceiver.qdoc @@ -29,7 +29,7 @@ \example network/broadcastreceiver \title Broadcast Receiver Example - The Broadcast Receiver example shows how to receive information that is broadcasted + \brief The Broadcast Receiver example shows how to receive information that is broadcasted over a local network. \image broadcastreceiver-example.png diff --git a/doc/src/examples/broadcastsender.qdoc b/doc/src/examples/broadcastsender.qdoc index 2cb0a13..a272e88 100644 --- a/doc/src/examples/broadcastsender.qdoc +++ b/doc/src/examples/broadcastsender.qdoc @@ -29,7 +29,7 @@ \example network/broadcastsender \title Broadcast Sender Example - The Broadcast Sender example shows how to broadcast information to multiple clients + \brief The Broadcast Sender example shows how to broadcast information to multiple clients on a local network. \image broadcastsender-example.png diff --git a/doc/src/examples/cachedtable.qdoc b/doc/src/examples/cachedtable.qdoc index 5a20329..7660dbf 100644 --- a/doc/src/examples/cachedtable.qdoc +++ b/doc/src/examples/cachedtable.qdoc @@ -29,7 +29,7 @@ \example sql/cachedtable \title Cached Table Example - The Cached Table example shows how a table view can be used to access a database, + \brief The Cached Table example shows how a table view can be used to access a database, caching any changes to the data until the user explicitly submits them using a push button. diff --git a/doc/src/examples/calculator.qdoc b/doc/src/examples/calculator.qdoc index c7dc013..7941698 100644 --- a/doc/src/examples/calculator.qdoc +++ b/doc/src/examples/calculator.qdoc @@ -29,7 +29,7 @@ \example widgets/calculator \title Calculator Example - The example shows how to use signals and slots to implement the + \brief The example shows how to use signals and slots to implement the functionality of a calculator widget, and how to use QGridLayout to place child widgets in a grid. diff --git a/doc/src/examples/calculatorbuilder.qdoc b/doc/src/examples/calculatorbuilder.qdoc index ac9db9f..97f6f06 100644 --- a/doc/src/examples/calculatorbuilder.qdoc +++ b/doc/src/examples/calculatorbuilder.qdoc @@ -29,7 +29,7 @@ \example designer/calculatorbuilder \title Calculator Builder Example - The Calculator Builder example shows how to create a user interface from + \brief The Calculator Builder example shows how to create a user interface from a \QD form at run-time, using the QUiLoader class. \image calculatorbuilder-example.png diff --git a/doc/src/examples/calculatorform.qdoc b/doc/src/examples/calculatorform.qdoc index e1025b6..945659f 100644 --- a/doc/src/examples/calculatorform.qdoc +++ b/doc/src/examples/calculatorform.qdoc @@ -29,9 +29,11 @@ \example designer/calculatorform \title Calculator Form Example - The Calculator Form Example shows how to use a form created with + \brief The Calculator Form Example shows how to use a form created with \QD in an application by using the user interface information from - a QWidget subclass. We use \l{Using a Designer UI File in Your Application} + a QWidget subclass. + + We use \l{Using a Designer UI File in Your Application} {uic's auto-connection} feature to automatically connect signals from widgets on the form to slots in our code. diff --git a/doc/src/examples/calendar.qdoc b/doc/src/examples/calendar.qdoc index 32bc547..2221e1f 100644 --- a/doc/src/examples/calendar.qdoc +++ b/doc/src/examples/calendar.qdoc @@ -29,7 +29,7 @@ \example richtext/calendar \title Calendar Example - The Calendar example shows how to create rich text content and display it using + \brief The Calendar example shows how to create rich text content and display it using a rich text editor. \image calendar-example.png diff --git a/doc/src/examples/calendarwidget.qdoc b/doc/src/examples/calendarwidget.qdoc index f72082a..ed3cd32 100644 --- a/doc/src/examples/calendarwidget.qdoc +++ b/doc/src/examples/calendarwidget.qdoc @@ -29,7 +29,7 @@ \title Calendar Widget Example \example widgets/calendarwidget - The Calendar Widget example shows use of \c QCalendarWidget. + \brief The Calendar Widget example shows use of \c QCalendarWidget. \image calendarwidgetexample.png diff --git a/doc/src/examples/capabilitiesexample.qdoc b/doc/src/examples/capabilitiesexample.qdoc index 636044b..c0c4f93 100644 --- a/doc/src/examples/capabilitiesexample.qdoc +++ b/doc/src/examples/capabilitiesexample.qdoc @@ -29,7 +29,7 @@ \example phonon/capabilities \title Capabilities Example - The Backend Capabilities example shows how to check which MIME + \brief The Backend Capabilities example shows how to check which MIME types, audio devices, and audio effects are available. \image capabilitiesexample.png diff --git a/doc/src/examples/charactermap.qdoc b/doc/src/examples/charactermap.qdoc index 285d6a4..fa82d7e 100644 --- a/doc/src/examples/charactermap.qdoc +++ b/doc/src/examples/charactermap.qdoc @@ -29,7 +29,7 @@ \example widgets/charactermap \title Character Map Example -The Character Map example shows how to create a custom widget that can +\brief The Character Map example shows how to create a custom widget that can both display its own content and respond to user input. The example displays an array of characters which the user can click on diff --git a/doc/src/examples/chart.qdoc b/doc/src/examples/chart.qdoc index af82f1b..d18a8fa 100644 --- a/doc/src/examples/chart.qdoc +++ b/doc/src/examples/chart.qdoc @@ -29,7 +29,7 @@ \example itemviews/chart \title Chart Example - The Chart example shows how to create a custom view for the model/view framework. + \brief The Chart example shows how to create a custom view for the model/view framework. \image chart-example.png diff --git a/doc/src/examples/classwizard.qdoc b/doc/src/examples/classwizard.qdoc index 53d0936..d29b956 100644 --- a/doc/src/examples/classwizard.qdoc +++ b/doc/src/examples/classwizard.qdoc @@ -29,7 +29,7 @@ \example dialogs/classwizard \title Class Wizard Example - The License Wizard example shows how to implement linear + \brief The License Wizard example shows how to implement linear wizards using QWizard. \image classwizard.png Screenshot of the Class Wizard example diff --git a/doc/src/examples/codecs.qdoc b/doc/src/examples/codecs.qdoc index 91fb6a2..02248e9 100644 --- a/doc/src/examples/codecs.qdoc +++ b/doc/src/examples/codecs.qdoc @@ -29,7 +29,7 @@ \example tools/codecs \title Codecs Example - The Codecs example demonstrates the principles behind importing and exporting text + \brief The Codecs example demonstrates the principles behind importing and exporting text using codecs to ensure that characters are encoded properly, avoiding loss of data and retaining the correct symbols used in various scripts. diff --git a/doc/src/examples/codeeditor.qdoc b/doc/src/examples/codeeditor.qdoc index 1718d52..9935e88 100644 --- a/doc/src/examples/codeeditor.qdoc +++ b/doc/src/examples/codeeditor.qdoc @@ -29,7 +29,7 @@ \example widgets/codeeditor \title Code Editor Example - The Code Editor example shows how to create a simple editor that + \brief The Code Editor example shows how to create a simple editor that has line numbers and that highlights the current line. \image codeeditor-example.png diff --git a/doc/src/examples/collidingmice-example.qdoc b/doc/src/examples/collidingmice-example.qdoc index 4bdd79d..e7c475a 100644 --- a/doc/src/examples/collidingmice-example.qdoc +++ b/doc/src/examples/collidingmice-example.qdoc @@ -29,7 +29,7 @@ \example graphicsview/collidingmice \title Colliding Mice Example - The Colliding Mice example shows how to use the Graphics View + \brief The Colliding Mice example shows how to use the Graphics View framework to implement animated items and detect collision between items. @@ -265,4 +265,4 @@ Doing the animation with a single timer connect to advance the scene ensures that all the mice are moved at one point and, more importantly, only one update is sent to the screen after all the mice have moved. -*/ \ No newline at end of file +*/ diff --git a/doc/src/examples/coloreditorfactory.qdoc b/doc/src/examples/coloreditorfactory.qdoc index 34060bd..e7c6e7d 100644 --- a/doc/src/examples/coloreditorfactory.qdoc +++ b/doc/src/examples/coloreditorfactory.qdoc @@ -29,8 +29,8 @@ \example itemviews/coloreditorfactory \title Color Editor Factory Example - This example shows how to create an editor that can be used by - a QItemDelegate. + \brief The Color Editor Factory example shows how to create an editor that + can be used by a QItemDelegate. \image coloreditorfactoryimage.png diff --git a/doc/src/examples/combowidgetmapper.qdoc b/doc/src/examples/combowidgetmapper.qdoc index e852f5e..61d69c1 100644 --- a/doc/src/examples/combowidgetmapper.qdoc +++ b/doc/src/examples/combowidgetmapper.qdoc @@ -29,7 +29,7 @@ \example itemviews/combowidgetmapper \title Combo Widget Mapper Example - The Combo Widget Mapper example shows how to use a custom delegate to + \brief The Combo Widget Mapper example shows how to use a custom delegate to map information from a model to specific widgets on a form. \image combowidgetmapper-example.png diff --git a/doc/src/examples/completer.qdoc b/doc/src/examples/completer.qdoc index 408de6b..298bbc4 100644 --- a/doc/src/examples/completer.qdoc +++ b/doc/src/examples/completer.qdoc @@ -29,7 +29,7 @@ \example tools/completer \title Completer Example - The Completer example shows how to provide string-completion facilities + \brief The Completer example shows how to provide string-completion facilities for an input widget based on data provided by a model. \image completer-example.png diff --git a/doc/src/examples/complexpingpong.qdoc b/doc/src/examples/complexpingpong.qdoc index 677353b..2013744 100644 --- a/doc/src/examples/complexpingpong.qdoc +++ b/doc/src/examples/complexpingpong.qdoc @@ -29,7 +29,7 @@ \example dbus/complexpingpong \title Complex Ping Pong Example - The Complex Ping Pong example improves on the \l{D-Bus Ping Pong Example} by providing + \brief The Complex Ping Pong example improves on the \l{D-Bus Ping Pong Example} by providing a more useful demonstration of D-Bus interfaces. \quotefile doc/src/snippets/complexpingpong-example.txt diff --git a/doc/src/examples/concentriccircles.qdoc b/doc/src/examples/concentriccircles.qdoc index 37c8f83..bfa24d9 100644 --- a/doc/src/examples/concentriccircles.qdoc +++ b/doc/src/examples/concentriccircles.qdoc @@ -29,7 +29,7 @@ \example painting/concentriccircles \title Concentric Circles Example - The Concentric Circles example shows the improved rendering + \brief The Concentric Circles example shows the improved rendering quality that can be obtained using floating point precision and anti-aliasing when drawing custom widgets. The example also shows how to do simple animations. diff --git a/doc/src/examples/configdialog.qdoc b/doc/src/examples/configdialog.qdoc index 166b25a..d83dbdb 100644 --- a/doc/src/examples/configdialog.qdoc +++ b/doc/src/examples/configdialog.qdoc @@ -29,7 +29,7 @@ \example dialogs/configdialog \title Config Dialog Example - The Config Dialog examples shows how a configuration dialog can be created by + \brief The Config Dialog examples shows how a configuration dialog can be created by using an icon view with a stacked widget. \image configdialog-example.png diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc index ca7ef13..606da2d 100644 --- a/doc/src/examples/containerextension.qdoc +++ b/doc/src/examples/containerextension.qdoc @@ -29,7 +29,7 @@ \example designer/containerextension \title Container Extension Example - The Container Extension example shows how to create a custom + \brief The Container Extension example shows how to create a custom multi-page plugin for Qt Designer using the QDesignerContainerExtension class. diff --git a/doc/src/examples/context2d.qdoc b/doc/src/examples/context2d.qdoc index 729e56b..9d9d0c6 100644 --- a/doc/src/examples/context2d.qdoc +++ b/doc/src/examples/context2d.qdoc @@ -29,7 +29,7 @@ \example script/context2d \title Context2D Example - This Qt Script example is an implementation of the Context2D API. + \brief This Qt Script example is an implementation of the Context2D API. \image context2d-example.png diff --git a/doc/src/examples/contextsensitivehelp.qdoc b/doc/src/examples/contextsensitivehelp.qdoc index 42e4a11..32b59bc 100644 --- a/doc/src/examples/contextsensitivehelp.qdoc +++ b/doc/src/examples/contextsensitivehelp.qdoc @@ -29,5 +29,5 @@ \example help/contextsensitivehelp \title Context-Sensitive Help Example - This example shows how to use the services of the QHelpEngineCore class. + \brief The Context Sensitive Help example shows how to use the services of the QHelpEngineCore class. */ diff --git a/doc/src/examples/contiguouscache.qdoc b/doc/src/examples/contiguouscache.qdoc index d0b39e6..52e8b15 100644 --- a/doc/src/examples/contiguouscache.qdoc +++ b/doc/src/examples/contiguouscache.qdoc @@ -29,8 +29,10 @@ \example tools/contiguouscache \title Contiguous Cache Example - The Contiguous Cache example shows how to use QContiguousCache to manage memory usage for - very large models. In some environments memory is limited and, even when it + \brief The Contiguous Cache example shows how to use QContiguousCache to manage memory usage for + very large models. + + In some environments memory is limited and, even when it isn't, users still dislike an application using excessive memory. Using QContiguousCache to manage a list, rather than loading the entire list into memory, allows the application to limit the amount diff --git a/doc/src/examples/cube.qdoc b/doc/src/examples/cube.qdoc index e1fd172..e28d4b2 100644 --- a/doc/src/examples/cube.qdoc +++ b/doc/src/examples/cube.qdoc @@ -44,8 +44,10 @@ \group all-examples \title Cube OpenGL ES 2.0 example - The Cube OpenGL ES 2.0 example shows how to write mouse rotateable - textured 3D cube using OpenGL ES 2.0 with Qt. It shows how to handle + \brief The Cube OpenGL ES 2.0 example shows how to write mouse rotateable + textured 3D cube using OpenGL ES 2.0 with Qt. + + It shows how to handle polygon geometries efficiently and how to write simple vertex and fragment shader for programmable graphics pipeline. In addition it shows how to use quaternions for representing 3D object orientation. diff --git a/doc/src/examples/customcompleter.qdoc b/doc/src/examples/customcompleter.qdoc index f0d5698..27e2ea7 100644 --- a/doc/src/examples/customcompleter.qdoc +++ b/doc/src/examples/customcompleter.qdoc @@ -29,9 +29,9 @@ \example tools/customcompleter \title Custom Completer Example - The Custom Completer example shows how to provide string-completion - facilities for an input widget based on data provided by a model. The - completer pops up suggestions for possible words based on the first three + \brief The Custom Completer example shows how to provide string-completion + facilities for an input widget based on data provided by a model. + The completer pops up suggestions for possible words based on the first three characters input by the user and the user's choice of word is inserted into the \c TextEdit using QTextCursor. diff --git a/doc/src/examples/customsortfiltermodel.qdoc b/doc/src/examples/customsortfiltermodel.qdoc index e145e82..41f8b04 100644 --- a/doc/src/examples/customsortfiltermodel.qdoc +++ b/doc/src/examples/customsortfiltermodel.qdoc @@ -29,7 +29,7 @@ \example itemviews/customsortfiltermodel \title Custom Sort/Filter Model Example - The Custom Sort/Filter Model example illustrates how to subclass + \brief The Custom Sort/Filter Model example illustrates how to subclass QSortFilterProxyModel to perform advanced sorting and filtering. \image customsortfiltermodel-example.png Screenshot of the Custom Sort/Filter Model Example diff --git a/doc/src/examples/customtype.qdoc b/doc/src/examples/customtype.qdoc index b969354..8ff97f3 100644 --- a/doc/src/examples/customtype.qdoc +++ b/doc/src/examples/customtype.qdoc @@ -29,7 +29,7 @@ \example tools/customtype \title Custom Type Example - The Custom Type example shows how to integrate a custom type into Qt's + \brief The Custom Type example shows how to integrate a custom type into Qt's meta-object system. Contents: diff --git a/doc/src/examples/customtypesending.qdoc b/doc/src/examples/customtypesending.qdoc index fc6b793..4ffb40e 100644 --- a/doc/src/examples/customtypesending.qdoc +++ b/doc/src/examples/customtypesending.qdoc @@ -29,7 +29,7 @@ \example tools/customtypesending \title Custom Type Sending Example - The Custom Type Sending example shows how to use a custom type with signals + \brief The Custom Type Sending example shows how to use a custom type with signals and slots. \image customtypesending-example.png diff --git a/doc/src/examples/customwidgetplugin.qdoc b/doc/src/examples/customwidgetplugin.qdoc index dadfbaf..81277ce 100644 --- a/doc/src/examples/customwidgetplugin.qdoc +++ b/doc/src/examples/customwidgetplugin.qdoc @@ -29,7 +29,7 @@ \example designer/customwidgetplugin \title Custom Widget Plugin Example - The Custom Widget example shows how to create a custom widget plugin for \QD. + \brief The Custom Widget example shows how to create a custom widget plugin for \QD. \image customwidgetplugin-example.png diff --git a/doc/src/examples/dbscreen.qdoc b/doc/src/examples/dbscreen.qdoc index 7f6bb18..c2b88cd 100644 --- a/doc/src/examples/dbscreen.qdoc +++ b/doc/src/examples/dbscreen.qdoc @@ -29,7 +29,7 @@ \example qws/dbscreen \title Double Buffered Graphics Driver Example - The Double Buffered Graphics Driver example shows how to write your own + \brief The Double Buffered Graphics Driver example shows how to write your own double buffered graphics driver and add it to Qt for Embedded Linux. Similar to the \l{Accelerated Graphics Driver Example}, there are three steps diff --git a/doc/src/examples/dbus-chat.qdoc b/doc/src/examples/dbus-chat.qdoc index a435cc9..c00166d 100644 --- a/doc/src/examples/dbus-chat.qdoc +++ b/doc/src/examples/dbus-chat.qdoc @@ -29,7 +29,7 @@ \example dbus/dbus-chat \title D-Bus Chat Example - The D-Bus Chat example shows how to use D-Bus to communicate between two + \brief The D-Bus Chat example shows how to use D-Bus to communicate between two applications. \image dbus-chat-example.png diff --git a/doc/src/examples/dbus-listnames.qdoc b/doc/src/examples/dbus-listnames.qdoc index 3d359f7..9807c30 100644 --- a/doc/src/examples/dbus-listnames.qdoc +++ b/doc/src/examples/dbus-listnames.qdoc @@ -29,5 +29,5 @@ \example dbus/listnames \title D-Bus List Names Example - The D-Bus List Names examples shows how to query D-Bus for a list of service names. + \brief The D-Bus List Names examples shows how to query D-Bus for a list of service names. */ diff --git a/doc/src/examples/dbus-pingpong.qdoc b/doc/src/examples/dbus-pingpong.qdoc index dc0f50b..2463877 100644 --- a/doc/src/examples/dbus-pingpong.qdoc +++ b/doc/src/examples/dbus-pingpong.qdoc @@ -29,7 +29,7 @@ \example dbus/pingpong \title D-Bus Ping Pong Example - The D-Bus Ping Pong example provides a basic demonstration of D-Bus + \brief The D-Bus Ping Pong example provides a basic demonstration of D-Bus interfaces. \quotefile doc/src/snippets/dbus-pingpong-example.txt diff --git a/doc/src/examples/dbus-remotecontrolledcar.qdoc b/doc/src/examples/dbus-remotecontrolledcar.qdoc index 3f0af9a..7152e21 100644 --- a/doc/src/examples/dbus-remotecontrolledcar.qdoc +++ b/doc/src/examples/dbus-remotecontrolledcar.qdoc @@ -29,7 +29,7 @@ \example dbus/remotecontrolledcar \title D-Bus Remote Controlled Car Example - The Remote Controlled Car example shows how to use D-Bus to control one + \brief The Remote Controlled Car example shows how to use D-Bus to control one application using another. \image remotecontrolledcar-car-example.png diff --git a/doc/src/examples/defaultprototypes.qdoc b/doc/src/examples/defaultprototypes.qdoc index a6c79f0..493a3bb 100644 --- a/doc/src/examples/defaultprototypes.qdoc +++ b/doc/src/examples/defaultprototypes.qdoc @@ -29,7 +29,7 @@ \example script/defaultprototypes \title Default Prototypes Example - This Qt Script example shows how to use default prototypes + \brief The Default Prototypes QtScript example shows how to use default prototypes to make a non-QObject-based type scriptable. \image defaultprototypes-example.png diff --git a/doc/src/examples/delayedencoding.qdoc b/doc/src/examples/delayedencoding.qdoc index 8ac2c7f..d94b589 100644 --- a/doc/src/examples/delayedencoding.qdoc +++ b/doc/src/examples/delayedencoding.qdoc @@ -29,7 +29,7 @@ \example draganddrop/delayedencoding \title Delayed Encoding Example - The Delayed Encoding example shows how to delay preparing of data + \brief The Delayed Encoding example shows how to delay preparing of data for drag and drop operations until a drop target is found. \image delayedecoding-example.png diff --git a/doc/src/examples/diagramscene.qdoc b/doc/src/examples/diagramscene.qdoc index 7d3c0e6..c7b4bfe 100644 --- a/doc/src/examples/diagramscene.qdoc +++ b/doc/src/examples/diagramscene.qdoc @@ -29,12 +29,12 @@ \example graphicsview/diagramscene \title Diagram Scene Example - This example shows use of Qt's graphics framework. + \brief The Diagram Scene example is an application in which you can + create a flowchart diagram using the graphics view framework. \image diagramscene.png - The Diagram Scene example is an application in which you can - create a flowchart diagram. It is possible to add flowchart shapes + In this example it is possible to add flowchart shapes and text and connect the shapes by arrows as shown in the image above. The shapes, arrows, and text can be given different colors, and it is possible to change the font, style, and diff --git a/doc/src/examples/digitalclock.qdoc b/doc/src/examples/digitalclock.qdoc index acee4d6..90ee710 100644 --- a/doc/src/examples/digitalclock.qdoc +++ b/doc/src/examples/digitalclock.qdoc @@ -29,7 +29,7 @@ \example widgets/digitalclock \title Digital Clock Example - The Digital Clock example shows how to use QLCDNumber to display a + \brief The Digital Clock example shows how to use QLCDNumber to display a number with LCD-like digits. \image digitalclock-example.png Screenshot of the Digital Clock example diff --git a/doc/src/examples/dirview.qdoc b/doc/src/examples/dirview.qdoc index 6d2ce7a..6a45d9a 100644 --- a/doc/src/examples/dirview.qdoc +++ b/doc/src/examples/dirview.qdoc @@ -29,7 +29,7 @@ \example itemviews/dirview \title Dir View Example - The Dir View example shows a tree view onto the local filing system. It uses the + \brief The Dir View example shows a tree view onto the local filing system. It uses the QDirModel class to provide supply file and directory information. \image dirview-example.png diff --git a/doc/src/examples/dockwidgets.qdoc b/doc/src/examples/dockwidgets.qdoc index b46a286..c6cebcc 100644 --- a/doc/src/examples/dockwidgets.qdoc +++ b/doc/src/examples/dockwidgets.qdoc @@ -29,7 +29,7 @@ \example mainwindows/dockwidgets \title Dock Widgets Example - The Dock Widgets example shows how to add dock windows to an + \brief The Dock Widgets example shows how to add dock windows to an application. It also shows how to use Qt's rich text engine. \image dockwidgets-example.png Screenshot of the Dock Widgets example diff --git a/doc/src/examples/dombookmarks.qdoc b/doc/src/examples/dombookmarks.qdoc index 03e3ec6..e25766a 100644 --- a/doc/src/examples/dombookmarks.qdoc +++ b/doc/src/examples/dombookmarks.qdoc @@ -29,9 +29,10 @@ \example xml/dombookmarks \title DOM Bookmarks Example - The DOM Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) - files that uses Qt's DOM-based XML API to read and parse the files. The SAX Bookmarks - example provides an alternative way to read this type of file. + \brief The DOM Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) + files that uses Qt's DOM-based XML API to read and parse the files. + + The SAX Bookmarks example provides an alternative way to read this type of file. \image dombookmarks-example.png diff --git a/doc/src/examples/domtraversal.qdoc b/doc/src/examples/domtraversal.qdoc index d0456c4..657b0dd 100644 --- a/doc/src/examples/domtraversal.qdoc +++ b/doc/src/examples/domtraversal.qdoc @@ -29,7 +29,7 @@ \example webkit/domtraversal \title DOM Traversal Example - The DOM Traversal example shows how to use the QWebElement class to access + \brief The DOM Traversal example shows how to use the QWebElement class to access the structure of a Web page. \image webkit-domtraversal.png diff --git a/doc/src/examples/draganddroppuzzle.qdoc b/doc/src/examples/draganddroppuzzle.qdoc index e89c8fc..4bb1ccb 100644 --- a/doc/src/examples/draganddroppuzzle.qdoc +++ b/doc/src/examples/draganddroppuzzle.qdoc @@ -29,7 +29,7 @@ \example draganddrop/puzzle \title Drag and Drop Puzzle Example - The Drag and Drop Puzzle example demonstrates a way of using the drag and drop system with + \brief The Drag and Drop Puzzle example demonstrates a way of using the drag and drop system with item view widgets. \image draganddroppuzzle-example.png diff --git a/doc/src/examples/dragdroprobot.qdoc b/doc/src/examples/dragdroprobot.qdoc index 84d8af4..aba30ad 100644 --- a/doc/src/examples/dragdroprobot.qdoc +++ b/doc/src/examples/dragdroprobot.qdoc @@ -29,7 +29,7 @@ \example graphicsview/dragdroprobot \title Drag and Drop Robot Example - The Drag and Drop Robot example shows how to implement Drag and Drop in a + \brief The Drag and Drop Robot example shows how to implement Drag and Drop in a QGraphicsItem subclass, as well as how to animate items using Qt's \l{Animation Framework}. diff --git a/doc/src/examples/draggableicons.qdoc b/doc/src/examples/draggableicons.qdoc index 0337431..1484a60 100644 --- a/doc/src/examples/draggableicons.qdoc +++ b/doc/src/examples/draggableicons.qdoc @@ -29,7 +29,7 @@ \example draganddrop/draggableicons \title Draggable Icons Example - The Draggable Icons example shows how to drag and drop image data between widgets + \brief The Draggable Icons example shows how to drag and drop image data between widgets in the same application, and between different applications. \image draggableicons-example.png diff --git a/doc/src/examples/draggabletext.qdoc b/doc/src/examples/draggabletext.qdoc index 14d07b6..ae9cfb9 100644 --- a/doc/src/examples/draggabletext.qdoc +++ b/doc/src/examples/draggabletext.qdoc @@ -29,7 +29,7 @@ \example draganddrop/draggabletext \title Draggable Text Example - The Draggable Text example shows how to drag and drop textual data between widgets + \brief The Draggable Text example shows how to drag and drop textual data between widgets in the same application, and between different applications. \image draggabletext-example.png diff --git a/doc/src/examples/drilldown.qdoc b/doc/src/examples/drilldown.qdoc index 1903df6..d11a71f 100644 --- a/doc/src/examples/drilldown.qdoc +++ b/doc/src/examples/drilldown.qdoc @@ -29,7 +29,7 @@ \example sql/drilldown \title Drill Down Example - The Drill Down example shows how to read data from a database as + \brief The Drill Down example shows how to read data from a database as well as submit changes, using the QSqlRelationalTableModel and QDataWidgetMapper classes. diff --git a/doc/src/examples/dropsite.qdoc b/doc/src/examples/dropsite.qdoc index bf17427..815618a 100644 --- a/doc/src/examples/dropsite.qdoc +++ b/doc/src/examples/dropsite.qdoc @@ -29,7 +29,7 @@ \example draganddrop/dropsite \title Drop Site Example - The example shows how to distinguish the various MIME formats available + \brief The Drop Site example shows how to distinguish the various MIME formats available in a drag and drop operation. \image dropsite-example.png Screenshot of the Drop Site example diff --git a/doc/src/examples/dynamiclayouts.qdoc b/doc/src/examples/dynamiclayouts.qdoc index b8314e3..c93fc74 100644 --- a/doc/src/examples/dynamiclayouts.qdoc +++ b/doc/src/examples/dynamiclayouts.qdoc @@ -29,6 +29,6 @@ \example layouts/dynamiclayouts \title Dynamic Layouts Example - The Dynamic Layouts example shows how to move widgets around in + \brief The Dynamic Layouts example shows how to move widgets around in existing layouts. */ diff --git a/doc/src/examples/easing.qdoc b/doc/src/examples/easing.qdoc index 1a7657d..42f00f1 100644 --- a/doc/src/examples/easing.qdoc +++ b/doc/src/examples/easing.qdoc @@ -29,7 +29,7 @@ \example animation/easing \title Easing Curves Example - The Easing Curves example shows how to use easing curves to + \brief The Easing Curves example shows how to use easing curves to control the speed of an animation. \image easing-example.png diff --git a/doc/src/examples/echoplugin.qdoc b/doc/src/examples/echoplugin.qdoc index cadd485..c920c2b 100644 --- a/doc/src/examples/echoplugin.qdoc +++ b/doc/src/examples/echoplugin.qdoc @@ -29,7 +29,7 @@ \example tools/echoplugin \title Echo Plugin Example - This example shows how to create a Qt plugin. + \brief The Echo Plugin example shows how to create a Qt plugin. \image echopluginexample.png diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc index 8be3037..00f20f6 100644 --- a/doc/src/examples/editabletreemodel.qdoc +++ b/doc/src/examples/editabletreemodel.qdoc @@ -29,8 +29,8 @@ \example itemviews/editabletreemodel \title Editable Tree Model Example - This example shows how to implement a simple item-based tree model that can - be used with other classes the model/view framework. + \brief The Editable Tree Model example shows how to implement a simple item-based tree model that can + be used with other classes in the model/view framework. \image itemviews-editabletreemodel.png diff --git a/doc/src/examples/elasticnodes.qdoc b/doc/src/examples/elasticnodes.qdoc index e5399b1..30ebc6f 100644 --- a/doc/src/examples/elasticnodes.qdoc +++ b/doc/src/examples/elasticnodes.qdoc @@ -29,8 +29,10 @@ \example graphicsview/elasticnodes \title Elastic Nodes Example - The Elastic Nodes example shows how to implement edges between nodes in a - graph, with basic interaction. You can click to drag a node around, and + \brief The Elastic Nodes example shows how to implement edges between nodes in a + graph, with basic interaction. + + You can click to drag a node around, and zoom in and out using the mouse wheel or the keyboard. Hitting the space bar will randomize the nodes. The example is also resolution independent; as you zoom in, the graphics remain crisp. diff --git a/doc/src/examples/elidedlabel.qdoc b/doc/src/examples/elidedlabel.qdoc index 5bfe0f8..9a5b476 100644 --- a/doc/src/examples/elidedlabel.qdoc +++ b/doc/src/examples/elidedlabel.qdoc @@ -30,7 +30,7 @@ \group all-examples \title Elided Label Example - This example creates a widget similar to QLabel, that elides the last + \brief The Elided Label example creates a widget similar to QLabel, that elides the last visible line, if the text is too long to fit the widget's geometry. \image elidedlabel-example.png Elided Label example on XPressMusic 5800 diff --git a/doc/src/examples/eventtransitions.qdoc b/doc/src/examples/eventtransitions.qdoc index c66e9c1..bc0503c 100644 --- a/doc/src/examples/eventtransitions.qdoc +++ b/doc/src/examples/eventtransitions.qdoc @@ -29,7 +29,7 @@ \example statemachine/eventtransitions \title Event Transitions Example - The Event Transitions example shows how to use event transitions, a + \brief The Event Transitions example shows how to use event transitions, a feature of \l{The State Machine Framework}. \snippet examples/statemachine/eventtransitions/main.cpp 0 diff --git a/doc/src/examples/extension.qdoc b/doc/src/examples/extension.qdoc index 41fddbb..69604ba 100644 --- a/doc/src/examples/extension.qdoc +++ b/doc/src/examples/extension.qdoc @@ -29,7 +29,7 @@ \example dialogs/extension \title Extension Example - The Extension example shows how to add an extension to a QDialog + \brief The Extension example shows how to add an extension to a QDialog using the QAbstractButton::toggled() signal and the QWidget::setVisible() slot. diff --git a/doc/src/examples/factorial.qdoc b/doc/src/examples/factorial.qdoc index a317189..483cd46 100644 --- a/doc/src/examples/factorial.qdoc +++ b/doc/src/examples/factorial.qdoc @@ -29,7 +29,7 @@ \example statemachine/factorial \title Factorial States Example - The Factorial States example shows how to use \l{The State Machine + \brief The Factorial States example shows how to use \l{The State Machine Framework} to calculate the factorial of an integer. The statechart for calculating the factorial looks as follows: diff --git a/doc/src/examples/fademessage.qdoc b/doc/src/examples/fademessage.qdoc index 7e07324..5abc19a 100644 --- a/doc/src/examples/fademessage.qdoc +++ b/doc/src/examples/fademessage.qdoc @@ -29,9 +29,8 @@ \example effects/fademessage \title Fade Message Effect Example - \div { style="text-align: center"} - \inlineimage fademessageeffect-example.png - \inlineimage fademessageeffect-example-faded.png - \enddiv - + \brief The Fade Message Example shows the QGraphicsColorizeEffect in action. + + \image fademessageeffect-example.png + \image fademessageeffect-example-faded.png */ diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc index 327dfbd..8cae77e 100644 --- a/doc/src/examples/fancybrowser.qdoc +++ b/doc/src/examples/fancybrowser.qdoc @@ -29,7 +29,7 @@ \example webkit/fancybrowser \title Fancy Browser Example - The Fancy Browser example shows how to use jQuery with QtWebKit to + \brief The Fancy Browser example shows how to use jQuery with QtWebKit to create a web browser with special effects and content manipulation. diff --git a/doc/src/examples/fetchmore.qdoc b/doc/src/examples/fetchmore.qdoc index 9e64b0a..8774543 100644 --- a/doc/src/examples/fetchmore.qdoc +++ b/doc/src/examples/fetchmore.qdoc @@ -29,7 +29,7 @@ \example itemviews/fetchmore \title Fetch More Example - The Fetch More example shows how two add items to an item view + \brief The Fetch More example shows how two add items to an item view model on demand. \image fetchmore-example.png diff --git a/doc/src/examples/filetree.qdoc b/doc/src/examples/filetree.qdoc index ae691d8..5b1019a 100644 --- a/doc/src/examples/filetree.qdoc +++ b/doc/src/examples/filetree.qdoc @@ -29,7 +29,7 @@ \example xmlpatterns/filetree \title File System Example - This example shows how to use QtXmlPatterns for querying non-XML + \brief The File Tree example shows how to use QtXmlPatterns for querying non-XML data that is modeled to look like XML. \tableofcontents diff --git a/doc/src/examples/findfiles.qdoc b/doc/src/examples/findfiles.qdoc index 026d61f..df591b6 100644 --- a/doc/src/examples/findfiles.qdoc +++ b/doc/src/examples/findfiles.qdoc @@ -29,8 +29,10 @@ \example dialogs/findfiles \title Find Files Example - The Find Files example shows how to use QProgressDialog to provide - feedback on the progress of a slow operation. The example also + \brief The Find Files example shows how to use QProgressDialog to provide + feedback on the progress of a slow operation. + + The example also shows how to use QFileDialog to facilitate browsing, how to use QTextStream's streaming operators to read a file, and how to use QTableWidget to provide standard table display facilities for diff --git a/doc/src/examples/fingerpaint.qdoc b/doc/src/examples/fingerpaint.qdoc index 49078b6..659784c 100644 --- a/doc/src/examples/fingerpaint.qdoc +++ b/doc/src/examples/fingerpaint.qdoc @@ -29,7 +29,7 @@ \example touch/fingerpaint \title Finger Paint Example - The Finger Paint example shows the use of a touchscreen with a custom widget + \brief The Finger Paint example shows the use of a touchscreen with a custom widget to create a simple painting application. \image touch-fingerpaint-example.png diff --git a/doc/src/examples/flowlayout.qdoc b/doc/src/examples/flowlayout.qdoc index 194a733..7b35b67 100644 --- a/doc/src/examples/flowlayout.qdoc +++ b/doc/src/examples/flowlayout.qdoc @@ -29,7 +29,7 @@ \example layouts/flowlayout \title Flow Layout Example - The Flow Layout example demonstrates a custom layout that arranges child + \brief The Flow Layout example demonstrates a custom layout that arranges child widgets from left to right and top to bottom in a top-level widget. \image flowlayout-example.png Screenshot of the Flow Layout example diff --git a/doc/src/examples/fontsampler.qdoc b/doc/src/examples/fontsampler.qdoc index b3caa9f..6ebeab9 100644 --- a/doc/src/examples/fontsampler.qdoc +++ b/doc/src/examples/fontsampler.qdoc @@ -29,7 +29,7 @@ \example painting/fontsampler \title Font Sampler Example - The Font Sampler example shows how to preview and print multi-page documents. + \brief The Font Sampler example shows how to preview and print multi-page documents. \image fontsampler-example.png */ diff --git a/doc/src/examples/formextractor.qdoc b/doc/src/examples/formextractor.qdoc index 79f6d19..de050c5 100644 --- a/doc/src/examples/formextractor.qdoc +++ b/doc/src/examples/formextractor.qdoc @@ -29,7 +29,7 @@ \example webkit/formextractor \title Form Extractor Example - The Form Extractor example shows how to use QWebFrame with JavaScript to + \brief The Form Extractor example shows how to use QWebFrame with JavaScript to extract form data. \image formextractor-example.png diff --git a/doc/src/examples/fortuneclient.qdoc b/doc/src/examples/fortuneclient.qdoc index 0c74143..7837ee2 100644 --- a/doc/src/examples/fortuneclient.qdoc +++ b/doc/src/examples/fortuneclient.qdoc @@ -29,8 +29,10 @@ \example network/fortuneclient \title Fortune Client Example - The Fortune Client example shows how to create a client for a simple - network service using QTcpSocket. It is intended to be run alongside the + \brief The Fortune Client example shows how to create a client for a simple + network service using QTcpSocket. + + The example is intended to be run alongside the \l{network/fortuneserver}{Fortune Server} example or the \l{network/threadedfortuneserver}{Threaded Fortune Server} example. diff --git a/doc/src/examples/fortuneserver.qdoc b/doc/src/examples/fortuneserver.qdoc index 2fb7f25..5042479 100644 --- a/doc/src/examples/fortuneserver.qdoc +++ b/doc/src/examples/fortuneserver.qdoc @@ -29,8 +29,10 @@ \example network/fortuneserver \title Fortune Server Example - The Fortune Server example shows how to create a server for a simple - network service. It is intended to be run alongside the + \brief The Fortune Server example shows how to create a server for a simple + network service. + + The example is intended to be run alongside the \l{network/fortuneclient}{Fortune Client} example or the \l{network/blockingfortuneclient}{Blocking Fortune Client} example. diff --git a/doc/src/examples/framebufferobject.qdoc b/doc/src/examples/framebufferobject.qdoc index 12b1d5f..539b751 100644 --- a/doc/src/examples/framebufferobject.qdoc +++ b/doc/src/examples/framebufferobject.qdoc @@ -29,7 +29,7 @@ \example opengl/framebufferobject \title Framebuffer Object Example - The Framebuffer Object example demonstrates how to use the + \brief The Framebuffer Object example demonstrates how to use the QGLFramebufferObject class to render into an off-screen buffer and use the contents as a texture in a QGLWidget. diff --git a/doc/src/examples/framebufferobject2.qdoc b/doc/src/examples/framebufferobject2.qdoc index cbe8f3f..b77b495 100644 --- a/doc/src/examples/framebufferobject2.qdoc +++ b/doc/src/examples/framebufferobject2.qdoc @@ -29,7 +29,7 @@ \example opengl/framebufferobject2 \title Framebuffer Object 2 Example - The Framebuffer Object 2 example demonstrates how to use the + \brief The Framebuffer Object 2 example demonstrates how to use the QGLFramebufferObject class to render into an off-screen buffer and use the contents as a texture in a QGLWidget. diff --git a/doc/src/examples/fridgemagnets.qdoc b/doc/src/examples/fridgemagnets.qdoc index 8490801..689ed1f 100644 --- a/doc/src/examples/fridgemagnets.qdoc +++ b/doc/src/examples/fridgemagnets.qdoc @@ -29,7 +29,7 @@ \example draganddrop/fridgemagnets \title Fridge Magnets Example - The Fridge Magnets example shows how to supply more than one type + \brief The Fridge Magnets example shows how to supply more than one type of MIME-encoded data with a drag and drop operation. \image fridgemagnets-example.png diff --git a/doc/src/examples/frozencolumn.qdoc b/doc/src/examples/frozencolumn.qdoc index a21926b..9d0d938 100644 --- a/doc/src/examples/frozencolumn.qdoc +++ b/doc/src/examples/frozencolumn.qdoc @@ -29,7 +29,7 @@ \example itemviews/frozencolumn \title Frozen Column Example - This example demonstrates how to freeze a column within a QTableView. + \brief The Frozen Column example demonstrates how to freeze a column within a QTableView. \image frozencolumn-example.png "Screenshot of the example" diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc index f0d64ef..57796f8 100644 --- a/doc/src/examples/ftp.qdoc +++ b/doc/src/examples/ftp.qdoc @@ -29,7 +29,7 @@ \example network/qftp \title FTP Example - The FTP example demonstrates a simple FTP client that can be used + \brief The FTP example demonstrates a simple FTP client that can be used to list the available files on an FTP server and download them. \image ftp-example.png diff --git a/doc/src/examples/globalVariables.qdoc b/doc/src/examples/globalVariables.qdoc index 70147d2..b03440d 100644 --- a/doc/src/examples/globalVariables.qdoc +++ b/doc/src/examples/globalVariables.qdoc @@ -29,7 +29,7 @@ \example xmlpatterns/xquery/globalVariables \title C++ Source Code Analyzer Example - This example uses XQuery and the \c xmlpatterns command line utility to + \brief The Global Variables example uses XQuery and the \c xmlpatterns command line utility to query C++ source code. \tableofcontents diff --git a/doc/src/examples/googlechat.qdoc b/doc/src/examples/googlechat.qdoc index e9118f1..34dbbf6 100644 --- a/doc/src/examples/googlechat.qdoc +++ b/doc/src/examples/googlechat.qdoc @@ -29,7 +29,7 @@ \example webkit/googlechat \title Google Chat Example - The Google Chat example shows how to use implement a simple Google Chat + \brief The Google Chat example shows how to use implement a simple Google Chat client with QtWebKit. \image googlechat-example.png diff --git a/doc/src/examples/googlesuggest.qdoc b/doc/src/examples/googlesuggest.qdoc index 743a624..8e5c1ca 100644 --- a/doc/src/examples/googlesuggest.qdoc +++ b/doc/src/examples/googlesuggest.qdoc @@ -29,7 +29,7 @@ \example network/googlesuggest \title Google Suggest Example - The Google Suggest example demonstrates how to use the QNetworkAccessManager + \brief The Google Suggest example demonstrates how to use the QNetworkAccessManager class to obtain a list of suggestions from the Google search engine as the user types into a QLineEdit. diff --git a/doc/src/examples/grabber.qdoc b/doc/src/examples/grabber.qdoc index 4b65848..27a89b9 100644 --- a/doc/src/examples/grabber.qdoc +++ b/doc/src/examples/grabber.qdoc @@ -29,7 +29,7 @@ \example opengl/grabber \title Grabber Example - The Grabber examples shows how to retrieve the contents of an OpenGL framebuffer. + \brief The Grabber examples shows how to retrieve the contents of an OpenGL framebuffer. \image grabber-example.png */ diff --git a/doc/src/examples/graphicsview-anchorlayout.qdoc b/doc/src/examples/graphicsview-anchorlayout.qdoc index 156cdb4..68c144a 100644 --- a/doc/src/examples/graphicsview-anchorlayout.qdoc +++ b/doc/src/examples/graphicsview-anchorlayout.qdoc @@ -29,6 +29,6 @@ \example graphicsview/anchorlayout \title Anchor Layout Example - The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout + \brief The Anchor Layout example demonstrates the use of the QGraphicsAnchorLayout class. */ diff --git a/doc/src/examples/graphicsview-flowlayout.qdoc b/doc/src/examples/graphicsview-flowlayout.qdoc index b0c04b8..42ea65f 100644 --- a/doc/src/examples/graphicsview-flowlayout.qdoc +++ b/doc/src/examples/graphicsview-flowlayout.qdoc @@ -29,7 +29,7 @@ \example graphicsview/flowlayout \title Graphics View Flow Layout Example - The Graphics View Flow Layout example shows the use of a flow layout + \brief The Graphics View Flow Layout example shows the use of a flow layout in a Graphics View widget. See the \l{Flow Layout Example} for a corresponding widget-based example. diff --git a/doc/src/examples/graphicsview-simpleanchorlayout.qdoc b/doc/src/examples/graphicsview-simpleanchorlayout.qdoc index 6f6ba5b..603ea50 100644 --- a/doc/src/examples/graphicsview-simpleanchorlayout.qdoc +++ b/doc/src/examples/graphicsview-simpleanchorlayout.qdoc @@ -29,6 +29,6 @@ \example graphicsview/simpleanchorlayout \title Simple Anchor Layout Example - The Simple Anchor Layout example shows the basic use of the + \brief The Simple Anchor Layout example shows the basic use of the QGraphicsAnchorLayout class. */ diff --git a/doc/src/examples/graphicsview-weatheranchorlayout.qdoc b/doc/src/examples/graphicsview-weatheranchorlayout.qdoc index 20173af..da2ee76 100644 --- a/doc/src/examples/graphicsview-weatheranchorlayout.qdoc +++ b/doc/src/examples/graphicsview-weatheranchorlayout.qdoc @@ -29,6 +29,6 @@ \example graphicsview/weatheranchorlayout \title Weather Anchor Layout Example - The Weather Anchor Layout example shows more complex use of the + \brief The Weather Anchor Layout example shows more complex use of the QGraphicsAnchorLayout class to create a real-world window layout. */ diff --git a/doc/src/examples/groupbox.qdoc b/doc/src/examples/groupbox.qdoc index a042437..02e8a9c 100644 --- a/doc/src/examples/groupbox.qdoc +++ b/doc/src/examples/groupbox.qdoc @@ -29,7 +29,7 @@ \example widgets/groupbox \title Group Box Example - The Group Box example shows how to use the different kinds of group + \brief The Group Box example shows how to use the different kinds of group boxes in Qt. Group boxes are container widgets that organize buttons into groups, diff --git a/doc/src/examples/hellogl.qdoc b/doc/src/examples/hellogl.qdoc index dbd672e..641a777 100644 --- a/doc/src/examples/hellogl.qdoc +++ b/doc/src/examples/hellogl.qdoc @@ -29,7 +29,7 @@ \example opengl/hellogl \title Hello GL Example - The Hello GL example demonstrates the basic use of the OpenGL-related classes + \brief The Hello GL example demonstrates the basic use of the OpenGL-related classes provided with Qt. \image hellogl-example.png diff --git a/doc/src/examples/hellogl_es.qdoc b/doc/src/examples/hellogl_es.qdoc index fdc7ab5..d57bb1d 100644 --- a/doc/src/examples/hellogl_es.qdoc +++ b/doc/src/examples/hellogl_es.qdoc @@ -29,7 +29,7 @@ \example opengl/hellogl_es \title Hello GL ES Example - The Hello GL ES example is the \l{Hello GL Example} ported to OpenGL ES. + \brief The Hello GL ES example is the \l{Hello GL Example} ported to OpenGL ES. It also included some effects from the OpenGL \l{Overpainting Example}. \image hellogl-es-example.png diff --git a/doc/src/examples/helloscript.qdoc b/doc/src/examples/helloscript.qdoc index 1c6ea85..745a327 100644 --- a/doc/src/examples/helloscript.qdoc +++ b/doc/src/examples/helloscript.qdoc @@ -29,9 +29,11 @@ \example script/helloscript \title Hello Script Example - The Hello Script example shows the basic use of Qt Script: How to embed + \brief The Hello Script example shows the basic use of Qt Script: How to embed a script engine into the application, how to evaluate a script, and how - to process the result of the evaluation. The example also shows how to + to process the result of the evaluation. + + The example also shows how to apply internationalization to scripts. \snippet examples/script/helloscript/main.cpp 0 diff --git a/doc/src/examples/hellotr.qdoc b/doc/src/examples/hellotr.qdoc index 4b7c4b7..c85a2ad 100644 --- a/doc/src/examples/hellotr.qdoc +++ b/doc/src/examples/hellotr.qdoc @@ -29,8 +29,9 @@ \example linguist/hellotr \title Hello tr() Example - This example is a small Hello World program with a Latin translation. The - screenshot below shows the English version. + \brief The Hello tr() example is a small Hello World program with a Latin translation. + + The screenshot below shows the English version. \image linguist-hellotr_en.png diff --git a/doc/src/examples/htmlinfo.qdoc b/doc/src/examples/htmlinfo.qdoc index 23365f1..e21e8b0 100644 --- a/doc/src/examples/htmlinfo.qdoc +++ b/doc/src/examples/htmlinfo.qdoc @@ -29,7 +29,7 @@ \example xml/htmlinfo \title XML HTML Info Example - The XML HTML Info example provides a simple command line utility that + \brief The XML HTML Info example provides a simple command line utility that scans the current directory for HTML files and prints statistics about them to standard out. diff --git a/doc/src/examples/http.qdoc b/doc/src/examples/http.qdoc index ab03683..4704be0 100644 --- a/doc/src/examples/http.qdoc +++ b/doc/src/examples/http.qdoc @@ -29,7 +29,7 @@ \example network/http \title HTTP Example - The HTTP example demonstrates a simple HTTP client that shows how to fetch files + \brief The HTTP example demonstrates a simple HTTP client that shows how to fetch files specified by URLs from remote hosts. \image http-example.png diff --git a/doc/src/examples/i18n.qdoc b/doc/src/examples/i18n.qdoc index 2ce47e1..392d2e2 100644 --- a/doc/src/examples/i18n.qdoc +++ b/doc/src/examples/i18n.qdoc @@ -29,8 +29,10 @@ \example tools/i18n \title I18N Example - The Internationalization (I18N) example demonstrates Qt's support for translated - text. Developers can write the initial application text in one language, and + \brief The Internationalization (I18N) example demonstrates Qt's support for translated + text. + + Developers can write the initial application text in one language, and translations can be provided later without any modifications to the code. \image i18n-example.png diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc index 82ff994..3fa9952 100644 --- a/doc/src/examples/icons.qdoc +++ b/doc/src/examples/icons.qdoc @@ -29,8 +29,10 @@ \example widgets/icons \title Icons Example - The Icons example shows how QIcon can generate pixmaps reflecting - an icon's state, mode and size. These pixmaps are generated from + \brief The Icons example shows how QIcon can generate pixmaps reflecting + an icon's state, mode and size. + + These pixmaps are generated from the set of pixmaps made available to the icon, and are used by Qt widgets to show an icon representing a particular action. diff --git a/doc/src/examples/imagecomposition.qdoc b/doc/src/examples/imagecomposition.qdoc index cd08de4..8b95ded 100644 --- a/doc/src/examples/imagecomposition.qdoc +++ b/doc/src/examples/imagecomposition.qdoc @@ -29,7 +29,7 @@ \example painting/imagecomposition \title Image Composition Example - The Image Composition example lets the user combine images + \brief The Image Composition example lets the user combine images together using any composition mode supported by QPainter, described in detail in \l{QPainter#Composition Modes}{Composition Modes}. diff --git a/doc/src/examples/imagegestures.qdoc b/doc/src/examples/imagegestures.qdoc index 24a1276..2a8a282 100644 --- a/doc/src/examples/imagegestures.qdoc +++ b/doc/src/examples/imagegestures.qdoc @@ -29,7 +29,7 @@ \example gestures/imagegestures \title Image Gestures Example - This example shows how to enable gestures for a widget and use gesture input + \brief The Image Gestures example shows how to enable gestures for a widget and use gesture input to perform actions. We use two classes to create the user interface for the application: \c MainWidget diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc index 49b3111..e915ef8 100644 --- a/doc/src/examples/imageviewer.qdoc +++ b/doc/src/examples/imageviewer.qdoc @@ -29,8 +29,10 @@ \example widgets/imageviewer \title Image Viewer Example - The example shows how to combine QLabel and QScrollArea to - display an image. QLabel is typically used for displaying text, + \brief The Image Viewer example shows how to combine QLabel and QScrollArea to + display an image. + + QLabel is typically used for displaying text, but it can also display an image. QScrollArea provides a scrolling view around another widget. If the child widget exceeds the size of the frame, QScrollArea automatically provides scroll diff --git a/doc/src/examples/inputpanel.qdoc b/doc/src/examples/inputpanel.qdoc index 54920f0..f001aee 100644 --- a/doc/src/examples/inputpanel.qdoc +++ b/doc/src/examples/inputpanel.qdoc @@ -29,7 +29,7 @@ \example tools/inputpanel \title Input Panel Example - The Input Panel example shows how to create an input panel that + \brief The Input Panel example shows how to create an input panel that can be used to input text into widgets using only the pointer and no keyboard. diff --git a/doc/src/examples/itemviewspuzzle.qdoc b/doc/src/examples/itemviewspuzzle.qdoc index 72e543b..22826ec 100644 --- a/doc/src/examples/itemviewspuzzle.qdoc +++ b/doc/src/examples/itemviewspuzzle.qdoc @@ -29,7 +29,7 @@ \example itemviews/puzzle \title Item Views Puzzle Example - The Puzzle example shows how to enable drag and drop with a custom model + \brief The Puzzle example shows how to enable drag and drop with a custom model to allow items to be transferred between a view and another widget. \image itemviewspuzzle-example.png diff --git a/doc/src/examples/licensewizard.qdoc b/doc/src/examples/licensewizard.qdoc index a58e029..e46ea32 100644 --- a/doc/src/examples/licensewizard.qdoc +++ b/doc/src/examples/licensewizard.qdoc @@ -29,7 +29,7 @@ \example dialogs/licensewizard \title License Wizard Example - The License Wizard example shows how to implement complex wizards in + \brief The License Wizard example shows how to implement complex wizards in Qt. \image licensewizard-example.png Screenshot of the License Wizard example diff --git a/doc/src/examples/lighting.qdoc b/doc/src/examples/lighting.qdoc index 815a42a..05c1e79 100644 --- a/doc/src/examples/lighting.qdoc +++ b/doc/src/examples/lighting.qdoc @@ -29,5 +29,7 @@ \example effects/lighting \title Lighting Effect Example + \brief The Lighting Effect Example shows the QGraphicsDropShadowEffect in action. + \image lightingeffect-example.png */ diff --git a/doc/src/examples/lineedits.qdoc b/doc/src/examples/lineedits.qdoc index 03b4f27..c187dfd 100644 --- a/doc/src/examples/lineedits.qdoc +++ b/doc/src/examples/lineedits.qdoc @@ -29,7 +29,7 @@ \example widgets/lineedits \title Line Edits Example - The Line Edits example demonstrates the many ways that QLineEdit can be used, and + \brief The Line Edits example demonstrates the many ways that QLineEdit can be used, and shows the effects of various properties and validators on the input and output supplied by the user. diff --git a/doc/src/examples/localfortuneclient.qdoc b/doc/src/examples/localfortuneclient.qdoc index 56ead19..b7ea65a 100644 --- a/doc/src/examples/localfortuneclient.qdoc +++ b/doc/src/examples/localfortuneclient.qdoc @@ -29,8 +29,10 @@ \example ipc/localfortuneclient \title Local Fortune Client Example - The Local Fortune Client example shows how to create a client for a simple - local service using QLocalSocket. It is intended to be run alongside the + \brief The Local Fortune Client example shows how to create a client for a simple + local service using QLocalSocket. + + The example is intended to be run alongside the \l{ipc/localfortuneserver}{Local Fortune Server} example. \image localfortuneclient-example.png Screenshot of the Local Fortune Client example diff --git a/doc/src/examples/localfortuneserver.qdoc b/doc/src/examples/localfortuneserver.qdoc index 7a26ff8..21c5feb 100644 --- a/doc/src/examples/localfortuneserver.qdoc +++ b/doc/src/examples/localfortuneserver.qdoc @@ -29,8 +29,10 @@ \example ipc/localfortuneserver \title Local Fortune Server Example - The Local Fortune Server example shows how to create a server for a simple - local service. It is intended to be run alongside the + \brief The Local Fortune Server example shows how to create a server for a simple + local service. + + The example is intended to be run alongside the \l{ipc/localfortuneclient}{Local Fortune Client} example \image localfortuneserver-example.png Screenshot of the Local Fortune Server example diff --git a/doc/src/examples/loopback.qdoc b/doc/src/examples/loopback.qdoc index a5d810a..9e87ace 100644 --- a/doc/src/examples/loopback.qdoc +++ b/doc/src/examples/loopback.qdoc @@ -29,7 +29,7 @@ \example network/loopback \title Loopback Example - The Loopback example shows how to communicate between simple clients and servers on a local + \brief The Loopback example shows how to communicate between simple clients and servers on a local host. \image loopback-example.png diff --git a/doc/src/examples/maemovibration.qdoc b/doc/src/examples/maemovibration.qdoc index de53ba4..58a8837 100644 --- a/doc/src/examples/maemovibration.qdoc +++ b/doc/src/examples/maemovibration.qdoc @@ -30,7 +30,7 @@ \group all-examples \title Maemo Vibration Example - The Maemo Vibration example shows how to tell the Maemo Mode Control Entity + \brief The Maemo Vibration example shows how to tell the Maemo Mode Control Entity (MCE) to vibrate a maemo device. The MCE is a system service on Maemo that, among other things, provides an diff --git a/doc/src/examples/mandelbrot.qdoc b/doc/src/examples/mandelbrot.qdoc index eb53e95..3e516e9 100644 --- a/doc/src/examples/mandelbrot.qdoc +++ b/doc/src/examples/mandelbrot.qdoc @@ -29,7 +29,7 @@ \example threads/mandelbrot \title Mandelbrot Example - The Mandelbrot example shows how to use a worker thread to + \brief The Mandelbrot example shows how to use a worker thread to perform heavy computations without blocking the main thread's event loop. diff --git a/doc/src/examples/masterdetail.qdoc b/doc/src/examples/masterdetail.qdoc index 16ddb3e..06bf228 100644 --- a/doc/src/examples/masterdetail.qdoc +++ b/doc/src/examples/masterdetail.qdoc @@ -29,8 +29,10 @@ \example sql/masterdetail \title Master Detail Example - The Master Detail Example shows how to present data from different - data sources in the same application. The album titles, and the + \brief The Master Detail Example shows how to present data from different + data sources in the same application. + + The album titles, and the corresponding artists and release dates, are kept in a database, while each album's tracks are stored in an XML file. diff --git a/doc/src/examples/mdi.qdoc b/doc/src/examples/mdi.qdoc index 4f64fa1..317a251 100644 --- a/doc/src/examples/mdi.qdoc +++ b/doc/src/examples/mdi.qdoc @@ -29,7 +29,7 @@ \example mainwindows/mdi \title MDI Example - The MDI example shows how to implement a Multiple Document Interface using Qt's + \brief The MDI example shows how to implement a Multiple Document Interface using Qt's QMdiArea class. \image mdi-example.png diff --git a/doc/src/examples/menus.qdoc b/doc/src/examples/menus.qdoc index 0a31ca8..f42aa64 100644 --- a/doc/src/examples/menus.qdoc +++ b/doc/src/examples/menus.qdoc @@ -29,7 +29,7 @@ \example mainwindows/menus \title Menus Example - The Menus example demonstrates how menus can be used in a main + \brief The Menus example demonstrates how menus can be used in a main window application. A menu widget can be either a pull-down menu in a menu bar or a diff --git a/doc/src/examples/mousecalibration.qdoc b/doc/src/examples/mousecalibration.qdoc index 590153b..b2f7939 100644 --- a/doc/src/examples/mousecalibration.qdoc +++ b/doc/src/examples/mousecalibration.qdoc @@ -29,7 +29,7 @@ \example qws/mousecalibration \title Mouse Calibration Example - The Mouse Calibration example demonstrates how to write a simple + \brief The Mouse Calibration example demonstrates how to write a simple program using the mechanisms provided by the QWSMouseHandler class to calibrate the mouse handler in \l{Qt for Embedded Linux}. diff --git a/doc/src/examples/moveblocks.qdoc b/doc/src/examples/moveblocks.qdoc index e5ce3be..5acaa47 100644 --- a/doc/src/examples/moveblocks.qdoc +++ b/doc/src/examples/moveblocks.qdoc @@ -29,7 +29,7 @@ \example animation/moveblocks \title Move Blocks Example - The Move Blocks example shows how to animate items in a + \brief The Move Blocks example shows how to animate items in a QGraphicsScene using a QStateMachine with a custom transition. \image moveblocks-example.png diff --git a/doc/src/examples/movie.qdoc b/doc/src/examples/movie.qdoc index bd5726c..4f31674 100644 --- a/doc/src/examples/movie.qdoc +++ b/doc/src/examples/movie.qdoc @@ -29,8 +29,10 @@ \example widgets/movie \title Movie Example - The Movie example demonstrates how to use QMovie and QLabel to - display animations. Now that Qt comes with the \l{Phonon multimedia + \brief The Movie example demonstrates how to use QMovie and QLabel to + display animations. + + Now that Qt comes with the \l{Phonon multimedia framework} {Phonon multimedia framework}, QMovie is mostly useful if one wants to play a simple animation without the added complexity of a multimedia framework to install and deploy. diff --git a/doc/src/examples/multipleinheritance.qdoc b/doc/src/examples/multipleinheritance.qdoc index fa125f0..9c86950 100644 --- a/doc/src/examples/multipleinheritance.qdoc +++ b/doc/src/examples/multipleinheritance.qdoc @@ -29,7 +29,7 @@ \example uitools/multipleinheritance \title Multiple Inheritance Example - The Multiple Inheritance Example shows how to use a form created with \QD + \brief The Multiple Inheritance Example shows how to use a form created with \QD in an application by subclassing both QWidget and the user interface class, which is \c{Ui::CalculatorForm}. diff --git a/doc/src/examples/musicplayerexample.qdoc b/doc/src/examples/musicplayerexample.qdoc index 7cba674..13a7bba 100644 --- a/doc/src/examples/musicplayerexample.qdoc +++ b/doc/src/examples/musicplayerexample.qdoc @@ -29,8 +29,9 @@ \example phonon/qmusicplayer \title Music Player Example - The Music Player Example shows how to use Phonon - the multimedia + \brief The Music Player Example shows how to use Phonon - the multimedia framework that comes with Qt - to create a simple music player. + The player can play music files, and provides simple playback control, such as pausing, stopping, and resuming the music. diff --git a/doc/src/examples/network-chat.qdoc b/doc/src/examples/network-chat.qdoc index bd8288f..b91b9c0 100644 --- a/doc/src/examples/network-chat.qdoc +++ b/doc/src/examples/network-chat.qdoc @@ -29,7 +29,7 @@ \example network/network-chat \title Network Chat Example - The Network Chat example demonstrates a stateful peer-to-peer Chat client + \brief The Network Chat example demonstrates a stateful peer-to-peer Chat client that uses broadcasting with QUdpSocket and QNetworkInterface to discover its peers. diff --git a/doc/src/examples/network-download.qdoc b/doc/src/examples/network-download.qdoc index da86b2a..48dbe10 100644 --- a/doc/src/examples/network-download.qdoc +++ b/doc/src/examples/network-download.qdoc @@ -29,7 +29,7 @@ \example network/download \title Network Download Example - The Network Download example shows how to perform multiple downloads in + \brief The Network Download example shows how to perform multiple downloads in parallel using the QNetworkAccessManager class. This example is designed to be run from the command line. diff --git a/doc/src/examples/network-downloadmanager.qdoc b/doc/src/examples/network-downloadmanager.qdoc index 0fa8cda..501c469 100644 --- a/doc/src/examples/network-downloadmanager.qdoc +++ b/doc/src/examples/network-downloadmanager.qdoc @@ -29,7 +29,7 @@ \example network/downloadmanager \title Network Download Manager Example - The Network Download example shows how to implement a queue for multiple + \brief The Network Download example shows how to implement a queue for multiple downloads using the QNetworkAccessManager class. This example is designed to be run from the command line. diff --git a/doc/src/examples/openvg-star.qdoc b/doc/src/examples/openvg-star.qdoc index 67422ae..2b25dbc 100644 --- a/doc/src/examples/openvg-star.qdoc +++ b/doc/src/examples/openvg-star.qdoc @@ -29,5 +29,5 @@ \example openvg/star \title OpenVG Star Example - The OpenVG Star example demonstrates the use of Qt's OpenVG integration. + \brief The OpenVG Star example demonstrates the use of Qt's OpenVG integration. */ diff --git a/doc/src/examples/orderform.qdoc b/doc/src/examples/orderform.qdoc index ea93d86..8d61143 100644 --- a/doc/src/examples/orderform.qdoc +++ b/doc/src/examples/orderform.qdoc @@ -29,9 +29,10 @@ \example richtext/orderform \title Order Form Example - The Order Form example shows how to generate rich text documents by - combining a simple template with data input by the user in a dialog. Data - is extracted from a \c DetailsDialog object and displayed on a QTextEdit + \brief The Order Form example shows how to generate rich text documents by + combining a simple template with data input by the user in a dialog. + + Data is extracted from a \c DetailsDialog object and displayed on a QTextEdit with a QTextCursor, using various formats. Each form generated is added to a QTabWidget for easy access. diff --git a/doc/src/examples/orientation.qdoc b/doc/src/examples/orientation.qdoc index f55a650..fc9f1c1 100644 --- a/doc/src/examples/orientation.qdoc +++ b/doc/src/examples/orientation.qdoc @@ -29,7 +29,7 @@ \group all-examples \title Orientation Example - The example shows a simple way to use different UIs depending on the screen + \brief The Orientation example shows a simple way to use different UIs depending on the screen orientation of a mobile device. \image orientation-landscape.png The UI in landscape mode diff --git a/doc/src/examples/overpainting.qdoc b/doc/src/examples/overpainting.qdoc index 12f9756..74001fc 100644 --- a/doc/src/examples/overpainting.qdoc +++ b/doc/src/examples/overpainting.qdoc @@ -29,7 +29,7 @@ \example opengl/overpainting \title Overpainting Example - The Overpainting example shows how QPainter can be used + \brief The Overpainting example shows how QPainter can be used to overpaint a scene rendered using OpenGL in a QGLWidget. \image overpainting-example.png diff --git a/doc/src/examples/padnavigator.qdoc b/doc/src/examples/padnavigator.qdoc index 0942c82..111beda 100644 --- a/doc/src/examples/padnavigator.qdoc +++ b/doc/src/examples/padnavigator.qdoc @@ -29,7 +29,7 @@ \example graphicsview/padnavigator \title Pad Navigator Example - The Pad Navigator Example shows how you can use Graphics View together with + \brief The Pad Navigator Example shows how you can use Graphics View together with embedded widgets and Qt's \l{State Machine Framework} to create a simple but useful, dynamic, animated user interface. diff --git a/doc/src/examples/painterpaths.qdoc b/doc/src/examples/painterpaths.qdoc index 2f740b8..04012eb 100644 --- a/doc/src/examples/painterpaths.qdoc +++ b/doc/src/examples/painterpaths.qdoc @@ -29,7 +29,7 @@ \example painting/painterpaths \title Painter Paths Example - The Painter Paths example shows how painter paths can be used to + \brief The Painter Paths example shows how painter paths can be used to build complex shapes for rendering. \image painterpaths-example.png diff --git a/doc/src/examples/pbuffers.qdoc b/doc/src/examples/pbuffers.qdoc index 0c496b4..1c31994 100644 --- a/doc/src/examples/pbuffers.qdoc +++ b/doc/src/examples/pbuffers.qdoc @@ -29,7 +29,7 @@ \example opengl/pbuffers \title Pixel Buffers Example - The Pixel Buffers example demonstrates how to use the + \brief The Pixel Buffers example demonstrates how to use the QGLPixelBuffer class to render into an off-screen buffer and use the contents as a dynamic texture in a QGLWidget. diff --git a/doc/src/examples/pbuffers2.qdoc b/doc/src/examples/pbuffers2.qdoc index 280f329..4827b86 100644 --- a/doc/src/examples/pbuffers2.qdoc +++ b/doc/src/examples/pbuffers2.qdoc @@ -29,7 +29,7 @@ \example opengl/pbuffers2 \title Pixel Buffers 2 Example - The Pixel Buffers 2 example demonstrates how to use the + \brief The Pixel Buffers 2 example demonstrates how to use the QGLPixelBuffer class to render into an off-screen buffer and use the contents as a dynamic texture in a QGLWidget. diff --git a/doc/src/examples/pinchzoom.qdoc b/doc/src/examples/pinchzoom.qdoc index 04a8bb4..540d54c 100644 --- a/doc/src/examples/pinchzoom.qdoc +++ b/doc/src/examples/pinchzoom.qdoc @@ -29,7 +29,7 @@ \example touch/pinchzoom \title Pinch Zoom Example - The Pinch Zoom example shows how to use low-level touch information + \brief The Pinch Zoom example shows how to use low-level touch information to recognize a gesture. \image touch-pinchzoom-example.png diff --git a/doc/src/examples/pingpong.qdoc b/doc/src/examples/pingpong.qdoc index c4a29a4..a90db94 100644 --- a/doc/src/examples/pingpong.qdoc +++ b/doc/src/examples/pingpong.qdoc @@ -29,7 +29,7 @@ \example statemachine/pingpong \title Ping Pong States Example - The Ping Pong States example shows how to use parallel states together + \brief The Ping Pong States example shows how to use parallel states together with custom events and transitions in \l{The State Machine Framework}. This example implements a statechart where two states communicate by diff --git a/doc/src/examples/pixelator.qdoc b/doc/src/examples/pixelator.qdoc index b6d1fd6..50e79da 100644 --- a/doc/src/examples/pixelator.qdoc +++ b/doc/src/examples/pixelator.qdoc @@ -29,7 +29,7 @@ \example itemviews/pixelator \title Pixelator Example - The Pixelator example shows how delegates can be used to customize the way that + \brief The Pixelator example shows how delegates can be used to customize the way that items are rendered in standard item views. \image pixelator-example.png diff --git a/doc/src/examples/plugandpaint.qdoc b/doc/src/examples/plugandpaint.qdoc index 2a9d286..960ec8c 100644 --- a/doc/src/examples/plugandpaint.qdoc +++ b/doc/src/examples/plugandpaint.qdoc @@ -29,7 +29,7 @@ \example tools/plugandpaint \title Plug & Paint Example - The Plug & Paint example demonstrates how to write Qt + \brief The Plug & Paint example demonstrates how to write Qt applications that can be extended through plugins. \image plugandpaint.png Screenshot of the Plug & Paint example diff --git a/doc/src/examples/portedasteroids.qdoc b/doc/src/examples/portedasteroids.qdoc index 06428bf..3fa0793 100644 --- a/doc/src/examples/portedasteroids.qdoc +++ b/doc/src/examples/portedasteroids.qdoc @@ -29,7 +29,7 @@ \example graphicsview/portedasteroids \title Ported Asteroids Example - The Ported Asteroids example is a port of the + \brief The Ported Asteroids example is a port of the Asteroids game, which was based on QCanvas, to the Graphics View framework. diff --git a/doc/src/examples/portedcanvas.qdoc b/doc/src/examples/portedcanvas.qdoc index 49824de..457d6b3 100644 --- a/doc/src/examples/portedcanvas.qdoc +++ b/doc/src/examples/portedcanvas.qdoc @@ -29,7 +29,7 @@ \example graphicsview/portedcanvas \title Ported Canvas Example - The Ported Canvas example is a port of the old + \brief The Ported Canvas example is a port of the old QCanvas example from Qt 3 to the Graphics View framework. \sa {Porting to Graphics View} diff --git a/doc/src/examples/previewer.qdoc b/doc/src/examples/previewer.qdoc index 2fe8d8d..128d3be 100644 --- a/doc/src/examples/previewer.qdoc +++ b/doc/src/examples/previewer.qdoc @@ -29,7 +29,7 @@ \example webkit/previewer \title Previewer Example - The Previewer example shows how to use QtWebKit's QWebView to preview + \brief The Previewer example shows how to use QtWebKit's QWebView to preview HTML data written in a QPlainTextEdit. \image previewer-example.png @@ -164,4 +164,4 @@ \snippet examples/webkit/previewer/main.cpp 0 -*/ \ No newline at end of file +*/ diff --git a/doc/src/examples/qml-calculator.qdoc b/doc/src/examples/qml-calculator.qdoc index 0624cb4..2e2cdc8 100644 --- a/doc/src/examples/qml-calculator.qdoc +++ b/doc/src/examples/qml-calculator.qdoc @@ -29,7 +29,7 @@ \title Calculator \example demos/declarative/calculator - This demo shows how to write a simple calculator application in QML and JavaScript. + \brief The Qt Quick Calculator demo shows how to write a simple calculator application in QML and JavaScript. \image qml-calculator-example.png */ diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index a910266..bde2ed7 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -29,7 +29,7 @@ \title Animation: Basics Example \example declarative/animation/basics - This example shows how to create and combine \l{QML Animation and Transitions}{animations} in QML. + \brief This example shows how to create and combine \l{QML Animation}{animations} in QML. \table \row @@ -38,6 +38,12 @@ \o color-animation.qml \endtable +/*! + \title Animation: Basics Property Animation Example + \example declarative/animation/basics/property-animation + + \brief This example shows how to create and combine \l{QML Animation}{animations} in QML. + \table \row \o \image qml-propertyanim-example.png @@ -50,7 +56,7 @@ \title Animation: Behavior Examples \example declarative/animation/behaviors - This example shows how to use QML behaviors. + \brief This example shows how to use QML behaviors. \image qml-behaviors-example.png */ @@ -59,7 +65,7 @@ \title Animation: Easing Example \example declarative/animation/easing - This example shows the different easing modes available for \l{QML Animation and Transitions}{animations}. + \brief This example shows the different easing modes available for \l{QML Animation}{animations}. \image qml-easing-example.png */ @@ -68,7 +74,7 @@ \title Animation: States Example \example declarative/animation/states - These examples show how to use \l{State}{states} and \l{Transition}{transitions}. + \brief These examples show how to use \l{States}{states} and \l{Transitions}{transitions}. The \c states.qml example shows how an item can change between states, and \c transitions.qml shows how these state changes can be animated. @@ -92,7 +98,7 @@ \title Image Elements: Border Image Example \example declarative/imageelements/borderimage - These examples show how to use the BorderImage element. + \brief These examples show how to use the BorderImage element. \table \row @@ -101,6 +107,12 @@ \o borderimage.qml \endtable +/*! + \title Image Elements: Shadows Image Example + \example declarative/imageelements/shadows + + \brief This example shows how to use the BorderImage element. + \table \row \o \image qml-borderimage-shadows-example.png @@ -113,7 +125,7 @@ \title Image Elements: Image Example \example declarative/imageelements/image - This example shows how to use the \l Image element and its \l{Image::fillMode}{fillModes}. + \brief This example shows how to use the \l Image element and its \l{Image::fillMode}{fillModes}. \image qml-image-example.png */ @@ -122,8 +134,8 @@ \page declarative-cppextensions-reference.html \title C++ Extensions: Reference examples - These examples show how QML can be extended from C++ in various ways. - + \brief These examples show how QML can be extended from C++ in various ways. + The code for these examples is used throughout the \l {Extending QML Functionalities using C++} reference documentation, which highlights the main principles demonstrated in each example. @@ -151,7 +163,7 @@ \title C++ Extensions: Plugins Example \example declarative/cppextensions/plugins - This example shows how to create a C++ plugin extension by subclassing QDeclarativeExtensionPlugin. + \brief This example shows how to create a C++ plugin extension by subclassing QDeclarativeExtensionPlugin. \image qml-plugins-example.png */ @@ -160,7 +172,7 @@ \title LayoutItem Example \example declarative/cppextensions/qgraphicslayouts/layoutitem - This example show how to use the LayoutItem element to integrate QML items into an existing + \brief This example show how to use the LayoutItem element to integrate QML items into an existing \l{Graphics View Framework}{Graphics View}-based application. \image qml-layoutitem-example.png @@ -169,7 +181,7 @@ \title QGraphicsGridLayout Example \example declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout - This example shows how to use QGraphicsGridLayout to lay out QML items. This is + \brief This example shows how to use QGraphicsGridLayout to lay out QML items. This is useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with QML. @@ -179,7 +191,7 @@ \title QGraphicsLinearLayout Example \example declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout - This example shows how to use QGraphicsLinearLayout to lay out QML items. This is + \brief This example shows how to use QGraphicsLinearLayout to lay out QML items. This is useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with QML. @@ -189,7 +201,7 @@ \title C++ Extensions: QGraphicsLayouts examples \page declarative-cppextensions-qgraphicslayouts.html - These examples show how to integrate \l{Graphics View Framework}{Graphics View} + \brief These examples show how to integrate \l{Graphics View Framework}{Graphics View} layout components with QML: \list @@ -206,7 +218,7 @@ \title C++ Extensions: QWidgets Example \example declarative/cppextensions/qwidgets - This example shows how to embed QWidget-based objects into QML using QGraphicsProxyWidget. + \brief This example shows how to embed QWidget-based objects into QML using QGraphicsProxyWidget. \image qml-qwidgets-example.png */ @@ -215,7 +227,7 @@ \title C++ Extensions: Image Provider Example \example declarative/cppextensions/imageprovider - This examples shows how to use QDeclarativeImageProvider to serve images + \brief This examples shows how to use QDeclarativeImageProvider to serve images to QML image elements. \image qml-imageprovider-example.png @@ -225,7 +237,7 @@ \title C++ Extensions: Network Access Manager Factory Example \example declarative/cppextensions/networkaccessmanagerfactory - This example shows how to use QDeclarativeNetworkAccessManagerFactory to create a QNetworkAccessManager + \brief This example shows how to use QDeclarativeNetworkAccessManagerFactory to create a QNetworkAccessManager with a proxy. */ @@ -234,7 +246,7 @@ \example declarative/i18n \ingroup internationalization - This example shows how to enable text translation in QML. + \brief This example shows how to enable text translation in QML. \image qml-i18n-example.png @@ -316,7 +328,7 @@ \title Positioners Example \example declarative/positioners - This example shows how to use the positioner elements such as \l Row, \l Column, + \brief This example shows how to use positioner elements such as \l Row, \l Column, \l Grid and \l Flow. \image qml-positioners-example.png @@ -326,7 +338,7 @@ \title Key Interaction: Focus Example \example declarative/keyinteraction/focus - This example shows how to handle keyboard input and focus in QML. + \brief This example shows how to handle keyboard input and focus in QML. \image qml-focus-example.png */ @@ -335,7 +347,7 @@ \title Models and Views: AbstractItemModel Example \example declarative/modelviews/abstractitemmodel - This example shows how to use a QAbstractItemModel subclass as a model in QML. + \brief This example shows how to use a QAbstractItemModel subclass as a model in QML. \image qml-abstractitemmodel-example.png */ @@ -344,7 +356,7 @@ \title Models and Views: GridView Example \example declarative/modelviews/gridview - This example shows how to use the GridView element. + \brief This example shows how to use the GridView element. \image qml-gridview-example.png */ @@ -353,7 +365,9 @@ \title Models and Views: ListView Example \example declarative/modelviews/listview - These examples show how to use the ListView element. + \brief This example shows how items can be dynamically added to + and removed from a ListModel, and how these list + modifications can be animated. \table \row @@ -362,6 +376,13 @@ \o dynamiclist.qml \endtable +/*! + \title Models and Views: Expanding Delegate ListView Example + \example declarative/modelviews/listview/expandingdelegates + + \brief This example shows how to create a dynamic delegate, which + expands when selected. + \table \row \o \image qml-listview-expandingdelegates-example.png @@ -369,6 +390,13 @@ \o expandingdelegates.qml \endtable +/*! + \title Models and Views: Highlight ListView Example + \example declarative/modelviews/listview/highlight + + \brief This example shows how to highlight one item + inside a ListView element. + \table \row \o \image qml-listview-highlight-example.png @@ -376,6 +404,13 @@ \o highlight.qml \endtable +/*! + \title Models and Views: Highlight Ranges ListView Example + \example declarative/modelviews/listview/highlightranges + + \brief This example shows how to highlight ranges within a + ListView element. + \table \row \o \image qml-listview-highlightranges-example.png @@ -383,6 +418,12 @@ \o highlightranges.qml \endtable +/*! + \title Models and Views: Sections ListView Example + \example declarative/modelviews/listview/sections + + \brief This example shows how to use the ListView element. + \table \row \o \image qml-listview-sections-example.png @@ -395,7 +436,7 @@ \title Models and Views: PathView Example \example declarative/modelviews/pathview - This example shows how to use the PathView element. + \brief This example shows how to use the PathView element. \image qml-pathview-example.png */ @@ -404,7 +445,7 @@ \title Models and Views: Object ListModel Example \example declarative/modelviews/objectlistmodel - This example shows how to use a QList as a model in QML. + \brief This example shows how to use a QList as a model in QML. \image qml-objectlistmodel-example.png */ @@ -413,7 +454,7 @@ \title Models and Views: Package Example \example declarative/modelviews/package - This example shows how to use the \l Package element. + \brief This example shows how to use the \l Package element. \image qml-package-example.png */ @@ -422,7 +463,7 @@ \title Models and Views: Parallax Example \example declarative/modelviews/parallax - This example shows how to combine and switch between views. + \brief This example shows how to combine and switch between views. \image qml-parallax-example.png */ @@ -431,7 +472,7 @@ \title Models and Views: String ListModel Example \example declarative/modelviews/stringlistmodel - This example shows how to use a QStringList as a model in QML. + \brief This example shows how to use a QStringList as a model in QML. \image qml-stringlistmodel-example.png */ @@ -440,7 +481,7 @@ \title Models and Views: VisualItemModel Example \example declarative/modelviews/visualitemmodel - This example shows how to use the VisualItemModel element. + \brief This example shows how to use the VisualItemModel element. \image qml-visualitemmodel-example.png */ @@ -449,7 +490,7 @@ \title Models and Views: WebView Example \example declarative/modelviews/webview - These examples show how to use the WebView element. + \brief These examples show how to use the WebView element. \table \row @@ -458,6 +499,12 @@ \o alert.qml \endtable +/*! + \title Models and Views: Autosize WebView Example + \example declarative/modelviews/webview/autosize + + \brief These examples show how to use the WebView element. + \table \row \o \image qml-webview-autosize-example.png @@ -465,6 +512,12 @@ \o autosize.qml \endtable +/*! + \title Models and Views: GoogleMaps WebView Example + \example declarative/modelviews/webview/googlemaps + + \brief These examples show how to use the WebView element. + \table \row \o \image qml-webview-googlemaps-example.png @@ -472,6 +525,12 @@ \o googlemaps.qml \endtable +/*! + \title Models and Views: Inline HTML WebView Example + \example declarative/modelviews/webview/inlinehtml + + \brief These examples show how to use the WebView element. + \table \row \o \image qml-webview-inlinehtml-example.png @@ -479,6 +538,12 @@ \o inlinehtml.qml \endtable +/*! + \title Models and Views: New Windows WebView Example + \example declarative/modelviews/webview/newwindows + + \brief These examples show how to use the WebView element. + \table \row \o \image qml-webview-newwindows-example.png @@ -492,22 +557,21 @@ \title Screen Orientation \example declarative/screenorientation - This example shows how to implement screen orientation support for your application. + \brief This example shows how to implement screen orientation support for your application. */ /*! \title SQL Local Storage Example \example declarative/sqllocalstorage - This example shows how to use the SQL Local Storage API in QML. + \brief This example shows how to use the SQL Local Storage API in QML. */ /*! \title Text: Fonts Example \example declarative/text/fonts - These examples show how to discover available fonts from QML and manipulate - text in various ways. + \brief These examples show how to discover available fonts from QML. \table \row @@ -516,6 +580,12 @@ \o availableFonts.qml \endtable +/*! + \title Text: Banner Fonts Example + \example declarative/text/fonts/banner + + \brief These example shows how to manipulate text in various ways. + \table \row \o \image qml-fonts-banner-example.png @@ -523,6 +593,12 @@ \o banner.qml \endtable +/*! + \title Text: Fonts Example + \example declarative/text/fonts/fonts + + \brief These examples shows how to display a text with multiple fonts. + \table \row \o \image qml-fonts-fonts-example.png @@ -530,6 +606,12 @@ \o fonts.qml \endtable +/*! + \title Text: Hello Fonts Example + \example declarative/text/fonts/hello + + \brief This example shows how to manipulate text in various ways. + \table \row \o \image qml-fonts-hello-example.png @@ -542,7 +624,7 @@ \title Text: Text Selection Example \example declarative/text/textselection - This example shows how text selection, copy and paste operations + \brief This example shows how text selection, copy and paste operations can be implemented on top of the TextEdit element. \image qml-textselection-example.png @@ -552,7 +634,7 @@ \title Threading: Threaded ListModel Example \example declarative/threading/threadedlistmodel - This example shows how to use a ListModel from multiple threads using + \brief This example shows how to use a ListModel from multiple threads using WorkerScript. */ @@ -560,15 +642,16 @@ \title Threading: WorkerScript Example \example declarative/threading/workerscript - This example shows how to use the WorkerScript element for threading in QML. + \brief This example shows how to use the WorkerScript element for threading in QML. */ /*! \title Toys: Clocks Example \example declarative/toys/clocks - This example displays a set of clocks with different times for different cities. - Each clock is created by combining \l Image elements with \l Rotation transforms + \brief This example displays a set of clocks with different times for different cities. + + Each clock is created by combining \l Image elements with \l Rotation transforms and \l SpringAnimation behaviors. \image qml-clocks-example.png @@ -578,7 +661,7 @@ \title Toys: Corkboards Example \example declarative/toys/corkboards - This example presents a flickable set of interactive corkboards. It is created + \brief This example presents a flickable set of interactive corkboards. It is created through a combination of elements like \l ListModel, \l Repeater and \l TextEdit together with rotation and scaling transforms, animation and mouse interaction. @@ -589,7 +672,7 @@ \title Toys: Dynamic Scene Example \example declarative/toys/dynamicscene - This example presents an interactive drag-and-drop scene. It demonstrates + \brief This example presents an interactive drag-and-drop scene. It demonstrates how to use QML's \l{Dynamic Object Creation} support to dynamically create and destroy objects. @@ -600,7 +683,7 @@ \title Toys: Tic-Tac-Toe Example \example declarative/toys/tic-tac-toe - This example presents a simple implementation of Tic Tac Toe. + \brief This example presents a simple implementation of Tic Tac Toe. \image qml-tic-tac-toe-example.png */ @@ -609,17 +692,24 @@ \title Toys: TV Tennis Example \example declarative/toys/tvtennis - This example shows how to use animation components such as \l SpringAnimation, + \brief This example shows how to use animation components such as \l SpringAnimation, \l SequentialAnimation and \l PropertyAction to create a game of TV tennis. \image qml-tvtennis-example.png */ /*! + \title Touch Interaction: Gestures Example + \example declarative/touchinteraction/gestures + + \brief This example shows how to use the GestureArea element. +*/ + +/*! \title Touch Interaction: MouseArea Example \example declarative/touchinteraction/mousearea - This example shows how to use the MouseArea element to access information + \brief This example shows how to use the MouseArea element to access information about mouse input. \image qml-mousearea-example.png @@ -629,7 +719,7 @@ \title UI Components: Dial Control Example \example declarative/ui-components/dialcontrol - This example shows how to create a dial-type control. It combines + \brief This example shows how to create a dial-type control. It combines \l Image elements with \l Rotation transforms and \l SpringAnimation behaviors to produce an interactive speedometer-type dial. @@ -641,7 +731,7 @@ \title UI Components: Flipable Example \example declarative/ui-components/flipable - This example shows how to use the \l Flipable element. + \brief This example shows how to use the \l Flipable element. \image qml-flipable-example.png */ @@ -650,7 +740,7 @@ \title UI Components: Progress Bars Example \example declarative/ui-components/progressbar - This example shows how to create a progress bar. + \brief This example shows how to create a progress bar. \image qml-progressbar-example.png */ @@ -659,7 +749,7 @@ \title UI Components: Scroll Bar Example \example declarative/ui-components/scrollbar - This example shows how to create scroll bars for a \l Flickable element + \brief This example shows how to create scroll bars for a \l Flickable element using the \l {Flickable::visibleArea.xPosition}{Flickable::visibleArea} properties. @@ -670,7 +760,7 @@ \title UI Components: Search Box Example \example declarative/ui-components/searchbox - This example shows how to combine TextInput, FocusScope and BorderImage + \brief This example shows how to combine TextInput, FocusScope and BorderImage elements to display multiple text input fields. \image qml-searchbox-example.png @@ -680,7 +770,7 @@ \title UI Components: Slide Switch Example \example declarative/ui-components/slideswitch - This example shows how to create a slide switch control. + \brief This example shows how to create a slide switch control. \image qml-slideswitch-example.png */ @@ -689,7 +779,7 @@ \title UI Components: Spinner Example \example declarative/ui-components/spinner - This example shows how to create a spinner-type component using the PathView element. + \brief This example shows how to create a spinner-type component using the PathView element. \image qml-spinner-example.png */ @@ -698,7 +788,7 @@ \title UI Components: Tab Widget Example \example declarative/ui-components/tabwidget - This example shows how to create a tab widget. It also demonstrates how + \brief This example shows how to create a tab widget. It also demonstrates how \l {Property aliases}{property aliases} and \l {Introduction to the QML Language#Default Properties}{default properties} can be used to collect and assemble the child items declared within an \l Item. @@ -710,7 +800,7 @@ \title XML: XMLHttpRequest Example \example declarative/xml/xmlhttprequest - This example shows how to use the \l XmlHttpRequest API in QML. + \brief This example shows how to use the \l XmlHttpRequest API in QML. \image qml-xmlhttprequest-example.png */ diff --git a/doc/src/examples/qml-extending.qdoc b/doc/src/examples/qml-extending.qdoc index 8dbbe7f..da7ab47 100644 --- a/doc/src/examples/qml-extending.qdoc +++ b/doc/src/examples/qml-extending.qdoc @@ -29,7 +29,8 @@ \example declarative/cppextensions/referenceexamples/adding \title Extending QML - Adding Types Example -The Adding Types Example shows how to add a new element type, \c Person, to QML. +\brief The Adding Types Example shows how to add a new element type, \c Person, to QML. + The \c Person type can be used from QML like this: \snippet examples/declarative/cppextensions/referenceexamples/adding/example.qml 0 diff --git a/doc/src/examples/qml-flickr.qdoc b/doc/src/examples/qml-flickr.qdoc index c23c0ba..65e8e0d 100644 --- a/doc/src/examples/qml-flickr.qdoc +++ b/doc/src/examples/qml-flickr.qdoc @@ -29,7 +29,7 @@ \title Flickr Mobile \example demos/declarative/flickr - This demo shows how to write a mobile Flickr browser application in QML. + \brief The Qt Quick Flickr Mobile demo shows how to write a mobile Flickr browser application in QML. \image qml-flickr-demo.png */ diff --git a/doc/src/examples/qml-folderlistmodel.qdoc b/doc/src/examples/qml-folderlistmodel.qdoc index ed92c9d..609be27 100644 --- a/doc/src/examples/qml-folderlistmodel.qdoc +++ b/doc/src/examples/qml-folderlistmodel.qdoc @@ -30,7 +30,9 @@ \title FolderListModel - a C++ model plugin \example src/imports/folderlistmodel -This plugin shows how to make a C++ model available to QML. It presents +\brief The FolderListModel plugin example shows how to make a C++ model available to QML. + +It presents a simple file list for a single folder (directory) and allows the presented folder to be changed. diff --git a/doc/src/examples/qml-minehunt.qdoc b/doc/src/examples/qml-minehunt.qdoc index ac13456..66c7dd3 100644 --- a/doc/src/examples/qml-minehunt.qdoc +++ b/doc/src/examples/qml-minehunt.qdoc @@ -29,7 +29,7 @@ \title Minehunt \example demos/declarative/minehunt - This demo shows how to create a simple Minehunt game, using QML for the + \brief The Qt Quick Minehunt demo shows how to create a simple Minehunt game, using QML for the UI and C++ for the game logic. \image qml-minehunt-demo.png diff --git a/doc/src/examples/qml-photoviewer.qdoc b/doc/src/examples/qml-photoviewer.qdoc index 5ecbf84..40b6372 100644 --- a/doc/src/examples/qml-photoviewer.qdoc +++ b/doc/src/examples/qml-photoviewer.qdoc @@ -29,7 +29,7 @@ \title Photo Viewer \example demos/declarative/photoviewer - This demo shows how to write a Flickr photo viewer application in QML. + \brief The Qt Quick Photo Viewer demo shows how to write a Flickr photo viewer application in QML. \image qml-photoviewer-demo.png */ diff --git a/doc/src/examples/qml-rssnews.qdoc b/doc/src/examples/qml-rssnews.qdoc index beea4d3..76df4e3 100644 --- a/doc/src/examples/qml-rssnews.qdoc +++ b/doc/src/examples/qml-rssnews.qdoc @@ -29,7 +29,7 @@ \title RSS News \example demos/declarative/rssnews - This demo shows how to write a RSS news reader in QML. + \brief The Qt Quick RSS News demo shows how to write a RSS news reader in QML. \image qml-rssnews-demo.png */ diff --git a/doc/src/examples/qml-samegame.qdoc b/doc/src/examples/qml-samegame.qdoc index 81a26a3..8b67a49 100644 --- a/doc/src/examples/qml-samegame.qdoc +++ b/doc/src/examples/qml-samegame.qdoc @@ -29,7 +29,7 @@ \title Same Game \example demos/declarative/samegame - This demo shows how to write a 'Same Game' game in QML, using Javascript + \brief The Qt Quick Same Game demo shows how to write a 'Same Game' game in QML, using Javascript for all the game logic. \image qml-samegame-demo.png diff --git a/doc/src/examples/qml-snake.qdoc b/doc/src/examples/qml-snake.qdoc index bce0e71..8a27711 100644 --- a/doc/src/examples/qml-snake.qdoc +++ b/doc/src/examples/qml-snake.qdoc @@ -29,7 +29,7 @@ \title Snake \example demos/declarative/snake - This demo shows how to write a Snake game in QML, controlled by the + \brief The Qt Quick Snake demo shows how to write a Snake game in QML, controlled by the keyboard as well as the mouse. \image qml-snake-demo.png diff --git a/doc/src/examples/qml-twitter.qdoc b/doc/src/examples/qml-twitter.qdoc index 3ebabb4..3334370 100644 --- a/doc/src/examples/qml-twitter.qdoc +++ b/doc/src/examples/qml-twitter.qdoc @@ -29,7 +29,7 @@ \title Twitter Mobile \example demos/declarative/twitter - This demo shows how to write a mobile Twitter search client in QML. Use it to + \brief The Qt Quick Twitter Mobile demo shows how to write a mobile Twitter search client in QML. Use it to see what people think about Qt Quick! \image qml-twitter-demo.png diff --git a/doc/src/examples/qml-webbrowser.qdoc b/doc/src/examples/qml-webbrowser.qdoc index 08416af..bdead7f 100644 --- a/doc/src/examples/qml-webbrowser.qdoc +++ b/doc/src/examples/qml-webbrowser.qdoc @@ -26,10 +26,10 @@ ****************************************************************************/ /*! - \title QML Web Browser + \title Qt Quick Web Browser \example demos/declarative/webbrowser - This demo shows how to write a simple web browser in QML by combining the + \brief The Qt Quick Web Browser demo shows how to write a simple web browser in QML by combining the WebView element with other components including scroll bars, \l Flickable views and TextInput fields. diff --git a/doc/src/examples/qobjectxmlmodel.qdoc b/doc/src/examples/qobjectxmlmodel.qdoc index a950f72..6f66e70 100644 --- a/doc/src/examples/qobjectxmlmodel.qdoc +++ b/doc/src/examples/qobjectxmlmodel.qdoc @@ -29,7 +29,7 @@ \example xmlpatterns/qobjectxmlmodel \title QObject XML Model Example - This example shows how to use QtXmlPatterns to query QObject trees + \brief The XML Model example shows how to use QtXmlPatterns to query QObject trees by modeling the non-XML data structure of a QObject tree to look like XML. diff --git a/doc/src/examples/qtconcurrent-imagescaling.qdoc b/doc/src/examples/qtconcurrent-imagescaling.qdoc index 1b3c6d6..15f2dab 100644 --- a/doc/src/examples/qtconcurrent-imagescaling.qdoc +++ b/doc/src/examples/qtconcurrent-imagescaling.qdoc @@ -29,6 +29,6 @@ \example qtconcurrent/imagescaling \title QtConcurrent Image Scaling Example - The QtConcurrent Map example shows how to use the asynchronous + \brief The QtConcurrent Image Scaling example shows how to use the asynchronous QtConcurrent API to load and scale a collection of images. */ diff --git a/doc/src/examples/qtconcurrent-map.qdoc b/doc/src/examples/qtconcurrent-map.qdoc index 76a6f13..6b22966 100644 --- a/doc/src/examples/qtconcurrent-map.qdoc +++ b/doc/src/examples/qtconcurrent-map.qdoc @@ -29,6 +29,6 @@ \example qtconcurrent/map \title QtConcurrent Map Example - The QtConcurrent Map example shows how to use the synchronous (blocking) + \brief The QtConcurrent Map example shows how to use the synchronous (blocking) QtConcurrent API to scale a collection of images. */ diff --git a/doc/src/examples/qtconcurrent-progressdialog.qdoc b/doc/src/examples/qtconcurrent-progressdialog.qdoc index 43e5fef..7f18b0f 100644 --- a/doc/src/examples/qtconcurrent-progressdialog.qdoc +++ b/doc/src/examples/qtconcurrent-progressdialog.qdoc @@ -29,7 +29,7 @@ \example qtconcurrent/progressdialog \title QtConcurrent Progress Dialog Example - The QtConcurrent Progress Dialog example shows how to use the + \brief The QtConcurrent Progress Dialog example shows how to use the QFutureWatcher class to monitor the progress of a long-running operation. \image qtconcurrent-progressdialog.png diff --git a/doc/src/examples/qtconcurrent-runfunction.qdoc b/doc/src/examples/qtconcurrent-runfunction.qdoc index c66ac11..7e73508 100644 --- a/doc/src/examples/qtconcurrent-runfunction.qdoc +++ b/doc/src/examples/qtconcurrent-runfunction.qdoc @@ -29,7 +29,7 @@ \example qtconcurrent/runfunction \title QtConcurrent Run Function Example - The QtConcurrent Run Function example shows how to apply concurrency to + \brief The QtConcurrent Run Function example shows how to apply concurrency to a standard function, using QFuture instances to retrieve return values at a later time. */ diff --git a/doc/src/examples/qtconcurrent-wordcount.qdoc b/doc/src/examples/qtconcurrent-wordcount.qdoc index 26e65be..5f87884 100644 --- a/doc/src/examples/qtconcurrent-wordcount.qdoc +++ b/doc/src/examples/qtconcurrent-wordcount.qdoc @@ -29,7 +29,7 @@ \example qtconcurrent/wordcount \title QtConcurrent Word Count Example - The QtConcurrent Word Count example demonstrates the use of the map-reduce + \brief The QtConcurrent Word Count example demonstrates the use of the map-reduce algorithm when applied to the problem of counting words in a collection of files. */ diff --git a/doc/src/examples/qtscriptcalculator.qdoc b/doc/src/examples/qtscriptcalculator.qdoc index ce925f3..109394d 100644 --- a/doc/src/examples/qtscriptcalculator.qdoc +++ b/doc/src/examples/qtscriptcalculator.qdoc @@ -29,7 +29,7 @@ \example script/calculator \title QtScript Calculator Example - In this simple QtScript example, we show how to implement the + \brief In the QtScript Calculator example, we show how to implement the functionality of a calculator widget. \image qtscript-calculator-example.png diff --git a/doc/src/examples/qtscriptcustomclass.qdoc b/doc/src/examples/qtscriptcustomclass.qdoc index b3d4535..21624a0 100644 --- a/doc/src/examples/qtscriptcustomclass.qdoc +++ b/doc/src/examples/qtscriptcustomclass.qdoc @@ -29,7 +29,7 @@ \example script/customclass \title Custom Script Class Example - The Custom Script Class example shows how to use QScriptClass and QScriptClassPropertyIterator + \brief The Custom Script Class example shows how to use QScriptClass and QScriptClassPropertyIterator to implement a custom script class. The script class we are going to implement is called \c{ByteArray}. It provides a wrapper around diff --git a/doc/src/examples/qtscripttetrix.qdoc b/doc/src/examples/qtscripttetrix.qdoc index 92a50bf..fe9632e 100644 --- a/doc/src/examples/qtscripttetrix.qdoc +++ b/doc/src/examples/qtscripttetrix.qdoc @@ -29,7 +29,7 @@ \example script/qstetrix \title Qt Script Tetrix Example - The QSTetrix example is a Qt Script version of the classic Tetrix game. + \brief The QSTetrix example is a Qt Script version of the classic Tetrix game. \image tetrix-example.png diff --git a/doc/src/examples/querymodel.qdoc b/doc/src/examples/querymodel.qdoc index 554ae21..9c523e7 100644 --- a/doc/src/examples/querymodel.qdoc +++ b/doc/src/examples/querymodel.qdoc @@ -29,7 +29,7 @@ \example sql/querymodel \title Query Model Example - The Query Model example shows how to make customized versions of + \brief The Query Model example shows how to make customized versions of data obtained from a SQL query, using a model that encapsulates the query and table views to display the results. diff --git a/doc/src/examples/queuedcustomtype.qdoc b/doc/src/examples/queuedcustomtype.qdoc index 85f6b07..4b1db01 100644 --- a/doc/src/examples/queuedcustomtype.qdoc +++ b/doc/src/examples/queuedcustomtype.qdoc @@ -29,7 +29,7 @@ \example threads/queuedcustomtype \title Queued Custom Type Example - The Queued Custom Type example shows how to send custom types between + \brief The Queued Custom Type example shows how to send custom types between threads with queued signals and slots. \image queuedcustomtype-example.png diff --git a/doc/src/examples/qxmlstreambookmarks.qdoc b/doc/src/examples/qxmlstreambookmarks.qdoc index ecb8fce..6d2a6f1 100644 --- a/doc/src/examples/qxmlstreambookmarks.qdoc +++ b/doc/src/examples/qxmlstreambookmarks.qdoc @@ -29,7 +29,7 @@ \example xml/streambookmarks \title QXmlStream Bookmarks Example - The QXmlStream Bookmarks example provides a reader for XML Bookmark + \brief The QXmlStream Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) files using Qt's QXmlStreamReader class for reading, and QXmlStreamWriter class for writing the files. diff --git a/doc/src/examples/recentfiles.qdoc b/doc/src/examples/recentfiles.qdoc index 048df01..03c79c6 100644 --- a/doc/src/examples/recentfiles.qdoc +++ b/doc/src/examples/recentfiles.qdoc @@ -29,7 +29,7 @@ \example mainwindows/recentfiles \title Recent Files Example - The Recent Files example shows how a standard File menu can be extended to show + \brief The Recent Files example shows how a standard File menu can be extended to show the most recent files loaded by a main window application. \image recentfiles-example.png diff --git a/doc/src/examples/recipes.qdoc b/doc/src/examples/recipes.qdoc index d4128aa..c93e4dbe 100644 --- a/doc/src/examples/recipes.qdoc +++ b/doc/src/examples/recipes.qdoc @@ -29,7 +29,7 @@ \example xmlpatterns/recipes \title Recipes Example - The Recipes example shows how to use QtXmlPatterns to query XML data + \brief The Recipes example shows how to use QtXmlPatterns to query XML data loaded from a file. \tableofcontents diff --git a/doc/src/examples/regexp.qdoc b/doc/src/examples/regexp.qdoc index 7b97156..4fc07d6 100644 --- a/doc/src/examples/regexp.qdoc +++ b/doc/src/examples/regexp.qdoc @@ -29,7 +29,7 @@ \example tools/regexp \title Regular Expressions Example - The Regular Expressions (RegExp) example shows how regular expressions in Qt are + \brief The Regular Expressions (RegExp) example shows how regular expressions in Qt are applied to text by providing an environment in which new regular expressions can be created and tested on custom text strings. diff --git a/doc/src/examples/relationaltablemodel.qdoc b/doc/src/examples/relationaltablemodel.qdoc index f23c69c..1c2c473 100644 --- a/doc/src/examples/relationaltablemodel.qdoc +++ b/doc/src/examples/relationaltablemodel.qdoc @@ -29,7 +29,7 @@ \example sql/relationaltablemodel \title Relational Table Model Example - The Relational Table Model example shows how to use table views with a relational + \brief The Relational Table Model example shows how to use table views with a relational model to visualize the relations between items in a database. \image relationaltablemodel-example.png diff --git a/doc/src/examples/remotecontrol.qdoc b/doc/src/examples/remotecontrol.qdoc index c92c5e4..e1e60b0 100644 --- a/doc/src/examples/remotecontrol.qdoc +++ b/doc/src/examples/remotecontrol.qdoc @@ -29,6 +29,6 @@ \example help/remotecontrol \title Remote Control Example - This example shows how to use and control Qt Assistant + \brief The Remote Control example shows how to use and control Qt Assistant as a help viewer. -*/ \ No newline at end of file +*/ diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc index e93886b..b872008 100644 --- a/doc/src/examples/rogue.qdoc +++ b/doc/src/examples/rogue.qdoc @@ -29,7 +29,7 @@ \example statemachine/rogue \title Rogue Example - The Rogue example shows how to use the Qt state machine for event + \brief The Rogue example shows how to use the Qt state machine for event handling. \image rogue-example.png diff --git a/doc/src/examples/rsslisting.qdoc b/doc/src/examples/rsslisting.qdoc index 9554842..7ad464f 100644 --- a/doc/src/examples/rsslisting.qdoc +++ b/doc/src/examples/rsslisting.qdoc @@ -29,7 +29,7 @@ \example xml/rsslisting \title RSS-Listing Example - The RSS-Listing example shows how to create a widget that displays news items + \brief The RSS-Listing example shows how to create a widget that displays news items from RDF news sources. \image rsslistingexample.png diff --git a/doc/src/examples/samplebuffers.qdoc b/doc/src/examples/samplebuffers.qdoc index c9d6438..422f96b 100644 --- a/doc/src/examples/samplebuffers.qdoc +++ b/doc/src/examples/samplebuffers.qdoc @@ -29,7 +29,7 @@ \example opengl/samplebuffers \title Sample Buffers Example - The Sample Buffers example demonstrates how to use and enable + \brief The Sample Buffers example demonstrates how to use and enable sample buffers in a QGLWidget. \image samplebuffers-example.png diff --git a/doc/src/examples/saxbookmarks.qdoc b/doc/src/examples/saxbookmarks.qdoc index e912372..089f2de 100644 --- a/doc/src/examples/saxbookmarks.qdoc +++ b/doc/src/examples/saxbookmarks.qdoc @@ -29,8 +29,10 @@ \example xml/saxbookmarks \title SAX Bookmarks Example - The SAX Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) - files that uses Qt's SAX-based API to read and parse the files. The DOM Bookmarks + \brief The SAX Bookmarks example provides a reader for XML Bookmark Exchange Language (XBEL) + files that uses Qt's SAX-based API to read and parse the files. + + The DOM Bookmarks example provides an alternative way to read this type of file. \image saxbookmarks-example.png diff --git a/doc/src/examples/schema.qdoc b/doc/src/examples/schema.qdoc index 77ccaf5..0ba794b 100644 --- a/doc/src/examples/schema.qdoc +++ b/doc/src/examples/schema.qdoc @@ -29,7 +29,7 @@ \example xmlpatterns/schema \title XML Schema Validation Example - The XML Schema Validation example shows how to use QtXmlPatterns to + \brief The XML Schema Validation example shows how to use QtXmlPatterns to validate XML with a W3C XML Schema. \tableofcontents diff --git a/doc/src/examples/screenshot.qdoc b/doc/src/examples/screenshot.qdoc index bc87fdb..1d8505f 100644 --- a/doc/src/examples/screenshot.qdoc +++ b/doc/src/examples/screenshot.qdoc @@ -29,7 +29,7 @@ \example desktop/screenshot \title Screenshot Example - The Screenshot example shows how to take a screenshot of the + \brief The Screenshot example shows how to take a screenshot of the desktop using QApplication and QDesktopWidget. It also shows how to use QTimer to provide a single-shot timer, and how to reimplement the QWidget::resizeEvent() event handler to make sure diff --git a/doc/src/examples/scribble.qdoc b/doc/src/examples/scribble.qdoc index da9b0b6..56b678c 100644 --- a/doc/src/examples/scribble.qdoc +++ b/doc/src/examples/scribble.qdoc @@ -29,7 +29,7 @@ \example widgets/scribble \title Scribble Example - The Scribble example shows how to reimplement some of QWidget's + \brief The Scribble example shows how to reimplement some of QWidget's event handlers to receive the events generated for the application's widgets. diff --git a/doc/src/examples/script-marshal.qdoc b/doc/src/examples/script-marshal.qdoc index 90ff69b..852f9be 100644 --- a/doc/src/examples/script-marshal.qdoc +++ b/doc/src/examples/script-marshal.qdoc @@ -29,6 +29,6 @@ \example script/marshal \title Qt Script Marshalling Example - The Qt Script Marshalling example demonstrates the marshalling of value + \brief The Qt Script Marshalling example demonstrates the marshalling of value types between C++ and Qt Script. */ diff --git a/doc/src/examples/script-qscript.qdoc b/doc/src/examples/script-qscript.qdoc index 6c50c3f..d0c2841 100644 --- a/doc/src/examples/script-qscript.qdoc +++ b/doc/src/examples/script-qscript.qdoc @@ -29,6 +29,6 @@ \example script/qscript \title Qt Script Interpreter Example - The Qt Script Interpreter example shows how to create an interactive + \brief The Qt Script Interpreter example shows how to create an interactive interpreter for Qt Script. */ diff --git a/doc/src/examples/script-qsdbg.qdoc b/doc/src/examples/script-qsdbg.qdoc index 59ab10e..7e4f05c 100644 --- a/doc/src/examples/script-qsdbg.qdoc +++ b/doc/src/examples/script-qsdbg.qdoc @@ -29,6 +29,6 @@ \example script/qsdbg \title Qt Script Debugger Example - The Qt Script Debugger example shows how to enable the Qt Script debugger + \brief The Qt Script Debugger example shows how to enable the Qt Script debugger for command line debugging. */ diff --git a/doc/src/examples/sdi.qdoc b/doc/src/examples/sdi.qdoc index 5e3eb79..e975879 100644 --- a/doc/src/examples/sdi.qdoc +++ b/doc/src/examples/sdi.qdoc @@ -29,7 +29,7 @@ \example mainwindows/sdi \title SDI Example - The SDI example shows how to create a Single Document Interface. It uses a number of + \brief The SDI example shows how to create a Single Document Interface. It uses a number of top-level windows to display the contents of different text files. \image sdi-example.png diff --git a/doc/src/examples/securesocketclient.qdoc b/doc/src/examples/securesocketclient.qdoc index 30ba16a..655465c 100644 --- a/doc/src/examples/securesocketclient.qdoc +++ b/doc/src/examples/securesocketclient.qdoc @@ -29,7 +29,7 @@ \example network/securesocketclient \title Secure Socket Client Example - The Secure Socket Client example shows how to use QSslSocket to + \brief The Secure Socket Client example shows how to use QSslSocket to communicate over an encrypted (SSL) connection. It also demonstrates how to deal with authenticity problems, and how to display security and certificate information. diff --git a/doc/src/examples/semaphores.qdoc b/doc/src/examples/semaphores.qdoc index aeced47..3bbf028 100644 --- a/doc/src/examples/semaphores.qdoc +++ b/doc/src/examples/semaphores.qdoc @@ -29,7 +29,7 @@ \example threads/semaphores \title Semaphores Example - The Semaphores example shows how to use QSemaphore to control + \brief The Semaphores example shows how to use QSemaphore to control access to a circular buffer shared by a producer thread and a consumer thread. diff --git a/doc/src/examples/settingseditor.qdoc b/doc/src/examples/settingseditor.qdoc index a0fcc17..fc581fd 100644 --- a/doc/src/examples/settingseditor.qdoc +++ b/doc/src/examples/settingseditor.qdoc @@ -29,7 +29,7 @@ \example tools/settingseditor \title Settings Editor Example - The Settings Editor example shows how Qt's standard settings support is used in an + \brief The Settings Editor example shows how Qt's standard settings support is used in an application by providing an editor that enables the user to view the settings for installed applications, and modify those that can be edited. diff --git a/doc/src/examples/shapedclock.qdoc b/doc/src/examples/shapedclock.qdoc index e66b3ef..c46c5a7 100644 --- a/doc/src/examples/shapedclock.qdoc +++ b/doc/src/examples/shapedclock.qdoc @@ -29,7 +29,7 @@ \example widgets/shapedclock \title Shaped Clock Example - The Shaped Clock example shows how to apply a widget mask to a top-level + \brief The Shaped Clock example shows how to apply a widget mask to a top-level widget to produce a shaped window. \image shapedclock-example.png diff --git a/doc/src/examples/sharedmemory.qdoc b/doc/src/examples/sharedmemory.qdoc index 2f4088b..c67d3f5 100644 --- a/doc/src/examples/sharedmemory.qdoc +++ b/doc/src/examples/sharedmemory.qdoc @@ -29,9 +29,10 @@ \example ipc/sharedmemory \title Shared Memory Example - The Shared Memory example shows how to use the QSharedMemory class - to implement inter-process communication using shared memory. To - build the example, run make. To run the example, start two instances + \brief The Shared Memory example shows how to use the QSharedMemory class + to implement inter-process communication using shared memory. + + To build the example, run make. To run the example, start two instances of the executable. The main() function creates an \l {QApplication} {application} and an instance of our example's Dialog class. The dialog is displayed and then control is passed to the application in diff --git a/doc/src/examples/simpledecoration.qdoc b/doc/src/examples/simpledecoration.qdoc index 3c02009..7b033a6 100644 --- a/doc/src/examples/simpledecoration.qdoc +++ b/doc/src/examples/simpledecoration.qdoc @@ -30,7 +30,7 @@ \title Simple Decoration Example \ingroup qt-embedded - The Simple Decoration example shows how to create a custom window decoration + \brief The Simple Decoration example shows how to create a custom window decoration for embedded applications. \image embedded-simpledecoration-example.png diff --git a/doc/src/examples/simpledommodel.qdoc b/doc/src/examples/simpledommodel.qdoc index b7fae91..2f7dd41 100644 --- a/doc/src/examples/simpledommodel.qdoc +++ b/doc/src/examples/simpledommodel.qdoc @@ -29,7 +29,7 @@ \example itemviews/simpledommodel \title Simple DOM Model Example - The Simple DOM Model example shows how an existing class can be adapted for use with + \brief The Simple DOM Model example shows how an existing class can be adapted for use with the model/view framework. \image simpledommodel-example.png diff --git a/doc/src/examples/simpleselector.qdoc b/doc/src/examples/simpleselector.qdoc index 4455c2b..28f9707 100644 --- a/doc/src/examples/simpleselector.qdoc +++ b/doc/src/examples/simpleselector.qdoc @@ -29,7 +29,7 @@ \example webkit/simpleselector \title Simple Selector Example - The Simple Selector example shows how to use QWebElement to access the + \brief The Simple Selector example shows how to use QWebElement to access the Document Object Model (DOM) in a Web page. \image webkit-simpleselector.png diff --git a/doc/src/examples/simpletextviewer.qdoc b/doc/src/examples/simpletextviewer.qdoc index bf44938..6bb1420 100644 --- a/doc/src/examples/simpletextviewer.qdoc +++ b/doc/src/examples/simpletextviewer.qdoc @@ -29,7 +29,7 @@ \example help/simpletextviewer \title Simple Text Viewer Example - The Simple Text Viewer example shows how to use \QA as a customized + \brief The Simple Text Viewer example shows how to use \QA as a customized help viewer for your application. This is done in two stages. Firstly, documentation is created and \QA diff --git a/doc/src/examples/simpletreemodel.qdoc b/doc/src/examples/simpletreemodel.qdoc index 00464b2..7989893 100644 --- a/doc/src/examples/simpletreemodel.qdoc +++ b/doc/src/examples/simpletreemodel.qdoc @@ -29,9 +29,10 @@ \example itemviews/simpletreemodel \title Simple Tree Model Example - The Simple Tree Model example shows how to create a basic, read-only - hierarchical model to use with Qt's standard view classes. For a - description of simple non-hierarchical list and table models, see the + \brief The Simple Tree Model example shows how to create a basic, read-only + hierarchical model to use with Qt's standard view classes. + + For a description of simple non-hierarchical list and table models, see the \l{Model/View Programming} overview. \image simpletreemodel-example.png diff --git a/doc/src/examples/simplewidgetmapper.qdoc b/doc/src/examples/simplewidgetmapper.qdoc index 60837fc..705da4b 100644 --- a/doc/src/examples/simplewidgetmapper.qdoc +++ b/doc/src/examples/simplewidgetmapper.qdoc @@ -29,7 +29,7 @@ \example itemviews/simplewidgetmapper \title Simple Widget Mapper Example - The Simple Widget Mapper example shows how to use a widget mapper to display + \brief The Simple Widget Mapper example shows how to use a widget mapper to display data from a model in a collection of widgets. \image simplewidgetmapper-example.png diff --git a/doc/src/examples/sipdialog.qdoc b/doc/src/examples/sipdialog.qdoc index 349ab18..ce78a9e 100644 --- a/doc/src/examples/sipdialog.qdoc +++ b/doc/src/examples/sipdialog.qdoc @@ -30,7 +30,7 @@ \title SIP Dialog Example \ingroup qtce - The SIP Dialog example shows how to create a dialog that is aware of + \brief The SIP Dialog example shows how to create a dialog that is aware of the Windows Mobile SIP (Software Input Panel) and reacts to it. \table diff --git a/doc/src/examples/sliders.qdoc b/doc/src/examples/sliders.qdoc index 7e47dcc..fc8af36 100644 --- a/doc/src/examples/sliders.qdoc +++ b/doc/src/examples/sliders.qdoc @@ -29,7 +29,7 @@ \example widgets/sliders \title Sliders Example - Qt provides three types of slider-like widgets: QSlider, + \brief Qt provides three types of slider-like widgets: QSlider, QScrollBar and QDial. They all inherit most of their functionality from QAbstractSlider, and can in theory replace each other in an application since the differences only concern diff --git a/doc/src/examples/spinboxdelegate.qdoc b/doc/src/examples/spinboxdelegate.qdoc index 50d5b9c..62f3ced 100644 --- a/doc/src/examples/spinboxdelegate.qdoc +++ b/doc/src/examples/spinboxdelegate.qdoc @@ -29,7 +29,7 @@ \example itemviews/spinboxdelegate \title Spin Box Delegate Example - The Spin Box Delegate example shows how to create an editor for a custom delegate in + \brief The Spin Box Delegate example shows how to create an editor for a custom delegate in the model/view framework by reusing a standard Qt editor widget. The model/view framework provides a standard delegate that is used by default diff --git a/doc/src/examples/spinboxes.qdoc b/doc/src/examples/spinboxes.qdoc index e87faf1..575d99d 100644 --- a/doc/src/examples/spinboxes.qdoc +++ b/doc/src/examples/spinboxes.qdoc @@ -29,7 +29,7 @@ \example widgets/spinboxes \title Spin Boxes Example - The Spin Boxes example shows how to use the many different types of spin boxes + \brief The Spin Boxes example shows how to use the many different types of spin boxes available in Qt, from a simple QSpinBox widget to more complex editors like the QDateTimeEdit widget. diff --git a/doc/src/examples/sqlwidgetmapper.qdoc b/doc/src/examples/sqlwidgetmapper.qdoc index cf1a158..453c811 100644 --- a/doc/src/examples/sqlwidgetmapper.qdoc +++ b/doc/src/examples/sqlwidgetmapper.qdoc @@ -29,7 +29,7 @@ \example sql/sqlwidgetmapper \title SQL Widget Mapper Example - The SQL Widget Mapper example shows how to use a map information from a + \brief The SQL Widget Mapper example shows how to use a map information from a database to widgets on a form. \image sql-widget-mapper.png diff --git a/doc/src/examples/standarddialogs.qdoc b/doc/src/examples/standarddialogs.qdoc index 92005b4..d187715 100644 --- a/doc/src/examples/standarddialogs.qdoc +++ b/doc/src/examples/standarddialogs.qdoc @@ -29,7 +29,7 @@ \example dialogs/standarddialogs \title Standard Dialogs Example - The Standard Dialogs example shows the standard dialogs that are provided by Qt. + \brief The Standard Dialogs example shows the standard dialogs that are provided by Qt. \image standarddialogs-example.png */ diff --git a/doc/src/examples/stardelegate.qdoc b/doc/src/examples/stardelegate.qdoc index ed3ae7e..b94935e 100644 --- a/doc/src/examples/stardelegate.qdoc +++ b/doc/src/examples/stardelegate.qdoc @@ -29,7 +29,7 @@ \example itemviews/stardelegate \title Star Delegate Example - The Star Delegate example shows how to create a delegate that + \brief The Star Delegate example shows how to create a delegate that can paint itself and that supports editing. \image stardelegate.png The Star Delegate Example diff --git a/doc/src/examples/states.qdoc b/doc/src/examples/states.qdoc index 815c969..284b4ec 100644 --- a/doc/src/examples/states.qdoc +++ b/doc/src/examples/states.qdoc @@ -29,7 +29,7 @@ \example animation/states \title States Example - The States example shows how to use the Qt state machine to play + \brief The States example shows how to use the Qt state machine to play animations. \image states-example.png diff --git a/doc/src/examples/stickman.qdoc b/doc/src/examples/stickman.qdoc index 8c35fe1..d980586 100644 --- a/doc/src/examples/stickman.qdoc +++ b/doc/src/examples/stickman.qdoc @@ -29,7 +29,7 @@ \example animation/stickman \title Stickman Example - The Stickman example shows how to animate transitions in a state machine to implement key frame + \brief The Stickman example shows how to animate transitions in a state machine to implement key frame animations. \image stickman-example.png diff --git a/doc/src/examples/styleplugin.qdoc b/doc/src/examples/styleplugin.qdoc index 59729c7..a38b8d7 100644 --- a/doc/src/examples/styleplugin.qdoc +++ b/doc/src/examples/styleplugin.qdoc @@ -29,7 +29,7 @@ \example tools/styleplugin \title Style Plugin Example - This example shows how to create a plugin that extends Qt with a new + \brief The Style Plugin example shows how to create a plugin that extends Qt with a new GUI look and feel. \image stylepluginexample.png diff --git a/doc/src/examples/styles.qdoc b/doc/src/examples/styles.qdoc index 5258c19..f9ac48c 100644 --- a/doc/src/examples/styles.qdoc +++ b/doc/src/examples/styles.qdoc @@ -29,7 +29,7 @@ \example widgets/styles \title Styles Example - The Styles example illustrates how to create custom widget + \brief The Styles example illustrates how to create custom widget drawing styles using Qt, and demonstrates Qt's predefined styles. \image styles-enabledwood.png Screenshot of the Styles example diff --git a/doc/src/examples/stylesheet.qdoc b/doc/src/examples/stylesheet.qdoc index a82d0d1..edb684b 100644 --- a/doc/src/examples/stylesheet.qdoc +++ b/doc/src/examples/stylesheet.qdoc @@ -29,7 +29,7 @@ \example widgets/stylesheet \title Style Sheet Example - The Style Sheet Example shows how to use style sheets. + \brief The Style Sheet Example shows how to use style sheets with Qt. \image stylesheet-pagefold.png Screen Shot of the Pagefold style sheet */ diff --git a/doc/src/examples/svgalib.qdoc b/doc/src/examples/svgalib.qdoc index dbdad0f..a0320e7 100644 --- a/doc/src/examples/svgalib.qdoc +++ b/doc/src/examples/svgalib.qdoc @@ -29,9 +29,11 @@ \example qws/svgalib \title Accelerated Graphics Driver Example - The Accelerated Graphics Driver example shows how you can write + \brief The Accelerated Graphics Driver example shows how you can write your own accelerated graphics driver and \l {add your graphics - driver to Qt for Embedded Linux}. In \l{Qt for Embedded Linux}, + driver to Qt for Embedded Linux}. + + In \l{Qt for Embedded Linux}, painting is a pure software implementation and is normally performed in two steps: The clients render each window onto a corresponding surface diff --git a/doc/src/examples/svggenerator.qdoc b/doc/src/examples/svggenerator.qdoc index 1fce379..ed5ea77 100644 --- a/doc/src/examples/svggenerator.qdoc +++ b/doc/src/examples/svggenerator.qdoc @@ -29,7 +29,7 @@ \example painting/svggenerator \title SVG Generator Example - The SVG Generator example shows how to add SVG file export to applications. + \brief The SVG Generator example shows how to add SVG file export to applications. \image svggenerator-example.png diff --git a/doc/src/examples/svgviewer.qdoc b/doc/src/examples/svgviewer.qdoc index f393b08..93671b6 100644 --- a/doc/src/examples/svgviewer.qdoc +++ b/doc/src/examples/svgviewer.qdoc @@ -29,7 +29,7 @@ \example painting/svgviewer \title SVG Viewer Example - The SVG Viewer example shows how to add SVG viewing support to applications. + \brief The SVG Viewer example shows how to add SVG viewing support to applications. \image svgviewer-example.png diff --git a/doc/src/examples/symbianvibration.qdoc b/doc/src/examples/symbianvibration.qdoc index 76f79e5..a6a3d52 100644 --- a/doc/src/examples/symbianvibration.qdoc +++ b/doc/src/examples/symbianvibration.qdoc @@ -29,7 +29,7 @@ \group all-examples \title Symbian Vibration Example - The Symbian Vibrator example shows how to get fine-grained vibration + \brief The Symbian Vibrator example shows how to get fine-grained vibration control on Symbian devices. Native Symbian APIs have to be used to enable vibration, since QtMobility diff --git a/doc/src/examples/syntaxhighlighter.qdoc b/doc/src/examples/syntaxhighlighter.qdoc index 919d61c..13409dc 100644 --- a/doc/src/examples/syntaxhighlighter.qdoc +++ b/doc/src/examples/syntaxhighlighter.qdoc @@ -29,7 +29,7 @@ \example richtext/syntaxhighlighter \title Syntax Highlighter Example - The Syntax Highlighter example shows how to perform simple syntax + \brief The Syntax Highlighter example shows how to perform simple syntax highlighting by subclassing the QSyntaxHighlighter class. \image syntaxhighlighter-example.png diff --git a/doc/src/examples/systray.qdoc b/doc/src/examples/systray.qdoc index e072c9d..22f3779 100644 --- a/doc/src/examples/systray.qdoc +++ b/doc/src/examples/systray.qdoc @@ -29,8 +29,7 @@ \example desktop/systray \title System Tray Icon Example - - The System Tray Icon example shows how to add an icon with a menu + \brief The System Tray Icon example shows how to add an icon with a menu and popup messages to a desktop environment's system tray. \image systemtray-example.png Screenshot of the System Tray Icon. diff --git a/doc/src/examples/tabdialog.qdoc b/doc/src/examples/tabdialog.qdoc index b192645..d450783 100644 --- a/doc/src/examples/tabdialog.qdoc +++ b/doc/src/examples/tabdialog.qdoc @@ -29,7 +29,7 @@ \example dialogs/tabdialog \title Tab Dialog Example - The Tab Dialog example shows how to construct a tab dialog using the + \brief The Tab Dialog example shows how to construct a tab dialog using the QTabWidget class. Dialogs provide an efficient way for the application to communicate diff --git a/doc/src/examples/tablemodel.qdoc b/doc/src/examples/tablemodel.qdoc index bd81763..ad2d557 100644 --- a/doc/src/examples/tablemodel.qdoc +++ b/doc/src/examples/tablemodel.qdoc @@ -29,7 +29,7 @@ \example sql/tablemodel \title Table Model Example - The Table Model example shows how to use a specialized SQL table model with table + \brief The Table Model example shows how to use a specialized SQL table model with table views to edit information in a database. \image tablemodel-example.png diff --git a/doc/src/examples/tablet.qdoc b/doc/src/examples/tablet.qdoc index 8639ab6..8c29642 100644 --- a/doc/src/examples/tablet.qdoc +++ b/doc/src/examples/tablet.qdoc @@ -29,7 +29,7 @@ \example widgets/tablet \title Tablet Example - This example shows how to use a Wacom tablet in Qt applications. + \brief The Tablet example shows how to use a Wacom tablet in Qt applications. \image tabletexample.png diff --git a/doc/src/examples/taskmenuextension.qdoc b/doc/src/examples/taskmenuextension.qdoc index a5562eb..2414ae4 100644 --- a/doc/src/examples/taskmenuextension.qdoc +++ b/doc/src/examples/taskmenuextension.qdoc @@ -29,7 +29,7 @@ \example designer/taskmenuextension \title Task Menu Extension Example - The Task Menu Extension example shows how to create a custom + \brief The Task Menu Extension example shows how to create a custom widget plugin for \l {Qt Designer Manual}{\QD}, and how to to use the QDesignerTaskMenuExtension class to provide custom task menu entries associated with the plugin. diff --git a/doc/src/examples/tetrix.qdoc b/doc/src/examples/tetrix.qdoc index e37d2b6..92e9e28 100644 --- a/doc/src/examples/tetrix.qdoc +++ b/doc/src/examples/tetrix.qdoc @@ -29,7 +29,7 @@ \example widgets/tetrix \title Tetrix Example - The Tetrix example is a Qt version of the classic Tetrix game. + \brief The Tetrix example is a Qt version of the classic Tetrix game. \image tetrix-example.png diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc index fc6d2ba..87947ac 100644 --- a/doc/src/examples/textfinder.qdoc +++ b/doc/src/examples/textfinder.qdoc @@ -29,8 +29,10 @@ \example uitools/textfinder \title Text Finder Example - The Text Finder example demonstrates how to dynamically process forms - using the QtUiTools module. Dynamic form processing enables a form to + \brief The Text Finder example demonstrates how to dynamically process forms + using the QtUiTools module. + + Dynamic form processing enables a form to be processed at run-time only by changing the UI file for the project. The program allows the user to look up a particular word within the contents of a text file. This text file is included in the project's diff --git a/doc/src/examples/textobject.qdoc b/doc/src/examples/textobject.qdoc index 30bf417..a108038 100644 --- a/doc/src/examples/textobject.qdoc +++ b/doc/src/examples/textobject.qdoc @@ -29,7 +29,7 @@ \example richtext/textobject \title Text Object Example - The Text Object example shows how to insert an SVG file into a + \brief The Text Object example shows how to insert an SVG file into a QTextDocument. \image textobject-example.png diff --git a/doc/src/examples/textures.qdoc b/doc/src/examples/textures.qdoc index 52bde78..09f6d9a 100644 --- a/doc/src/examples/textures.qdoc +++ b/doc/src/examples/textures.qdoc @@ -29,7 +29,7 @@ \example opengl/textures \title Textures Example - The Textures example demonstrates the use of Qt's image classes as textures in + \brief The Textures example demonstrates the use of Qt's image classes as textures in applications that use both OpenGL and Qt to display graphics. \image textures-example.png diff --git a/doc/src/examples/threadedfortuneserver.qdoc b/doc/src/examples/threadedfortuneserver.qdoc index 87da054..855d735 100644 --- a/doc/src/examples/threadedfortuneserver.qdoc +++ b/doc/src/examples/threadedfortuneserver.qdoc @@ -29,9 +29,11 @@ \example network/threadedfortuneserver \title Threaded Fortune Server Example - The Threaded Fortune Server example shows how to create a server for a + \brief The Threaded Fortune Server example shows how to create a server for a simple network service that uses threads to handle requests from different - clients. It is intended to be run alongside the Fortune Client example. + clients. + + The example is intended to be run alongside the Fortune Client example. \image threadedfortuneserver-example.png diff --git a/doc/src/examples/tooltips.qdoc b/doc/src/examples/tooltips.qdoc index 9786c40..4abdf99 100644 --- a/doc/src/examples/tooltips.qdoc +++ b/doc/src/examples/tooltips.qdoc @@ -29,7 +29,7 @@ \example widgets/tooltips \title Tool Tips Example - The Tool Tips example shows how to provide static and dynamic tool + \brief The Tool Tips example shows how to provide static and dynamic tool tips for an application's widgets. The simplest and most common way to set a widget's tool tip is by diff --git a/doc/src/examples/torrent.qdoc b/doc/src/examples/torrent.qdoc index 86c0b0c..9082441 100644 --- a/doc/src/examples/torrent.qdoc +++ b/doc/src/examples/torrent.qdoc @@ -29,7 +29,7 @@ \example network/torrent \title Torrent Example - The Torrent example is a functional BitTorrent client that + \brief The Torrent example is a functional BitTorrent client that illustrates how to write a complex TCP/IP application using Qt. \image torrent-example.png diff --git a/doc/src/examples/touch-dials.qdoc b/doc/src/examples/touch-dials.qdoc index f80e72e..008a7f2 100644 --- a/doc/src/examples/touch-dials.qdoc +++ b/doc/src/examples/touch-dials.qdoc @@ -29,7 +29,7 @@ \example touch/dials \title Touch Dials Example - The Touch Dials example shows how to apply touch to a set of + \brief The Touch Dials example shows how to apply touch to a set of standard Qt widgets. \image touch-dials-example.png diff --git a/doc/src/examples/touch-knobs.qdoc b/doc/src/examples/touch-knobs.qdoc index 44ff8a8..4abc64c 100644 --- a/doc/src/examples/touch-knobs.qdoc +++ b/doc/src/examples/touch-knobs.qdoc @@ -29,7 +29,7 @@ \example touch/knobs \title Touch Knobs Example - The Touch Knobs example shows how to create custom controls that + \brief The Touch Knobs example shows how to create custom controls that accept touch input. \image touch-knobs-example.png diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc index dc12f37..b73f5ce 100644 --- a/doc/src/examples/trafficinfo.qdoc +++ b/doc/src/examples/trafficinfo.qdoc @@ -29,7 +29,7 @@ \example xmlpatterns/trafficinfo \title TrafficInfo Example - Shows how XQuery can be used extract information from WML documents provided by a WAP service. + \brief The Traffic Info example shows how XQuery can be used extract information from WML documents provided by a WAP service. \section1 Overview diff --git a/doc/src/examples/trafficlight.qdoc b/doc/src/examples/trafficlight.qdoc index 828195e..cf6bb19 100644 --- a/doc/src/examples/trafficlight.qdoc +++ b/doc/src/examples/trafficlight.qdoc @@ -29,7 +29,7 @@ \example statemachine/trafficlight \title Traffic Light Example - The Traffic Light example shows how to use \l{The State Machine Framework} + \brief The Traffic Light example shows how to use \l{The State Machine Framework} to implement the control flow of a traffic light. \image trafficlight-example.png diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc index 26b558c..c4888f9 100644 --- a/doc/src/examples/transformations.qdoc +++ b/doc/src/examples/transformations.qdoc @@ -29,7 +29,7 @@ \example painting/transformations \title Transformations Example - The Transformations example shows how transformations influence + \brief The Transformations example shows how transformations influence the way that QPainter renders graphics primitives. In particular it shows how the order of transformations affect the result. diff --git a/doc/src/examples/treemodelcompleter.qdoc b/doc/src/examples/treemodelcompleter.qdoc index 4caba0d..94c363e 100644 --- a/doc/src/examples/treemodelcompleter.qdoc +++ b/doc/src/examples/treemodelcompleter.qdoc @@ -29,7 +29,7 @@ \example tools/treemodelcompleter \title Tree Model Completer Example - The Tree Model Completer example shows how to provide completion + \brief The Tree Model Completer example shows how to provide completion facilities for a hierarchical model, using a period as the separator to access Child, GrandChild and GrandGrandChild level objects. diff --git a/doc/src/examples/trivialwizard.qdoc b/doc/src/examples/trivialwizard.qdoc index e654a78..df8378f 100644 --- a/doc/src/examples/trivialwizard.qdoc +++ b/doc/src/examples/trivialwizard.qdoc @@ -29,7 +29,7 @@ \example dialogs/trivialwizard \title Trivial Wizard Example - The Trivial Wizard example illustrates how to create a linear three-page + \brief The Trivial Wizard example illustrates how to create a linear three-page registration wizard using three instances of QWizardPage and one instance of QWizard. diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc index de6cc60..faa6405 100644 --- a/doc/src/examples/trollprint.qdoc +++ b/doc/src/examples/trollprint.qdoc @@ -29,7 +29,7 @@ \example linguist/trollprint \title Troll Print Example - Troll Print is an example application that lets the user choose + \brief Troll Print is an example application that lets the user choose printer settings. It comes in two versions: English and Portuguese. diff --git a/doc/src/examples/twowaybutton.qdoc b/doc/src/examples/twowaybutton.qdoc index b42615e..8e3f5a6 100644 --- a/doc/src/examples/twowaybutton.qdoc +++ b/doc/src/examples/twowaybutton.qdoc @@ -29,7 +29,7 @@ \example statemachine/twowaybutton \title Two-way Button Example - The Two-way button example shows how to use \l{The State Machine + \brief The Two-way button example shows how to use \l{The State Machine Framework} to implement a simple state machine that toggles the current state when a button is clicked. diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc index 15372ec..370435d 100644 --- a/doc/src/examples/undoframework.qdoc +++ b/doc/src/examples/undoframework.qdoc @@ -29,7 +29,7 @@ \example tools/undoframework \title Undo Framework Example - This example shows how to implement undo/redo functionality + \brief This example shows how to implement undo/redo functionality with the Qt undo framework. \image undoframeworkexample.png The Undo Diagram Example diff --git a/doc/src/examples/videographicsitem.qdoc b/doc/src/examples/videographicsitem.qdoc index f52e043..76f54cb 100644 --- a/doc/src/examples/videographicsitem.qdoc +++ b/doc/src/examples/videographicsitem.qdoc @@ -29,7 +29,7 @@ \example multimedia/videographicsitem \title Video Graphics Item Example - The Video Graphics Item example shows how to implement a QGraphicsItem that displays video on a + \brief The Video Graphics Item example shows how to implement a QGraphicsItem that displays video on a graphics scene using QtMultimedia's QAbstractVideoSurface. \image video-videographicsitem.png diff --git a/doc/src/examples/videowidget.qdoc b/doc/src/examples/videowidget.qdoc index c9a87ce..d2dab10 100644 --- a/doc/src/examples/videowidget.qdoc +++ b/doc/src/examples/videowidget.qdoc @@ -29,7 +29,7 @@ \example multimedia/videowidget \title Video Widget Example - The Video Widget example shows how to implement a video widget using + \brief The Video Widget example shows how to implement a video widget using QtMultimedia's QAbstractVideoSurface \image video-videowidget.png diff --git a/doc/src/examples/waitconditions.qdoc b/doc/src/examples/waitconditions.qdoc index 0d0cd1b..f2f07c5 100644 --- a/doc/src/examples/waitconditions.qdoc +++ b/doc/src/examples/waitconditions.qdoc @@ -29,7 +29,7 @@ \example threads/waitconditions \title Wait Conditions Example - The Wait Conditions example shows how to use QWaitCondition and + \brief The Wait Conditions example shows how to use QWaitCondition and QMutex to control access to a circular buffer shared by a producer thread and a consumer thread. diff --git a/doc/src/examples/webkit-bridge-imageanalyzer.qdoc b/doc/src/examples/webkit-bridge-imageanalyzer.qdoc index a736879..7383abc 100644 --- a/doc/src/examples/webkit-bridge-imageanalyzer.qdoc +++ b/doc/src/examples/webkit-bridge-imageanalyzer.qdoc @@ -30,12 +30,13 @@ \startpage {index.html}{Qt Reference Documentation} \title The Webkit Bridge Tutorial - Hybrid Client Application - In this example, we will show how to write a hybrid application using + \brief In this example, we will show how to write a hybrid application using \l{The QtWebKit Bridge}{QtWebKit Bridge}, which distinguishes itself from a thin client in that it performs heavy calculations on the client side in C++, like a native application, but presents nothing more than a \c QWebView for its -user interface, displaying web content written in HTML/JavaScript. The -application uses QtConcurrent to distribute its work across as many CPU cores as +user interface, displaying web content written in HTML/JavaScript. + +The application uses QtConcurrent to distribute its work across as many CPU cores as are available from the system, so it can process each image in parallel. For the full reference documentation of QtWebKit hybrid development, see diff --git a/doc/src/examples/webkit-framecapture.qdoc b/doc/src/examples/webkit-framecapture.qdoc index 2d80c6a..1f9fa9f 100644 --- a/doc/src/examples/webkit-framecapture.qdoc +++ b/doc/src/examples/webkit-framecapture.qdoc @@ -29,7 +29,7 @@ \example webkit/framecapture \title WebKit Frame Capture Example - The Frame Capture example shows how to use the WebKit browser engine to + \brief The Frame Capture example shows how to use the WebKit browser engine to obtain images of frames in a Web page. This example is designed to be run from the command line. Run the diff --git a/doc/src/examples/widgets-softkeys.qdoc b/doc/src/examples/widgets-softkeys.qdoc index 336aac8..1c66718 100644 --- a/doc/src/examples/widgets-softkeys.qdoc +++ b/doc/src/examples/widgets-softkeys.qdoc @@ -29,5 +29,5 @@ \example widgets/softkeys \title Soft Keys Example - The Soft Keys example shows how to use soft key input on the Symbian platform. + \brief The Soft Keys example shows how to use soft key input on the Symbian platform. */ diff --git a/doc/src/examples/widgets-validators.qdoc b/doc/src/examples/widgets-validators.qdoc index d6c229d..1984d9f 100644 --- a/doc/src/examples/widgets-validators.qdoc +++ b/doc/src/examples/widgets-validators.qdoc @@ -29,5 +29,5 @@ \example widgets/validators \title Validators Example - The Validators example shows the signal emission behavior of input validators. + \brief The Validators example shows the signal emission behavior of input validators. */ diff --git a/doc/src/examples/wiggly.qdoc b/doc/src/examples/wiggly.qdoc index 3685741..2bb3d64 100644 --- a/doc/src/examples/wiggly.qdoc +++ b/doc/src/examples/wiggly.qdoc @@ -29,7 +29,7 @@ \example widgets/wiggly \title Wiggly Example - The Wiggly example shows how to animate a widget using + \brief The Wiggly example shows how to animate a widget using QBasicTimer and \l{QObject::timerEvent()}{timerEvent()}. In addition, the example demonstrates how to use QFontMetrics to determine the size of text on screen. diff --git a/doc/src/examples/windowflags.qdoc b/doc/src/examples/windowflags.qdoc index e690c37..d701498 100644 --- a/doc/src/examples/windowflags.qdoc +++ b/doc/src/examples/windowflags.qdoc @@ -29,7 +29,7 @@ \example widgets/windowflags \title Window Flags Example - The Window Flags example shows how to use the window flags + \brief The Window Flags example shows how to use the window flags available in Qt. A window flag is either a type or a hint. A type is used to diff --git a/doc/src/examples/worldtimeclockbuilder.qdoc b/doc/src/examples/worldtimeclockbuilder.qdoc index e8999ea..cf6d062 100644 --- a/doc/src/examples/worldtimeclockbuilder.qdoc +++ b/doc/src/examples/worldtimeclockbuilder.qdoc @@ -29,7 +29,7 @@ \example designer/worldtimeclockbuilder \title World Time Clock Builder Example - The World Time Clock Builder example shows how forms created with Qt + \brief The World Time Clock Builder example shows how forms created with Qt Designer that contain custom widgets can be dynamically generated at run-time. diff --git a/doc/src/examples/worldtimeclockplugin.qdoc b/doc/src/examples/worldtimeclockplugin.qdoc index 7b88708..ee1d534 100644 --- a/doc/src/examples/worldtimeclockplugin.qdoc +++ b/doc/src/examples/worldtimeclockplugin.qdoc @@ -29,7 +29,7 @@ \example designer/worldtimeclockplugin \title World Time Clock Plugin Example - The World Time Clock Plugin example shows how to create a custom + \brief The World Time Clock Plugin example shows how to create a custom widget plugin for \QD that uses signals and slots. \image worldtimeclockplugin-example.png diff --git a/doc/src/examples/xmlstreamlint.qdoc b/doc/src/examples/xmlstreamlint.qdoc index 98bee62..0a31fb0 100644 --- a/doc/src/examples/xmlstreamlint.qdoc +++ b/doc/src/examples/xmlstreamlint.qdoc @@ -29,7 +29,7 @@ \example xml/xmlstreamlint \title XML Stream Lint Example - The XML Stream Lint example provides a simple command line utility that + \brief The XML Stream Lint example provides a simple command line utility that accepts a file name as its single argument and writes it to the standard output file. -- cgit v0.12 From 9cb4327bd29e8e8af6f5e3dea5121cf26d1c887d Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 1 Sep 2011 15:27:39 +0200 Subject: Add briefs to the new 4.8 demos. --- doc/src/demos/glhypnotizer.qdoc | 2 +- doc/src/demos/guitartuner.qdoc | 7 +++++-- doc/src/demos/mobiledemos.qdoc | 6 ++++-- doc/src/demos/qcamera.qdoc | 4 ++-- doc/src/demos/qml-qtbubblelevel.qdoc | 10 ++++++---- doc/src/demos/styledemo.qdoc | 2 +- 6 files changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/src/demos/glhypnotizer.qdoc b/doc/src/demos/glhypnotizer.qdoc index 468a4ac..0782e90 100644 --- a/doc/src/demos/glhypnotizer.qdoc +++ b/doc/src/demos/glhypnotizer.qdoc @@ -29,7 +29,7 @@ \example demos/glhypnotizer \title GL Hypnotizer - This demo shows how to use OpenGL from a seperate thread. + \brief The GL Hypnotizer demo shows how to use OpenGL from a seperate thread. \image glhypnotizer-demo.png diff --git a/doc/src/demos/guitartuner.qdoc b/doc/src/demos/guitartuner.qdoc index df15c04..8a1e875 100644 --- a/doc/src/demos/guitartuner.qdoc +++ b/doc/src/demos/guitartuner.qdoc @@ -27,16 +27,19 @@ /*! \page guitartuner_example.html - \title Guitar Tuner Example + \title Guitar Tuner Demonstration \example demos/mobile/guitartuner +\brief The Guitar Tuner demo demonstrates the audio-in and audio-out interfaces of +Qt Mobility Multimedia, and integrating Qt code in a Qt Quick UI. + The Guitar Tuner application can be used to tune guitar strings by analyzing the audio recorded by the device microphone. Guitar Tuner can be also used in the listening mode. It will then play the audio by the corresponding frequency, and the user can tune the guitar by ear. The application demonstrates the audio-in and the audio-out interfaces of \l{external: Mobility Multimedia}{Qt Mobility Multimedia} and integrating Qt -code to the Qt Quick UI. +code in a Qt Quick UI. The example is hosted in Projects Forum Nokia: https://projects.forum.nokia.com/guitartuner diff --git a/doc/src/demos/mobiledemos.qdoc b/doc/src/demos/mobiledemos.qdoc index 2aaa258..6af10f6 100644 --- a/doc/src/demos/mobiledemos.qdoc +++ b/doc/src/demos/mobiledemos.qdoc @@ -30,8 +30,10 @@ \example demos/mobile/quickhit \title Quick Hit Demo - This demo shows how to use Mobility APIs to access device audio - capabilities. Uses the multimedia and systeminfo modules of + \brief The Quick Hit demo shows how to use Mobility APIs to access device audio + capabilities. + + The demo uses the multimedia and systeminfo modules of \l{external: Qt Mobility Manual}{Qt Mobility}. \note This demonstration requires QtMobility libraries. diff --git a/doc/src/demos/qcamera.qdoc b/doc/src/demos/qcamera.qdoc index f41afd7..be3f667 100644 --- a/doc/src/demos/qcamera.qdoc +++ b/doc/src/demos/qcamera.qdoc @@ -27,10 +27,10 @@ /*! \page qcamera_example.html - \title QCamera Example + \title QCamera Demo \example demos/mobile/qcamera - This Qt C++ application demonstrates how to use Multimedia, Messaging and Contacts modules from \l{external: Qt Mobility Manual}{Qt Mobility}. + \brief The QCamera demo shows how to use Multimedia, Messaging and Contacts modules from Qt Mobility. \image qcameraexample.png diff --git a/doc/src/demos/qml-qtbubblelevel.qdoc b/doc/src/demos/qml-qtbubblelevel.qdoc index 052dd50..146f604 100644 --- a/doc/src/demos/qml-qtbubblelevel.qdoc +++ b/doc/src/demos/qml-qtbubblelevel.qdoc @@ -27,13 +27,15 @@ /*! \page qtbubblelevel_example.html - \title Qt Bubble Level Example + \title Qt Bubble Level Demo \example demos/mobile/qtbubblelevel -Qt Bubble Level is a simple application that uses -\l{external: Qt Mobility Manual}{Qt Mobility's} accelerometer APIs and hardware +\brief Qt Bubble Level is a simple application that uses +Qt Mobility's accelerometer APIs and hardware sensor information to calculate the inclination of the device and presents this -as atraditional bubble level. The application provides a calibration feature to +as atraditional bubble level. + +The application provides a calibration feature to handle any possible errors in accelerometer readings. The example is hosted in Projects Forum Nokia: https://projects.forum.nokia.com/qtbubblelevel diff --git a/doc/src/demos/styledemo.qdoc b/doc/src/demos/styledemo.qdoc index 13cab2b..d05d091 100644 --- a/doc/src/demos/styledemo.qdoc +++ b/doc/src/demos/styledemo.qdoc @@ -29,7 +29,7 @@ \example demos/embedded/styledemo \title Embedded Styles Demonstration - The Embedded Styles demo shows how to use Qt Style APIs in embedded contexts + \brief The Embedded Styles demo shows how to use Qt Style APIs in embedded contexts \image styledemo-demo.png */ -- cgit v0.12 From 211aea4ea4871e89db2ad42aa9859f9efb34e091 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 1 Sep 2011 15:43:27 +0200 Subject: Add briefs for the new 4.8 examples. --- doc/src/examples/multicastreceiver.qdoc | 2 +- doc/src/examples/multicastsender.qdoc | 2 +- doc/src/examples/simplewebplugin.qdoc | 2 +- doc/src/examples/undoframework.qdoc | 2 +- doc/src/examples/webftpclient.qdoc | 2 +- doc/src/examples/webplugin.qdoc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/examples/multicastreceiver.qdoc b/doc/src/examples/multicastreceiver.qdoc index 1a0f3b5..96a011f 100644 --- a/doc/src/examples/multicastreceiver.qdoc +++ b/doc/src/examples/multicastreceiver.qdoc @@ -29,7 +29,7 @@ \example network/multicastreceiver \title Multicast Receiver Example - The Multicast Receiever example shows how to receive information that is + \brief The Multicast Receiever example shows how to receive information that is sent to a multicast group. \image multicastreceiver-example.png diff --git a/doc/src/examples/multicastsender.qdoc b/doc/src/examples/multicastsender.qdoc index 55b3804..c5b7531 100644 --- a/doc/src/examples/multicastsender.qdoc +++ b/doc/src/examples/multicastsender.qdoc @@ -29,7 +29,7 @@ \example network/multicastsender \title Multicast Sender Example - The Multicast Sender example shows how to send information to multiple + \brief The Multicast Sender example shows how to send information to multiple clients in a multicast group. \image multicastsender-example.png diff --git a/doc/src/examples/simplewebplugin.qdoc b/doc/src/examples/simplewebplugin.qdoc index 4c95b58..185cc85 100644 --- a/doc/src/examples/simplewebplugin.qdoc +++ b/doc/src/examples/simplewebplugin.qdoc @@ -29,7 +29,7 @@ \example webkit/simplewebplugin \title Simple Web Plugin Example - The Simple Web Plugin example shows how to embed a regular Qt widget into a + \brief The Simple Web Plugin example shows how to embed a regular Qt widget into a Web page displayed using QWebView. \image webkit-simplewebplugin.png A table widget embedded in a Web page. diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc index 370435d..2fdb4cf 100644 --- a/doc/src/examples/undoframework.qdoc +++ b/doc/src/examples/undoframework.qdoc @@ -29,7 +29,7 @@ \example tools/undoframework \title Undo Framework Example - \brief This example shows how to implement undo/redo functionality + \brief The Undo Framework example shows how to implement undo/redo functionality with the Qt undo framework. \image undoframeworkexample.png The Undo Diagram Example diff --git a/doc/src/examples/webftpclient.qdoc b/doc/src/examples/webftpclient.qdoc index c3d456d..47006f9 100644 --- a/doc/src/examples/webftpclient.qdoc +++ b/doc/src/examples/webftpclient.qdoc @@ -29,7 +29,7 @@ \example webkit/webftpclient \title Web FTP Client Example - The Web FTP Client example shows how to add support for a new protocol + \brief The Web FTP Client example shows how to add support for a new protocol to QtWebKit-based applications. \image webkit-webftpclient.png An FTP client displaying the contents of the ftp.qt.nokia.com site. diff --git a/doc/src/examples/webplugin.qdoc b/doc/src/examples/webplugin.qdoc index dcf4fb5..c607bef 100644 --- a/doc/src/examples/webplugin.qdoc +++ b/doc/src/examples/webplugin.qdoc @@ -29,7 +29,7 @@ \example webkit/webplugin \title Web Plugin Example - The Web Plugin example shows how to communicate between a Qt widget + \brief The Web Plugin example shows how to communicate between a Qt widget embedded in a Web page and the page itself. \image webkit-webplugin.png A table widget embedded in a Web page. -- cgit v0.12 From 71bcd941d577097ca99900554386c9f12d4353e3 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Tue, 13 Sep 2011 15:33:31 +0200 Subject: Add missing checks for httpReply in QNetworkHttpBackend. httpReply is not guaranteed to be non-null. Adding missing checks for methods that can be called from outside the class. Reviewed-By: Peter Hartmann --- src/network/access/qnetworkaccesshttpbackend.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp index abef8ab..aa477fb 100644 --- a/src/network/access/qnetworkaccesshttpbackend.cpp +++ b/src/network/access/qnetworkaccesshttpbackend.cpp @@ -737,7 +737,7 @@ void QNetworkAccessHttpBackend::readFromHttp() void QNetworkAccessHttpBackend::replyFinished() { - if (httpReply->bytesAvailable()) + if (!httpReply || httpReply->bytesAvailable()) // we haven't read everything yet. Wait some more. return; @@ -788,6 +788,9 @@ void QNetworkAccessHttpBackend::checkForRedirect(const int statusCode) void QNetworkAccessHttpBackend::replyHeaderChanged() { + if (!httpReply) + return; + setAttribute(QNetworkRequest::HttpPipeliningWasUsedAttribute, httpReply->isPipeliningUsed()); // reconstruct the HTTP header @@ -1128,7 +1131,7 @@ bool QNetworkAccessHttpBackend::canResume() const return false; // Can only resume if server/resource supports Range header. - if (httpReply->headerField("Accept-Ranges", "none") == "none") + if (!httpReply || httpReply->headerField("Accept-Ranges", "none") == "none") return false; // We only support resuming for byte ranges. -- cgit v0.12 From c4cab7199590cc6b1901334e8ff604cd876fccee Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 14 Sep 2011 14:07:06 +0100 Subject: Prevent crash when cache is changed on the fly Calling QNetworkAccessManager::setCache while there were requests being processed using the existing cache caused crashes due to deleting the old cache invalidating pointers to the cache data streams (QTemporaryFile in case of QNetworkDiskCache). Using pointer to deleted data caused a crash in some cases. It has undefined behaviour because the memory may have been overwritten or decommitted. To fix this, use the deleted signal to notify QNetworkReplyImpl that the cache has been destroyed. It then clears the pointer to the data stream and disables caching. This avoids the crash that previously happened when trying to write to the cache file. Task-number: QT-5252 Reviewed-by: Peter Hartmann --- src/network/access/qnetworkreplyimpl.cpp | 23 +++++++++++++++++++---- src/network/access/qnetworkreplyimpl_p.h | 2 ++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 8a0a944..81cd548 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -446,6 +446,7 @@ bool QNetworkReplyImplPrivate::isCachingEnabled() const void QNetworkReplyImplPrivate::setCachingEnabled(bool enable) { + Q_Q(QNetworkReplyImpl); if (!enable && !cacheEnabled) return; // nothing to do if (enable && cacheEnabled) @@ -468,15 +469,27 @@ void QNetworkReplyImplPrivate::setCachingEnabled(bool enable) networkCache()->remove(url); cacheSaveDevice = 0; cacheEnabled = false; + QObject::disconnect(networkCache(), SIGNAL(destroyed()), q, SLOT(_q_cacheDestroyed())); } } +void QNetworkReplyImplPrivate::_q_cacheDestroyed() +{ + //destruction of cache invalidates cacheSaveDevice + cacheSaveDevice = 0; + cacheEnabled = false; +} + void QNetworkReplyImplPrivate::completeCacheSave() { - if (cacheEnabled && errorCode != QNetworkReplyImpl::NoError) { - networkCache()->remove(url); - } else if (cacheEnabled && cacheSaveDevice) { - networkCache()->insert(cacheSaveDevice); + Q_Q(QNetworkReplyImpl); + if (cacheEnabled) { + if (errorCode != QNetworkReplyImpl::NoError) { + networkCache()->remove(url); + } else if (cacheSaveDevice) { + networkCache()->insert(cacheSaveDevice); + } + QObject::disconnect(networkCache(), SIGNAL(destroyed()), q, SLOT(_q_cacheDestroyed())); } cacheSaveDevice = 0; cacheEnabled = false; @@ -536,6 +549,8 @@ void QNetworkReplyImplPrivate::initCacheSaveDevice() networkCache()->remove(url); cacheSaveDevice = 0; cacheEnabled = false; + } else { + q->connect(networkCache(), SIGNAL(destroyed()), SLOT(_q_cacheDestroyed())); } } diff --git a/src/network/access/qnetworkreplyimpl_p.h b/src/network/access/qnetworkreplyimpl_p.h index 31da297..0e4ff8f 100644 --- a/src/network/access/qnetworkreplyimpl_p.h +++ b/src/network/access/qnetworkreplyimpl_p.h @@ -103,6 +103,7 @@ public: Q_PRIVATE_SLOT(d_func(), void _q_networkSessionConnected()) Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed()) #endif + Q_PRIVATE_SLOT(d_func(), void _q_cacheDestroyed()) }; class QNetworkReplyImplPrivate: public QNetworkReplyPrivate @@ -139,6 +140,7 @@ public: void _q_networkSessionConnected(); void _q_networkSessionFailed(); #endif + void _q_cacheDestroyed(); void setup(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData); -- cgit v0.12 From 5571dbea919d1f122e7331cb0214e584c89efcb9 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 18 Feb 2011 16:47:39 +0000 Subject: Fix RConnection handle leak in symbian bearer plugin The implementation was opening RConnection handles on top of previous instances, and not closing RConnection handles. Both of these cause a resource leak in the socket server which cannot clean up the connection until the Qt process has exited. After a lot of this (which could be triggered by the QNetworkReply auto test), the socket server may run out of memory resulting in all socket operations failing. Reviewed-by: Markus Goetz (cherry picked from commit f5e7b6c64caa67bf11fa9754114d686da73b22d6) --- .../bearer/symbian/qnetworksession_impl.cpp | 97 +++++++++------------- src/plugins/bearer/symbian/qnetworksession_impl.h | 1 + 2 files changed, 41 insertions(+), 57 deletions(-) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 5639c4f..fc6e141 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -89,33 +89,43 @@ QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine) TRAP_IGNORE(iConnectionMonitor.ConnectL()); } -QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl() +void QNetworkSessionPrivateImpl::closeHandles() { - isOpen = false; - isOpening = false; - // Cancel Connection Progress Notifications first. - // Note: ConnectionNotifier must be destroyed before Canceling RConnection::Start() + // Note: ConnectionNotifier must be destroyed before RConnection::Close() // => deleting ipConnectionNotifier results RConnection::CancelProgressNotification() delete ipConnectionNotifier; ipConnectionNotifier = NULL; #ifdef SNAP_FUNCTIONALITY_AVAILABLE - if (iMobility) { - delete iMobility; - iMobility = NULL; - } + // mobility monitor must be deleted before RConnection is closed + delete iMobility; + iMobility = NULL; #endif - // Cancel possible RConnection::Start() + // Cancel possible RConnection::Start() - may call RConnection::Close if Start was in progress Cancel(); - iSocketServ.Close(); + //close any open connection (note Close twice is safe in case Cancel did it above) + iConnection.Close(); // Close global 'Open C' RConnection // Clears also possible unsetdefaultif() flags. setdefaultif(0); iConnectionMonitor.Close(); +#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG + qDebug() << "QNS this : " << QString::number((uint)this) + << " - handles closed"; +#endif + iSocketServ.Close(); +} + +QNetworkSessionPrivateImpl::~QNetworkSessionPrivateImpl() +{ + isOpen = false; + isOpening = false; + + closeHandles(); iOpenCLibrary.Close(); #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG qDebug() << "QNS this : " << QString::number((uint)this) @@ -166,7 +176,7 @@ void QNetworkSessionPrivateImpl::configurationAdded(QNetworkConfigurationPrivate #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG qDebug() << "QNS this : " << QString::number((uint)this) << " - " << "configurationAdded IAP: " - << toSymbianConfig(privateConfiguration(config))->numericIdentifier(); + << toSymbianConfig(config)->numericIdentifier(); #endif syncStateWithInterface(); @@ -372,7 +382,8 @@ void QNetworkSessionPrivateImpl::open() syncStateWithInterface(); return; } - + + Q_ASSERT(!iConnection.SubSessionHandle()); error = iConnection.Open(iSocketServ); if (error != KErrNone) { // Could not open RConnection @@ -414,8 +425,8 @@ void QNetworkSessionPrivateImpl::open() pref.SetIapId(symbianConfig->numericIdentifier()); #endif - iConnection.Start(pref, iStatus); if (!IsActive()) { + iConnection.Start(pref, iStatus); SetActive(); } // Avoid flip flop of states if the configuration is already @@ -442,8 +453,8 @@ void QNetworkSessionPrivateImpl::open() #else TConnSnapPref snapPref(symbianConfig->numericIdentifier()); #endif - iConnection.Start(snapPref, iStatus); if (!IsActive()) { + iConnection.Start(snapPref, iStatus); SetActive(); } // Avoid flip flop of states if the configuration is already @@ -453,8 +464,8 @@ void QNetworkSessionPrivateImpl::open() } } else if (publicConfig.type() == QNetworkConfiguration::UserChoice) { iKnownConfigsBeforeConnectionStart = engine->accessPointConfigurationIdentifiers(); - iConnection.Start(iStatus); if (!IsActive()) { + iConnection.Start(iStatus); SetActive(); } newState(QNetworkSession::Connecting); @@ -465,9 +476,7 @@ void QNetworkSessionPrivateImpl::open() isOpening = false; iError = QNetworkSession::UnknownSessionError; emit QNetworkSessionPrivate::error(iError); - if (ipConnectionNotifier) { - ipConnectionNotifier->StopNotifications(); - } + closeHandles(); syncStateWithInterface(); } } @@ -521,21 +530,10 @@ void QNetworkSessionPrivateImpl::close(bool allowSignals) serviceConfig = QNetworkConfiguration(); -#ifdef SNAP_FUNCTIONALITY_AVAILABLE - if (iMobility) { - delete iMobility; - iMobility = NULL; - } -#endif + closeHandles(); - if (ipConnectionNotifier && !iHandleStateNotificationsFromManager) { - ipConnectionNotifier->StopNotifications(); - // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate - iHandleStateNotificationsFromManager = true; - } - - Cancel(); // closes iConnection - iSocketServ.Close(); + // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate + iHandleStateNotificationsFromManager = true; // Close global 'Open C' RConnection. If OpenC supports, // close the defaultif for good to avoid difficult timing @@ -759,12 +757,14 @@ void QNetworkSessionPrivateImpl::NewCarrierActive(TAccessPointInfo /*aNewAPInfo* } } -void QNetworkSessionPrivateImpl::Error(TInt /*aError*/) +void QNetworkSessionPrivateImpl::Error(TInt aError) { #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG qDebug() << "QNS this : " << QString::number((uint)this) << " - " - << "roaming Error() occurred, isOpen is: " << isOpen; + << "roaming Error() occurred" << aError << ", isOpen is: " << isOpen; #endif + if (aError == KErrCancel) + return; //avoid recursive deletion if (isOpen) { isOpen = false; isOpening = false; @@ -772,10 +772,7 @@ void QNetworkSessionPrivateImpl::Error(TInt /*aError*/) serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::RoamingError; emit QNetworkSessionPrivate::error(iError); - Cancel(); - if (ipConnectionNotifier) { - ipConnectionNotifier->StopNotifications(); - } + closeHandles(); QT_TRY { syncStateWithInterface(); // In some cases IAP is still in Connected state when @@ -1102,18 +1099,13 @@ void QNetworkSessionPrivateImpl::RunL() isOpening = false; iError = QNetworkSession::UnknownSessionError; QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - if (ipConnectionNotifier) { - ipConnectionNotifier->StopNotifications(); - } + closeHandles(); if (!newActiveConfig.isValid()) { // No valid configuration, bail out. // Status updates from QNCM won't be received correctly // because there is no configuration to associate them with so transit here. - iConnection.Close(); newState(QNetworkSession::Closing); newState(QNetworkSession::Disconnected); - } else { - Cancel(); } QT_TRYCATCH_LEAVING(syncStateWithInterface()); return; @@ -1156,10 +1148,7 @@ void QNetworkSessionPrivateImpl::RunL() serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::InvalidConfigurationError; QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - if (ipConnectionNotifier) { - ipConnectionNotifier->StopNotifications(); - } - Cancel(); + closeHandles(); QT_TRYCATCH_LEAVING(syncStateWithInterface()); break; case KErrCancel: // Connection attempt cancelled @@ -1178,10 +1167,7 @@ void QNetworkSessionPrivateImpl::RunL() iError = QNetworkSession::UnknownSessionError; } QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError)); - if (ipConnectionNotifier) { - ipConnectionNotifier->StopNotifications(); - } - Cancel(); + closeHandles(); QT_TRYCATCH_LEAVING(syncStateWithInterface()); break; } @@ -1273,10 +1259,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint serviceConfig = QNetworkConfiguration(); iError = QNetworkSession::SessionAbortedError; emit QNetworkSessionPrivate::error(iError); - if (ipConnectionNotifier) { - ipConnectionNotifier->StopNotifications(); - } - Cancel(); + closeHandles(); // Start handling IAP state change signals from QNetworkConfigurationManagerPrivate iHandleStateNotificationsFromManager = true; emitSessionClosed = true; // Emit SessionClosed after state change has been reported diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h index 774b988..a597812 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.h +++ b/src/plugins/bearer/symbian/qnetworksession_impl.h @@ -149,6 +149,7 @@ private: bool easyWlanTrueIapId(TUint32 &trueIapId) const; #endif + void closeHandles(); private: // data SymbianEngine *engine; -- cgit v0.12 From ada33b11092f278ae4f1280a6da07ffd151a31b6 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 18 Feb 2011 17:22:32 +0000 Subject: Refactor dangerous multiple inheritance QObject and CBase both expect to be the root class of the object hierarchy so it can cause problems if they are used in multiple inheritance. Refactored the CActive used for starting RConnection into a helper class. Reviewed-by: Markus Goetz (cherry picked from commit 5a6365f14006ab50854e41a5927645c7e9966756) --- .../bearer/symbian/qnetworksession_impl.cpp | 82 ++++++++++++++++------ src/plugins/bearer/symbian/qnetworksession_impl.h | 29 ++++++-- 2 files changed, 86 insertions(+), 25 deletions(-) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index fc6e141..5514511 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -61,13 +61,12 @@ QT_BEGIN_NAMESPACE QNetworkSessionPrivateImpl::QNetworkSessionPrivateImpl(SymbianEngine *engine) -: CActive(CActive::EPriorityUserInput), engine(engine), - iDynamicUnSetdefaultif(0), ipConnectionNotifier(0), +: engine(engine), + ipConnectionNotifier(0), ipConnectionStarter(0), iHandleStateNotificationsFromManager(false), iFirstSync(true), iStoppedByUser(false), iClosedByUser(false), iError(QNetworkSession::UnknownSessionError), iALREnabled(0), iConnectInBackground(false), isOpening(false) { - CActiveScheduler::Add(this); #ifdef SNAP_FUNCTIONALITY_AVAILABLE iMobility = NULL; @@ -104,7 +103,8 @@ void QNetworkSessionPrivateImpl::closeHandles() #endif // Cancel possible RConnection::Start() - may call RConnection::Close if Start was in progress - Cancel(); + delete ipConnectionStarter; + ipConnectionStarter = 0; //close any open connection (note Close twice is safe in case Cancel did it above) iConnection.Close(); @@ -425,9 +425,9 @@ void QNetworkSessionPrivateImpl::open() pref.SetIapId(symbianConfig->numericIdentifier()); #endif - if (!IsActive()) { - iConnection.Start(pref, iStatus); - SetActive(); + if (!ipConnectionStarter) { + ipConnectionStarter = new ConnectionStarter(*this, iConnection); + ipConnectionStarter->Start(pref); } // Avoid flip flop of states if the configuration is already // active. IsOpen/opened() will indicate when ready. @@ -453,9 +453,9 @@ void QNetworkSessionPrivateImpl::open() #else TConnSnapPref snapPref(symbianConfig->numericIdentifier()); #endif - if (!IsActive()) { - iConnection.Start(snapPref, iStatus); - SetActive(); + if (!ipConnectionStarter) { + ipConnectionStarter = new ConnectionStarter(*this, iConnection); + ipConnectionStarter->Start(snapPref); } // Avoid flip flop of states if the configuration is already // active. IsOpen/opened() will indicate when ready. @@ -464,9 +464,9 @@ void QNetworkSessionPrivateImpl::open() } } else if (publicConfig.type() == QNetworkConfiguration::UserChoice) { iKnownConfigsBeforeConnectionStart = engine->accessPointConfigurationIdentifiers(); - if (!IsActive()) { - iConnection.Start(iStatus); - SetActive(); + if (!ipConnectionStarter) { + ipConnectionStarter = new ConnectionStarter(*this, iConnection); + ipConnectionStarter->Start(); } newState(QNetworkSession::Connecting); } @@ -1066,13 +1066,14 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia return publicConfig; } -void QNetworkSessionPrivateImpl::RunL() +void QNetworkSessionPrivateImpl::ConnectionStartComplete(TInt statusCode) { #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG qDebug() << "QNS this : " << QString::number((uint)this) << " - " - << "RConnection::RunL with status code: " << iStatus.Int(); + << "RConnection::Start completed with status code: " << statusCode; #endif - TInt statusCode = iStatus.Int(); + delete ipConnectionStarter; + ipConnectionStarter = 0; switch (statusCode) { case KErrNone: // Connection created successfully @@ -1173,11 +1174,6 @@ void QNetworkSessionPrivateImpl::RunL() } } -void QNetworkSessionPrivateImpl::DoCancel() -{ - iConnection.Close(); -} - // Enters newState if feasible according to current state. // AccessPointId may be given as parameter. If it is zero, state-change is assumed to // concern this session's configuration. If non-zero, the configuration is looked up @@ -1566,6 +1562,50 @@ void ConnectionProgressNotifier::RunL() } } +ConnectionStarter::ConnectionStarter(QNetworkSessionPrivateImpl &owner, RConnection &connection) + : CActive(CActive::EPriorityUserInput), iOwner(owner), iConnection(connection) +{ + CActiveScheduler::Add(this); +} + +ConnectionStarter::~ConnectionStarter() +{ + Cancel(); +} + +void ConnectionStarter::Start() +{ + if (!IsActive()) { + iConnection.Start(iStatus); + SetActive(); + } +} + +void ConnectionStarter::Start(TConnPref &pref) +{ + if (!IsActive()) { + iConnection.Start(pref, iStatus); + SetActive(); + } +} + +void ConnectionStarter::RunL() +{ + iOwner.ConnectionStartComplete(iStatus.Int()); + //note owner deletes on callback +} + +TInt ConnectionStarter::RunError(TInt err) +{ + qWarning() << "ConnectionStarter::RunError" << err; + return KErrNone; +} + +void ConnectionStarter::DoCancel() +{ + iConnection.Close(); +} + QT_END_NAMESPACE #endif //QT_NO_BEARERMANAGEMENT diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h index a597812..a5a4f87 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.h +++ b/src/plugins/bearer/symbian/qnetworksession_impl.h @@ -68,11 +68,12 @@ QT_BEGIN_NAMESPACE class ConnectionProgressNotifier; +class ConnectionStarter; class SymbianEngine; typedef void (*TOpenCUnSetdefaultifFunction)(); -class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate, public CActive +class QNetworkSessionPrivateImpl : public QNetworkSessionPrivate #ifdef SNAP_FUNCTIONALITY_AVAILABLE , public MMobilityProtocolResp #endif @@ -125,7 +126,7 @@ public: // From MMobilityProtocolResp #endif protected: // From CActive - void RunL(); + void ConnectionStartComplete(TInt statusCode); void DoCancel(); private Q_SLOTS: @@ -167,12 +168,13 @@ private: // data mutable RConnection iConnection; mutable RConnectionMonitor iConnectionMonitor; ConnectionProgressNotifier* ipConnectionNotifier; - + ConnectionStarter* ipConnectionStarter; + bool iHandleStateNotificationsFromManager; bool iFirstSync; bool iStoppedByUser; bool iClosedByUser; - + #ifdef SNAP_FUNCTIONALITY_AVAILABLE CActiveCommsMobilityApiExt* iMobility; #endif @@ -190,6 +192,7 @@ private: // data bool isOpening; friend class ConnectionProgressNotifier; + friend class ConnectionStarter; }; class ConnectionProgressNotifier : public CActive @@ -212,6 +215,24 @@ private: // Data }; +class ConnectionStarter : public CActive +{ +public: + ConnectionStarter(QNetworkSessionPrivateImpl &owner, RConnection &connection); + ~ConnectionStarter(); + + void Start(); + void Start(TConnPref &pref); +protected: + void RunL(); + TInt RunError(TInt err); + void DoCancel(); + +private: // Data + QNetworkSessionPrivateImpl &iOwner; + RConnection& iConnection; +}; + QT_END_NAMESPACE #endif //QNETWORKSESSION_IMPL_H -- cgit v0.12 From 22ef6f15102cd287bd3cdbc9fe723d22b35560ca Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 31 Aug 2011 10:01:19 +0200 Subject: Debugger: Move QT_DECLARATIVE_DEBUG handling out of qdeclarative.h Apps don't have to (directly or indirectly) include qdeclarative.h. Instead, move the static instance to qdeclarativeengine.h, and qdeclarativeview.h (which instantiates it's own engine). Change-Id: I8b3e63ad4f134969734a2cc712395145d90e0dfa Reviewed-on: http://codereview.qt.nokia.com/3941 Reviewed-by: Qt Sanity Bot Reviewed-by: Aurindam Jana Reviewed-by: Martin Jones (cherrypicked from commit 6cb39fb829b78b5f6e9751283c7cd50400821e2a) --- src/declarative/debugger/debugger.pri | 3 +- src/declarative/debugger/qdeclarativedebug.h | 67 ++++++++++++++++++++++++++++ src/declarative/qml/qdeclarative.h | 11 ----- src/declarative/qml/qdeclarativeengine.h | 1 + src/declarative/util/qdeclarativeview.h | 1 + 5 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 src/declarative/debugger/qdeclarativedebug.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 3134c79..a904f6f 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -27,4 +27,5 @@ HEADERS += \ $$PWD/qdeclarativeinspectorservice_p.h \ $$PWD/qdeclarativeinspectorinterface_p.h \ $$PWD/qjsdebuggeragent_p.h \ - $$PWD/qjsdebugservice_p.h + $$PWD/qjsdebugservice_p.h \ + $$PWD/qdeclarativedebug.h diff --git a/src/declarative/debugger/qdeclarativedebug.h b/src/declarative/debugger/qdeclarativedebug.h new file mode 100644 index 0000000..b7930b2 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebug.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** 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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEDEBUG_H +#define QDECLARATIVEDEBUG_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler +{ + QDeclarativeDebuggingEnabler(); +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +#if defined(QT_DECLARATIVE_DEBUG) +static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper; +#endif + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUG_H diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index 5e8d0f4..399c207 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -405,17 +405,6 @@ QObject *qmlAttachedPropertiesObject(const QObject *obj, bool create = true) return qmlAttachedPropertiesObject(&idx, obj, &T::staticMetaObject, create); } -// Enable debugging before any QDeclarativeEngine is created -struct Q_DECLARATIVE_EXPORT QDeclarativeDebuggingEnabler -{ - QDeclarativeDebuggingEnabler(); -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -#if defined(QT_DECLARATIVE_DEBUG) -static QDeclarativeDebuggingEnabler qmlEnableDebuggingHelper; -#endif - QT_END_NAMESPACE QML_DECLARE_TYPE(QObject) diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h index 61ab2b2..4d6887f 100644 --- a/src/declarative/qml/qdeclarativeengine.h +++ b/src/declarative/qml/qdeclarativeengine.h @@ -47,6 +47,7 @@ #include #include #include +#include QT_BEGIN_HEADER diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h index b3854fc..ef51934 100644 --- a/src/declarative/util/qdeclarativeview.h +++ b/src/declarative/util/qdeclarativeview.h @@ -47,6 +47,7 @@ #include #include #include +#include QT_BEGIN_HEADER -- cgit v0.12 From 25c151b84ec8e2966780454745b53995e7b68dcd Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Thu, 15 Sep 2011 10:07:00 +0200 Subject: Changelog: update changes-4.8.0 for Richard --- dist/changes-4.8.0 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index b8e3842..b5c2a87 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -147,8 +147,9 @@ Qt for Windows Qt for Mac OS X --------------- - - raster graphics system is now made as the default paint engine for - Mac OS X. [QTBUG-12615] + - Alien widgets is now used by default for Qt/Cocoa on Mac OS X. + - Qt/Cocoa on Mac OS X has now full support for the raster paint engine. + - QApplication has now implemented macEventFilter for Qt/Cocoa - HarfBuzz can now be used as an optional text layout engine on Mac OS X. [QTBUG-17728] -- cgit v0.12 From 83d3085841b2caadb15c2534b1a2e329949f748d Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Thu, 15 Sep 2011 18:19:28 +1000 Subject: Fix aliasing bug when compiled with gcc 4.6 Task-number: QTBUG-21265 --- src/declarative/qml/qdeclarativenotifier_p.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/src/declarative/qml/qdeclarativenotifier_p.h b/src/declarative/qml/qdeclarativenotifier_p.h index 5f70f7d..e46b843 100644 --- a/src/declarative/qml/qdeclarativenotifier_p.h +++ b/src/declarative/qml/qdeclarativenotifier_p.h @@ -99,8 +99,15 @@ private: enum { InvalidType, SignalType, NotifierType } type; union { - char signalData[sizeof(Signal)]; - char notifierData[sizeof(Notifier)]; + struct { + Signal *signal; + union { + char signalData[sizeof(Signal)]; + qint64 q_for_alignment_1; + double q_for_alignment_2; + }; + }; + Notifier notifier; }; inline Notifier *toNotifier(); @@ -194,7 +201,7 @@ void QDeclarativeNotifierEndpoint::connect(QDeclarativeNotifier *notifier) void QDeclarativeNotifierEndpoint::disconnect() { if (type == SignalType) { - Signal *s = (Signal *)&signalData; + Signal *s = asSignal(); if (s->source) { QMetaObject::disconnectOne(s->source, s->sourceSignal, target, targetMethod); s->source = 0; @@ -234,7 +241,8 @@ QDeclarativeNotifierEndpoint::Notifier *QDeclarativeNotifierEndpoint::toNotifier QDeclarativeNotifierEndpoint::Notifier *QDeclarativeNotifierEndpoint::asNotifier() { - return (Notifier *)(¬ifierData); + Q_ASSERT(type == NotifierType); + return ¬ifier; } QDeclarativeNotifierEndpoint::Signal *QDeclarativeNotifierEndpoint::toSignal() @@ -243,16 +251,15 @@ QDeclarativeNotifierEndpoint::Signal *QDeclarativeNotifierEndpoint::toSignal() return asSignal(); disconnect(); - Signal *s = asSignal(); - new (s) Signal; + signal = new (&signalData) Signal; type = SignalType; - - return s; + return signal; } QDeclarativeNotifierEndpoint::Signal *QDeclarativeNotifierEndpoint::asSignal() { - return (Signal *)(&signalData); + Q_ASSERT(type == SignalType); + return signal; } QT_END_NAMESPACE -- cgit v0.12 From 7e6bf4a06e6f2e8e3a25d1212be766e2e753347a Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 16 Sep 2011 11:40:40 +0200 Subject: Update 4.8.0 changelog --- dist/changes-4.8.0 | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index b5c2a87..9c48f1e 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -152,6 +152,7 @@ Qt for Mac OS X - QApplication has now implemented macEventFilter for Qt/Cocoa - HarfBuzz can now be used as an optional text layout engine on Mac OS X. [QTBUG-17728] + - Qt shows some love to OS X Lion (10.7). Qt for Embedded Linux --------------------- -- cgit v0.12 From 6aebdf7a224ea976adc74bf47bd49fa6a1606ee2 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 30 Aug 2011 17:21:30 +0200 Subject: Rename QDeclarativeEngineDebugServer to ~Service And fix the file names/location, too Change-Id: If2d5ec0896332896ad11af748ec8f75c39e1555c Reviewed-on: http://codereview.qt.nokia.com/3890 Reviewed-by: Qt Sanity Bot Reviewed-by: Kai Koehne (cherrypicked from 8804ec49bda8672c5700ab843f2958c3d2bd8e41) --- src/declarative/debugger/debugger.pri | 6 +- src/declarative/debugger/qdeclarativedebug.cpp | 16 +- .../debugger/qdeclarativeenginedebugservice.cpp | 747 +++++++++++++++++++++ .../debugger/qdeclarativeenginedebugservice_p.h | 134 ++++ src/declarative/qml/qdeclarativecomponent.cpp | 4 +- src/declarative/qml/qdeclarativeengine.cpp | 8 +- src/declarative/qml/qdeclarativeenginedebug.cpp | 747 --------------------- src/declarative/qml/qdeclarativeenginedebug_p.h | 134 ---- src/declarative/qml/qml.pri | 2 - .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 1 - .../tst_qdeclarativedebugclient.cpp | 1 - .../tst_qdeclarativedebugservice.cpp | 1 - 12 files changed, 899 insertions(+), 902 deletions(-) create mode 100644 src/declarative/debugger/qdeclarativeenginedebugservice.cpp create mode 100644 src/declarative/debugger/qdeclarativeenginedebugservice_p.h delete mode 100644 src/declarative/qml/qdeclarativeenginedebug.cpp delete mode 100644 src/declarative/qml/qdeclarativeenginedebug_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index a904f6f..0810872 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -11,7 +11,8 @@ SOURCES += \ $$PWD/qdeclarativedebugserver.cpp \ $$PWD/qdeclarativeinspectorservice.cpp \ $$PWD/qjsdebuggeragent.cpp \ - $$PWD/qjsdebugservice.cpp + $$PWD/qjsdebugservice.cpp \ + $$PWD/qdeclarativeenginedebugservice.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ @@ -28,4 +29,5 @@ HEADERS += \ $$PWD/qdeclarativeinspectorinterface_p.h \ $$PWD/qjsdebuggeragent_p.h \ $$PWD/qjsdebugservice_p.h \ - $$PWD/qdeclarativedebug.h + $$PWD/qdeclarativedebug.h \ + $$PWD/qdeclarativeenginedebugservice_p.h diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativedebug.cpp index 620ee1d..17bd553 100644 --- a/src/declarative/debugger/qdeclarativedebug.cpp +++ b/src/declarative/debugger/qdeclarativedebug.cpp @@ -43,7 +43,7 @@ #include "private/qdeclarativedebugclient_p.h" -#include +#include #include @@ -207,7 +207,7 @@ void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclara void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o, bool simple) { - QDeclarativeEngineDebugServer::QDeclarativeObjectData data; + QDeclarativeEngineDebugService::QDeclarativeObjectData data; ds >> data; o.m_debugId = data.objectId; o.m_class = data.objectType; @@ -234,7 +234,7 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb ds >> propCount; for (int ii = 0; ii < propCount; ++ii) { - QDeclarativeEngineDebugServer::QDeclarativeObjectProperty data; + QDeclarativeEngineDebugService::QDeclarativeObjectProperty data; ds >> data; QDeclarativeDebugPropertyReference prop; prop.m_objectDebugId = o.m_debugId; @@ -243,21 +243,21 @@ void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugOb prop.m_hasNotifySignal = data.hasNotifySignal; prop.m_valueTypeName = data.valueTypeName; switch (data.type) { - case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Basic: - case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::List: - case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::SignalProperty: + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic: + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List: + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty: { prop.m_value = data.value; break; } - case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Object: + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Object: { QDeclarativeDebugObjectReference obj; obj.m_debugId = prop.m_value.toInt(); prop.m_value = QVariant::fromValue(obj); break; } - case QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Unknown: + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Unknown: break; } o.m_properties << prop; diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice.cpp b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp new file mode 100644 index 0000000..7683733 --- /dev/null +++ b/src/declarative/debugger/qdeclarativeenginedebugservice.cpp @@ -0,0 +1,747 @@ +/**************************************************************************** +** +** 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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "private/qdeclarativeenginedebugservice_p.h" + +#include "private/qdeclarativeboundsignal_p.h" +#include "qdeclarativeengine.h" +#include "private/qdeclarativemetatype_p.h" +#include "qdeclarativeproperty.h" +#include "private/qdeclarativeproperty_p.h" +#include "private/qdeclarativebinding_p.h" +#include "private/qdeclarativecontext_p.h" +#include "private/qdeclarativewatcher_p.h" +#include "private/qdeclarativevaluetype_p.h" +#include "private/qdeclarativevmemetaobject_p.h" +#include "private/qdeclarativeexpression_p.h" +#include "private/qdeclarativepropertychanges_p.h" + +#include +#include + +QT_BEGIN_NAMESPACE + +Q_GLOBAL_STATIC(QDeclarativeEngineDebugService, qmlEngineDebugService); + +QDeclarativeEngineDebugService *QDeclarativeEngineDebugService::instance() +{ + return qmlEngineDebugService(); +} + +QDeclarativeEngineDebugService::QDeclarativeEngineDebugService(QObject *parent) +: QDeclarativeDebugService(QLatin1String("QDeclarativeEngine"), parent), + m_watch(new QDeclarativeWatcher(this)) +{ + QObject::connect(m_watch, SIGNAL(propertyChanged(int,int,QMetaProperty,QVariant)), + this, SLOT(propertyChanged(int,int,QMetaProperty,QVariant))); +} + +QDataStream &operator<<(QDataStream &ds, + const QDeclarativeEngineDebugService::QDeclarativeObjectData &data) +{ + ds << data.url << data.lineNumber << data.columnNumber << data.idString + << data.objectName << data.objectType << data.objectId << data.contextId; + return ds; +} + +QDataStream &operator>>(QDataStream &ds, + QDeclarativeEngineDebugService::QDeclarativeObjectData &data) +{ + ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString + >> data.objectName >> data.objectType >> data.objectId >> data.contextId; + return ds; +} + +QDataStream &operator<<(QDataStream &ds, + const QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data) +{ + ds << (int)data.type << data.name << data.value << data.valueTypeName + << data.binding << data.hasNotifySignal; + return ds; +} + +QDataStream &operator>>(QDataStream &ds, + QDeclarativeEngineDebugService::QDeclarativeObjectProperty &data) +{ + int type; + ds >> type >> data.name >> data.value >> data.valueTypeName + >> data.binding >> data.hasNotifySignal; + data.type = (QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Type)type; + return ds; +} + +static inline bool isSignalPropertyName(const QString &signalName) +{ + // see QmlCompiler::isSignalPropertyName + return signalName.length() >= 3 && signalName.startsWith(QLatin1String("on")) && + signalName.at(2).isLetter() && signalName.at(2).isUpper(); +} + +static bool hasValidSignal(QObject *object, const QString &propertyName) +{ + if (!isSignalPropertyName(propertyName)) + return false; + + QString signalName = propertyName.mid(2); + signalName[0] = signalName.at(0).toLower(); + + int sigIdx = QDeclarativePropertyPrivate::findSignalByName(object->metaObject(), signalName.toLatin1()).methodIndex(); + + if (sigIdx == -1) + return false; + + return true; +} + +QDeclarativeEngineDebugService::QDeclarativeObjectProperty +QDeclarativeEngineDebugService::propertyData(QObject *obj, int propIdx) +{ + QDeclarativeObjectProperty rv; + + QMetaProperty prop = obj->metaObject()->property(propIdx); + + rv.type = QDeclarativeObjectProperty::Unknown; + rv.valueTypeName = QString::fromUtf8(prop.typeName()); + rv.name = QString::fromUtf8(prop.name()); + rv.hasNotifySignal = prop.hasNotifySignal(); + QDeclarativeAbstractBinding *binding = + QDeclarativePropertyPrivate::binding(QDeclarativeProperty(obj, rv.name)); + if (binding) + rv.binding = binding->expression(); + + if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { + rv.type = QDeclarativeObjectProperty::Basic; + } else if (QDeclarativeMetaType::isQObject(prop.userType())) { + rv.type = QDeclarativeObjectProperty::Object; + } else if (QDeclarativeMetaType::isList(prop.userType())) { + rv.type = QDeclarativeObjectProperty::List; + } + + QVariant value; + if (rv.type != QDeclarativeObjectProperty::Unknown && prop.userType() != 0) { + value = prop.read(obj); + } + rv.value = valueContents(value); + + return rv; +} + +QVariant QDeclarativeEngineDebugService::valueContents(const QVariant &value) const +{ + int userType = value.userType(); + + if (value.type() == QVariant::List) { + QVariantList contents; + QVariantList list = value.toList(); + int count = list.size(); + for (int i = 0; i < count; i++) + contents << valueContents(list.at(i)); + return contents; + } + + if (QDeclarativeValueTypeFactory::isValueType(userType)) + return value; + + if (QDeclarativeMetaType::isQObject(userType)) { + QObject *o = QDeclarativeMetaType::toQObject(value); + if (o) { + QString name = o->objectName(); + if (name.isEmpty()) + name = QLatin1String(""); + return name; + } + } + + return QLatin1String(""); +} + +void QDeclarativeEngineDebugService::buildObjectDump(QDataStream &message, + QObject *object, bool recur, bool dumpProperties) +{ + message << objectData(object); + + QObjectList children = object->children(); + + int childrenCount = children.count(); + for (int ii = 0; ii < children.count(); ++ii) { + if (qobject_cast(children[ii]) || QDeclarativeBoundSignal::cast(children[ii])) + --childrenCount; + } + + message << childrenCount << recur; + + QList fakeProperties; + + for (int ii = 0; ii < children.count(); ++ii) { + QObject *child = children.at(ii); + if (qobject_cast(child)) + continue; + QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child); + if (signal) { + if (!dumpProperties) + continue; + QDeclarativeObjectProperty prop; + prop.type = QDeclarativeObjectProperty::SignalProperty; + prop.hasNotifySignal = false; + QDeclarativeExpression *expr = signal->expression(); + if (expr) { + prop.value = expr->expression(); + QObject *scope = expr->scopeObject(); + if (scope) { + QString sig = QLatin1String(scope->metaObject()->method(signal->index()).signature()); + int lparen = sig.indexOf(QLatin1Char('(')); + if (lparen >= 0) { + QString methodName = sig.mid(0, lparen); + prop.name = QLatin1String("on") + methodName[0].toUpper() + + methodName.mid(1); + } + } + } + fakeProperties << prop; + } else { + if (recur) + buildObjectDump(message, child, recur, dumpProperties); + else + message << objectData(child); + } + } + + if (!dumpProperties) { + message << 0; + return; + } + + QList propertyIndexes; + for (int ii = 0; ii < object->metaObject()->propertyCount(); ++ii) { + if (object->metaObject()->property(ii).isScriptable()) + propertyIndexes << ii; + } + + message << propertyIndexes.size() + fakeProperties.count(); + + for (int ii = 0; ii < propertyIndexes.size(); ++ii) + message << propertyData(object, propertyIndexes.at(ii)); + + for (int ii = 0; ii < fakeProperties.count(); ++ii) + message << fakeProperties[ii]; +} + +void QDeclarativeEngineDebugService::prepareDeferredObjects(QObject *obj) +{ + qmlExecuteDeferred(obj); + + QObjectList children = obj->children(); + for (int ii = 0; ii < children.count(); ++ii) { + QObject *child = children.at(ii); + prepareDeferredObjects(child); + } + +} + +void QDeclarativeEngineDebugService::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt) +{ + QDeclarativeContextData *p = QDeclarativeContextData::get(ctxt); + + QString ctxtName = ctxt->objectName(); + int ctxtId = QDeclarativeDebugService::idForObject(ctxt); + + message << ctxtName << ctxtId; + + int count = 0; + + QDeclarativeContextData *child = p->childContexts; + while (child) { + ++count; + child = child->nextChild; + } + + message << count; + + child = p->childContexts; + while (child) { + buildObjectList(message, child->asQDeclarativeContext()); + child = child->nextChild; + } + + // Clean deleted objects + QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); + for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { + if (!ctxtPriv->instances.at(ii)) { + ctxtPriv->instances.removeAt(ii); + --ii; + } + } + + message << ctxtPriv->instances.count(); + for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { + message << objectData(ctxtPriv->instances.at(ii)); + } +} + +void QDeclarativeEngineDebugService::buildStatesList(QDeclarativeContext *ctxt, bool cleanList=false) +{ + if (cleanList) + m_allStates.clear(); + + QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); + for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { + buildStatesList(ctxtPriv->instances.at(ii)); + } + + QDeclarativeContextData *child = QDeclarativeContextData::get(ctxt)->childContexts; + while (child) { + buildStatesList(child->asQDeclarativeContext()); + child = child->nextChild; + } +} + +void QDeclarativeEngineDebugService::buildStatesList(QObject *obj) +{ + if (QDeclarativeState *state = qobject_cast(obj)) { + m_allStates.append(state); + } + + QObjectList children = obj->children(); + for (int ii = 0; ii < children.count(); ++ii) { + buildStatesList(children.at(ii)); + } +} + +QDeclarativeEngineDebugService::QDeclarativeObjectData +QDeclarativeEngineDebugService::objectData(QObject *object) +{ + QDeclarativeData *ddata = QDeclarativeData::get(object); + QDeclarativeObjectData rv; + if (ddata && ddata->outerContext) { + rv.url = ddata->outerContext->url; + rv.lineNumber = ddata->lineNumber; + rv.columnNumber = ddata->columnNumber; + } else { + rv.lineNumber = -1; + rv.columnNumber = -1; + } + + QDeclarativeContext *context = qmlContext(object); + if (context) { + QDeclarativeContextData *cdata = QDeclarativeContextData::get(context); + if (cdata) + rv.idString = cdata->findObjectId(object); + } + + rv.objectName = object->objectName(); + rv.objectId = QDeclarativeDebugService::idForObject(object); + rv.contextId = QDeclarativeDebugService::idForObject(qmlContext(object)); + + QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject()); + if (type) { + QString typeName = QLatin1String(type->qmlTypeName()); + int lastSlash = typeName.lastIndexOf(QLatin1Char('/')); + rv.objectType = lastSlash < 0 ? typeName : typeName.mid(lastSlash+1); + } else { + rv.objectType = QString::fromUtf8(object->metaObject()->className()); + int marker = rv.objectType.indexOf(QLatin1String("_QMLTYPE_")); + if (marker != -1) + rv.objectType = rv.objectType.left(marker); + } + + return rv; +} + +void QDeclarativeEngineDebugService::messageReceived(const QByteArray &message) +{ + QDataStream ds(message); + + QByteArray type; + ds >> type; + + if (type == "LIST_ENGINES") { + int queryId; + ds >> queryId; + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + rs << QByteArray("LIST_ENGINES_R"); + rs << queryId << m_engines.count(); + + for (int ii = 0; ii < m_engines.count(); ++ii) { + QDeclarativeEngine *engine = m_engines.at(ii); + + QString engineName = engine->objectName(); + int engineId = QDeclarativeDebugService::idForObject(engine); + + rs << engineName << engineId; + } + + sendMessage(reply); + } else if (type == "LIST_OBJECTS") { + int queryId; + int engineId = -1; + ds >> queryId >> engineId; + + QDeclarativeEngine *engine = + qobject_cast(QDeclarativeDebugService::objectForId(engineId)); + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + rs << QByteArray("LIST_OBJECTS_R") << queryId; + + if (engine) { + buildObjectList(rs, engine->rootContext()); + buildStatesList(engine->rootContext(), true); + } + + sendMessage(reply); + } else if (type == "FETCH_OBJECT") { + int queryId; + int objectId; + bool recurse; + bool dumpProperties = true; + + ds >> queryId >> objectId >> recurse >> dumpProperties; + + QObject *object = QDeclarativeDebugService::objectForId(objectId); + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + rs << QByteArray("FETCH_OBJECT_R") << queryId; + + if (object) { + if (recurse) + prepareDeferredObjects(object); + buildObjectDump(rs, object, recurse, dumpProperties); + } + + sendMessage(reply); + } else if (type == "WATCH_OBJECT") { + int queryId; + int objectId; + + ds >> queryId >> objectId; + bool ok = m_watch->addWatch(queryId, objectId); + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + rs << QByteArray("WATCH_OBJECT_R") << queryId << ok; + + sendMessage(reply); + } else if (type == "WATCH_PROPERTY") { + int queryId; + int objectId; + QByteArray property; + + ds >> queryId >> objectId >> property; + bool ok = m_watch->addWatch(queryId, objectId, property); + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + rs << QByteArray("WATCH_PROPERTY_R") << queryId << ok; + + sendMessage(reply); + } else if (type == "WATCH_EXPR_OBJECT") { + int queryId; + int debugId; + QString expr; + + ds >> queryId >> debugId >> expr; + bool ok = m_watch->addWatch(queryId, debugId, expr); + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + rs << QByteArray("WATCH_EXPR_OBJECT_R") << queryId << ok; + sendMessage(reply); + } else if (type == "NO_WATCH") { + int queryId; + + ds >> queryId; + m_watch->removeWatch(queryId); + } else if (type == "EVAL_EXPRESSION") { + int queryId; + int objectId; + QString expr; + + ds >> queryId >> objectId >> expr; + + QObject *object = QDeclarativeDebugService::objectForId(objectId); + QDeclarativeContext *context = qmlContext(object); + QVariant result; + if (object && context) { + QDeclarativeExpression exprObj(context, object, expr); + bool undefined = false; + QVariant value = exprObj.evaluate(&undefined); + if (undefined) + result = QLatin1String(""); + else + result = valueContents(value); + } else { + result = QLatin1String(""); + } + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + rs << QByteArray("EVAL_EXPRESSION_R") << queryId << result; + + sendMessage(reply); + } else if (type == "SET_BINDING") { + int objectId; + QString propertyName; + QVariant expr; + bool isLiteralValue; + QString filename; + int line; + ds >> objectId >> propertyName >> expr >> isLiteralValue; + if (!ds.atEnd()) { // backward compatibility from 2.1, 2.2 + ds >> filename >> line; + } + setBinding(objectId, propertyName, expr, isLiteralValue, filename, line); + } else if (type == "RESET_BINDING") { + int objectId; + QString propertyName; + ds >> objectId >> propertyName; + resetBinding(objectId, propertyName); + } else if (type == "SET_METHOD_BODY") { + int objectId; + QString methodName; + QString methodBody; + ds >> objectId >> methodName >> methodBody; + setMethodBody(objectId, methodName, methodBody); + } +} + +void QDeclarativeEngineDebugService::setBinding(int objectId, + const QString &propertyName, + const QVariant &expression, + bool isLiteralValue, + QString filename, + int line) +{ + QObject *object = objectForId(objectId); + QDeclarativeContext *context = qmlContext(object); + + if (object && context) { + QDeclarativeProperty property(object, propertyName, context); + if (property.isValid()) { + + bool inBaseState = true; + + foreach(QWeakPointer statePointer, m_allStates) { + if (QDeclarativeState *state = statePointer.data()) { + // here we assume that the revert list on itself defines the base state + if (state->isStateActive() && state->containsPropertyInRevertList(object, propertyName)) { + inBaseState = false; + + QDeclarativeBinding *newBinding = 0; + if (!isLiteralValue) { + newBinding = new QDeclarativeBinding(expression.toString(), object, context); + newBinding->setTarget(property); + newBinding->setNotifyOnValueChanged(true); + newBinding->setSourceLocation(filename, line); + } + + state->changeBindingInRevertList(object, propertyName, newBinding); + + if (isLiteralValue) + state->changeValueInRevertList(object, propertyName, expression); + } + } + } + + if (inBaseState) { + if (isLiteralValue) { + property.write(expression); + } else if (hasValidSignal(object, propertyName)) { + QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); + QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); + declarativeExpression->setSourceLocation(filename, line); + } else if (property.isProperty()) { + QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); + binding->setTarget(property); + binding->setSourceLocation(filename, line); + binding->setNotifyOnValueChanged(true); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding); + if (oldBinding) + oldBinding->destroy(); + binding->update(); + } else { + qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object; + } + } + + } else { + // not a valid property + if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { + if (isLiteralValue) { + propertyChanges->changeValue(propertyName, expression); + } else { + propertyChanges->changeExpression(propertyName, expression.toString()); + } + } else { + qWarning() << "QDeclarativeEngineDebugService::setBinding: unable to set property" << propertyName << "on object" << object; + } + } + } +} + +void QDeclarativeEngineDebugService::resetBinding(int objectId, const QString &propertyName) +{ + QObject *object = objectForId(objectId); + QDeclarativeContext *context = qmlContext(object); + + if (object && context) { + if (object->property(propertyName.toLatin1()).isValid()) { + QDeclarativeProperty property(object, propertyName); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(property); + if (oldBinding) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, 0); + if (oldBinding) + oldBinding->destroy(); + } + if (property.isResettable()) { + // Note: this will reset the property in any case, without regard to states + // Right now almost no QDeclarativeItem has reset methods for its properties (with the + // notable exception of QDeclarativeAnchors), so this is not a big issue + // later on, setBinding does take states into account + property.reset(); + } else { + // overwrite with default value + if (QDeclarativeType *objType = QDeclarativeMetaType::qmlType(object->metaObject())) { + if (QObject *emptyObject = objType->create()) { + if (emptyObject->property(propertyName.toLatin1()).isValid()) { + QVariant defaultValue = QDeclarativeProperty(emptyObject, propertyName).read(); + if (defaultValue.isValid()) { + setBinding(objectId, propertyName, defaultValue, true); + } + } + delete emptyObject; + } + } + } + } else if (hasValidSignal(object, propertyName)) { + QDeclarativeProperty property(object, propertyName, context); + QDeclarativePropertyPrivate::setSignalExpression(property, 0); + } else { + if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { + propertyChanges->removeProperty(propertyName); + } + } + } +} + +void QDeclarativeEngineDebugService::setMethodBody(int objectId, const QString &method, const QString &body) +{ + QObject *object = objectForId(objectId); + QDeclarativeContext *context = qmlContext(object); + if (!object || !context || !context->engine()) + return; + QDeclarativeContextData *contextData = QDeclarativeContextData::get(context); + if (!contextData) + return; + + QDeclarativePropertyCache::Data dummy; + QDeclarativePropertyCache::Data *prop = + QDeclarativePropertyCache::property(context->engine(), object, method, dummy); + + if (!prop || !(prop->flags & QDeclarativePropertyCache::Data::IsVMEFunction)) + return; + + QMetaMethod metaMethod = object->metaObject()->method(prop->coreIndex); + QList paramNames = metaMethod.parameterNames(); + + QString paramStr; + for (int ii = 0; ii < paramNames.count(); ++ii) { + if (ii != 0) paramStr.append(QLatin1String(",")); + paramStr.append(QString::fromUtf8(paramNames.at(ii))); + } + + QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr + + QLatin1String(") {"); + jsfunction += body; + jsfunction += QLatin1String("\n})"); + + QDeclarativeVMEMetaObject *vmeMetaObject = + static_cast(QObjectPrivate::get(object)->metaObject); + Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this + + int lineNumber = vmeMetaObject->vmeMethodLineNumber(prop->coreIndex); + vmeMetaObject->setVmeMethod(prop->coreIndex, QDeclarativeExpressionPrivate::evalInObjectScope(contextData, object, jsfunction, contextData->url.toString(), lineNumber, 0)); +} + +void QDeclarativeEngineDebugService::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value) +{ + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + + rs << QByteArray("UPDATE_WATCH") << id << objectId << QByteArray(property.name()) << valueContents(value); + + sendMessage(reply); +} + +void QDeclarativeEngineDebugService::addEngine(QDeclarativeEngine *engine) +{ + Q_ASSERT(engine); + Q_ASSERT(!m_engines.contains(engine)); + + m_engines.append(engine); +} + +void QDeclarativeEngineDebugService::remEngine(QDeclarativeEngine *engine) +{ + Q_ASSERT(engine); + Q_ASSERT(m_engines.contains(engine)); + + m_engines.removeAll(engine); +} + +void QDeclarativeEngineDebugService::objectCreated(QDeclarativeEngine *engine, QObject *object) +{ + Q_ASSERT(engine); + Q_ASSERT(m_engines.contains(engine)); + + int engineId = QDeclarativeDebugService::idForObject(engine); + int objectId = QDeclarativeDebugService::idForObject(object); + + QByteArray reply; + QDataStream rs(&reply, QIODevice::WriteOnly); + + rs << QByteArray("OBJECT_CREATED") << engineId << objectId; + sendMessage(reply); +} + +QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativeenginedebugservice_p.h b/src/declarative/debugger/qdeclarativeenginedebugservice_p.h new file mode 100644 index 0000000..3674b83 --- /dev/null +++ b/src/declarative/debugger/qdeclarativeenginedebugservice_p.h @@ -0,0 +1,134 @@ +/**************************************************************************** +** +** 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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QDECLARATIVEENGINEDEBUGSERVICE_P_H +#define QDECLARATIVEENGINEDEBUGSERVICE_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include + +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class QDeclarativeEngine; +class QDeclarativeContext; +class QDeclarativeWatcher; +class QDataStream; +class QDeclarativeState; + +class QDeclarativeEngineDebugService : public QDeclarativeDebugService +{ + Q_OBJECT +public: + QDeclarativeEngineDebugService(QObject * = 0); + + struct QDeclarativeObjectData { + QUrl url; + int lineNumber; + int columnNumber; + QString idString; + QString objectName; + QString objectType; + int objectId; + int contextId; + }; + + struct QDeclarativeObjectProperty { + enum Type { Unknown, Basic, Object, List, SignalProperty }; + Type type; + QString name; + QVariant value; + QString valueTypeName; + QString binding; + bool hasNotifySignal; + }; + + void addEngine(QDeclarativeEngine *); + void remEngine(QDeclarativeEngine *); + void objectCreated(QDeclarativeEngine *, QObject *); + + static QDeclarativeEngineDebugService *instance(); + +protected: + virtual void messageReceived(const QByteArray &); + +private Q_SLOTS: + void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value); + +private: + void prepareDeferredObjects(QObject *); + void buildObjectList(QDataStream &, QDeclarativeContext *); + void buildObjectDump(QDataStream &, QObject *, bool, bool); + void buildStatesList(QDeclarativeContext *, bool); + void buildStatesList(QObject *obj); + QDeclarativeObjectData objectData(QObject *); + QDeclarativeObjectProperty propertyData(QObject *, int); + QVariant valueContents(const QVariant &defaultValue) const; + void setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename = QString(), int line = -1); + void resetBinding(int objectId, const QString &propertyName); + void setMethodBody(int objectId, const QString &method, const QString &body); + + QList m_engines; + QDeclarativeWatcher *m_watch; + QList > m_allStates; +}; +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugService::QDeclarativeObjectData &); +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugService::QDeclarativeObjectData &); +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugService::QDeclarativeObjectProperty &); +Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugService::QDeclarativeObjectProperty &); + +QT_END_NAMESPACE + +#endif // QDECLARATIVEENGINEDEBUGSERVICE_P_H + diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index d9f291b..f423f50 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -53,7 +53,7 @@ #include "private/qdeclarativeglobal_p.h" #include "private/qdeclarativescriptparser_p.h" #include "private/qdeclarativedebugtrace_p.h" -#include "private/qdeclarativeenginedebug_p.h" +#include "private/qdeclarativeenginedebugservice_p.h" #include #include @@ -896,7 +896,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon if (enginePriv->isDebugging && rv) { if (!parentContext->isInternal) parentContext->asQDeclarativeContextPrivate()->instances.append(rv); - QDeclarativeEngineDebugServer::instance()->objectCreated(parentContext->engine, rv); + QDeclarativeEngineDebugService::instance()->objectCreated(parentContext->engine, rv); } return rv; diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 34014f7..1417b78 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -51,7 +51,7 @@ #include "qdeclarativecomponent.h" #include "private/qdeclarativebinding_p_p.h" #include "private/qdeclarativevme_p.h" -#include "private/qdeclarativeenginedebug_p.h" +#include "private/qdeclarativeenginedebugservice_p.h" #include "private/qdeclarativestringconverters_p.h" #include "private/qdeclarativexmlhttprequest_p.h" #include "private/qdeclarativesqldatabase_p.h" @@ -581,9 +581,9 @@ void QDeclarativeEnginePrivate::init() scriptEngine.globalObject().property(QLatin1String("Qt")).setProperty(QLatin1String("application"), applicationObject); if (QCoreApplication::instance()->thread() == q->thread() && - QDeclarativeEngineDebugServer::isDebuggingEnabled()) { + QDeclarativeEngineDebugService::isDebuggingEnabled()) { isDebugging = true; - QDeclarativeEngineDebugServer::instance()->addEngine(q); + QDeclarativeEngineDebugService::instance()->addEngine(q); QJSDebugService::instance()->addEngine(q); } } @@ -648,7 +648,7 @@ QDeclarativeEngine::~QDeclarativeEngine() { Q_D(QDeclarativeEngine); if (d->isDebugging) { - QDeclarativeEngineDebugServer::instance()->remEngine(this); + QDeclarativeEngineDebugService::instance()->remEngine(this); QJSDebugService::instance()->removeEngine(this); } } diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp deleted file mode 100644 index 8707a7f..0000000 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ /dev/null @@ -1,747 +0,0 @@ -/**************************************************************************** -** -** 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 QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "private/qdeclarativeenginedebug_p.h" - -#include "private/qdeclarativeboundsignal_p.h" -#include "qdeclarativeengine.h" -#include "private/qdeclarativemetatype_p.h" -#include "qdeclarativeproperty.h" -#include "private/qdeclarativeproperty_p.h" -#include "private/qdeclarativebinding_p.h" -#include "private/qdeclarativecontext_p.h" -#include "private/qdeclarativewatcher_p.h" -#include "private/qdeclarativevaluetype_p.h" -#include "private/qdeclarativevmemetaobject_p.h" -#include "private/qdeclarativeexpression_p.h" -#include "private/qdeclarativepropertychanges_p.h" - -#include -#include - -QT_BEGIN_NAMESPACE - -Q_GLOBAL_STATIC(QDeclarativeEngineDebugServer, qmlEngineDebugServer); - -QDeclarativeEngineDebugServer *QDeclarativeEngineDebugServer::instance() -{ - return qmlEngineDebugServer(); -} - -QDeclarativeEngineDebugServer::QDeclarativeEngineDebugServer(QObject *parent) -: QDeclarativeDebugService(QLatin1String("QDeclarativeEngine"), parent), - m_watch(new QDeclarativeWatcher(this)) -{ - QObject::connect(m_watch, SIGNAL(propertyChanged(int,int,QMetaProperty,QVariant)), - this, SLOT(propertyChanged(int,int,QMetaProperty,QVariant))); -} - -QDataStream &operator<<(QDataStream &ds, - const QDeclarativeEngineDebugServer::QDeclarativeObjectData &data) -{ - ds << data.url << data.lineNumber << data.columnNumber << data.idString - << data.objectName << data.objectType << data.objectId << data.contextId; - return ds; -} - -QDataStream &operator>>(QDataStream &ds, - QDeclarativeEngineDebugServer::QDeclarativeObjectData &data) -{ - ds >> data.url >> data.lineNumber >> data.columnNumber >> data.idString - >> data.objectName >> data.objectType >> data.objectId >> data.contextId; - return ds; -} - -QDataStream &operator<<(QDataStream &ds, - const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &data) -{ - ds << (int)data.type << data.name << data.value << data.valueTypeName - << data.binding << data.hasNotifySignal; - return ds; -} - -QDataStream &operator>>(QDataStream &ds, - QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &data) -{ - int type; - ds >> type >> data.name >> data.value >> data.valueTypeName - >> data.binding >> data.hasNotifySignal; - data.type = (QDeclarativeEngineDebugServer::QDeclarativeObjectProperty::Type)type; - return ds; -} - -static inline bool isSignalPropertyName(const QString &signalName) -{ - // see QmlCompiler::isSignalPropertyName - return signalName.length() >= 3 && signalName.startsWith(QLatin1String("on")) && - signalName.at(2).isLetter() && signalName.at(2).isUpper(); -} - -static bool hasValidSignal(QObject *object, const QString &propertyName) -{ - if (!isSignalPropertyName(propertyName)) - return false; - - QString signalName = propertyName.mid(2); - signalName[0] = signalName.at(0).toLower(); - - int sigIdx = QDeclarativePropertyPrivate::findSignalByName(object->metaObject(), signalName.toLatin1()).methodIndex(); - - if (sigIdx == -1) - return false; - - return true; -} - -QDeclarativeEngineDebugServer::QDeclarativeObjectProperty -QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) -{ - QDeclarativeObjectProperty rv; - - QMetaProperty prop = obj->metaObject()->property(propIdx); - - rv.type = QDeclarativeObjectProperty::Unknown; - rv.valueTypeName = QString::fromUtf8(prop.typeName()); - rv.name = QString::fromUtf8(prop.name()); - rv.hasNotifySignal = prop.hasNotifySignal(); - QDeclarativeAbstractBinding *binding = - QDeclarativePropertyPrivate::binding(QDeclarativeProperty(obj, rv.name)); - if (binding) - rv.binding = binding->expression(); - - if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { - rv.type = QDeclarativeObjectProperty::Basic; - } else if (QDeclarativeMetaType::isQObject(prop.userType())) { - rv.type = QDeclarativeObjectProperty::Object; - } else if (QDeclarativeMetaType::isList(prop.userType())) { - rv.type = QDeclarativeObjectProperty::List; - } - - QVariant value; - if (rv.type != QDeclarativeObjectProperty::Unknown && prop.userType() != 0) { - value = prop.read(obj); - } - rv.value = valueContents(value); - - return rv; -} - -QVariant QDeclarativeEngineDebugServer::valueContents(const QVariant &value) const -{ - int userType = value.userType(); - - if (value.type() == QVariant::List) { - QVariantList contents; - QVariantList list = value.toList(); - int count = list.size(); - for (int i = 0; i < count; i++) - contents << valueContents(list.at(i)); - return contents; - } - - if (QDeclarativeValueTypeFactory::isValueType(userType)) - return value; - - if (QDeclarativeMetaType::isQObject(userType)) { - QObject *o = QDeclarativeMetaType::toQObject(value); - if (o) { - QString name = o->objectName(); - if (name.isEmpty()) - name = QLatin1String(""); - return name; - } - } - - return QLatin1String(""); -} - -void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, - QObject *object, bool recur, bool dumpProperties) -{ - message << objectData(object); - - QObjectList children = object->children(); - - int childrenCount = children.count(); - for (int ii = 0; ii < children.count(); ++ii) { - if (qobject_cast(children[ii]) || QDeclarativeBoundSignal::cast(children[ii])) - --childrenCount; - } - - message << childrenCount << recur; - - QList fakeProperties; - - for (int ii = 0; ii < children.count(); ++ii) { - QObject *child = children.at(ii); - if (qobject_cast(child)) - continue; - QDeclarativeBoundSignal *signal = QDeclarativeBoundSignal::cast(child); - if (signal) { - if (!dumpProperties) - continue; - QDeclarativeObjectProperty prop; - prop.type = QDeclarativeObjectProperty::SignalProperty; - prop.hasNotifySignal = false; - QDeclarativeExpression *expr = signal->expression(); - if (expr) { - prop.value = expr->expression(); - QObject *scope = expr->scopeObject(); - if (scope) { - QString sig = QLatin1String(scope->metaObject()->method(signal->index()).signature()); - int lparen = sig.indexOf(QLatin1Char('(')); - if (lparen >= 0) { - QString methodName = sig.mid(0, lparen); - prop.name = QLatin1String("on") + methodName[0].toUpper() - + methodName.mid(1); - } - } - } - fakeProperties << prop; - } else { - if (recur) - buildObjectDump(message, child, recur, dumpProperties); - else - message << objectData(child); - } - } - - if (!dumpProperties) { - message << 0; - return; - } - - QList propertyIndexes; - for (int ii = 0; ii < object->metaObject()->propertyCount(); ++ii) { - if (object->metaObject()->property(ii).isScriptable()) - propertyIndexes << ii; - } - - message << propertyIndexes.size() + fakeProperties.count(); - - for (int ii = 0; ii < propertyIndexes.size(); ++ii) - message << propertyData(object, propertyIndexes.at(ii)); - - for (int ii = 0; ii < fakeProperties.count(); ++ii) - message << fakeProperties[ii]; -} - -void QDeclarativeEngineDebugServer::prepareDeferredObjects(QObject *obj) -{ - qmlExecuteDeferred(obj); - - QObjectList children = obj->children(); - for (int ii = 0; ii < children.count(); ++ii) { - QObject *child = children.at(ii); - prepareDeferredObjects(child); - } - -} - -void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt) -{ - QDeclarativeContextData *p = QDeclarativeContextData::get(ctxt); - - QString ctxtName = ctxt->objectName(); - int ctxtId = QDeclarativeDebugService::idForObject(ctxt); - - message << ctxtName << ctxtId; - - int count = 0; - - QDeclarativeContextData *child = p->childContexts; - while (child) { - ++count; - child = child->nextChild; - } - - message << count; - - child = p->childContexts; - while (child) { - buildObjectList(message, child->asQDeclarativeContext()); - child = child->nextChild; - } - - // Clean deleted objects - QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); - for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { - if (!ctxtPriv->instances.at(ii)) { - ctxtPriv->instances.removeAt(ii); - --ii; - } - } - - message << ctxtPriv->instances.count(); - for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { - message << objectData(ctxtPriv->instances.at(ii)); - } -} - -void QDeclarativeEngineDebugServer::buildStatesList(QDeclarativeContext *ctxt, bool cleanList=false) -{ - if (cleanList) - m_allStates.clear(); - - QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); - for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { - buildStatesList(ctxtPriv->instances.at(ii)); - } - - QDeclarativeContextData *child = QDeclarativeContextData::get(ctxt)->childContexts; - while (child) { - buildStatesList(child->asQDeclarativeContext()); - child = child->nextChild; - } -} - -void QDeclarativeEngineDebugServer::buildStatesList(QObject *obj) -{ - if (QDeclarativeState *state = qobject_cast(obj)) { - m_allStates.append(state); - } - - QObjectList children = obj->children(); - for (int ii = 0; ii < children.count(); ++ii) { - buildStatesList(children.at(ii)); - } -} - -QDeclarativeEngineDebugServer::QDeclarativeObjectData -QDeclarativeEngineDebugServer::objectData(QObject *object) -{ - QDeclarativeData *ddata = QDeclarativeData::get(object); - QDeclarativeObjectData rv; - if (ddata && ddata->outerContext) { - rv.url = ddata->outerContext->url; - rv.lineNumber = ddata->lineNumber; - rv.columnNumber = ddata->columnNumber; - } else { - rv.lineNumber = -1; - rv.columnNumber = -1; - } - - QDeclarativeContext *context = qmlContext(object); - if (context) { - QDeclarativeContextData *cdata = QDeclarativeContextData::get(context); - if (cdata) - rv.idString = cdata->findObjectId(object); - } - - rv.objectName = object->objectName(); - rv.objectId = QDeclarativeDebugService::idForObject(object); - rv.contextId = QDeclarativeDebugService::idForObject(qmlContext(object)); - - QDeclarativeType *type = QDeclarativeMetaType::qmlType(object->metaObject()); - if (type) { - QString typeName = QLatin1String(type->qmlTypeName()); - int lastSlash = typeName.lastIndexOf(QLatin1Char('/')); - rv.objectType = lastSlash < 0 ? typeName : typeName.mid(lastSlash+1); - } else { - rv.objectType = QString::fromUtf8(object->metaObject()->className()); - int marker = rv.objectType.indexOf(QLatin1String("_QMLTYPE_")); - if (marker != -1) - rv.objectType = rv.objectType.left(marker); - } - - return rv; -} - -void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) -{ - QDataStream ds(message); - - QByteArray type; - ds >> type; - - if (type == "LIST_ENGINES") { - int queryId; - ds >> queryId; - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - rs << QByteArray("LIST_ENGINES_R"); - rs << queryId << m_engines.count(); - - for (int ii = 0; ii < m_engines.count(); ++ii) { - QDeclarativeEngine *engine = m_engines.at(ii); - - QString engineName = engine->objectName(); - int engineId = QDeclarativeDebugService::idForObject(engine); - - rs << engineName << engineId; - } - - sendMessage(reply); - } else if (type == "LIST_OBJECTS") { - int queryId; - int engineId = -1; - ds >> queryId >> engineId; - - QDeclarativeEngine *engine = - qobject_cast(QDeclarativeDebugService::objectForId(engineId)); - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - rs << QByteArray("LIST_OBJECTS_R") << queryId; - - if (engine) { - buildObjectList(rs, engine->rootContext()); - buildStatesList(engine->rootContext(), true); - } - - sendMessage(reply); - } else if (type == "FETCH_OBJECT") { - int queryId; - int objectId; - bool recurse; - bool dumpProperties = true; - - ds >> queryId >> objectId >> recurse >> dumpProperties; - - QObject *object = QDeclarativeDebugService::objectForId(objectId); - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - rs << QByteArray("FETCH_OBJECT_R") << queryId; - - if (object) { - if (recurse) - prepareDeferredObjects(object); - buildObjectDump(rs, object, recurse, dumpProperties); - } - - sendMessage(reply); - } else if (type == "WATCH_OBJECT") { - int queryId; - int objectId; - - ds >> queryId >> objectId; - bool ok = m_watch->addWatch(queryId, objectId); - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - rs << QByteArray("WATCH_OBJECT_R") << queryId << ok; - - sendMessage(reply); - } else if (type == "WATCH_PROPERTY") { - int queryId; - int objectId; - QByteArray property; - - ds >> queryId >> objectId >> property; - bool ok = m_watch->addWatch(queryId, objectId, property); - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - rs << QByteArray("WATCH_PROPERTY_R") << queryId << ok; - - sendMessage(reply); - } else if (type == "WATCH_EXPR_OBJECT") { - int queryId; - int debugId; - QString expr; - - ds >> queryId >> debugId >> expr; - bool ok = m_watch->addWatch(queryId, debugId, expr); - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - rs << QByteArray("WATCH_EXPR_OBJECT_R") << queryId << ok; - sendMessage(reply); - } else if (type == "NO_WATCH") { - int queryId; - - ds >> queryId; - m_watch->removeWatch(queryId); - } else if (type == "EVAL_EXPRESSION") { - int queryId; - int objectId; - QString expr; - - ds >> queryId >> objectId >> expr; - - QObject *object = QDeclarativeDebugService::objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); - QVariant result; - if (object && context) { - QDeclarativeExpression exprObj(context, object, expr); - bool undefined = false; - QVariant value = exprObj.evaluate(&undefined); - if (undefined) - result = QLatin1String(""); - else - result = valueContents(value); - } else { - result = QLatin1String(""); - } - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - rs << QByteArray("EVAL_EXPRESSION_R") << queryId << result; - - sendMessage(reply); - } else if (type == "SET_BINDING") { - int objectId; - QString propertyName; - QVariant expr; - bool isLiteralValue; - QString filename; - int line; - ds >> objectId >> propertyName >> expr >> isLiteralValue; - if (!ds.atEnd()) { // backward compatibility from 2.1, 2.2 - ds >> filename >> line; - } - setBinding(objectId, propertyName, expr, isLiteralValue, filename, line); - } else if (type == "RESET_BINDING") { - int objectId; - QString propertyName; - ds >> objectId >> propertyName; - resetBinding(objectId, propertyName); - } else if (type == "SET_METHOD_BODY") { - int objectId; - QString methodName; - QString methodBody; - ds >> objectId >> methodName >> methodBody; - setMethodBody(objectId, methodName, methodBody); - } -} - -void QDeclarativeEngineDebugServer::setBinding(int objectId, - const QString &propertyName, - const QVariant &expression, - bool isLiteralValue, - QString filename, - int line) -{ - QObject *object = objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); - - if (object && context) { - QDeclarativeProperty property(object, propertyName, context); - if (property.isValid()) { - - bool inBaseState = true; - - foreach(QWeakPointer statePointer, m_allStates) { - if (QDeclarativeState *state = statePointer.data()) { - // here we assume that the revert list on itself defines the base state - if (state->isStateActive() && state->containsPropertyInRevertList(object, propertyName)) { - inBaseState = false; - - QDeclarativeBinding *newBinding = 0; - if (!isLiteralValue) { - newBinding = new QDeclarativeBinding(expression.toString(), object, context); - newBinding->setTarget(property); - newBinding->setNotifyOnValueChanged(true); - newBinding->setSourceLocation(filename, line); - } - - state->changeBindingInRevertList(object, propertyName, newBinding); - - if (isLiteralValue) - state->changeValueInRevertList(object, propertyName, expression); - } - } - } - - if (inBaseState) { - if (isLiteralValue) { - property.write(expression); - } else if (hasValidSignal(object, propertyName)) { - QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); - QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); - declarativeExpression->setSourceLocation(filename, line); - } else if (property.isProperty()) { - QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); - binding->setTarget(property); - binding->setSourceLocation(filename, line); - binding->setNotifyOnValueChanged(true); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding); - if (oldBinding) - oldBinding->destroy(); - binding->update(); - } else { - qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; - } - } - - } else { - // not a valid property - if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { - if (isLiteralValue) { - propertyChanges->changeValue(propertyName, expression); - } else { - propertyChanges->changeExpression(propertyName, expression.toString()); - } - } else { - qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; - } - } - } -} - -void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &propertyName) -{ - QObject *object = objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); - - if (object && context) { - if (object->property(propertyName.toLatin1()).isValid()) { - QDeclarativeProperty property(object, propertyName); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(property); - if (oldBinding) { - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, 0); - if (oldBinding) - oldBinding->destroy(); - } - if (property.isResettable()) { - // Note: this will reset the property in any case, without regard to states - // Right now almost no QDeclarativeItem has reset methods for its properties (with the - // notable exception of QDeclarativeAnchors), so this is not a big issue - // later on, setBinding does take states into account - property.reset(); - } else { - // overwrite with default value - if (QDeclarativeType *objType = QDeclarativeMetaType::qmlType(object->metaObject())) { - if (QObject *emptyObject = objType->create()) { - if (emptyObject->property(propertyName.toLatin1()).isValid()) { - QVariant defaultValue = QDeclarativeProperty(emptyObject, propertyName).read(); - if (defaultValue.isValid()) { - setBinding(objectId, propertyName, defaultValue, true); - } - } - delete emptyObject; - } - } - } - } else if (hasValidSignal(object, propertyName)) { - QDeclarativeProperty property(object, propertyName, context); - QDeclarativePropertyPrivate::setSignalExpression(property, 0); - } else { - if (QDeclarativePropertyChanges *propertyChanges = qobject_cast(object)) { - propertyChanges->removeProperty(propertyName); - } - } - } -} - -void QDeclarativeEngineDebugServer::setMethodBody(int objectId, const QString &method, const QString &body) -{ - QObject *object = objectForId(objectId); - QDeclarativeContext *context = qmlContext(object); - if (!object || !context || !context->engine()) - return; - QDeclarativeContextData *contextData = QDeclarativeContextData::get(context); - if (!contextData) - return; - - QDeclarativePropertyCache::Data dummy; - QDeclarativePropertyCache::Data *prop = - QDeclarativePropertyCache::property(context->engine(), object, method, dummy); - - if (!prop || !(prop->flags & QDeclarativePropertyCache::Data::IsVMEFunction)) - return; - - QMetaMethod metaMethod = object->metaObject()->method(prop->coreIndex); - QList paramNames = metaMethod.parameterNames(); - - QString paramStr; - for (int ii = 0; ii < paramNames.count(); ++ii) { - if (ii != 0) paramStr.append(QLatin1String(",")); - paramStr.append(QString::fromUtf8(paramNames.at(ii))); - } - - QString jsfunction = QLatin1String("(function ") + method + QLatin1String("(") + paramStr + - QLatin1String(") {"); - jsfunction += body; - jsfunction += QLatin1String("\n})"); - - QDeclarativeVMEMetaObject *vmeMetaObject = - static_cast(QObjectPrivate::get(object)->metaObject); - Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this - - int lineNumber = vmeMetaObject->vmeMethodLineNumber(prop->coreIndex); - vmeMetaObject->setVmeMethod(prop->coreIndex, QDeclarativeExpressionPrivate::evalInObjectScope(contextData, object, jsfunction, contextData->url.toString(), lineNumber, 0)); -} - -void QDeclarativeEngineDebugServer::propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value) -{ - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - - rs << QByteArray("UPDATE_WATCH") << id << objectId << QByteArray(property.name()) << valueContents(value); - - sendMessage(reply); -} - -void QDeclarativeEngineDebugServer::addEngine(QDeclarativeEngine *engine) -{ - Q_ASSERT(engine); - Q_ASSERT(!m_engines.contains(engine)); - - m_engines.append(engine); -} - -void QDeclarativeEngineDebugServer::remEngine(QDeclarativeEngine *engine) -{ - Q_ASSERT(engine); - Q_ASSERT(m_engines.contains(engine)); - - m_engines.removeAll(engine); -} - -void QDeclarativeEngineDebugServer::objectCreated(QDeclarativeEngine *engine, QObject *object) -{ - Q_ASSERT(engine); - Q_ASSERT(m_engines.contains(engine)); - - int engineId = QDeclarativeDebugService::idForObject(engine); - int objectId = QDeclarativeDebugService::idForObject(object); - - QByteArray reply; - QDataStream rs(&reply, QIODevice::WriteOnly); - - rs << QByteArray("OBJECT_CREATED") << engineId << objectId; - sendMessage(reply); -} - -QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h deleted file mode 100644 index 804a043..0000000 --- a/src/declarative/qml/qdeclarativeenginedebug_p.h +++ /dev/null @@ -1,134 +0,0 @@ -/**************************************************************************** -** -** 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 QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QDECLARATIVEENGINEDEBUG_P_H -#define QDECLARATIVEENGINEDEBUG_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include - -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class QDeclarativeEngine; -class QDeclarativeContext; -class QDeclarativeWatcher; -class QDataStream; -class QDeclarativeState; - -class QDeclarativeEngineDebugServer : public QDeclarativeDebugService -{ - Q_OBJECT -public: - QDeclarativeEngineDebugServer(QObject * = 0); - - struct QDeclarativeObjectData { - QUrl url; - int lineNumber; - int columnNumber; - QString idString; - QString objectName; - QString objectType; - int objectId; - int contextId; - }; - - struct QDeclarativeObjectProperty { - enum Type { Unknown, Basic, Object, List, SignalProperty }; - Type type; - QString name; - QVariant value; - QString valueTypeName; - QString binding; - bool hasNotifySignal; - }; - - void addEngine(QDeclarativeEngine *); - void remEngine(QDeclarativeEngine *); - void objectCreated(QDeclarativeEngine *, QObject *); - - static QDeclarativeEngineDebugServer *instance(); - -protected: - virtual void messageReceived(const QByteArray &); - -private Q_SLOTS: - void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value); - -private: - void prepareDeferredObjects(QObject *); - void buildObjectList(QDataStream &, QDeclarativeContext *); - void buildObjectDump(QDataStream &, QObject *, bool, bool); - void buildStatesList(QDeclarativeContext *, bool); - void buildStatesList(QObject *obj); - QDeclarativeObjectData objectData(QObject *); - QDeclarativeObjectProperty propertyData(QObject *, int); - QVariant valueContents(const QVariant &defaultValue) const; - void setBinding(int objectId, const QString &propertyName, const QVariant &expression, bool isLiteralValue, QString filename = QString(), int line = -1); - void resetBinding(int objectId, const QString &propertyName); - void setMethodBody(int objectId, const QString &method, const QString &body); - - QList m_engines; - QDeclarativeWatcher *m_watch; - QList > m_allStates; -}; -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &); -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &); -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &); -Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectProperty &); - -QT_END_NAMESPACE - -#endif // QDECLARATIVEENGINEDEBUG_P_H - diff --git a/src/declarative/qml/qml.pri b/src/declarative/qml/qml.pri index bf9e54a..5d171bf 100644 --- a/src/declarative/qml/qml.pri +++ b/src/declarative/qml/qml.pri @@ -27,7 +27,6 @@ SOURCES += \ $$PWD/qdeclarativeinfo.cpp \ $$PWD/qdeclarativeerror.cpp \ $$PWD/qdeclarativescriptparser.cpp \ - $$PWD/qdeclarativeenginedebug.cpp \ $$PWD/qdeclarativerewrite.cpp \ $$PWD/qdeclarativevaluetype.cpp \ $$PWD/qdeclarativecompiledbindings.cpp \ @@ -99,7 +98,6 @@ HEADERS += \ $$PWD/qdeclarativedata_p.h \ $$PWD/qdeclarativeerror.h \ $$PWD/qdeclarativescriptparser_p.h \ - $$PWD/qdeclarativeenginedebug_p.h \ $$PWD/qdeclarativerewrite_p.h \ $$PWD/qpodvector_p.h \ $$PWD/qbitfield_p.h \ diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index d5ae040..0821245 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -53,7 +53,6 @@ #include #include -#include #include #include #include diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index 1599cab..0d371d0 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -48,7 +48,6 @@ #include #include -#include #include #include diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 74f549c..1ca3b8f 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -48,7 +48,6 @@ #include #include -#include #include #include -- cgit v0.12 From 160e1eed007f43a68ee03a6e8c0bfd2602a64ee0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 31 Aug 2011 09:12:39 +0200 Subject: Debugger: Rename qdeclarativedebug* to qdeclarativeenginedebug* Change-Id: I0c289bdf555aa317dc12c5dbcff0168ebcc7bd50 Reviewed-on: http://codereview.qt.nokia.com/3935 Reviewed-by: Qt Sanity Bot Reviewed-by: Aurindam Jana (cherrypicked from a07f68eff5ac4696a551f083d186a685f7ef043d) --- src/declarative/debugger/debugger.pri | 4 +- src/declarative/debugger/qdeclarativedebug.cpp | 1068 -------------------- src/declarative/debugger/qdeclarativedebug_p.h | 387 ------- .../debugger/qdeclarativeenginedebug.cpp | 1068 ++++++++++++++++++++ .../debugger/qdeclarativeenginedebug_p.h | 387 +++++++ .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 2 +- .../tst_qdeclarativedebugclient.cpp | 2 - .../tst_qdeclarativedebugservice.cpp | 1 - 8 files changed, 1458 insertions(+), 1461 deletions(-) delete mode 100644 src/declarative/debugger/qdeclarativedebug.cpp delete mode 100644 src/declarative/debugger/qdeclarativedebug_p.h create mode 100644 src/declarative/debugger/qdeclarativeenginedebug.cpp create mode 100644 src/declarative/debugger/qdeclarativeenginedebug_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 0810872..c81968e 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -5,7 +5,7 @@ SOURCES += \ $$PWD/qpacketprotocol.cpp \ $$PWD/qdeclarativedebugservice.cpp \ $$PWD/qdeclarativedebugclient.cpp \ - $$PWD/qdeclarativedebug.cpp \ + $$PWD/qdeclarativeenginedebug.cpp \ $$PWD/qdeclarativedebugtrace.cpp \ $$PWD/qdeclarativedebughelper.cpp \ $$PWD/qdeclarativedebugserver.cpp \ @@ -20,7 +20,7 @@ HEADERS += \ $$PWD/qdeclarativedebugservice_p.h \ $$PWD/qdeclarativedebugservice_p_p.h \ $$PWD/qdeclarativedebugclient_p.h \ - $$PWD/qdeclarativedebug_p.h \ + $$PWD/qdeclarativeenginedebug_p.h \ $$PWD/qdeclarativedebugtrace_p.h \ $$PWD/qdeclarativedebughelper_p.h \ $$PWD/qdeclarativedebugserver_p.h \ diff --git a/src/declarative/debugger/qdeclarativedebug.cpp b/src/declarative/debugger/qdeclarativedebug.cpp deleted file mode 100644 index 17bd553..0000000 --- a/src/declarative/debugger/qdeclarativedebug.cpp +++ /dev/null @@ -1,1068 +0,0 @@ -/**************************************************************************** -** -** 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 QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "private/qdeclarativedebug_p.h" - -#include "private/qdeclarativedebugclient_p.h" - -#include - -#include - -QT_BEGIN_NAMESPACE - -class QDeclarativeEngineDebugClient : public QDeclarativeDebugClient -{ -public: - QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p); - -protected: - virtual void statusChanged(Status status); - virtual void messageReceived(const QByteArray &); - -private: - QDeclarativeEngineDebugPrivate *priv; - friend class QDeclarativeEngineDebugPrivate; -}; - -class QDeclarativeEngineDebugPrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QDeclarativeEngineDebug) -public: - QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *); - ~QDeclarativeEngineDebugPrivate(); - - void statusChanged(QDeclarativeEngineDebug::Status status); - void message(const QByteArray &); - - QDeclarativeEngineDebugClient *client; - int nextId; - int getId(); - - void decode(QDataStream &, QDeclarativeDebugContextReference &); - void decode(QDataStream &, QDeclarativeDebugObjectReference &, bool simple); - - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugEnginesQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugRootContextQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugObjectQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugExpressionQuery *); - static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugWatch *); - - QHash enginesQuery; - QHash rootContextQuery; - QHash objectQuery; - QHash expressionQuery; - - QHash watched; -}; - -QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, - QDeclarativeEngineDebugPrivate *p) -: QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p) -{ -} - -void QDeclarativeEngineDebugClient::statusChanged(Status status) -{ - if (priv) - priv->statusChanged(static_cast(status)); -} - -void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data) -{ - if (priv) - priv->message(data); -} - -QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *c) -: client(new QDeclarativeEngineDebugClient(c, this)), nextId(0) -{ -} - -QDeclarativeEngineDebugPrivate::~QDeclarativeEngineDebugPrivate() -{ - if (client) - client->priv = 0; - delete client; - - QHash::iterator enginesIter = enginesQuery.begin(); - for (; enginesIter != enginesQuery.end(); ++enginesIter) { - enginesIter.value()->m_client = 0; - if (enginesIter.value()->state() == QDeclarativeDebugQuery::Waiting) - enginesIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator rootContextIter = rootContextQuery.begin(); - for (; rootContextIter != rootContextQuery.end(); ++rootContextIter) { - rootContextIter.value()->m_client = 0; - if (rootContextIter.value()->state() == QDeclarativeDebugQuery::Waiting) - rootContextIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator objectIter = objectQuery.begin(); - for (; objectIter != objectQuery.end(); ++objectIter) { - objectIter.value()->m_client = 0; - if (objectIter.value()->state() == QDeclarativeDebugQuery::Waiting) - objectIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator exprIter = expressionQuery.begin(); - for (; exprIter != expressionQuery.end(); ++exprIter) { - exprIter.value()->m_client = 0; - if (exprIter.value()->state() == QDeclarativeDebugQuery::Waiting) - exprIter.value()->setState(QDeclarativeDebugQuery::Error); - } - - QHash::iterator watchIter = watched.begin(); - for (; watchIter != watched.end(); ++watchIter) { - watchIter.value()->m_client = 0; - watchIter.value()->setState(QDeclarativeDebugWatch::Dead); - } -} - -int QDeclarativeEngineDebugPrivate::getId() -{ - return nextId++; -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugEnginesQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->enginesQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, - QDeclarativeDebugRootContextQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->rootContextQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugObjectQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->objectQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugExpressionQuery *q) -{ - if (c && q) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->expressionQuery.remove(q->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugWatch *w) -{ - if (c && w) { - QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); - p->watched.remove(w->m_queryId); - } -} - -void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o, - bool simple) -{ - QDeclarativeEngineDebugService::QDeclarativeObjectData data; - ds >> data; - o.m_debugId = data.objectId; - o.m_class = data.objectType; - o.m_idString = data.idString; - o.m_name = data.objectName; - o.m_source.m_url = data.url; - o.m_source.m_lineNumber = data.lineNumber; - o.m_source.m_columnNumber = data.columnNumber; - o.m_contextDebugId = data.contextId; - - if (simple) - return; - - int childCount; - bool recur; - ds >> childCount >> recur; - - for (int ii = 0; ii < childCount; ++ii) { - o.m_children.append(QDeclarativeDebugObjectReference()); - decode(ds, o.m_children.last(), !recur); - } - - int propCount; - ds >> propCount; - - for (int ii = 0; ii < propCount; ++ii) { - QDeclarativeEngineDebugService::QDeclarativeObjectProperty data; - ds >> data; - QDeclarativeDebugPropertyReference prop; - prop.m_objectDebugId = o.m_debugId; - prop.m_name = data.name; - prop.m_binding = data.binding; - prop.m_hasNotifySignal = data.hasNotifySignal; - prop.m_valueTypeName = data.valueTypeName; - switch (data.type) { - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic: - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List: - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty: - { - prop.m_value = data.value; - break; - } - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Object: - { - QDeclarativeDebugObjectReference obj; - obj.m_debugId = prop.m_value.toInt(); - prop.m_value = QVariant::fromValue(obj); - break; - } - case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Unknown: - break; - } - o.m_properties << prop; - } -} - -void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugContextReference &c) -{ - ds >> c.m_name >> c.m_debugId; - - int contextCount; - ds >> contextCount; - - for (int ii = 0; ii < contextCount; ++ii) { - c.m_contexts.append(QDeclarativeDebugContextReference()); - decode(ds, c.m_contexts.last()); - } - - int objectCount; - ds >> objectCount; - - for (int ii = 0; ii < objectCount; ++ii) { - QDeclarativeDebugObjectReference obj; - decode(ds, obj, true); - - obj.m_contextDebugId = c.m_debugId; - c.m_objects << obj; - } -} - -void QDeclarativeEngineDebugPrivate::statusChanged(QDeclarativeEngineDebug::Status status) -{ - emit q_func()->statusChanged(status); -} - -void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) -{ - QDataStream ds(data); - - QByteArray type; - ds >> type; - - //qDebug() << "QDeclarativeEngineDebugPrivate::message()" << type; - - if (type == "LIST_ENGINES_R") { - int queryId; - ds >> queryId; - - QDeclarativeDebugEnginesQuery *query = enginesQuery.value(queryId); - if (!query) - return; - enginesQuery.remove(queryId); - - int count; - ds >> count; - - for (int ii = 0; ii < count; ++ii) { - QDeclarativeDebugEngineReference ref; - ds >> ref.m_name; - ds >> ref.m_debugId; - query->m_engines << ref; - } - - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "LIST_OBJECTS_R") { - int queryId; - ds >> queryId; - - QDeclarativeDebugRootContextQuery *query = rootContextQuery.value(queryId); - if (!query) - return; - rootContextQuery.remove(queryId); - - if (!ds.atEnd()) - decode(ds, query->m_context); - - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "FETCH_OBJECT_R") { - int queryId; - ds >> queryId; - - QDeclarativeDebugObjectQuery *query = objectQuery.value(queryId); - if (!query) - return; - objectQuery.remove(queryId); - - if (!ds.atEnd()) - decode(ds, query->m_object, false); - - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "EVAL_EXPRESSION_R") { - int queryId; - QVariant result; - ds >> queryId >> result; - - QDeclarativeDebugExpressionQuery *query = expressionQuery.value(queryId); - if (!query) - return; - expressionQuery.remove(queryId); - - query->m_result = result; - query->m_client = 0; - query->setState(QDeclarativeDebugQuery::Completed); - } else if (type == "WATCH_PROPERTY_R") { - int queryId; - bool ok; - ds >> queryId >> ok; - - QDeclarativeDebugWatch *watch = watched.value(queryId); - if (!watch) - return; - - watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); - } else if (type == "WATCH_OBJECT_R") { - int queryId; - bool ok; - ds >> queryId >> ok; - - QDeclarativeDebugWatch *watch = watched.value(queryId); - if (!watch) - return; - - watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); - } else if (type == "WATCH_EXPR_OBJECT_R") { - int queryId; - bool ok; - ds >> queryId >> ok; - - QDeclarativeDebugWatch *watch = watched.value(queryId); - if (!watch) - return; - - watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); - } else if (type == "UPDATE_WATCH") { - int queryId; - int debugId; - QByteArray name; - QVariant value; - ds >> queryId >> debugId >> name >> value; - - QDeclarativeDebugWatch *watch = watched.value(queryId, 0); - if (!watch) - return; - emit watch->valueChanged(name, value); - } else if (type == "OBJECT_CREATED") { - emit q_func()->newObjects(); - } -} - -QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent) -: QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent) -{ -} - -QDeclarativeEngineDebug::Status QDeclarativeEngineDebug::status() const -{ - Q_D(const QDeclarativeEngineDebug); - - return static_cast(d->client->status()); -} - -QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled) { - int queryId = d->getId(); - watch->m_queryId = queryId; - watch->m_client = this; - watch->m_objectDebugId = property.objectDebugId(); - watch->m_name = property.name(); - d->watched.insert(queryId, watch); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8(); - d->client->sendMessage(message); - } else { - watch->m_state = QDeclarativeDebugWatch::Dead; - } - - return watch; -} - -QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugContextReference &, const QString &, QObject *) -{ - qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); - return 0; -} - -QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, const QString &expr, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled) { - int queryId = d->getId(); - watch->m_queryId = queryId; - watch->m_client = this; - watch->m_objectDebugId = object.debugId(); - watch->m_expr = expr; - d->watched.insert(queryId, watch); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr; - d->client->sendMessage(message); - } else { - watch->m_state = QDeclarativeDebugWatch::Dead; - } - return watch; -} - -QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled) { - int queryId = d->getId(); - watch->m_queryId = queryId; - watch->m_client = this; - watch->m_objectDebugId = object.debugId(); - d->watched.insert(queryId, watch); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId(); - d->client->sendMessage(message); - } else { - watch->m_state = QDeclarativeDebugWatch::Dead; - } - - return watch; -} - -QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugFileReference &, QObject *) -{ - qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); - return 0; -} - -void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch) -{ - Q_D(QDeclarativeEngineDebug); - - if (!watch || !watch->m_client) - return; - - watch->m_client = 0; - watch->setState(QDeclarativeDebugWatch::Inactive); - - d->watched.remove(watch->queryId()); - - if (d->client && d->client->status() == QDeclarativeDebugClient::Enabled) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("NO_WATCH") << watch->queryId(); - d->client->sendMessage(message); - } -} - -QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->enginesQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("LIST_ENGINES") << queryId; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(const QDeclarativeDebugEngineReference &engine, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->rootContextQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId(); - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclarativeDebugObjectReference &object, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->objectQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() - << false << true; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(const QDeclarativeDebugObjectReference &object, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { - query->m_client = this; - int queryId = d->getId(); - query->m_queryId = queryId; - d->objectQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() - << true << true; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent) -{ - Q_D(QDeclarativeEngineDebug); - - QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent); - if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - query->m_client = this; - query->m_expr = expr; - int queryId = d->getId(); - query->m_queryId = queryId; - d->expressionQuery.insert(queryId, query); - - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr; - d->client->sendMessage(message); - } else { - query->m_state = QDeclarativeDebugQuery::Error; - } - - return query; -} - -bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName, - const QVariant &bindingExpression, - bool isLiteralValue, - QString source, int line) -{ - Q_D(QDeclarativeEngineDebug); - - if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line; - d->client->sendMessage(message); - return true; - } else { - return false; - } -} - -bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName) -{ - Q_D(QDeclarativeEngineDebug); - - if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName; - d->client->sendMessage(message); - return true; - } else { - return false; - } -} - -bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &methodName, - const QString &methodBody) -{ - Q_D(QDeclarativeEngineDebug); - - if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { - QByteArray message; - QDataStream ds(&message, QIODevice::WriteOnly); - ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody; - d->client->sendMessage(message); - return true; - } else { - return false; - } -} - -QDeclarativeDebugWatch::QDeclarativeDebugWatch(QObject *parent) -: QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1) -{ -} - -QDeclarativeDebugWatch::~QDeclarativeDebugWatch() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -int QDeclarativeDebugWatch::queryId() const -{ - return m_queryId; -} - -int QDeclarativeDebugWatch::objectDebugId() const -{ - return m_objectDebugId; -} - -QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state() const -{ - return m_state; -} - -void QDeclarativeDebugWatch::setState(State s) -{ - if (m_state == s) - return; - m_state = s; - emit stateChanged(m_state); -} - -QDeclarativeDebugPropertyWatch::QDeclarativeDebugPropertyWatch(QObject *parent) - : QDeclarativeDebugWatch(parent) -{ -} - -QString QDeclarativeDebugPropertyWatch::name() const -{ - return m_name; -} - - -QDeclarativeDebugObjectExpressionWatch::QDeclarativeDebugObjectExpressionWatch(QObject *parent) - : QDeclarativeDebugWatch(parent) -{ -} - -QString QDeclarativeDebugObjectExpressionWatch::expression() const -{ - return m_expr; -} - - -QDeclarativeDebugQuery::QDeclarativeDebugQuery(QObject *parent) -: QObject(parent), m_state(Waiting) -{ -} - -QDeclarativeDebugQuery::State QDeclarativeDebugQuery::state() const -{ - return m_state; -} - -bool QDeclarativeDebugQuery::isWaiting() const -{ - return m_state == Waiting; -} - -void QDeclarativeDebugQuery::setState(State s) -{ - if (m_state == s) - return; - m_state = s; - emit stateChanged(m_state); -} - -QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(QObject *parent) -: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QList QDeclarativeDebugEnginesQuery::engines() const -{ - return m_engines; -} - -QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(QObject *parent) -: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext() const -{ - return m_context; -} - -QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(QObject *parent) -: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object() const -{ - return m_object; -} - -QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(QObject *parent) -: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) -{ -} - -QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery() -{ - if (m_client && m_queryId != -1) - QDeclarativeEngineDebugPrivate::remove(m_client, this); -} - -QVariant QDeclarativeDebugExpressionQuery::expression() const -{ - return m_expr; -} - -QVariant QDeclarativeDebugExpressionQuery::result() const -{ - return m_result; -} - -QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference() -: m_debugId(-1) -{ -} - -QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(int debugId) -: m_debugId(debugId) -{ -} - -QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &o) -: m_debugId(o.m_debugId), m_name(o.m_name) -{ -} - -QDeclarativeDebugEngineReference & -QDeclarativeDebugEngineReference::operator=(const QDeclarativeDebugEngineReference &o) -{ - m_debugId = o.m_debugId; m_name = o.m_name; - return *this; -} - -int QDeclarativeDebugEngineReference::debugId() const -{ - return m_debugId; -} - -QString QDeclarativeDebugEngineReference::name() const -{ - return m_name; -} - -QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference() -: m_debugId(-1), m_contextDebugId(-1) -{ -} - -QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int debugId) -: m_debugId(debugId), m_contextDebugId(-1) -{ -} - -QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &o) -: m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString), - m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId), - m_properties(o.m_properties), m_children(o.m_children) -{ -} - -QDeclarativeDebugObjectReference & -QDeclarativeDebugObjectReference::operator=(const QDeclarativeDebugObjectReference &o) -{ - m_debugId = o.m_debugId; m_class = o.m_class; m_idString = o.m_idString; - m_name = o.m_name; m_source = o.m_source; m_contextDebugId = o.m_contextDebugId; - m_properties = o.m_properties; m_children = o.m_children; - return *this; -} - -int QDeclarativeDebugObjectReference::debugId() const -{ - return m_debugId; -} - -QString QDeclarativeDebugObjectReference::className() const -{ - return m_class; -} - -QString QDeclarativeDebugObjectReference::idString() const -{ - return m_idString; -} - -QString QDeclarativeDebugObjectReference::name() const -{ - return m_name; -} - -QDeclarativeDebugFileReference QDeclarativeDebugObjectReference::source() const -{ - return m_source; -} - -int QDeclarativeDebugObjectReference::contextDebugId() const -{ - return m_contextDebugId; -} - -QList QDeclarativeDebugObjectReference::properties() const -{ - return m_properties; -} - -QList QDeclarativeDebugObjectReference::children() const -{ - return m_children; -} - -QDeclarativeDebugContextReference::QDeclarativeDebugContextReference() -: m_debugId(-1) -{ -} - -QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &o) -: m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts) -{ -} - -QDeclarativeDebugContextReference &QDeclarativeDebugContextReference::operator=(const QDeclarativeDebugContextReference &o) -{ - m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects; - m_contexts = o.m_contexts; - return *this; -} - -int QDeclarativeDebugContextReference::debugId() const -{ - return m_debugId; -} - -QString QDeclarativeDebugContextReference::name() const -{ - return m_name; -} - -QList QDeclarativeDebugContextReference::objects() const -{ - return m_objects; -} - -QList QDeclarativeDebugContextReference::contexts() const -{ - return m_contexts; -} - -QDeclarativeDebugFileReference::QDeclarativeDebugFileReference() -: m_lineNumber(-1), m_columnNumber(-1) -{ -} - -QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &o) -: m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber) -{ -} - -QDeclarativeDebugFileReference &QDeclarativeDebugFileReference::operator=(const QDeclarativeDebugFileReference &o) -{ - m_url = o.m_url; m_lineNumber = o.m_lineNumber; m_columnNumber = o.m_columnNumber; - return *this; -} - -QUrl QDeclarativeDebugFileReference::url() const -{ - return m_url; -} - -void QDeclarativeDebugFileReference::setUrl(const QUrl &u) -{ - m_url = u; -} - -int QDeclarativeDebugFileReference::lineNumber() const -{ - return m_lineNumber; -} - -void QDeclarativeDebugFileReference::setLineNumber(int l) -{ - m_lineNumber = l; -} - -int QDeclarativeDebugFileReference::columnNumber() const -{ - return m_columnNumber; -} - -void QDeclarativeDebugFileReference::setColumnNumber(int c) -{ - m_columnNumber = c; -} - -QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference() -: m_objectDebugId(-1), m_hasNotifySignal(false) -{ -} - -QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &o) -: m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value), - m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding), - m_hasNotifySignal(o.m_hasNotifySignal) -{ -} - -QDeclarativeDebugPropertyReference &QDeclarativeDebugPropertyReference::operator=(const QDeclarativeDebugPropertyReference &o) -{ - m_objectDebugId = o.m_objectDebugId; m_name = o.m_name; m_value = o.m_value; - m_valueTypeName = o.m_valueTypeName; m_binding = o.m_binding; - m_hasNotifySignal = o.m_hasNotifySignal; - return *this; -} - -int QDeclarativeDebugPropertyReference::objectDebugId() const -{ - return m_objectDebugId; -} - -QString QDeclarativeDebugPropertyReference::name() const -{ - return m_name; -} - -QString QDeclarativeDebugPropertyReference::valueTypeName() const -{ - return m_valueTypeName; -} - -QVariant QDeclarativeDebugPropertyReference::value() const -{ - return m_value; -} - -QString QDeclarativeDebugPropertyReference::binding() const -{ - return m_binding; -} - -bool QDeclarativeDebugPropertyReference::hasNotifySignal() const -{ - return m_hasNotifySignal; -} - -QT_END_NAMESPACE - diff --git a/src/declarative/debugger/qdeclarativedebug_p.h b/src/declarative/debugger/qdeclarativedebug_p.h deleted file mode 100644 index f822637..0000000 --- a/src/declarative/debugger/qdeclarativedebug_p.h +++ /dev/null @@ -1,387 +0,0 @@ -/**************************************************************************** -** -** 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 QtDeclarative module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -#ifndef QDECLARATIVEDEBUG_H -#define QDECLARATIVEDEBUG_H - -#include -#include -#include - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) - -class QDeclarativeDebugConnection; -class QDeclarativeDebugWatch; -class QDeclarativeDebugPropertyWatch; -class QDeclarativeDebugObjectExpressionWatch; -class QDeclarativeDebugEnginesQuery; -class QDeclarativeDebugRootContextQuery; -class QDeclarativeDebugObjectQuery; -class QDeclarativeDebugExpressionQuery; -class QDeclarativeDebugPropertyReference; -class QDeclarativeDebugContextReference; -class QDeclarativeDebugObjectReference; -class QDeclarativeDebugFileReference; -class QDeclarativeDebugEngineReference; -class QDeclarativeEngineDebugPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebug : public QObject -{ -Q_OBJECT -public: - enum Status { NotConnected, Unavailable, Enabled }; - - explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0); - - Status status() const; - - QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &, - QObject *parent = 0); - QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugContextReference &, const QString &, - QObject *parent = 0); - QDeclarativeDebugObjectExpressionWatch *addWatch(const QDeclarativeDebugObjectReference &, const QString &, - QObject *parent = 0); - QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugObjectReference &, - QObject *parent = 0); - QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugFileReference &, - QObject *parent = 0); - - void removeWatch(QDeclarativeDebugWatch *watch); - - QDeclarativeDebugEnginesQuery *queryAvailableEngines(QObject *parent = 0); - QDeclarativeDebugRootContextQuery *queryRootContexts(const QDeclarativeDebugEngineReference &, - QObject *parent = 0); - QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &, - QObject *parent = 0); - QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &, - QObject *parent = 0); - QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId, - const QString &expr, - QObject *parent = 0); - bool setBindingForObject(int objectDebugId, const QString &propertyName, - const QVariant &bindingExpression, bool isLiteralValue, - QString source = QString(), int line = -1); - bool resetBindingForObject(int objectDebugId, const QString &propertyName); - bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody); - -Q_SIGNALS: - void newObjects(); - void statusChanged(Status status); - -private: - Q_DECLARE_PRIVATE(QDeclarativeEngineDebug) -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugWatch : public QObject -{ -Q_OBJECT -public: - enum State { Waiting, Active, Inactive, Dead }; - - QDeclarativeDebugWatch(QObject *); - ~QDeclarativeDebugWatch(); - - int queryId() const; - int objectDebugId() const; - State state() const; - -Q_SIGNALS: - void stateChanged(QDeclarativeDebugWatch::State); - //void objectChanged(int, const QDeclarativeDebugObjectReference &); - //void valueChanged(int, const QVariant &); - - // Server sends value as string if it is a user-type variant - void valueChanged(const QByteArray &name, const QVariant &value); - -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - void setState(State); - State m_state; - int m_queryId; - QDeclarativeEngineDebug *m_client; - int m_objectDebugId; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch -{ - Q_OBJECT -public: - QDeclarativeDebugPropertyWatch(QObject *parent); - - QString name() const; - -private: - friend class QDeclarativeEngineDebug; - QString m_name; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch -{ - Q_OBJECT -public: - QDeclarativeDebugObjectExpressionWatch(QObject *parent); - - QString expression() const; - -private: - friend class QDeclarativeEngineDebug; - QString m_expr; - int m_debugId; -}; - - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugQuery : public QObject -{ -Q_OBJECT -public: - enum State { Waiting, Error, Completed }; - - State state() const; - bool isWaiting() const; - -// bool waitUntilCompleted(); - -Q_SIGNALS: - void stateChanged(QDeclarativeDebugQuery::State); - -protected: - QDeclarativeDebugQuery(QObject *); - -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - void setState(State); - State m_state; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugFileReference -{ -public: - QDeclarativeDebugFileReference(); - QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &); - QDeclarativeDebugFileReference &operator=(const QDeclarativeDebugFileReference &); - - QUrl url() const; - void setUrl(const QUrl &); - int lineNumber() const; - void setLineNumber(int); - int columnNumber() const; - void setColumnNumber(int); - -private: - friend class QDeclarativeEngineDebugPrivate; - QUrl m_url; - int m_lineNumber; - int m_columnNumber; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEngineReference -{ -public: - QDeclarativeDebugEngineReference(); - QDeclarativeDebugEngineReference(int); - QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &); - QDeclarativeDebugEngineReference &operator=(const QDeclarativeDebugEngineReference &); - - int debugId() const; - QString name() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_debugId; - QString m_name; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectReference -{ -public: - QDeclarativeDebugObjectReference(); - QDeclarativeDebugObjectReference(int); - QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &); - QDeclarativeDebugObjectReference &operator=(const QDeclarativeDebugObjectReference &); - - int debugId() const; - QString className() const; - QString idString() const; - QString name() const; - - QDeclarativeDebugFileReference source() const; - int contextDebugId() const; - - QList properties() const; - QList children() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_debugId; - QString m_class; - QString m_idString; - QString m_name; - QDeclarativeDebugFileReference m_source; - int m_contextDebugId; - QList m_properties; - QList m_children; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugContextReference -{ -public: - QDeclarativeDebugContextReference(); - QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &); - QDeclarativeDebugContextReference &operator=(const QDeclarativeDebugContextReference &); - - int debugId() const; - QString name() const; - - QList objects() const; - QList contexts() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_debugId; - QString m_name; - QList m_objects; - QList m_contexts; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyReference -{ -public: - QDeclarativeDebugPropertyReference(); - QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &); - QDeclarativeDebugPropertyReference &operator=(const QDeclarativeDebugPropertyReference &); - - int objectDebugId() const; - QString name() const; - QVariant value() const; - QString valueTypeName() const; - QString binding() const; - bool hasNotifySignal() const; - -private: - friend class QDeclarativeEngineDebugPrivate; - int m_objectDebugId; - QString m_name; - QVariant m_value; - QString m_valueTypeName; - QString m_binding; - bool m_hasNotifySignal; -}; - - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery -{ -Q_OBJECT -public: - virtual ~QDeclarativeDebugEnginesQuery(); - QList engines() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugEnginesQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QList m_engines; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery -{ -Q_OBJECT -public: - virtual ~QDeclarativeDebugRootContextQuery(); - QDeclarativeDebugContextReference rootContext() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugRootContextQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QDeclarativeDebugContextReference m_context; -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery -{ -Q_OBJECT -public: - virtual ~QDeclarativeDebugObjectQuery(); - QDeclarativeDebugObjectReference object() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugObjectQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QDeclarativeDebugObjectReference m_object; - -}; - -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery -{ -Q_OBJECT -public: - virtual ~QDeclarativeDebugExpressionQuery(); - QVariant expression() const; - QVariant result() const; -private: - friend class QDeclarativeEngineDebug; - friend class QDeclarativeEngineDebugPrivate; - QDeclarativeDebugExpressionQuery(QObject *); - QDeclarativeEngineDebug *m_client; - int m_queryId; - QVariant m_expr; - QVariant m_result; -}; - -QT_END_NAMESPACE - -Q_DECLARE_METATYPE(QDeclarativeDebugEngineReference) -Q_DECLARE_METATYPE(QDeclarativeDebugObjectReference) -Q_DECLARE_METATYPE(QDeclarativeDebugContextReference) -Q_DECLARE_METATYPE(QDeclarativeDebugPropertyReference) - -QT_END_HEADER - -#endif // QDECLARATIVEDEBUG_H diff --git a/src/declarative/debugger/qdeclarativeenginedebug.cpp b/src/declarative/debugger/qdeclarativeenginedebug.cpp new file mode 100644 index 0000000..85ce710 --- /dev/null +++ b/src/declarative/debugger/qdeclarativeenginedebug.cpp @@ -0,0 +1,1068 @@ +/**************************************************************************** +** +** 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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "private/qdeclarativeenginedebug_p.h" + +#include "private/qdeclarativedebugclient_p.h" + +#include + +#include + +QT_BEGIN_NAMESPACE + +class QDeclarativeEngineDebugClient : public QDeclarativeDebugClient +{ +public: + QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, QDeclarativeEngineDebugPrivate *p); + +protected: + virtual void statusChanged(Status status); + virtual void messageReceived(const QByteArray &); + +private: + QDeclarativeEngineDebugPrivate *priv; + friend class QDeclarativeEngineDebugPrivate; +}; + +class QDeclarativeEngineDebugPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeEngineDebug) +public: + QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *); + ~QDeclarativeEngineDebugPrivate(); + + void statusChanged(QDeclarativeEngineDebug::Status status); + void message(const QByteArray &); + + QDeclarativeEngineDebugClient *client; + int nextId; + int getId(); + + void decode(QDataStream &, QDeclarativeDebugContextReference &); + void decode(QDataStream &, QDeclarativeDebugObjectReference &, bool simple); + + static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugEnginesQuery *); + static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugRootContextQuery *); + static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugObjectQuery *); + static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugExpressionQuery *); + static void remove(QDeclarativeEngineDebug *, QDeclarativeDebugWatch *); + + QHash enginesQuery; + QHash rootContextQuery; + QHash objectQuery; + QHash expressionQuery; + + QHash watched; +}; + +QDeclarativeEngineDebugClient::QDeclarativeEngineDebugClient(QDeclarativeDebugConnection *client, + QDeclarativeEngineDebugPrivate *p) +: QDeclarativeDebugClient(QLatin1String("QDeclarativeEngine"), client), priv(p) +{ +} + +void QDeclarativeEngineDebugClient::statusChanged(Status status) +{ + if (priv) + priv->statusChanged(static_cast(status)); +} + +void QDeclarativeEngineDebugClient::messageReceived(const QByteArray &data) +{ + if (priv) + priv->message(data); +} + +QDeclarativeEngineDebugPrivate::QDeclarativeEngineDebugPrivate(QDeclarativeDebugConnection *c) +: client(new QDeclarativeEngineDebugClient(c, this)), nextId(0) +{ +} + +QDeclarativeEngineDebugPrivate::~QDeclarativeEngineDebugPrivate() +{ + if (client) + client->priv = 0; + delete client; + + QHash::iterator enginesIter = enginesQuery.begin(); + for (; enginesIter != enginesQuery.end(); ++enginesIter) { + enginesIter.value()->m_client = 0; + if (enginesIter.value()->state() == QDeclarativeDebugQuery::Waiting) + enginesIter.value()->setState(QDeclarativeDebugQuery::Error); + } + + QHash::iterator rootContextIter = rootContextQuery.begin(); + for (; rootContextIter != rootContextQuery.end(); ++rootContextIter) { + rootContextIter.value()->m_client = 0; + if (rootContextIter.value()->state() == QDeclarativeDebugQuery::Waiting) + rootContextIter.value()->setState(QDeclarativeDebugQuery::Error); + } + + QHash::iterator objectIter = objectQuery.begin(); + for (; objectIter != objectQuery.end(); ++objectIter) { + objectIter.value()->m_client = 0; + if (objectIter.value()->state() == QDeclarativeDebugQuery::Waiting) + objectIter.value()->setState(QDeclarativeDebugQuery::Error); + } + + QHash::iterator exprIter = expressionQuery.begin(); + for (; exprIter != expressionQuery.end(); ++exprIter) { + exprIter.value()->m_client = 0; + if (exprIter.value()->state() == QDeclarativeDebugQuery::Waiting) + exprIter.value()->setState(QDeclarativeDebugQuery::Error); + } + + QHash::iterator watchIter = watched.begin(); + for (; watchIter != watched.end(); ++watchIter) { + watchIter.value()->m_client = 0; + watchIter.value()->setState(QDeclarativeDebugWatch::Dead); + } +} + +int QDeclarativeEngineDebugPrivate::getId() +{ + return nextId++; +} + +void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugEnginesQuery *q) +{ + if (c && q) { + QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); + p->enginesQuery.remove(q->m_queryId); + } +} + +void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, + QDeclarativeDebugRootContextQuery *q) +{ + if (c && q) { + QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); + p->rootContextQuery.remove(q->m_queryId); + } +} + +void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugObjectQuery *q) +{ + if (c && q) { + QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); + p->objectQuery.remove(q->m_queryId); + } +} + +void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugExpressionQuery *q) +{ + if (c && q) { + QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); + p->expressionQuery.remove(q->m_queryId); + } +} + +void QDeclarativeEngineDebugPrivate::remove(QDeclarativeEngineDebug *c, QDeclarativeDebugWatch *w) +{ + if (c && w) { + QDeclarativeEngineDebugPrivate *p = (QDeclarativeEngineDebugPrivate *)QObjectPrivate::get(c); + p->watched.remove(w->m_queryId); + } +} + +void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugObjectReference &o, + bool simple) +{ + QDeclarativeEngineDebugService::QDeclarativeObjectData data; + ds >> data; + o.m_debugId = data.objectId; + o.m_class = data.objectType; + o.m_idString = data.idString; + o.m_name = data.objectName; + o.m_source.m_url = data.url; + o.m_source.m_lineNumber = data.lineNumber; + o.m_source.m_columnNumber = data.columnNumber; + o.m_contextDebugId = data.contextId; + + if (simple) + return; + + int childCount; + bool recur; + ds >> childCount >> recur; + + for (int ii = 0; ii < childCount; ++ii) { + o.m_children.append(QDeclarativeDebugObjectReference()); + decode(ds, o.m_children.last(), !recur); + } + + int propCount; + ds >> propCount; + + for (int ii = 0; ii < propCount; ++ii) { + QDeclarativeEngineDebugService::QDeclarativeObjectProperty data; + ds >> data; + QDeclarativeDebugPropertyReference prop; + prop.m_objectDebugId = o.m_debugId; + prop.m_name = data.name; + prop.m_binding = data.binding; + prop.m_hasNotifySignal = data.hasNotifySignal; + prop.m_valueTypeName = data.valueTypeName; + switch (data.type) { + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Basic: + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::List: + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::SignalProperty: + { + prop.m_value = data.value; + break; + } + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Object: + { + QDeclarativeDebugObjectReference obj; + obj.m_debugId = prop.m_value.toInt(); + prop.m_value = QVariant::fromValue(obj); + break; + } + case QDeclarativeEngineDebugService::QDeclarativeObjectProperty::Unknown: + break; + } + o.m_properties << prop; + } +} + +void QDeclarativeEngineDebugPrivate::decode(QDataStream &ds, QDeclarativeDebugContextReference &c) +{ + ds >> c.m_name >> c.m_debugId; + + int contextCount; + ds >> contextCount; + + for (int ii = 0; ii < contextCount; ++ii) { + c.m_contexts.append(QDeclarativeDebugContextReference()); + decode(ds, c.m_contexts.last()); + } + + int objectCount; + ds >> objectCount; + + for (int ii = 0; ii < objectCount; ++ii) { + QDeclarativeDebugObjectReference obj; + decode(ds, obj, true); + + obj.m_contextDebugId = c.m_debugId; + c.m_objects << obj; + } +} + +void QDeclarativeEngineDebugPrivate::statusChanged(QDeclarativeEngineDebug::Status status) +{ + emit q_func()->statusChanged(status); +} + +void QDeclarativeEngineDebugPrivate::message(const QByteArray &data) +{ + QDataStream ds(data); + + QByteArray type; + ds >> type; + + //qDebug() << "QDeclarativeEngineDebugPrivate::message()" << type; + + if (type == "LIST_ENGINES_R") { + int queryId; + ds >> queryId; + + QDeclarativeDebugEnginesQuery *query = enginesQuery.value(queryId); + if (!query) + return; + enginesQuery.remove(queryId); + + int count; + ds >> count; + + for (int ii = 0; ii < count; ++ii) { + QDeclarativeDebugEngineReference ref; + ds >> ref.m_name; + ds >> ref.m_debugId; + query->m_engines << ref; + } + + query->m_client = 0; + query->setState(QDeclarativeDebugQuery::Completed); + } else if (type == "LIST_OBJECTS_R") { + int queryId; + ds >> queryId; + + QDeclarativeDebugRootContextQuery *query = rootContextQuery.value(queryId); + if (!query) + return; + rootContextQuery.remove(queryId); + + if (!ds.atEnd()) + decode(ds, query->m_context); + + query->m_client = 0; + query->setState(QDeclarativeDebugQuery::Completed); + } else if (type == "FETCH_OBJECT_R") { + int queryId; + ds >> queryId; + + QDeclarativeDebugObjectQuery *query = objectQuery.value(queryId); + if (!query) + return; + objectQuery.remove(queryId); + + if (!ds.atEnd()) + decode(ds, query->m_object, false); + + query->m_client = 0; + query->setState(QDeclarativeDebugQuery::Completed); + } else if (type == "EVAL_EXPRESSION_R") { + int queryId; + QVariant result; + ds >> queryId >> result; + + QDeclarativeDebugExpressionQuery *query = expressionQuery.value(queryId); + if (!query) + return; + expressionQuery.remove(queryId); + + query->m_result = result; + query->m_client = 0; + query->setState(QDeclarativeDebugQuery::Completed); + } else if (type == "WATCH_PROPERTY_R") { + int queryId; + bool ok; + ds >> queryId >> ok; + + QDeclarativeDebugWatch *watch = watched.value(queryId); + if (!watch) + return; + + watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); + } else if (type == "WATCH_OBJECT_R") { + int queryId; + bool ok; + ds >> queryId >> ok; + + QDeclarativeDebugWatch *watch = watched.value(queryId); + if (!watch) + return; + + watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); + } else if (type == "WATCH_EXPR_OBJECT_R") { + int queryId; + bool ok; + ds >> queryId >> ok; + + QDeclarativeDebugWatch *watch = watched.value(queryId); + if (!watch) + return; + + watch->setState(ok ? QDeclarativeDebugWatch::Active : QDeclarativeDebugWatch::Inactive); + } else if (type == "UPDATE_WATCH") { + int queryId; + int debugId; + QByteArray name; + QVariant value; + ds >> queryId >> debugId >> name >> value; + + QDeclarativeDebugWatch *watch = watched.value(queryId, 0); + if (!watch) + return; + emit watch->valueChanged(name, value); + } else if (type == "OBJECT_CREATED") { + emit q_func()->newObjects(); + } +} + +QDeclarativeEngineDebug::QDeclarativeEngineDebug(QDeclarativeDebugConnection *client, QObject *parent) +: QObject(*(new QDeclarativeEngineDebugPrivate(client)), parent) +{ +} + +QDeclarativeEngineDebug::Status QDeclarativeEngineDebug::status() const +{ + Q_D(const QDeclarativeEngineDebug); + + return static_cast(d->client->status()); +} + +QDeclarativeDebugPropertyWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugPropertyReference &property, QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + + QDeclarativeDebugPropertyWatch *watch = new QDeclarativeDebugPropertyWatch(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled) { + int queryId = d->getId(); + watch->m_queryId = queryId; + watch->m_client = this; + watch->m_objectDebugId = property.objectDebugId(); + watch->m_name = property.name(); + d->watched.insert(queryId, watch); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("WATCH_PROPERTY") << queryId << property.objectDebugId() << property.name().toUtf8(); + d->client->sendMessage(message); + } else { + watch->m_state = QDeclarativeDebugWatch::Dead; + } + + return watch; +} + +QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugContextReference &, const QString &, QObject *) +{ + qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); + return 0; +} + +QDeclarativeDebugObjectExpressionWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, const QString &expr, QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + QDeclarativeDebugObjectExpressionWatch *watch = new QDeclarativeDebugObjectExpressionWatch(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled) { + int queryId = d->getId(); + watch->m_queryId = queryId; + watch->m_client = this; + watch->m_objectDebugId = object.debugId(); + watch->m_expr = expr; + d->watched.insert(queryId, watch); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("WATCH_EXPR_OBJECT") << queryId << object.debugId() << expr; + d->client->sendMessage(message); + } else { + watch->m_state = QDeclarativeDebugWatch::Dead; + } + return watch; +} + +QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugObjectReference &object, QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + + QDeclarativeDebugWatch *watch = new QDeclarativeDebugWatch(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled) { + int queryId = d->getId(); + watch->m_queryId = queryId; + watch->m_client = this; + watch->m_objectDebugId = object.debugId(); + d->watched.insert(queryId, watch); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("WATCH_OBJECT") << queryId << object.debugId(); + d->client->sendMessage(message); + } else { + watch->m_state = QDeclarativeDebugWatch::Dead; + } + + return watch; +} + +QDeclarativeDebugWatch *QDeclarativeEngineDebug::addWatch(const QDeclarativeDebugFileReference &, QObject *) +{ + qWarning("QDeclarativeEngineDebug::addWatch(): Not implemented"); + return 0; +} + +void QDeclarativeEngineDebug::removeWatch(QDeclarativeDebugWatch *watch) +{ + Q_D(QDeclarativeEngineDebug); + + if (!watch || !watch->m_client) + return; + + watch->m_client = 0; + watch->setState(QDeclarativeDebugWatch::Inactive); + + d->watched.remove(watch->queryId()); + + if (d->client && d->client->status() == QDeclarativeDebugClient::Enabled) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("NO_WATCH") << watch->queryId(); + d->client->sendMessage(message); + } +} + +QDeclarativeDebugEnginesQuery *QDeclarativeEngineDebug::queryAvailableEngines(QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + + QDeclarativeDebugEnginesQuery *query = new QDeclarativeDebugEnginesQuery(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->enginesQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("LIST_ENGINES") << queryId; + d->client->sendMessage(message); + } else { + query->m_state = QDeclarativeDebugQuery::Error; + } + + return query; +} + +QDeclarativeDebugRootContextQuery *QDeclarativeEngineDebug::queryRootContexts(const QDeclarativeDebugEngineReference &engine, QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + + QDeclarativeDebugRootContextQuery *query = new QDeclarativeDebugRootContextQuery(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled && engine.debugId() != -1) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->rootContextQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("LIST_OBJECTS") << queryId << engine.debugId(); + d->client->sendMessage(message); + } else { + query->m_state = QDeclarativeDebugQuery::Error; + } + + return query; +} + +QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObject(const QDeclarativeDebugObjectReference &object, QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + + QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->objectQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() + << false << true; + d->client->sendMessage(message); + } else { + query->m_state = QDeclarativeDebugQuery::Error; + } + + return query; +} + +QDeclarativeDebugObjectQuery *QDeclarativeEngineDebug::queryObjectRecursive(const QDeclarativeDebugObjectReference &object, QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + + QDeclarativeDebugObjectQuery *query = new QDeclarativeDebugObjectQuery(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled && object.debugId() != -1) { + query->m_client = this; + int queryId = d->getId(); + query->m_queryId = queryId; + d->objectQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("FETCH_OBJECT") << queryId << object.debugId() + << true << true; + d->client->sendMessage(message); + } else { + query->m_state = QDeclarativeDebugQuery::Error; + } + + return query; +} + +QDeclarativeDebugExpressionQuery *QDeclarativeEngineDebug::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent) +{ + Q_D(QDeclarativeEngineDebug); + + QDeclarativeDebugExpressionQuery *query = new QDeclarativeDebugExpressionQuery(parent); + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { + query->m_client = this; + query->m_expr = expr; + int queryId = d->getId(); + query->m_queryId = queryId; + d->expressionQuery.insert(queryId, query); + + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("EVAL_EXPRESSION") << queryId << objectDebugId << expr; + d->client->sendMessage(message); + } else { + query->m_state = QDeclarativeDebugQuery::Error; + } + + return query; +} + +bool QDeclarativeEngineDebug::setBindingForObject(int objectDebugId, const QString &propertyName, + const QVariant &bindingExpression, + bool isLiteralValue, + QString source, int line) +{ + Q_D(QDeclarativeEngineDebug); + + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("SET_BINDING") << objectDebugId << propertyName << bindingExpression << isLiteralValue << source << line; + d->client->sendMessage(message); + return true; + } else { + return false; + } +} + +bool QDeclarativeEngineDebug::resetBindingForObject(int objectDebugId, const QString &propertyName) +{ + Q_D(QDeclarativeEngineDebug); + + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("RESET_BINDING") << objectDebugId << propertyName; + d->client->sendMessage(message); + return true; + } else { + return false; + } +} + +bool QDeclarativeEngineDebug::setMethodBody(int objectDebugId, const QString &methodName, + const QString &methodBody) +{ + Q_D(QDeclarativeEngineDebug); + + if (d->client->status() == QDeclarativeDebugClient::Enabled && objectDebugId != -1) { + QByteArray message; + QDataStream ds(&message, QIODevice::WriteOnly); + ds << QByteArray("SET_METHOD_BODY") << objectDebugId << methodName << methodBody; + d->client->sendMessage(message); + return true; + } else { + return false; + } +} + +QDeclarativeDebugWatch::QDeclarativeDebugWatch(QObject *parent) +: QObject(parent), m_state(Waiting), m_queryId(-1), m_client(0), m_objectDebugId(-1) +{ +} + +QDeclarativeDebugWatch::~QDeclarativeDebugWatch() +{ + if (m_client && m_queryId != -1) + QDeclarativeEngineDebugPrivate::remove(m_client, this); +} + +int QDeclarativeDebugWatch::queryId() const +{ + return m_queryId; +} + +int QDeclarativeDebugWatch::objectDebugId() const +{ + return m_objectDebugId; +} + +QDeclarativeDebugWatch::State QDeclarativeDebugWatch::state() const +{ + return m_state; +} + +void QDeclarativeDebugWatch::setState(State s) +{ + if (m_state == s) + return; + m_state = s; + emit stateChanged(m_state); +} + +QDeclarativeDebugPropertyWatch::QDeclarativeDebugPropertyWatch(QObject *parent) + : QDeclarativeDebugWatch(parent) +{ +} + +QString QDeclarativeDebugPropertyWatch::name() const +{ + return m_name; +} + + +QDeclarativeDebugObjectExpressionWatch::QDeclarativeDebugObjectExpressionWatch(QObject *parent) + : QDeclarativeDebugWatch(parent) +{ +} + +QString QDeclarativeDebugObjectExpressionWatch::expression() const +{ + return m_expr; +} + + +QDeclarativeDebugQuery::QDeclarativeDebugQuery(QObject *parent) +: QObject(parent), m_state(Waiting) +{ +} + +QDeclarativeDebugQuery::State QDeclarativeDebugQuery::state() const +{ + return m_state; +} + +bool QDeclarativeDebugQuery::isWaiting() const +{ + return m_state == Waiting; +} + +void QDeclarativeDebugQuery::setState(State s) +{ + if (m_state == s) + return; + m_state = s; + emit stateChanged(m_state); +} + +QDeclarativeDebugEnginesQuery::QDeclarativeDebugEnginesQuery(QObject *parent) +: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QDeclarativeDebugEnginesQuery::~QDeclarativeDebugEnginesQuery() +{ + if (m_client && m_queryId != -1) + QDeclarativeEngineDebugPrivate::remove(m_client, this); +} + +QList QDeclarativeDebugEnginesQuery::engines() const +{ + return m_engines; +} + +QDeclarativeDebugRootContextQuery::QDeclarativeDebugRootContextQuery(QObject *parent) +: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QDeclarativeDebugRootContextQuery::~QDeclarativeDebugRootContextQuery() +{ + if (m_client && m_queryId != -1) + QDeclarativeEngineDebugPrivate::remove(m_client, this); +} + +QDeclarativeDebugContextReference QDeclarativeDebugRootContextQuery::rootContext() const +{ + return m_context; +} + +QDeclarativeDebugObjectQuery::QDeclarativeDebugObjectQuery(QObject *parent) +: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QDeclarativeDebugObjectQuery::~QDeclarativeDebugObjectQuery() +{ + if (m_client && m_queryId != -1) + QDeclarativeEngineDebugPrivate::remove(m_client, this); +} + +QDeclarativeDebugObjectReference QDeclarativeDebugObjectQuery::object() const +{ + return m_object; +} + +QDeclarativeDebugExpressionQuery::QDeclarativeDebugExpressionQuery(QObject *parent) +: QDeclarativeDebugQuery(parent), m_client(0), m_queryId(-1) +{ +} + +QDeclarativeDebugExpressionQuery::~QDeclarativeDebugExpressionQuery() +{ + if (m_client && m_queryId != -1) + QDeclarativeEngineDebugPrivate::remove(m_client, this); +} + +QVariant QDeclarativeDebugExpressionQuery::expression() const +{ + return m_expr; +} + +QVariant QDeclarativeDebugExpressionQuery::result() const +{ + return m_result; +} + +QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference() +: m_debugId(-1) +{ +} + +QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(int debugId) +: m_debugId(debugId) +{ +} + +QDeclarativeDebugEngineReference::QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &o) +: m_debugId(o.m_debugId), m_name(o.m_name) +{ +} + +QDeclarativeDebugEngineReference & +QDeclarativeDebugEngineReference::operator=(const QDeclarativeDebugEngineReference &o) +{ + m_debugId = o.m_debugId; m_name = o.m_name; + return *this; +} + +int QDeclarativeDebugEngineReference::debugId() const +{ + return m_debugId; +} + +QString QDeclarativeDebugEngineReference::name() const +{ + return m_name; +} + +QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference() +: m_debugId(-1), m_contextDebugId(-1) +{ +} + +QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(int debugId) +: m_debugId(debugId), m_contextDebugId(-1) +{ +} + +QDeclarativeDebugObjectReference::QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &o) +: m_debugId(o.m_debugId), m_class(o.m_class), m_idString(o.m_idString), + m_name(o.m_name), m_source(o.m_source), m_contextDebugId(o.m_contextDebugId), + m_properties(o.m_properties), m_children(o.m_children) +{ +} + +QDeclarativeDebugObjectReference & +QDeclarativeDebugObjectReference::operator=(const QDeclarativeDebugObjectReference &o) +{ + m_debugId = o.m_debugId; m_class = o.m_class; m_idString = o.m_idString; + m_name = o.m_name; m_source = o.m_source; m_contextDebugId = o.m_contextDebugId; + m_properties = o.m_properties; m_children = o.m_children; + return *this; +} + +int QDeclarativeDebugObjectReference::debugId() const +{ + return m_debugId; +} + +QString QDeclarativeDebugObjectReference::className() const +{ + return m_class; +} + +QString QDeclarativeDebugObjectReference::idString() const +{ + return m_idString; +} + +QString QDeclarativeDebugObjectReference::name() const +{ + return m_name; +} + +QDeclarativeDebugFileReference QDeclarativeDebugObjectReference::source() const +{ + return m_source; +} + +int QDeclarativeDebugObjectReference::contextDebugId() const +{ + return m_contextDebugId; +} + +QList QDeclarativeDebugObjectReference::properties() const +{ + return m_properties; +} + +QList QDeclarativeDebugObjectReference::children() const +{ + return m_children; +} + +QDeclarativeDebugContextReference::QDeclarativeDebugContextReference() +: m_debugId(-1) +{ +} + +QDeclarativeDebugContextReference::QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &o) +: m_debugId(o.m_debugId), m_name(o.m_name), m_objects(o.m_objects), m_contexts(o.m_contexts) +{ +} + +QDeclarativeDebugContextReference &QDeclarativeDebugContextReference::operator=(const QDeclarativeDebugContextReference &o) +{ + m_debugId = o.m_debugId; m_name = o.m_name; m_objects = o.m_objects; + m_contexts = o.m_contexts; + return *this; +} + +int QDeclarativeDebugContextReference::debugId() const +{ + return m_debugId; +} + +QString QDeclarativeDebugContextReference::name() const +{ + return m_name; +} + +QList QDeclarativeDebugContextReference::objects() const +{ + return m_objects; +} + +QList QDeclarativeDebugContextReference::contexts() const +{ + return m_contexts; +} + +QDeclarativeDebugFileReference::QDeclarativeDebugFileReference() +: m_lineNumber(-1), m_columnNumber(-1) +{ +} + +QDeclarativeDebugFileReference::QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &o) +: m_url(o.m_url), m_lineNumber(o.m_lineNumber), m_columnNumber(o.m_columnNumber) +{ +} + +QDeclarativeDebugFileReference &QDeclarativeDebugFileReference::operator=(const QDeclarativeDebugFileReference &o) +{ + m_url = o.m_url; m_lineNumber = o.m_lineNumber; m_columnNumber = o.m_columnNumber; + return *this; +} + +QUrl QDeclarativeDebugFileReference::url() const +{ + return m_url; +} + +void QDeclarativeDebugFileReference::setUrl(const QUrl &u) +{ + m_url = u; +} + +int QDeclarativeDebugFileReference::lineNumber() const +{ + return m_lineNumber; +} + +void QDeclarativeDebugFileReference::setLineNumber(int l) +{ + m_lineNumber = l; +} + +int QDeclarativeDebugFileReference::columnNumber() const +{ + return m_columnNumber; +} + +void QDeclarativeDebugFileReference::setColumnNumber(int c) +{ + m_columnNumber = c; +} + +QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference() +: m_objectDebugId(-1), m_hasNotifySignal(false) +{ +} + +QDeclarativeDebugPropertyReference::QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &o) +: m_objectDebugId(o.m_objectDebugId), m_name(o.m_name), m_value(o.m_value), + m_valueTypeName(o.m_valueTypeName), m_binding(o.m_binding), + m_hasNotifySignal(o.m_hasNotifySignal) +{ +} + +QDeclarativeDebugPropertyReference &QDeclarativeDebugPropertyReference::operator=(const QDeclarativeDebugPropertyReference &o) +{ + m_objectDebugId = o.m_objectDebugId; m_name = o.m_name; m_value = o.m_value; + m_valueTypeName = o.m_valueTypeName; m_binding = o.m_binding; + m_hasNotifySignal = o.m_hasNotifySignal; + return *this; +} + +int QDeclarativeDebugPropertyReference::objectDebugId() const +{ + return m_objectDebugId; +} + +QString QDeclarativeDebugPropertyReference::name() const +{ + return m_name; +} + +QString QDeclarativeDebugPropertyReference::valueTypeName() const +{ + return m_valueTypeName; +} + +QVariant QDeclarativeDebugPropertyReference::value() const +{ + return m_value; +} + +QString QDeclarativeDebugPropertyReference::binding() const +{ + return m_binding; +} + +bool QDeclarativeDebugPropertyReference::hasNotifySignal() const +{ + return m_hasNotifySignal; +} + +QT_END_NAMESPACE + diff --git a/src/declarative/debugger/qdeclarativeenginedebug_p.h b/src/declarative/debugger/qdeclarativeenginedebug_p.h new file mode 100644 index 0000000..9b70e1c --- /dev/null +++ b/src/declarative/debugger/qdeclarativeenginedebug_p.h @@ -0,0 +1,387 @@ +/**************************************************************************** +** +** 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 QtDeclarative module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** 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. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#ifndef QDECLARATIVEENGINEDEBUG_H +#define QDECLARATIVEENGINEDEBUG_H + +#include +#include +#include + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugConnection; +class QDeclarativeDebugWatch; +class QDeclarativeDebugPropertyWatch; +class QDeclarativeDebugObjectExpressionWatch; +class QDeclarativeDebugEnginesQuery; +class QDeclarativeDebugRootContextQuery; +class QDeclarativeDebugObjectQuery; +class QDeclarativeDebugExpressionQuery; +class QDeclarativeDebugPropertyReference; +class QDeclarativeDebugContextReference; +class QDeclarativeDebugObjectReference; +class QDeclarativeDebugFileReference; +class QDeclarativeDebugEngineReference; +class QDeclarativeEngineDebugPrivate; +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeEngineDebug : public QObject +{ +Q_OBJECT +public: + enum Status { NotConnected, Unavailable, Enabled }; + + explicit QDeclarativeEngineDebug(QDeclarativeDebugConnection *, QObject * = 0); + + Status status() const; + + QDeclarativeDebugPropertyWatch *addWatch(const QDeclarativeDebugPropertyReference &, + QObject *parent = 0); + QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugContextReference &, const QString &, + QObject *parent = 0); + QDeclarativeDebugObjectExpressionWatch *addWatch(const QDeclarativeDebugObjectReference &, const QString &, + QObject *parent = 0); + QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugObjectReference &, + QObject *parent = 0); + QDeclarativeDebugWatch *addWatch(const QDeclarativeDebugFileReference &, + QObject *parent = 0); + + void removeWatch(QDeclarativeDebugWatch *watch); + + QDeclarativeDebugEnginesQuery *queryAvailableEngines(QObject *parent = 0); + QDeclarativeDebugRootContextQuery *queryRootContexts(const QDeclarativeDebugEngineReference &, + QObject *parent = 0); + QDeclarativeDebugObjectQuery *queryObject(const QDeclarativeDebugObjectReference &, + QObject *parent = 0); + QDeclarativeDebugObjectQuery *queryObjectRecursive(const QDeclarativeDebugObjectReference &, + QObject *parent = 0); + QDeclarativeDebugExpressionQuery *queryExpressionResult(int objectDebugId, + const QString &expr, + QObject *parent = 0); + bool setBindingForObject(int objectDebugId, const QString &propertyName, + const QVariant &bindingExpression, bool isLiteralValue, + QString source = QString(), int line = -1); + bool resetBindingForObject(int objectDebugId, const QString &propertyName); + bool setMethodBody(int objectDebugId, const QString &methodName, const QString &methodBody); + +Q_SIGNALS: + void newObjects(); + void statusChanged(Status status); + +private: + Q_DECLARE_PRIVATE(QDeclarativeEngineDebug) +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugWatch : public QObject +{ +Q_OBJECT +public: + enum State { Waiting, Active, Inactive, Dead }; + + QDeclarativeDebugWatch(QObject *); + ~QDeclarativeDebugWatch(); + + int queryId() const; + int objectDebugId() const; + State state() const; + +Q_SIGNALS: + void stateChanged(QDeclarativeDebugWatch::State); + //void objectChanged(int, const QDeclarativeDebugObjectReference &); + //void valueChanged(int, const QVariant &); + + // Server sends value as string if it is a user-type variant + void valueChanged(const QByteArray &name, const QVariant &value); + +private: + friend class QDeclarativeEngineDebug; + friend class QDeclarativeEngineDebugPrivate; + void setState(State); + State m_state; + int m_queryId; + QDeclarativeEngineDebug *m_client; + int m_objectDebugId; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyWatch : public QDeclarativeDebugWatch +{ + Q_OBJECT +public: + QDeclarativeDebugPropertyWatch(QObject *parent); + + QString name() const; + +private: + friend class QDeclarativeEngineDebug; + QString m_name; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectExpressionWatch : public QDeclarativeDebugWatch +{ + Q_OBJECT +public: + QDeclarativeDebugObjectExpressionWatch(QObject *parent); + + QString expression() const; + +private: + friend class QDeclarativeEngineDebug; + QString m_expr; + int m_debugId; +}; + + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugQuery : public QObject +{ +Q_OBJECT +public: + enum State { Waiting, Error, Completed }; + + State state() const; + bool isWaiting() const; + +// bool waitUntilCompleted(); + +Q_SIGNALS: + void stateChanged(QDeclarativeDebugQuery::State); + +protected: + QDeclarativeDebugQuery(QObject *); + +private: + friend class QDeclarativeEngineDebug; + friend class QDeclarativeEngineDebugPrivate; + void setState(State); + State m_state; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugFileReference +{ +public: + QDeclarativeDebugFileReference(); + QDeclarativeDebugFileReference(const QDeclarativeDebugFileReference &); + QDeclarativeDebugFileReference &operator=(const QDeclarativeDebugFileReference &); + + QUrl url() const; + void setUrl(const QUrl &); + int lineNumber() const; + void setLineNumber(int); + int columnNumber() const; + void setColumnNumber(int); + +private: + friend class QDeclarativeEngineDebugPrivate; + QUrl m_url; + int m_lineNumber; + int m_columnNumber; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEngineReference +{ +public: + QDeclarativeDebugEngineReference(); + QDeclarativeDebugEngineReference(int); + QDeclarativeDebugEngineReference(const QDeclarativeDebugEngineReference &); + QDeclarativeDebugEngineReference &operator=(const QDeclarativeDebugEngineReference &); + + int debugId() const; + QString name() const; + +private: + friend class QDeclarativeEngineDebugPrivate; + int m_debugId; + QString m_name; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectReference +{ +public: + QDeclarativeDebugObjectReference(); + QDeclarativeDebugObjectReference(int); + QDeclarativeDebugObjectReference(const QDeclarativeDebugObjectReference &); + QDeclarativeDebugObjectReference &operator=(const QDeclarativeDebugObjectReference &); + + int debugId() const; + QString className() const; + QString idString() const; + QString name() const; + + QDeclarativeDebugFileReference source() const; + int contextDebugId() const; + + QList properties() const; + QList children() const; + +private: + friend class QDeclarativeEngineDebugPrivate; + int m_debugId; + QString m_class; + QString m_idString; + QString m_name; + QDeclarativeDebugFileReference m_source; + int m_contextDebugId; + QList m_properties; + QList m_children; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugContextReference +{ +public: + QDeclarativeDebugContextReference(); + QDeclarativeDebugContextReference(const QDeclarativeDebugContextReference &); + QDeclarativeDebugContextReference &operator=(const QDeclarativeDebugContextReference &); + + int debugId() const; + QString name() const; + + QList objects() const; + QList contexts() const; + +private: + friend class QDeclarativeEngineDebugPrivate; + int m_debugId; + QString m_name; + QList m_objects; + QList m_contexts; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugPropertyReference +{ +public: + QDeclarativeDebugPropertyReference(); + QDeclarativeDebugPropertyReference(const QDeclarativeDebugPropertyReference &); + QDeclarativeDebugPropertyReference &operator=(const QDeclarativeDebugPropertyReference &); + + int objectDebugId() const; + QString name() const; + QVariant value() const; + QString valueTypeName() const; + QString binding() const; + bool hasNotifySignal() const; + +private: + friend class QDeclarativeEngineDebugPrivate; + int m_objectDebugId; + QString m_name; + QVariant m_value; + QString m_valueTypeName; + QString m_binding; + bool m_hasNotifySignal; +}; + + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugEnginesQuery : public QDeclarativeDebugQuery +{ +Q_OBJECT +public: + virtual ~QDeclarativeDebugEnginesQuery(); + QList engines() const; +private: + friend class QDeclarativeEngineDebug; + friend class QDeclarativeEngineDebugPrivate; + QDeclarativeDebugEnginesQuery(QObject *); + QDeclarativeEngineDebug *m_client; + int m_queryId; + QList m_engines; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugRootContextQuery : public QDeclarativeDebugQuery +{ +Q_OBJECT +public: + virtual ~QDeclarativeDebugRootContextQuery(); + QDeclarativeDebugContextReference rootContext() const; +private: + friend class QDeclarativeEngineDebug; + friend class QDeclarativeEngineDebugPrivate; + QDeclarativeDebugRootContextQuery(QObject *); + QDeclarativeEngineDebug *m_client; + int m_queryId; + QDeclarativeDebugContextReference m_context; +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugObjectQuery : public QDeclarativeDebugQuery +{ +Q_OBJECT +public: + virtual ~QDeclarativeDebugObjectQuery(); + QDeclarativeDebugObjectReference object() const; +private: + friend class QDeclarativeEngineDebug; + friend class QDeclarativeEngineDebugPrivate; + QDeclarativeDebugObjectQuery(QObject *); + QDeclarativeEngineDebug *m_client; + int m_queryId; + QDeclarativeDebugObjectReference m_object; + +}; + +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeDebugExpressionQuery : public QDeclarativeDebugQuery +{ +Q_OBJECT +public: + virtual ~QDeclarativeDebugExpressionQuery(); + QVariant expression() const; + QVariant result() const; +private: + friend class QDeclarativeEngineDebug; + friend class QDeclarativeEngineDebugPrivate; + QDeclarativeDebugExpressionQuery(QObject *); + QDeclarativeEngineDebug *m_client; + int m_queryId; + QVariant m_expr; + QVariant m_result; +}; + +QT_END_NAMESPACE + +Q_DECLARE_METATYPE(QDeclarativeDebugEngineReference) +Q_DECLARE_METATYPE(QDeclarativeDebugObjectReference) +Q_DECLARE_METATYPE(QDeclarativeDebugContextReference) +Q_DECLARE_METATYPE(QDeclarativeDebugPropertyReference) + +QT_END_HEADER + +#endif // QDECLARATIVEENGINEDEBUG_H diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 0821245..be9b402 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp index 0d371d0..4846d67 100644 --- a/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp +++ b/tests/auto/declarative/qdeclarativedebugclient/tst_qdeclarativedebugclient.cpp @@ -47,9 +47,7 @@ #include -#include #include -#include #include "../../../shared/util.h" #include "../shared/debugutil_p.h" diff --git a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp index 1ca3b8f..85d459b 100644 --- a/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp +++ b/tests/auto/declarative/qdeclarativedebugservice/tst_qdeclarativedebugservice.cpp @@ -47,7 +47,6 @@ #include -#include #include #include -- cgit v0.12 From 8ba781b01e900148fec2e9d26485369b3295487f Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 14 Sep 2011 16:12:10 +0200 Subject: Remove support for multiple cookies in one Set-Cookie header to follow RFC6265. This also allows cookie values to contain commas to increase compatibility like most popular browsers do even though the RFC still reserves them for future uses. Reviewed-by: Peter Hartmann Task-number: QTBUG-21456 --- dist/changes-4.8.0 | 1 + src/network/access/qnetworkcookie.cpp | 18 +++----- tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp | 54 +++++++----------------- 3 files changed, 21 insertions(+), 52 deletions(-) diff --git a/dist/changes-4.8.0 b/dist/changes-4.8.0 index b8e3842..e208fa1 100644 --- a/dist/changes-4.8.0 +++ b/dist/changes-4.8.0 @@ -105,6 +105,7 @@ QtNetwork - HTTP cache: do not load resources from cache that must be revalidated [QTBUG-18983] - HTTP cache: change file organization (MR-2505) - SOCKS5: write errors are propagated to the outer socket [QTBUG-18713] + - Cookies: Commas are no longer used to support multiple cookies in a single Set-Cookie header [QTBUG-21456] QtOpenGL -------- diff --git a/src/network/access/qnetworkcookie.cpp b/src/network/access/qnetworkcookie.cpp index 0670738..a9bb318 100644 --- a/src/network/access/qnetworkcookie.cpp +++ b/src/network/access/qnetworkcookie.cpp @@ -372,7 +372,7 @@ static QPair nextField(const QByteArray &text, int &posi // parse the first part, before the equal sign for (i = position; i < length; ++i) { register char c = text.at(i); - if (c == ';' || c == ',' || c == '=') + if (c == ';' || c == '=') break; } @@ -423,7 +423,7 @@ static QPair nextField(const QByteArray &text, int &posi for ( ; i < length; ++i) { register char c = text.at(i); - if (c == ',' || c == ';') + if (c == ';') break; } position = i; @@ -434,7 +434,7 @@ static QPair nextField(const QByteArray &text, int &posi register char c = text.at(i); // for name value pairs, we want to parse until reaching the next ';' // and not break when reaching a space char - if (c == ',' || c == ';' || ((isNameValue && (c == '\n' || c == '\r')) || (!isNameValue && isLWS(c)))) + if (c == ';' || ((isNameValue && (c == '\n' || c == '\r')) || (!isNameValue && isLWS(c)))) break; } @@ -461,8 +461,7 @@ static QPair nextField(const QByteArray &text, int &posi \value Full makes toRawForm() return the full cookie contents, as suitable for sending to a client in a - server's "Set-Cookie:" header. Multiple cookies are separated - by commas in a "Set-Cookie:" header. + server's "Set-Cookie:" header. Note that only the Full form of the cookie can be parsed back into its original contents. @@ -488,7 +487,6 @@ QByteArray QNetworkCookie::toRawForm(RawForm form) const result = d->name; result += '='; if ((d->value.contains(';') || - d->value.contains(',') || d->value.contains('"')) && (!d->value.startsWith('"') && !d->value.endsWith('"'))) { @@ -967,14 +965,8 @@ QList QNetworkCookiePrivate::parseSetCookieHeaderLine(const QByt cookie.setValue(field.second); position = nextNonWhitespace(cookieString, position); - bool endOfCookie = false; - while (!endOfCookie && position < length) { + while (position < length) { switch (cookieString.at(position++)) { - case ',': - // end of the cookie - endOfCookie = true; - break; - case ';': // new field in the cookie field = nextField(cookieString, position, false); diff --git a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp index a83f6dd..e4c88cd 100644 --- a/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp +++ b/tests/auto/qnetworkcookie/tst_qnetworkcookie.cpp @@ -181,6 +181,14 @@ void tst_QNetworkCookie::parseSingleCookie_data() QTest::newRow("with-value-with-special4") << "a = \"\\\"\" " << cookie; cookie.setValue("\"\\\"a, b; c\\\"\""); QTest::newRow("with-value-with-special5") << "a = \"\\\"a, b; c\\\"\"" << cookie; + // RFC6265 states that cookie values shouldn't contain commas, but we still allow them + // since they are only reserved for future compatibility and other browsers do the same. + cookie.setValue(","); + QTest::newRow("with-value-with-special6") << "a = ," << cookie; + cookie.setValue(",b"); + QTest::newRow("with-value-with-special7") << "a = ,b" << cookie; + cookie.setValue("b,"); + QTest::newRow("with-value-with-special8") << "a = b," << cookie; cookie.setValue("b c"); QTest::newRow("with-value-with-whitespace") << "a = b c" << cookie; @@ -599,7 +607,6 @@ void tst_QNetworkCookie::parseSingleCookie() //QEXPECT_FAIL("network2", "QDateTime parsing problem: the date is beyond year 8000", Abort); QCOMPARE(result.count(), 1); - QEXPECT_FAIL("network3", "Cookie value contains commas, violating the HTTP spec", Abort); QCOMPARE(result.at(0), expectedCookie); result = QNetworkCookie::parseCookies(result.at(0).toRawForm()); @@ -634,48 +641,17 @@ void tst_QNetworkCookie::parseMultipleCookies_data() // reason: malformed NAME=VALUE pair QTest::newRow("invalid-05") << "foo" << list; QTest::newRow("invalid-06") << "=b" << list; - QTest::newRow("invalid-09") << "foo,a=b" << list; - QTest::newRow("invalid-11") << ";path=/" << list; + QTest::newRow("invalid-07") << ";path=/" << list; // reason: malformed expiration date string - QTest::newRow("invalid-12") << "a=b;expires=" << list; - QTest::newRow("invalid-13") << "a=b;expires=foobar" << list; - QTest::newRow("invalid-14") << "a=b;expires=foobar, abc" << list; - QTest::newRow("invalid-15") << "a=b;expires=foobar, dd-mmm-yyyy hh:mm:ss GMT; path=/" << list; - QTest::newRow("invalid-16") << "a=b;expires=foobar, 32-Caz-1999 24:01:60 GMT; path=/" << list; - - QNetworkCookie cookie; - cookie.setName("a"); - list += cookie; - cookie.setName("c"); - cookie.setValue("d"); - list += cookie; - QTest::newRow("two-1") << "a=,c=d" << list; - QTest::newRow("two-2") << "a=, c=d" << list; - QTest::newRow("two-3") << "a= ,c=d" << list; - QTest::newRow("two-4") << "a= , c=d" << list; - - list.clear(); - list += cookie; - cookie.setName("a"); - cookie.setValue(QByteArray()); - list += cookie; - QTest::newRow("two-5") << "c=d,a=" << list; - QTest::newRow("two-6") << "c=d, a=" << list; - QTest::newRow("two-7") << "c=d , a=" << list; - - cookie.setName("foo"); - cookie.setValue("bar"); - cookie.setPath("/"); - list += cookie; - QTest::newRow("complex-1") << "c=d, a=, foo=bar; path=/" << list; - - cookie.setName("baz"); - cookie.setDomain(".qt.nokia.com"); - list.prepend(cookie); - QTest::newRow("complex-2") << "baz=bar; path=/; domain=.qt.nokia.com, c=d,a=,foo=bar; path=/" << list; + QTest::newRow("invalid-08") << "a=b;expires=" << list; + QTest::newRow("invalid-09") << "a=b;expires=foobar" << list; + QTest::newRow("invalid-10") << "a=b;expires=foobar, abc" << list; + QTest::newRow("invalid-11") << "a=b;expires=foobar, dd-mmm-yyyy hh:mm:ss GMT; path=/" << list; + QTest::newRow("invalid-12") << "a=b;expires=foobar, 32-Caz-1999 24:01:60 GMT; path=/" << list; // cookies obtained from the network: + QNetworkCookie cookie; cookie = QNetworkCookie("id", "51706646077999719"); cookie.setDomain(".bluestreak.com"); cookie.setPath("/"); -- cgit v0.12 From 32e2ea24df71f3078b03598360aea76c0ebe1cba Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 19 Sep 2011 09:25:20 +0200 Subject: Debugger: Fix autotest breakage Fix compilation breakage caused by 160e1eed007f43a68ee03a6e8c0bfd2602a64ee0 Change-Id: I664a45454f247cf0bc85b09d8787443a75e62568 --- tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp index f841272..bad7b8f 100644 --- a/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp +++ b/tests/auto/declarative/qdeclarativedebugjs/tst_qdeclarativedebugjs.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include -- cgit v0.12 From d04f37fa73d2fbb78dd85a02e9d3180ed4ddbdab Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Mon, 19 Sep 2011 14:34:04 +0100 Subject: symbian bearer: fix tst_qnetworksession test failures Symbian is not reporting the expected KLinkLayerClosed event on the last RConnection handle. Instead, it reports the event KConfigDaemonFinishedDeregistrationStop, which indicates the nif plugin is being destroyed (this is followed by unload events) To fix, this event is treated the same as a link down event, and results in the state change to disconnected. Either there has been a behaviour change in the platform, or the test was previously run with another user of the API running in the background (e.g. WLAN wizard, connection monitor) which prevented the unload. Task-Number: QTBUG-21382 Reviewed-By: mread (cherry picked from commit a0ad54acd33873316908080f432768fdf3e3bfc2) --- src/plugins/bearer/symbian/qnetworksession_impl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp index 5514511..29f0637 100644 --- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp +++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp @@ -1438,6 +1438,9 @@ void QNetworkSessionPrivateImpl::handleSymbianConnectionStatusChange(TInt aConne newState(QNetworkSession::Closing,accessPointId); break; + // Connection stopped + case KConfigDaemonFinishedDeregistrationStop: //this comes if this is the last session, instead of KLinkLayerClosed + case KConfigDaemonFinishedDeregistrationPreserve: // Connection closed case KConnectionClosed: case KLinkLayerClosed: -- cgit v0.12 From fa717293080c9d00b02028bebece1935aef6e093 Mon Sep 17 00:00:00 2001 From: aavit Date: Fri, 25 Mar 2011 13:50:41 +0100 Subject: Avoid runtime warning about interlace handling from libpng 1.5 Task-number: QTBUG-13298, QTBUG-21408 (cherry picked from commit c8851ce8e109fb6b403ae80036d9f319f1b69d7a) --- src/gui/image/qpnghandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index 7f5cbe8..c0cebf9 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -217,6 +217,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre png_colorp palette = 0; int num_palette; png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0); + png_set_interlace_handling(png_ptr); if (color_type == PNG_COLOR_TYPE_GRAY) { // Black & White or 8-bit grayscale -- cgit v0.12 From 7147a0c0df5278dad3594c0d01599bd9424d946e Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Wed, 21 Sep 2011 11:48:39 +1000 Subject: Compile fix for Symbian --- src/declarative/qml/qdeclarativenotifier_p.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativenotifier_p.h b/src/declarative/qml/qdeclarativenotifier_p.h index e46b843..dd0bee6 100644 --- a/src/declarative/qml/qdeclarativenotifier_p.h +++ b/src/declarative/qml/qdeclarativenotifier_p.h @@ -106,7 +106,7 @@ private: qint64 q_for_alignment_1; double q_for_alignment_2; }; - }; + } signal; Notifier notifier; }; @@ -251,15 +251,15 @@ QDeclarativeNotifierEndpoint::Signal *QDeclarativeNotifierEndpoint::toSignal() return asSignal(); disconnect(); - signal = new (&signalData) Signal; + signal.signal = new (&signal.signalData) Signal; type = SignalType; - return signal; + return signal.signal; } QDeclarativeNotifierEndpoint::Signal *QDeclarativeNotifierEndpoint::asSignal() { Q_ASSERT(type == SignalType); - return signal; + return signal.signal; } QT_END_NAMESPACE -- cgit v0.12 From 849694e4cb9d010517b54b2b30035485487b0e12 Mon Sep 17 00:00:00 2001 From: mread Date: Wed, 21 Sep 2011 11:35:14 +0100 Subject: QML import path puts Qt dirs in correct Symbian order The QML import path contains an entry for the standard import location on each drive on Symbian. These were being ordered so that Z:, the ROM drive, was listed first. In fact the drive order was the reverse of the normal Symbian drive search order. This had the effect that upgraded versions of QML imports installed on the device were generally ignored for older ROM based versions. The import path has now been changed to match the normal Symbian drive search order. This will make it more likely for upgraded QML imports to be picked up and used. Task-number: QTBUG-21409 Reviewed-by: Shane Kearns Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativeimport.cpp | 10 ++++++++- .../tst_qdeclarativemoduleplugin.cpp | 25 ++++++++++++++++++++++ .../tst_qdeclarativemoduleplugin.pro | 2 +- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativeimport.cpp b/src/declarative/qml/qdeclarativeimport.cpp index 6e0b348..c25207a 100644 --- a/src/declarative/qml/qdeclarativeimport.cpp +++ b/src/declarative/qml/qdeclarativeimport.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -733,8 +734,12 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e) } RFs& fs = qt_s60GetRFs(); TPtrC tempPathPtr(reinterpret_cast (tempPath.constData())); + // Symbian searches should start from Y:. Fix start drive otherwise TFindFile starts from the session drive + _LIT(KStartDir, "Y:"); + TFileName dirPath(KStartDir); + dirPath.Append(tempPathPtr); TFindFile finder(fs); - TInt err = finder.FindByDir(tempPathPtr, tempPathPtr); + TInt err = finder.FindByDir(tempPathPtr, dirPath); while (err == KErrNone) { QString foundDir(reinterpret_cast(finder.File().Ptr()), finder.File().Length()); @@ -742,6 +747,9 @@ QDeclarativeImportDatabase::QDeclarativeImportDatabase(QDeclarativeEngine *e) addImportPath(foundDir); err = finder.Find(); } + // TFindFile found the directories in the order we want, but addImportPath reverses it. + // Reverse the order again to get it right. + QAlgorithmsPrivate::qReverse(fileImportPath.begin(), fileImportPath.end()); } else { addImportPath(installImportsPath); } diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp index 2cc2971..96bea68 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include "../shared/testhttpserver.h" #include "../../../shared/util.h" @@ -70,6 +71,7 @@ private slots: void remoteImportWithUnquotedUri(); void versionNotInstalled(); void versionNotInstalled_data(); + void importPath(); }; #ifdef Q_OS_SYMBIAN @@ -308,6 +310,29 @@ void tst_qdeclarativemoduleplugin::versionNotInstalled() VERIFY_ERRORS(errorFile.toLatin1().constData()); } +void tst_qdeclarativemoduleplugin::importPath() +{ +#ifndef Q_OS_SYMBIAN + QSKIP("Import path order testing for Symbian only", SkipAll); +#else + QDeclarativeEngine engine; + QStringList imports = engine.importPathList(); + QString installImportsPath = QDir::cleanPath(QLibraryInfo::location(QLibraryInfo::ImportsPath)); + QString driveOrder(QLatin1String("ZABCDEFGHIJKLMNOPQRSTUVWXY")); + int lastOrder = 30; + foreach(QString import, imports) + { + if (import.endsWith(installImportsPath)) + { + int order = driveOrder.indexOf(import[0]); + QVERIFY(order < lastOrder); + lastOrder = order; + } + } + QVERIFY(lastOrder != 30); +#endif +} + QTEST_MAIN(tst_qdeclarativemoduleplugin) #include "tst_qdeclarativemoduleplugin.moc" diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro index a92d3a2..2716a8b 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro +++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.pro @@ -9,7 +9,7 @@ CONFIG -= app_bundle symbian: { importFiles.sources = data importFiles.path = . - DEPLOYMENT = importFiles + DEPLOYMENT += importFiles } else { DEFINES += SRCDIR=\\\"$$PWD\\\" } -- cgit v0.12 From c3669d24b498aa0661ade5ed7465260788f629b5 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 22 Sep 2011 11:23:23 +0300 Subject: QLineControl: selectedTextChanged() signal is omitted in some cases QLineControl does not emit selectionChanged() signal when selection is changed due to handling of input method query. As a fix, the signal is emitted when internal values for selection end and beginning are changed in processInputMethodEvent(). Additionally, added deselect() test case for both QDeclarativeTextEdit and QDeclarativeTextInput to help out autotesting of text selections. Note that there are some differences in the QLineControl and QTextControl implementations. This causes the different signal counts even if the test steps are similar. Task-number: QTBUG-21429 Reviewed-by: Miikka Heikkinen --- src/gui/widgets/qlinecontrol.cpp | 4 + .../tst_qdeclarativetextedit.cpp | 115 ++++++++++++++++++++ .../tst_qdeclarativetextinput.cpp | 117 ++++++++++++++++++++- 3 files changed, 235 insertions(+), 1 deletion(-) diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 198bc04..c5232ad 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -447,6 +447,8 @@ void QLineControl::moveCursor(int pos, bool mark) void QLineControl::processInputMethodEvent(QInputMethodEvent *event) { int priorState = 0; + int originalSelectionStart = m_selstart; + int originalSelectionEnd = m_selend; bool isGettingInput = !event->commitString().isEmpty() || event->preeditString() != preeditAreaText() || event->replacementLength() > 0; @@ -525,6 +527,8 @@ void QLineControl::processInputMethodEvent(QInputMethodEvent *event) } m_textLayout.setAdditionalFormats(formats); updateDisplayText(/*force*/ true); + if (originalSelectionStart != m_selstart || originalSelectionEnd != m_selend) + emit selectionChanged(); if (cursorPositionChanged) emitCursorPositionChanged(); else if (m_preeditCursor != oldPreeditCursor) diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index fde0588..b6df308 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -154,6 +154,7 @@ private slots: void inputContextMouseHandler(); void inputMethodComposing(); void cursorRectangleSize(); + void deselect(); private: void simulateKey(QDeclarativeView *, int key, Qt::KeyboardModifiers modifiers = 0); @@ -2655,6 +2656,120 @@ void tst_qdeclarativetextedit::cursorRectangleSize() QCOMPARE(microFocusFromScene.size(), cursorRect.size()); QCOMPARE(microFocusFromApp.size(), cursorRect.size()); } + +void tst_qdeclarativetextedit::deselect() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/CursorRect.qml"); + QVERIFY(canvas->rootObject() != 0); + canvas->show(); + canvas->setFocus(); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + + QDeclarativeTextEdit *textEdit = qobject_cast(canvas->rootObject()); + QVERIFY(textEdit != 0); + + textEdit->setText("Select"); + + QSignalSpy selectionStartSpy(textEdit, SIGNAL(selectionStartChanged())); + QSignalSpy selectionEndSpy(textEdit, SIGNAL(selectionEndChanged())); + QSignalSpy selectionSpy(textEdit, SIGNAL(selectionChanged())); + + textEdit->select(5, 6); + + QCOMPARE(selectionStartSpy.count(), 1); + QCOMPARE(selectionEndSpy.count(), 1); + QCOMPARE(selectionSpy.count(), 1); + QCOMPARE(textEdit->selectionStart(), 5); + QCOMPARE(textEdit->selectionEnd(), 6); + QCOMPARE(textEdit->selectedText(), QLatin1String("t")); + QCOMPARE(textEdit->cursorPosition(), 6); + + textEdit->deselect(); + + QCOMPARE(selectionStartSpy.count(), 2); + QCOMPARE(selectionEndSpy.count(), 1); + QCOMPARE(selectionSpy.count(), 2); + QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectedText(), QLatin1String("")); + QCOMPARE(textEdit->cursorPosition(), 6); + + textEdit->select(5, 6); + + QCOMPARE(selectionStartSpy.count(), 3); + QCOMPARE(selectionEndSpy.count(), 1); + QCOMPARE(selectionSpy.count(), 3); + QCOMPARE(textEdit->selectionStart(), 5); + QCOMPARE(textEdit->selectionEnd(), 6); + QCOMPARE(textEdit->selectedText(), QLatin1String("t")); + QCOMPARE(textEdit->cursorPosition(), 6); + + QKeyEvent leftArrowPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier); + QKeyEvent leftArrowRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier); + QApplication::sendEvent(canvas, &leftArrowPress); + QApplication::sendEvent(canvas, &leftArrowRelese); + + QCOMPARE(selectionStartSpy.count(), 3); + QCOMPARE(selectionEndSpy.count(), 2); + QCOMPARE(selectionSpy.count(), 4); + QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectedText(), QLatin1String("")); + QCOMPARE(textEdit->cursorPosition(), 5); + + textEdit->select(5, 6); + + QCOMPARE(selectionStartSpy.count(), 3); + QCOMPARE(selectionEndSpy.count(), 3); + QCOMPARE(selectionSpy.count(), 5); + QCOMPARE(textEdit->selectionStart(), 5); + QCOMPARE(textEdit->selectionEnd(), 6); + QCOMPARE(textEdit->selectedText(), QLatin1String("t")); + QCOMPARE(textEdit->cursorPosition(), 6); + + QList attributes; + attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); + QInputMethodEvent event(QLatin1String(""), attributes); + QApplication::sendEvent(canvas, &event); + + QCOMPARE(selectionStartSpy.count(), 4); + QCOMPARE(selectionEndSpy.count(), 4); + QCOMPARE(selectionSpy.count(), 6); + QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectedText(), QLatin1String("")); + QCOMPARE(textEdit->cursorPosition(), 0); + + textEdit->setCursorPosition(1); + + QCOMPARE(selectionStartSpy.count(), 5); + QCOMPARE(selectionEndSpy.count(), 5); + QCOMPARE(selectionSpy.count(), 6); + + QKeyEvent leftArrowShiftPress(QEvent::KeyPress, Qt::Key_Left, Qt::ShiftModifier); + QKeyEvent leftArrowShiftRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::ShiftModifier); + QApplication::sendEvent(canvas, &leftArrowShiftPress); + QApplication::sendEvent(canvas, &leftArrowShiftRelese); + + QCOMPARE(selectionStartSpy.count(), 6); + QCOMPARE(selectionEndSpy.count(), 5); + QCOMPARE(selectionSpy.count(), 7); + QCOMPARE(textEdit->selectionStart(), 0); + QCOMPARE(textEdit->selectionEnd(), 1); + QCOMPARE(textEdit->selectedText(), QLatin1String("S")); + QCOMPARE(textEdit->cursorPosition(), 0); + + QApplication::sendEvent(canvas, &event); + + QCOMPARE(selectionStartSpy.count(), 6); + QCOMPARE(selectionEndSpy.count(), 6); + QCOMPARE(selectionSpy.count(), 8); + QCOMPARE(textEdit->selectionStart(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectionEnd(), textEdit->cursorPosition()); + QCOMPARE(textEdit->selectedText(), QLatin1String("")); + QCOMPARE(textEdit->cursorPosition(), 0); +} QTEST_MAIN(tst_qdeclarativetextedit) #include "tst_qdeclarativetextedit.moc" diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index bb895bf..b077670 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -147,6 +147,7 @@ private slots: void inputContextMouseHandler(); void inputMethodComposing(); void cursorRectangleSize(); + void deselect(); private: void simulateKey(QDeclarativeView *, int key); @@ -2367,7 +2368,7 @@ void tst_qdeclarativetextinput::openInputPanelOnFocus() QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled)); // input method should not be enabled - // if TextEdit is read only. + // if TextInput is read only. input.setReadOnly(true); ic.openInputPanelReceived = false; input.setFocus(true); @@ -2815,6 +2816,120 @@ void tst_qdeclarativetextinput::cursorRectangleSize() QCOMPARE(microFocusFromApp.size(), cursorRect.size()); } +void tst_qdeclarativetextinput::deselect() +{ + QDeclarativeView *canvas = createView(SRCDIR "/data/positionAt.qml"); + QVERIFY(canvas->rootObject() != 0); + canvas->show(); + canvas->setFocus(); + QApplication::setActiveWindow(canvas); + QTest::qWaitForWindowShown(canvas); + + QDeclarativeTextInput *textInput = qobject_cast(canvas->rootObject()); + QVERIFY(textInput != 0); + + textInput->setText("Select"); + + QSignalSpy selectionStartSpy(textInput, SIGNAL(selectionStartChanged())); + QSignalSpy selectionEndSpy(textInput, SIGNAL(selectionEndChanged())); + QSignalSpy selectedTextSpy(textInput, SIGNAL(selectedTextChanged())); + + textInput->select(5, 6); + + QCOMPARE(selectionStartSpy.count(), 1); + QCOMPARE(selectionEndSpy.count(), 0); + QCOMPARE(selectedTextSpy.count(), 1); + QCOMPARE(textInput->selectionStart(), 5); + QCOMPARE(textInput->selectionEnd(), 6); + QCOMPARE(textInput->selectedText(), QLatin1String("t")); + QCOMPARE(textInput->cursorPosition(), 6); + + textInput->deselect(); + + QCOMPARE(selectionStartSpy.count(), 2); + QCOMPARE(selectionEndSpy.count(), 1); + QCOMPARE(selectedTextSpy.count(), 2); + QCOMPARE(textInput->selectionStart(), textInput->cursorPosition()); + QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition()); + QCOMPARE(textInput->selectedText(), QLatin1String("")); + QCOMPARE(textInput->cursorPosition(), 6); + + textInput->select(5, 6); + + QCOMPARE(selectionStartSpy.count(), 3); + QCOMPARE(selectionEndSpy.count(), 1); + QCOMPARE(selectedTextSpy.count(), 3); + QCOMPARE(textInput->selectionStart(), 5); + QCOMPARE(textInput->selectionEnd(), 6); + QCOMPARE(textInput->selectedText(), QLatin1String("t")); + QCOMPARE(textInput->cursorPosition(), 6); + + QKeyEvent leftArrowPress(QEvent::KeyPress, Qt::Key_Left, Qt::NoModifier); + QKeyEvent leftArrowRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::NoModifier); + QApplication::sendEvent(canvas, &leftArrowPress); + QApplication::sendEvent(canvas, &leftArrowRelese); + + QCOMPARE(selectionStartSpy.count(), 4); + QCOMPARE(selectionEndSpy.count(), 2); + QCOMPARE(selectedTextSpy.count(), 4); + QCOMPARE(textInput->selectionStart(), textInput->cursorPosition()); + QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition()); + QCOMPARE(textInput->selectedText(), QLatin1String("")); + QCOMPARE(textInput->cursorPosition(), 5); + + textInput->select(5, 6); + + QCOMPARE(selectionStartSpy.count(), 4); + QCOMPARE(selectionEndSpy.count(), 3); + QCOMPARE(selectedTextSpy.count(), 5); + QCOMPARE(textInput->selectionStart(), 5); + QCOMPARE(textInput->selectionEnd(), 6); + QCOMPARE(textInput->selectedText(), QLatin1String("t")); + QCOMPARE(textInput->cursorPosition(), 6); + + QList attributes; + attributes << QInputMethodEvent::Attribute(QInputMethodEvent::Selection, 0, 0, QVariant()); + QInputMethodEvent event(QLatin1String(""), attributes); + QApplication::sendEvent(canvas, &event); + + QCOMPARE(selectionStartSpy.count(), 5); + QCOMPARE(selectionEndSpy.count(), 4); + QCOMPARE(selectedTextSpy.count(), 6); + QCOMPARE(textInput->selectionStart(), textInput->cursorPosition()); + QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition()); + QCOMPARE(textInput->selectedText(), QLatin1String("")); + QCOMPARE(textInput->cursorPosition(), 0); + + textInput->setCursorPosition(1); + + QCOMPARE(selectionStartSpy.count(), 6); + QCOMPARE(selectionEndSpy.count(), 5); + QCOMPARE(selectedTextSpy.count(), 6); + + QKeyEvent leftArrowShiftPress(QEvent::KeyPress, Qt::Key_Left, Qt::ShiftModifier); + QKeyEvent leftArrowShiftRelese(QEvent::KeyRelease, Qt::Key_Left, Qt::ShiftModifier); + QApplication::sendEvent(canvas, &leftArrowShiftPress); + QApplication::sendEvent(canvas, &leftArrowShiftRelese); + + QCOMPARE(selectionStartSpy.count(), 7); + QCOMPARE(selectionEndSpy.count(), 5); + QCOMPARE(selectedTextSpy.count(), 7); + QCOMPARE(textInput->selectionStart(), 0); + QCOMPARE(textInput->selectionEnd(), 1); + QCOMPARE(textInput->selectedText(), QLatin1String("S")); + QCOMPARE(textInput->cursorPosition(), 0); + + QApplication::sendEvent(canvas, &event); + + QCOMPARE(selectionStartSpy.count(), 8); + QCOMPARE(selectionEndSpy.count(), 6); + QCOMPARE(selectedTextSpy.count(), 8); + QCOMPARE(textInput->selectionStart(), textInput->cursorPosition()); + QCOMPARE(textInput->selectionEnd(), textInput->cursorPosition()); + QCOMPARE(textInput->selectedText(), QLatin1String("")); + QCOMPARE(textInput->cursorPosition(), 0); +} + QTEST_MAIN(tst_qdeclarativetextinput) #include "tst_qdeclarativetextinput.moc" -- cgit v0.12 From 055d68ce72a9cfbaffa5ac85314aff215e7a74c6 Mon Sep 17 00:00:00 2001 From: Aapo Haapanen Date: Thu, 22 Sep 2011 15:50:50 +0300 Subject: fix for QTBUG-18050: QXmlQuery crash --- src/xmlpatterns/api/qxmlquery.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp index e69fe50..4690a8d 100644 --- a/src/xmlpatterns/api/qxmlquery.cpp +++ b/src/xmlpatterns/api/qxmlquery.cpp @@ -988,7 +988,12 @@ bool setFocusHelper(QXmlQuery *const queryInstance, const QXmlItem focusItem(focusResult.next()); if(focusItem.isNull() || focusResult.hasError()) + { + /* The previous focus must be cleared in error situations. + * Otherwise the query may be left in an inconsistent state. */ + queryInstance->setFocus(QXmlItem()); return false; + } else { queryInstance->setFocus(focusItem); -- cgit v0.12 From 6f6493747121db428a71d494c8cb3f04a0292279 Mon Sep 17 00:00:00 2001 From: Viktor Kolesnyk Date: Mon, 5 Sep 2011 15:08:23 +0300 Subject: Incorrect 'break' in switch-case was replaced by 'return' --- src/gui/kernel/qcursor_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qcursor_win.cpp b/src/gui/kernel/qcursor_win.cpp index cef83f5..a68472c 100644 --- a/src/gui/kernel/qcursor_win.cpp +++ b/src/gui/kernel/qcursor_win.cpp @@ -477,7 +477,7 @@ void QCursorData::update() QPixmap pixmap = QApplicationPrivate::instance()->getPixmapCursor(cshape); hcurs = create32BitCursor(pixmap, hx, hy); } - break; + return; default: qWarning("QCursor::update: Invalid cursor shape %d", cshape); return; -- cgit v0.12 From 872872f3d3f0d89010d3a196b70e8445a08d0784 Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Fri, 23 Sep 2011 07:47:24 +0300 Subject: Fix to QtOpenGL crash Exiting the native video recorder on Symbian and going back to Qt app which runs on opengl graphics system crashed on some devices because there was not enough GPU memory and also because low GPU mem device environment detection was flawed. This patch fixes 32MB GPU memory detection and adds wait/retrial to EGL surface creation if it fails. Task-number: QTBUG-21499 Reviewed-by: Laszlo Agocs --- src/gui/egl/qegl.cpp | 32 ++++++++ src/gui/painting/qgraphicssystemex_symbian.cpp | 105 +++++++++++++++++++++---- 2 files changed, 123 insertions(+), 14 deletions(-) diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 4db4a6a..02adef8 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -684,6 +684,37 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglPr else props = 0; EGLSurface surf; +#ifdef Q_OS_SYMBIAN + // On Symbian there might be situations (especially on 32MB GPU devices) + // where Qt is trying to create EGL surface while some other application + // is still holding all available GPU memory but is about to release it + // soon. For an example when exiting native video recorder and going back to + // Qt application behind it. Video stack tear down takes some time and Qt + // app might be too quick in reserving its EGL surface and thus running out + // of GPU memory right away. So if EGL surface creation fails due to bad + // alloc, let's try recreating it four times within ~1 second if needed. + // This strategy gives some time for video recorder to tear down its stack + // and a chance to Qt for creating a valid surface. + int tries = 4; + while(tries--) { + if (devType == QInternal::Widget) + surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props); + else + surf = eglCreatePixmapSurface(QEgl::display(), cfg, pixmapDrawable, props); + if (surf == EGL_NO_SURFACE) { + EGLint error = eglGetError(); + if (error == EGL_BAD_ALLOC) { + if (tries) { + User::After(1000 * 250); // 250ms + continue; + } + } + qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", error); + } else { + break; + } + } +#else if (devType == QInternal::Widget) surf = eglCreateWindowSurface(QEgl::display(), cfg, windowDrawable, props); else @@ -691,6 +722,7 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig cfg, const QEglPr if (surf == EGL_NO_SURFACE) { qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); } +#endif return surf; } #endif diff --git a/src/gui/painting/qgraphicssystemex_symbian.cpp b/src/gui/painting/qgraphicssystemex_symbian.cpp index 4469704..46731d8 100644 --- a/src/gui/painting/qgraphicssystemex_symbian.cpp +++ b/src/gui/painting/qgraphicssystemex_symbian.cpp @@ -46,31 +46,106 @@ #include +#ifdef Q_SYMBIAN_SUPPORTS_SURFACES +#include "private/qegl_p.h" +#endif + QT_BEGIN_NAMESPACE static bool bcm2727Initialized = false; static bool bcm2727 = false; +typedef EGLBoolean (*NOK_resource_profiling)(EGLDisplay, EGLint, EGLint*, EGLint, EGLint*); +#define EGL_PROF_TOTAL_MEMORY_NOK 0x3070 + +// Detect if Qt is running on BCM2727 chip. +// BCM2727 is a special case on Symbian because +// it has only 32MB GPU memory which exposes +// significant limitations to hw accelerated UI. bool QSymbianGraphicsSystemEx::hasBCM2727() { if (bcm2727Initialized) return bcm2727; - const TUid KIvePropertyCat = {0x2726beef}; - enum TIvePropertyChipType { - EVCBCM2727B1 = 0x00000000, - EVCBCM2763A0 = 0x04000100, - EVCBCM2763B0 = 0x04000102, - EVCBCM2763C0 = 0x04000103, - EVCBCM2763C1 = 0x04000104, - EVCBCMUnknown = 0x7fffffff - }; - - TInt chipType = EVCBCMUnknown; - if (RProperty::Get(KIvePropertyCat, 0, chipType) == KErrNone) { - if (chipType == EVCBCM2727B1) +#ifdef Q_SYMBIAN_SUPPORTS_SURFACES + EGLDisplay display = QEgl::display(); +#if 1 + // Hacky but fast ~0ms. + const char* vendor = eglQueryString(display, EGL_VENDOR); + if (strstr(vendor, "Broadcom")) { + const TUid KIvePropertyCat = {0x2726beef}; + enum TIvePropertyChipType { + EVCBCM2727B1 = 0x00000000, + EVCBCM2763A0 = 0x04000100, + EVCBCM2763B0 = 0x04000102, + EVCBCM2763C0 = 0x04000103, + EVCBCM2763C1 = 0x04000104, + EVCBCMUnknown = 0x7fffffff + }; + + // Broadcom driver publishes KIvePropertyCat PS key on + // devices which are running on BCM2727 chip and post Anna Symbian. + TInt chipType = EVCBCMUnknown; + if (RProperty::Get(KIvePropertyCat, 0, chipType) == KErrNone) { + if (chipType == EVCBCM2727B1) + bcm2727 = true; + } else if (QSysInfo::symbianVersion() <= QSysInfo::SV_SF_3) { + // Device is running on Symbian Anna or older Symbian^3 in which + // KIvePropertyCat is not published. These ones are always 32MB devices. + bcm2727 = true; + } else { + // We have some other Broadcom chip on post Anna Symbian. + // Should have > 32MB GPU memory. + } + } +#else + // Fool proof but takes 15-20ms and we don't want this delay on app startup... + + // All devices with <= 32MB GPU memory should be + // dealed in similar manner to BCM2727 + // So let's query max GPU memory amount. + NOK_resource_profiling eglQueryProfilingData = (NOK_resource_profiling)eglGetProcAddress("eglQueryProfilingDataNOK"); + if (eglQueryProfilingData) { + EGLint dataCount; + eglQueryProfilingData(display, + EGL_PROF_QUERY_GLOBAL_BIT_NOK | + EGL_PROF_QUERY_MEMORY_USAGE_BIT_NOK, + NULL, + 0, + (EGLint*)&dataCount); + + // Allocate room for the profiling data + EGLint* profData = (EGLint*)malloc(dataCount * sizeof(EGLint)); + memset(profData,0,dataCount * sizeof(EGLint)); + + // Retrieve the profiling data + eglQueryProfilingData(display, + EGL_PROF_QUERY_GLOBAL_BIT_NOK | + EGL_PROF_QUERY_MEMORY_USAGE_BIT_NOK, + profData, + dataCount, + (EGLint*)&dataCount); + + int totalMemory; + EGLint i = 0; + while (profData && i < dataCount) { + switch (profData[i++]) { + case EGL_PROF_TOTAL_MEMORY_NOK: + totalMemory = profData[i++]; + break; + default: + i++; + } + } + + // ok, hasBCM2727() naming is a bit misleading but Qt must + // behave the same on all chips like BCM2727 (<= 32MB GPU memory) + // and our code (and others) are already using this function. + if (totalMemory <= 33554432) bcm2727 = true; } +#endif +#endif // Q_SYMBIAN_SUPPORTS_SURFACES bcm2727Initialized = true; @@ -80,7 +155,9 @@ bool QSymbianGraphicsSystemEx::hasBCM2727() void QSymbianGraphicsSystemEx::releaseCachedGpuResources() { // Do nothing here - // This is implemented in graphics system specific plugin + + // This virtual function should be implemented in graphics system specific + // plugin } void QSymbianGraphicsSystemEx::releaseAllGpuResources() -- cgit v0.12 From 4d07fc585b7cb8784deaf98afa432082f36fc981 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 23 Sep 2011 10:51:53 +0300 Subject: The cursor can get offscreen in splitscreen landscape mode When input context is making the translation, it doesn't check if the translation is happening to the correct direction (i.e. upwards or downwards). As a fix, check if the cursor is still visible after making the translation. If it isn't apply the translation to the other direction. Task-number: QTBUG-21543 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 9025221..b830d50 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -1277,7 +1277,11 @@ void QCoeFepInputContext::translateInputWidget() // Translation should happen row-by-row, but initially it needs to ensure that cursor is visible. const qreal translation = m_transformation.height() ? cursor.height() : (cursorRect.bottom() - vkbRect.top()); - const qreal dy = -(qMin(maxY, translation)); + qreal dy = -(qMin(maxY, translation)); + + // Correct the translation direction, if the cursor rect would be moved outside of application area. + if ((cursorRect.bottom() + dy) < 0) + dy *= -1; // Do not allow transform above screen top, nor beyond scenerect if (m_transformation.height() + dy > 0 || gv->sceneRect().bottom() + m_transformation.height() < 0) { -- cgit v0.12 From 44bf0486fcde32f9ec007e8ed2904114b0ad15fd Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Fri, 23 Sep 2011 12:34:34 +0300 Subject: Doc updates to Qt 4.8 platform notes documentation. --- doc/src/platforms/platform-notes.qdoc | 43 +++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 477f125..2cdfc37 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -685,9 +685,7 @@ \ingroup platform-specific \brief Information about the state of support for the Symbian platform. - As with any port, the maturity for Qt for Symbian has not yet reached the - same level as other established Qt ports. This page documents the current - notes for the Symbian port. + This page documents the current notes for the Symbian port. \section1 Source Compatibility @@ -698,18 +696,34 @@ \section1 Binary Compatibility - As with every supported platform, we will strive to maintain - application behavior and binary compatibility throughout the lifetime of - the Qt 4.x series. However, due to the fact that Symbian support is newly - added in 4.6.0, there is a slight possibility that minor corrections to the - application binary interface (ABI) might be required in 4.6.1, in order to - ensure compatibility going forward. Any such change will be clearly - documented in the release notes for 4.6.1. + As with every supported platform, Qt strives to maintain application + behavior and binary compatibility throughout the lifetime of the Qt 4.x + major version and on the Symbian devices that support Qt. Symbian support in + Qt SDK and Ovi Store were introduced with Qt 4.6. Each Qt release contains + bug fixes that might change the API behavior and thereby affect application + compatibility. + + In addition, Symbian devices have different input methods, such as different + keyboard styles or touch input, screen sizes, memory, and CPU and GPU + capabilities. Therefore, you must test applications on specific target + devices to ensure compatibility. In order to build applications that are + supported also on earlier devices, select the target in Qt SDK carefully. + Generally, an earlier target (such as S60 5th Edition) is supported on a + larger number of devices than a later target (such as Symbian Belle). \section1 Supported Devices - See the list of supported devices at - http://wiki.forum.nokia.com/index.php/Nokia_Smart_Installer_for_Symbian#Supported_Devices + \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian#Supported_Devices}{Nokia Smart Installer for Symbian} + documentation lists supported devices. + + + ###how to formulate this: + Qt 4.6 for Symbian is supported for S60 3rd Edition feature pack 1 devices + and onward via Smart Installer. Qt 4.7.3 is supported in S60 5th Edition + devices and onward. Symbian^3 devices have Qt 4.6 support pre-installed. + Symbian Anna has Qt 4.7.3 pre-installed and Symbian Belle has Qt 4.7.4 in + device firmware (ROM). + \section1 Supported Functionality @@ -736,9 +750,7 @@ \row \o QtSql \o The only driver supported is SQLite. \row \o QtMultimedia - \o Although the module itself is supported, no backend for Symbian - is currently available. However, there is a backend available - for Phonon. + \o For support details see \l {Multimedia and Phonon Support} section. \endtable \section1 Compiler Notes @@ -796,6 +808,7 @@ For more information see the documentation of the individual Qt classes. If a class does not mention Symbian capabilities, it requires none. + \target Multimedia and Phonon Support \section1 Multimedia and Phonon Support Qt provides a high-level API for multimedia functionality with -- cgit v0.12 From 6a8a3f7f8171bb56bc5ff5a5f503213180e6465f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simo=20F=C3=A4lt?= Date: Fri, 23 Sep 2011 14:56:23 +0300 Subject: Disabled activeqt/webbrowser example from mingw build. --- examples/activeqt/activeqt.pro | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro index 79d257a..ad41a47 100644 --- a/examples/activeqt/activeqt.pro +++ b/examples/activeqt/activeqt.pro @@ -12,6 +12,9 @@ contains(QT_CONFIG, opengl):SUBDIRS += opengl # For now only the contain examples with mingw, for the others you need # an IDL compiler win32-g++*|wince*:SUBDIRS = webbrowser +# Due to build problems, active qt was disabled from mingw build, +# so we have to remove the only one left +win32-g++*:SUBDIRS = # install target.path = $$[QT_INSTALL_EXAMPLES]/activeqt -- cgit v0.12 From 00a3147f66688b71069989bbac406a00f6e8cf83 Mon Sep 17 00:00:00 2001 From: Aapo Haapanen Date: Thu, 22 Sep 2011 15:50:50 +0300 Subject: Fix for QTBUG-18050: QXmlQuery crash If QXmlQuery has a previous focus and an invalid xml is given in setFocus, the old focus must be cleared. Otherwise the query may be left in an inconsistent state. Task-number: QTBUG-18050 Reviewed-by: Miikka Heikkinen --- src/xmlpatterns/api/qxmlquery.cpp | 5 +++++ tests/auto/qxmlquery/tst_qxmlquery.cpp | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/xmlpatterns/api/qxmlquery.cpp b/src/xmlpatterns/api/qxmlquery.cpp index e69fe50..e5e901d 100644 --- a/src/xmlpatterns/api/qxmlquery.cpp +++ b/src/xmlpatterns/api/qxmlquery.cpp @@ -988,7 +988,12 @@ bool setFocusHelper(QXmlQuery *const queryInstance, const QXmlItem focusItem(focusResult.next()); if(focusItem.isNull() || focusResult.hasError()) + { + /* The previous focus must be cleared in error situations. + * Otherwise the query may be left in an inconsistent state. */ + queryInstance->setFocus(QXmlItem()); return false; + } else { queryInstance->setFocus(focusItem); diff --git a/tests/auto/qxmlquery/tst_qxmlquery.cpp b/tests/auto/qxmlquery/tst_qxmlquery.cpp index e443720..51bb88e 100644 --- a/tests/auto/qxmlquery/tst_qxmlquery.cpp +++ b/tests/auto/qxmlquery/tst_qxmlquery.cpp @@ -167,6 +167,7 @@ private Q_SLOTS: void setFocusQString() const; void setFocusQStringFailure() const; void setFocusQStringSignature() const; + void setFocusQStringFailureAfterSucces() const; void recompilationWithEvaluateToResultFailing() const; void secondEvaluationWithEvaluateToResultFailing() const; void recompilationWithEvaluateToReceiver() const; @@ -1976,6 +1977,25 @@ void tst_QXmlQuery::setFocusQStringSignature() const static_cast(query.setFocus(QString())); } +void tst_QXmlQuery::setFocusQStringFailureAfterSucces() const +{ + /* Test for QTBUG-18050. First call setFocus with a valid string, + * and then with an invalid string. evaluateTo should not crash. */ + QXmlQuery query; + MessageSilencer silencer; + query.setMessageHandler(&silencer); + + QVERIFY(query.setFocus(QLatin1String("valid-input"))); + QVERIFY(!query.setFocus(QLatin1String("invalid-input"))); + + query.setQuery("/query"); + + QString output; + /* Last setFocus was with an invalid string, so evaluateTo should return + * false */ + QVERIFY(!query.evaluateTo(&output)); +} + void tst_QXmlQuery::setFocusQIODeviceTriggerWarnings() const { /* A null pointer. */ -- cgit v0.12 From caf77de1ea1c15ae4dbeb8ea1182ec6226db210d Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Fri, 23 Sep 2011 15:45:01 +0300 Subject: Doc updates to platform notes of Qt 4.8 doc. --- doc/src/platforms/platform-notes.qdoc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 2cdfc37..3134ae0 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -716,13 +716,19 @@ \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian#Supported_Devices}{Nokia Smart Installer for Symbian} documentation lists supported devices. + Qt versions are supported by Symbian devices as follows: + \list + \o Qt 4.6 is supported by S60 3rd Edition feature pack 1 and newer devices + through \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian}{Smart Installer}. + \o Qt 4.7.3 is supported by S60 5th Edition and newer devices. + \endlist - ###how to formulate this: - Qt 4.6 for Symbian is supported for S60 3rd Edition feature pack 1 devices - and onward via Smart Installer. Qt 4.7.3 is supported in S60 5th Edition - devices and onward. Symbian^3 devices have Qt 4.6 support pre-installed. - Symbian Anna has Qt 4.7.3 pre-installed and Symbian Belle has Qt 4.7.4 in - device firmware (ROM). + Symbian devices have a pre-installed Qt support as follows: + \list + \o Symbian^3: Qt 4.6 in C: drive. + \o Symbian Anna: Qt 4.7.3 in C: drive. + \o Symbian Belle: Qt 4.7.4 in device firmware (ROM). + \endlist \section1 Supported Functionality -- cgit v0.12 From a0e677ef0468fdf2d8f04e1b64312a3d9881be5f Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 23 Sep 2011 12:01:08 +0100 Subject: symbian - Document behaviour of QDir::rootPath / homePath The root path was intentionally changed to reflect the real drive root, while home path continues to reflect the user data directory. Task-Number: QTBUG-21527 Reviewed-By: Miikka Heikkinen --- src/corelib/io/qdir.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index 4ba8e06..48b9358 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1872,7 +1872,10 @@ QString QDir::currentPath() Under non-Windows operating systems the \c HOME environment variable is used if it exists, otherwise the path returned by the - rootPath(). On Symbian always the same as the path returned by the rootPath(). + rootPath(). + + On Symbian this typically returns "c:/data", + i.e. the same as native PathInfo::PhoneMemoryRootPath(). \sa home(), currentPath(), rootPath(), tempPath() */ @@ -1936,9 +1939,8 @@ QString QDir::tempPath() /*! Returns the absolute path of the root directory. - For Unix operating systems this returns "/". For Windows file - systems this normally returns "c:/". On Symbian this typically returns - "c:/data", i.e. the same as native PathInfo::PhoneMemoryRootPath(). + For Unix operating systems this returns "/". For Windows and Symbian file + systems this normally returns "c:/". I.E. the root of the system drive. \sa root(), drives(), currentPath(), homePath(), tempPath() */ -- cgit v0.12 From 930461946ce14051e56a3d7f49e2cd24742b8777 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 23 Sep 2011 15:53:59 +0100 Subject: Symbian - perform some FS initialisation previously done by open c When using Qt 4.6 and 4.7, the working directory is set to the same drive the application is installed on by the open c library. The default working directory in symbian is always the private directory on the system drive, but we told people to rely on the open c behaviour. Open C also creates the private path on both the system and installation drives when the application is started. This behaviour is also replicated now in Qt 4.8 for backward compatibility of apps that may rely on it. Similar code to create the private path on the installation drive in QCoreApplication::applicationDirPath() has been removed, as the new code in this patch is always executed first. Task-Number: QTBUG-21527 Reviewed-By: mread --- src/corelib/kernel/qcore_symbian_p.cpp | 19 +++++++++++++++++++ src/corelib/kernel/qcoreapplication.cpp | 6 ------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/corelib/kernel/qcore_symbian_p.cpp b/src/corelib/kernel/qcore_symbian_p.cpp index 04acfb0..57ae2af 100644 --- a/src/corelib/kernel/qcore_symbian_p.cpp +++ b/src/corelib/kernel/qcore_symbian_p.cpp @@ -45,6 +45,7 @@ #include "qcore_symbian_p.h" #include #include +#include "qdebug.h" QT_BEGIN_NAMESPACE @@ -115,6 +116,24 @@ public: QS60RFsSession() { qt_symbian_throwIfError(iFs.Connect()); qt_symbian_throwIfError(iFs.ShareProtected()); + //BC with 4.7: create private path on system drive + TInt sysdrive = iFs.GetSystemDrive(); + TInt err = iFs.CreatePrivatePath(sysdrive); + if (err != KErrNone && err != KErrAlreadyExists) + qWarning("Failed to create private path on system drive."); + //BC with 4.7: set working directory to same drive as application + TFileName pfn = RProcess().FileName(); + TInt drive; + if (pfn.Length() > 0 && iFs.CharToDrive(pfn[0], drive) == KErrNone) { + // for system drive or rom based apps, leave the path on system drive + if (drive != sysdrive && drive != EDriveZ) { + err = iFs.CreatePrivatePath(drive); + if (err == KErrNone || err == KErrAlreadyExists) + iFs.SetSessionToPrivate(drive); + else + qWarning("Failed to create private path on application drive."); + } + } } ~QS60RFsSession() { diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 752bbaa..c4a9e40 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -1991,12 +1991,6 @@ QString QCoreApplication::applicationDirPath() appPath = qt_TDesC2QString(privatePath); appPath.prepend(QLatin1Char(':')).prepend(qDriveChar); - // Create the appPath if it doesn't exist. Non-existing appPath will cause - // Platform Security violations later on if the app doesn't have AllFiles capability. - err = fs.CreatePrivatePath(drive); - if (err != KErrNone) - qWarning("QCoreApplication::applicationDirPath: Failed to create private path."); - d->cachedApplicationDirPath = QFileInfo(appPath).path(); } #else -- cgit v0.12 From 8d9e63130767858287331d7e19d732919d620607 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 26 Sep 2011 10:46:53 +0300 Subject: Fix plugin implicit loading when calling QPluginLoader::instance(). QPluginLoader::instance() didn't increase loading refcount if another QPluginLoader had already loaded the plugin. This meant that if the another QPluginLoader subsequently unloaded the plugin, the instance would be destroyed even if the second loader still wanted to use it. Also improved the tst_QPluginLoader::deleteinstanceOnUnload() test case to test more combinations of deletion order and explicit/implicit loading. Task-number: QT-5259 Reviewed-by: Sami Merila --- src/corelib/plugin/qpluginloader.cpp | 2 +- tests/auto/qpluginloader/tst_qpluginloader.cpp | 29 ++++++++++++++++++-------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp index bbb64e4..9f9ea1a 100644 --- a/src/corelib/plugin/qpluginloader.cpp +++ b/src/corelib/plugin/qpluginloader.cpp @@ -198,7 +198,7 @@ QPluginLoader::~QPluginLoader() */ QObject *QPluginLoader::instance() { - if (!isLoaded() && !load()) + if (!load()) return 0; if (!d->inst && d->instance) d->inst = d->instance(); diff --git a/tests/auto/qpluginloader/tst_qpluginloader.cpp b/tests/auto/qpluginloader/tst_qpluginloader.cpp index d2d92a5..152d1f4 100644 --- a/tests/auto/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/qpluginloader/tst_qpluginloader.cpp @@ -272,10 +272,10 @@ void tst_QPluginLoader::loadHints() void tst_QPluginLoader::deleteinstanceOnUnload() { - for (int pass = 0; pass < 2; ++pass) { + for (int pass = 0; pass < 4; ++pass) { QPluginLoader loader1; loader1.setFileName( sys_qualifiedLibraryName("theplugin")); //a plugin - if (pass == 0) + if (pass < 2) loader1.load(); // not recommended, instance() should do the job. PluginInterface *instance1 = qobject_cast(loader1.instance()); QVERIFY(instance1); @@ -283,21 +283,32 @@ void tst_QPluginLoader::deleteinstanceOnUnload() QPluginLoader loader2; loader2.setFileName( sys_qualifiedLibraryName("theplugin")); //a plugin - if (pass == 0) + if (pass < 2) loader2.load(); // not recommended, instance() should do the job. PluginInterface *instance2 = qobject_cast(loader2.instance()); QCOMPARE(instance2->pluginName(), QLatin1String("Plugin ok")); QSignalSpy spy1(loader1.instance(), SIGNAL(destroyed())); QSignalSpy spy2(loader2.instance(), SIGNAL(destroyed())); - if (pass == 0) { - QCOMPARE(loader2.unload(), false); // refcount not reached 0, not really unloaded - QCOMPARE(spy1.count(), 0); - QCOMPARE(spy2.count(), 0); - } + + // refcount not reached 0, not really unloaded + if (pass % 2) + QCOMPARE(loader1.unload(), false); + else + QCOMPARE(loader2.unload(), false); + + QCOMPARE(spy1.count(), 0); + QCOMPARE(spy2.count(), 0); + QCOMPARE(instance1->pluginName(), QLatin1String("Plugin ok")); QCOMPARE(instance2->pluginName(), QLatin1String("Plugin ok")); - QVERIFY(loader1.unload()); // refcount reached 0, did really unload + + // refcount reached 0, did really unload + if (pass % 2) + QVERIFY(loader2.unload()); + else + QVERIFY(loader1.unload()); + QCOMPARE(spy1.count(), 1); QCOMPARE(spy2.count(), 1); } -- cgit v0.12 From aa73a64e7997af3a029be32753c248a21e6961fb Mon Sep 17 00:00:00 2001 From: "Jarkko T. Toivonen" Date: Mon, 26 Sep 2011 12:51:48 +0300 Subject: Lower case as default in password entry in Symbian port. The text case "Abc" is removed from the permitted cases because passwords are rarely sentences but random characters. Task-number: QTBUG-10312 Reviewed-by: Shane Kearns --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 56338b2..87c4045 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -755,6 +755,9 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) } else if (hints & ImhNoAutoUppercase) { m_fepState->SetDefaultCase(EAknEditorLowerCase); m_fepState->SetCurrentCase(EAknEditorLowerCase); + } else if (hints & ImhHiddenText) { + m_fepState->SetDefaultCase(EAknEditorLowerCase); + m_fepState->SetCurrentCase(EAknEditorLowerCase); } else { m_fepState->SetDefaultCase(EAknEditorTextCase); m_fepState->SetCurrentCase(EAknEditorTextCase); @@ -766,6 +769,10 @@ void QCoeFepInputContext::applyHints(Qt::InputMethodHints hints) if (hints & ImhLowercaseOnly) { flags |= EAknEditorLowerCase; } + if (hints & ImhHiddenText) { + flags = EAknEditorAllCaseModes; + flags &= ~EAknEditorTextCase; + } if (flags == 0) { flags = EAknEditorAllCaseModes; if (hints & ImhNoAutoUppercase) { -- cgit v0.12 From 26341f6060434b6cbc08d98df34c2d2aee56a70c Mon Sep 17 00:00:00 2001 From: Juha Kukkonen Date: Mon, 26 Sep 2011 08:25:50 +0300 Subject: Fix QXmlQuery autotest failure. Changed XQuery functions fn:doc() and fn:doc-available() to work with URLs without scheme when accessing files. Task-number: QT-4962 Reviewed-by: Honglei Zhang --- src/xmlpatterns/functions/qsequencegeneratingfns.cpp | 20 ++++++++++++++++++-- .../qabstractxmlnodemodel/qabstractxmlnodemodel.pro | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp index 6215f3d..3f3dbbb 100644 --- a/src/xmlpatterns/functions/qsequencegeneratingfns.cpp +++ b/src/xmlpatterns/functions/qsequencegeneratingfns.cpp @@ -41,6 +41,7 @@ #include #include +#include #include "qanyuri_p.h" #include "qboolean_p.h" @@ -207,6 +208,21 @@ Item::Iterator::Ptr IdrefFN::evaluateSequence(const DynamicContext::Ptr &context return CommonValues::emptyIterator; /* TODO Haven't implemented further. */ } +/*! + * Attemps to resolve scheme if URL does not have scheme defined. + */ +static QUrl resolveScheme(const QUrl &url) +{ + // On Windows and Symbian the drive letter is detected as the scheme. + if (url.scheme().isEmpty() || (url.scheme().length() == 1)) { + QString filename = url.toString(); + QFileInfo file(filename); + if (file.exists()) + return QUrl::fromLocalFile(filename); + } + return url; +} + Item DocFN::evaluateSingleton(const DynamicContext::Ptr &context) const { const Item itemURI(m_operands.first()->evaluateSingleton(context)); @@ -219,7 +235,7 @@ Item DocFN::evaluateSingleton(const DynamicContext::Ptr &context) const * as part of a workaround for solaris-cc-64. DocFN::typeCheck() is in qsequencefns.cpp * as part of that workaround. */ const QUrl mayRela(AnyURI::toQUrl(itemURI.stringValue(), context, this)); - const QUrl uri(context->resolveURI(mayRela, staticBaseURI())); + const QUrl uri(resolveScheme(context->resolveURI(mayRela, staticBaseURI()))); Q_ASSERT(uri.isValid()); Q_ASSERT(!uri.isRelative()); @@ -251,7 +267,7 @@ bool DocAvailableFN::evaluateEBV(const DynamicContext::Ptr &context) const /* These two lines are duplicated in DocFN::evaluateSingleton(), as part * of a workaround for solaris-cc-64. */ const QUrl mayRela(AnyURI::toQUrl(itemURI.stringValue(), context, this)); - const QUrl uri(context->resolveURI(mayRela, staticBaseURI())); + const QUrl uri(resolveScheme(context->resolveURI(mayRela, staticBaseURI()))); Q_ASSERT(!uri.isRelative()); return context->resourceLoader()->isDocumentAvailable(uri); diff --git a/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro b/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro index b8f509d..90a99c0 100644 --- a/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro +++ b/tests/auto/qabstractxmlnodemodel/qabstractxmlnodemodel.pro @@ -6,7 +6,7 @@ HEADERS += TestNodeModel.h LoadingModel.h include (../xmlpatterns.pri) -wince*: { +wince*|symbian: { addFiles.files = tree.xml addFiles.path = . -- cgit v0.12 From e90cffc2c5f313cc813d0a21a1d9d0afe8d0ea7a Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Tue, 27 Sep 2011 08:17:25 +0300 Subject: Crash in QDeclarativeCompiler::indexOfProperty In QDeclarativePropertyCache, plain integer bitfield overrideIndex is initialized with -1 in class constructor. Unfortunately, ARM compiler treats bitfields as unsigned, unless explicitly defined as signed [1]. Therefore, overrideIndex actually gets initial value of 2147483647, which causes array operations done with the index to fail. As a fix, define overrideIndex as signed int bitfield. [1] http://www.keil.com/support/man/docs/armccref/armccref_Babjddhe.htm Under bitfields/Note: "A plain bitfield, declared without either signed or unsigned qualifiers, is treated as unsigned" Task-number: QT-5285 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativepropertycache_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h index 581f519..c648d25 100644 --- a/src/declarative/qml/qdeclarativepropertycache_p.h +++ b/src/declarative/qml/qdeclarativepropertycache_p.h @@ -111,7 +111,7 @@ public: int relatedIndex; // When IsFunction }; uint overrideIndexIsProperty : 1; - int overrideIndex : 31; + signed int overrideIndex : 31; int revision; int metaObjectOffset; -- cgit v0.12 From e5d7c375d45044cdee261c238e7ab6bd5ab7a0ac Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Tue, 27 Sep 2011 09:38:54 +0300 Subject: Doc updates to platform notes document. --- doc/src/platforms/platform-notes.qdoc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 3134ae0..60acb12 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -749,15 +749,30 @@ \endtable The following technologies have limited support: + \table \header \o Technology \o Note \row \o QtSql - \o The only driver supported is SQLite. + \o The supported drivers are SQLite and QSYMSQL. \row \o QtMultimedia \o For support details see \l {Multimedia and Phonon Support} section. \endtable + + It is not recommended to use the following Qt widgets: + \list + \o QFileDialog with the \c DontUseNativeDialog option + \o QColorDialog with the \c DontUseNativeDialog option + \o QFontDialog + \o QWizard + \o QCalendarWidget + \o QDateTimeEdit + \o QMdiArea + \o QMdiSubWindow + \o QDockWidget + \o QPrintPreviewWidget + \endlist \section1 Compiler Notes @@ -827,7 +842,7 @@ In this release the support is experimental. Video playback may show artifacts when the video is moved or resized (for instance during - orientation flips). This problem is present on Symbian^1 and earlier + orientation flips). This problem is present on S60 5th Edition and earlier versions, and on Symbian^3 systems. The audio and video formats that Phonon supports depends on what support -- cgit v0.12 From 24855ef3983fa5d87b3e3a06fe891a769e670ae5 Mon Sep 17 00:00:00 2001 From: Gareth Stockwell Date: Wed, 31 Aug 2011 15:52:25 +0100 Subject: Always recreate backing store when TLW transparency changes When using either the opengl or openvg graphics system on Symbian, if a TLW is made transparent, the widget switches to using raster rendering, because EGL surface transparency is currently not supported by the platform. This patch enables the reverse to occur: when the widget is subsequently made opaque, rendering switches back to using GL/VG. Task-number: QTBUG-21211 Reviewed-by: Jani Hautakangas Reviewed-by: Laszlo Agocs Reviewed-by: Sami Merila --- src/gui/kernel/qwidget.cpp | 24 ++++++++++++---- src/gui/kernel/qwidget_p.h | 1 + src/gui/kernel/qwidget_s60.cpp | 58 ++++++++++++++++++++++++-------------- tests/auto/qwidget/tst_qwidget.cpp | 45 ++++++++++++++++++++++++++++- 4 files changed, 101 insertions(+), 27 deletions(-) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 8e8266c..bda0885 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -2238,10 +2238,16 @@ void QWidgetPrivate::updateIsOpaque() #endif #ifdef Q_WS_S60 - if (q->windowType() == Qt::Dialog && q->testAttribute(Qt::WA_TranslucentBackground) - && S60->avkonComponentsSupportTransparency) { - setOpaque(false); - return; + if (q->testAttribute(Qt::WA_TranslucentBackground)) { + if (q->windowType() & Qt::Dialog || q->windowType() & Qt::Popup) { + if (S60->avkonComponentsSupportTransparency) { + setOpaque(false); + return; + } + } else { + setOpaque(false); + return; + } } #endif @@ -2261,11 +2267,16 @@ void QWidgetPrivate::updateIsOpaque() } if (q->isWindow() && !q->testAttribute(Qt::WA_NoSystemBackground)) { +#ifdef Q_WS_S60 + setOpaque(true); + return; +#else const QBrush &windowBrush = q->palette().brush(QPalette::Window); if (windowBrush.style() != Qt::NoBrush && windowBrush.isOpaque()) { setOpaque(true); return; } +#endif } setOpaque(false); } @@ -10845,11 +10856,14 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) } break; case Qt::WA_TranslucentBackground: +#if defined(Q_OS_SYMBIAN) + setAttribute(Qt::WA_NoSystemBackground, on); +#else if (on) { setAttribute(Qt::WA_NoSystemBackground); d->updateIsTranslucent(); } - +#endif break; case Qt::WA_AcceptTouchEvents: #if defined(Q_WS_WIN) || defined(Q_WS_MAC) || defined(Q_OS_SYMBIAN) diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index e30497c..caa6454 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -228,6 +228,7 @@ struct QTLWExtra { uint inExpose : 1; // Prevents drawing recursion uint nativeWindowTransparencyEnabled : 1; // Tracks native window transparency uint forcedToRaster : 1; + uint noSystemRotationDisabled : 1; #endif }; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index e80eced..e12dfa7 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -820,19 +820,12 @@ void QWidgetPrivate::setConstraints_sys() void QWidgetPrivate::s60UpdateIsOpaque() { Q_Q(QWidget); - if (!q->testAttribute(Qt::WA_WState_Created)) return; - const bool writeAlpha = extraData()->nativePaintMode == QWExtra::BlitWriteAlpha; - if (!q->testAttribute(Qt::WA_TranslucentBackground) && !writeAlpha) - return; const bool requireAlphaChannel = !isOpaque || writeAlpha; - createTLExtra(); - RWindow *const window = static_cast(q->effectiveWinId()->DrawableWindow()); - #ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces && !extra->topextra->forcedToRaster) { @@ -841,25 +834,47 @@ void QWidgetPrivate::s60UpdateIsOpaque() return; } #endif + const bool recreateBackingStore = extra->topextra->backingStore.data() && ( + QApplicationPrivate::graphics_system_name == QLatin1String("openvg") || + QApplicationPrivate::graphics_system_name == QLatin1String("opengl") + ); if (requireAlphaChannel) { - const TDisplayMode displayMode = static_cast(window->SetRequiredDisplayMode(EColor16MA)); - if (window->SetTransparencyAlphaChannel() == KErrNone) { + window->SetRequiredDisplayMode(EColor16MA); + if (window->SetTransparencyAlphaChannel() == KErrNone) window->SetBackgroundColor(TRgb(255, 255, 255, 0)); - extra->topextra->nativeWindowTransparencyEnabled = 1; - if (extra->topextra->backingStore.data() && ( - QApplicationPrivate::graphics_system_name == QLatin1String("openvg") - || QApplicationPrivate::graphics_system_name == QLatin1String("opengl"))) { - // Semi-transparent EGL surfaces aren't supported. We need to - // recreate backing store to get translucent surface (raster surface). - extra->topextra->backingStore.create(q); - extra->topextra->backingStore.registerWidget(q); - // FixNativeOrientation() will not work without an EGL surface. + } else { + if (recreateBackingStore) { + // Clear the UI surface to ensure that the EGL surface content is visible + CWsScreenDevice *screenDevice = S60->screenDevice(q); + QScopedPointer gc(new CWindowGc(screenDevice)); + const int err = gc->Construct(); + if (!err) { + gc->Activate(*window); + window->BeginRedraw(); + gc->SetDrawMode(CWindowGc::EDrawModeWriteAlpha); + gc->SetBrushColor(TRgb(0, 0, 0, 0)); + gc->Clear(TRect(0, 0, q->width(), q->height())); + window->EndRedraw(); + } + } + if (extra->topextra->nativeWindowTransparencyEnabled) + window->SetTransparentRegion(TRegionFix<1>()); + } + extra->topextra->nativeWindowTransparencyEnabled = requireAlphaChannel; + if (recreateBackingStore) { + extra->topextra->backingStore.create(q); + extra->topextra->backingStore.registerWidget(q); + bool noSystemRotationDisabled = false; + if (requireAlphaChannel) { + if (q->testAttribute(Qt::WA_SymbianNoSystemRotation)) { + // FixNativeOrientation() will not work without an EGL surface q->setAttribute(Qt::WA_SymbianNoSystemRotation, false); + noSystemRotationDisabled = true; } + } else { + q->setAttribute(Qt::WA_SymbianNoSystemRotation, extra->topextra->noSystemRotationDisabled); } - } else if (extra->topextra->nativeWindowTransparencyEnabled) { - window->SetTransparentRegion(TRegionFix<1>()); - extra->topextra->nativeWindowTransparencyEnabled = 0; + extra->topextra->noSystemRotationDisabled = noSystemRotationDisabled; } } @@ -1020,6 +1035,7 @@ void QWidgetPrivate::createTLSysExtra() extra->topextra->inExpose = 0; extra->topextra->nativeWindowTransparencyEnabled = 0; extra->topextra->forcedToRaster = 0; + extra->topextra->noSystemRotationDisabled = 0; } void QWidgetPrivate::deleteTLSysExtra() diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 43dd077..2161f99 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -397,6 +397,9 @@ private slots: void minimizedWindowModeTransitions(); void normalWindowModeTransitions(); void focusSwitchClosesPopupMenu(); +#if !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE) + void opacityChangeCausesBackingStoreRecreation(); +#endif #endif void focusProxyAndInputMethods(); @@ -10336,7 +10339,47 @@ void tst_QWidget::focusSwitchClosesPopupMenu() mainWindow.activateWindow(); QVERIFY(!CEikonEnv::Static()->AppUiFactory()->MenuBar()->IsDisplayed()); } -#endif + +#if !defined(Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE) +class OpacityChangeWidget : public QWidget +{ +public: + OpacityChangeWidget() : m_paintEngineType(QPaintEngine::MaxUser) { } + void paintEvent(QPaintEvent *) + { + QPainter painter(this); + m_paintEngineType = painter.paintEngine()->type(); + } + QPaintEngine::Type paintEngineType() const { return m_paintEngineType; } +private: + QPaintEngine::Type m_paintEngineType; +}; + +void tst_QWidget::opacityChangeCausesBackingStoreRecreation() +{ + OpacityChangeWidget w; + w.show(); + QTest::qWaitForWindowShown(&w); + const QPaintEngine::Type type = w.paintEngineType(); + if (QPaintEngine::OpenGL != type && QPaintEngine::OpenVG != type) { + QSKIP("Test case is only valid when using opengl or openvg graphics system", SkipAll); + } else { + if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces) { + QSKIP("Test case is only valid when EGL surface transparency is not supported", SkipAll); + } else { + // Making window transparent should force switch to raster graphics system + w.setAttribute(Qt::WA_TranslucentBackground, true); + w.repaint(); + QCOMPARE(w.paintEngineType(), QPaintEngine::Raster); + // Making window opaque should cause switch back to previous graphics system + w.setAttribute(Qt::WA_TranslucentBackground, false); + w.repaint(); + QCOMPARE(w.paintEngineType(), type); + } + } +} +#endif // !Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE +#endif // Q_OS_SYMBIAN class InputContextTester : public QInputContext { -- cgit v0.12 From 5d809703aa2d2a08ae7e9610fd42025b081d3d0c Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Tue, 27 Sep 2011 13:59:17 +0200 Subject: QNetworkRequest autotest: adapt to new cookie parsing (re. commas) Cookies cannot be separated by commas anymore, but are separated by new lines. See "Remove support for multiple cookies in one Set-Cookie header to follow RFC6265." Reviewed-by: Martin Petersson Task-number: QTBUG-21456 --- tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp index 9052716..02d1e5a 100644 --- a/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp +++ b/tests/auto/qnetworkrequest/tst_qnetworkrequest.cpp @@ -414,7 +414,7 @@ void tst_QNetworkRequest::rawHeaderParsing_data() QTest::newRow("SetCookie-3") << QNetworkRequest::SetCookieHeader << qVariantFromValue(QList() << cookie << cookie2) << true << "Set-Cookie" - << "a=b; path=/, c=d"; + << "a=b; path=/\nc=d"; } void tst_QNetworkRequest::rawHeaderParsing() -- cgit v0.12 From 99c2bdc8c3346e7b84d2d71ec4dca8fe0ed6688e Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Tue, 27 Sep 2011 15:11:36 +0300 Subject: Doc updates to Qt for Symbian installation instructions and platform notes. --- doc/src/getting-started/installation.qdoc | 58 ++++++++++++++++++++++--------- doc/src/platforms/platform-notes.qdoc | 5 ++- 2 files changed, 43 insertions(+), 20 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index 36d63f5..2936d60 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -510,7 +510,10 @@ in the \l{Qt for the Symbian platform Requirements} document. \section1 Step 1: Install Qt - Run \c{qt-symbian-opensource-%VERSION%.exe} and follow the instructions. + Download the \c {Qt libraries 4.x for Windows} package (for \c minGW or \c {VS 2008}) + from the \l {http://qt.nokia.com/downloads#qt-lib}{downloads} page. + + Run the downloaded package and follow the instructions. \note Qt must be installed on the same drive as the Symbian SDK you are using, and the install path must not contain any spaces. @@ -652,23 +655,39 @@ Binary Package} document. Congratulations, Qt is now ready to use. \section1 Step 7: Installing Qt Libraries on the Device + + To run a Qt application on a device, it must have Qt libraries installed. + + Symbian devices have a pre-installed Qt as follows: + \list + \o Symbian Anna devices have the pre-installed Qt, Qt Mobility, and Qt Webkit. + \o Symbian Belle and later devices have the pre-installed Qt on the device firmware. + \endlist + + \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian} + {Nokia Smart Installer for Symbian} deploys the required Qt libraries to supported S60 + and Symbian devices if the libraries are not pre-installed. + + Nokia Developer site's \l {http://www.developer.nokia.com/Devices/Device_specifications/?filter1=qt} + {Device specifications} provide information on which devices have a + pre-installed Qt and the used Qt version. + + To create your own Qt installation package, do as follows: + + \snippet doc/src/snippets/code/doc_src_installation.qdoc 29 + + The Qt libraries are built with "All -Tcb" capability, so they can support + all types of applications. If you don't have a suitable certificate, you can + patch the binaries in either of the following ways: + + \list + \o If you have no certificate, build a self-signed Qt: + \snippet doc/src/snippets/code/doc_src_installation.qdoc 34 - To run the demo on a real device, you first have to install - the Qt libraries on the device: - -\snippet doc/src/snippets/code/doc_src_installation.qdoc 29 - - The Qt libraries are built with "All -Tcb" capability, so that - they can support all types of application. - If you don't have a suitable certificate, it is possible to patch - the binaries as follows: - - If you have no certificate, build a self signed Qt: -\snippet doc/src/snippets/code/doc_src_installation.qdoc 34 - - If you have a symbian-signed developer certificate, specify the + \o If you have a symbian-signed developer certificate, specify the capabilities you can sign for, for example: -\snippet doc/src/snippets/code/doc_src_installation.qdoc 35 + \snippet doc/src/snippets/code/doc_src_installation.qdoc 35 + \endlist \section1 Running Qt demos @@ -1315,7 +1334,12 @@ We hope you will enjoy using Qt. \brief Setting up the Symbian platform environment for Qt. \previouspage General Qt Requirements - Qt for the Symbian platform requires the following software installed on your development PC: + \l {http://qt.nokia.com/downloads}{Qt SDK} provides all the necessary tools + and libraries for developing Qt applications. However, if you want to build + Qt itself for Symbian, follow the instructions below. + + Qt for the Symbian platform requires the following software installed on + your development PC: \list \o \l{http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/}{Carbide.c++ v2.3.0 or higher recommended}. \list diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc index 60acb12..e1e8c44 100644 --- a/doc/src/platforms/platform-notes.qdoc +++ b/doc/src/platforms/platform-notes.qdoc @@ -725,7 +725,6 @@ Symbian devices have a pre-installed Qt support as follows: \list - \o Symbian^3: Qt 4.6 in C: drive. \o Symbian Anna: Qt 4.7.3 in C: drive. \o Symbian Belle: Qt 4.7.4 in device firmware (ROM). \endlist @@ -856,7 +855,7 @@ \section1 Hardware Accelerated Rendering - The default graphics system on Symbian^3 is OpenVG, which uses OpenVG + The default graphics system on Symbian Anna is OpenVG, which uses OpenVG hardware to accelerate \l QPainter functions. There are a few exceptions, where Qt will use software rendering fallback. @@ -873,7 +872,7 @@ \section1 QtOpenGL Support in Symbian - Qt 4.7 introduces the \l {QtOpenGL} module to Symbian^3. QtOpenGL is + Qt 4.7 introduces the \l {QtOpenGL} module. QtOpenGL is supported on devices which support OpenGL ES 2.0. Symbian platforms prior to Symbian^3 are not supported. -- cgit v0.12 From 55d25e4471074241a4edf9b9c0033cce4e211bdf Mon Sep 17 00:00:00 2001 From: Eero Hyyti Date: Tue, 27 Sep 2011 16:09:42 +0300 Subject: Document updates to Qt for Symbian installation instructions and platform notes. --- doc/src/getting-started/installation.qdoc | 570 ++++++++++++++++-------------- doc/src/platforms/platform-notes.qdoc | 95 +++-- 2 files changed, 374 insertions(+), 291 deletions(-) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index ef010b4..bec9ee4 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -79,6 +79,8 @@ for your platform from the following list. \snippet doc/src/snippets/code/doc_src_installation.qdoc 1 Type \c{./configure -help} to get a list of all available options. + The \l{Configuration Options for Qt} page gives a brief overview + of these. To create the library and compile all the demos, examples, tools, and tutorials, type: @@ -218,7 +220,8 @@ for your platform from the following list. \snippet doc/src/snippets/code/doc_src_installation.qdoc 8 - Type \c{configure -help} to get a list of all available options. + Type \c{configure -help} to get a list of all available options. The + \l{Configuration Options for Qt} page gives a brief overview of these. If you have multiple compilers installed, and want to build the Qt library using a specific compiler, you must specify a \c qmake specification. @@ -433,7 +436,9 @@ in the \l{Qt for Windows CE Requirements} document. If you want to configure Qt for another platform or with other options, type \c{configure -help} to get a list of all available - options. See the \c README file for the list of supported platforms. + options. The \l{Configuration Options for Qt} page gives a brief + overview of these. See the \c README file for the list of supported + platforms. \section1 Step 4: Build Qt Library @@ -505,7 +510,10 @@ in the \l{Qt for the Symbian platform Requirements} document. \section1 Step 1: Install Qt - Run \c{qt-symbian-opensource-%VERSION%.exe} and follow the instructions. + Download the \c {Qt libraries 4.x for Windows} package (for \c minGW or \c {VS 2008}) + from the \l {http://qt.nokia.com/downloads#qt-lib}{downloads} page. + + Run the downloaded package and follow the instructions. \note Qt must be installed on the same drive as the Symbian SDK you are using, and the install path must not contain any spaces. @@ -626,6 +634,10 @@ Binary Package} document. \snippet doc/src/snippets/code/doc_src_installation.qdoc 31 (to build the tools using MinGW, and the libraries using SBSv2) + Type \c{./configure -help} to get a list of all available options. + The \l{Configuration Options for Qt} page gives a brief overview + of these. + SBSv2 (also known as \l{http://developer.symbian.org/wiki/index.php/Introduction_to_RAPTOR} {Raptor}) is a next-generation Symbian build system. SBSv2 is not officially supported by any of the S60 SDKs currently available from Forum Nokia. @@ -643,23 +655,39 @@ Binary Package} document. Congratulations, Qt is now ready to use. \section1 Step 7: Installing Qt Libraries on the Device - - To run the demo on a real device, you first have to install - the Qt libraries on the device: + + To run a Qt application on a device, it must have Qt libraries installed. + + Symbian devices have a pre-installed Qt as follows: + \list + \o Symbian Anna devices have the pre-installed Qt, Qt Mobility, and Qt Webkit. + \o Symbian Belle and later devices have the pre-installed Qt on the device firmware. + \endlist + + \l {http://www.developer.nokia.com/Community/Wiki/Nokia_Smart_Installer_for_Symbian} + {Nokia Smart Installer for Symbian} deploys the required Qt libraries to supported S60 + and Symbian devices if the libraries are not pre-installed. + + Nokia Developer site's \l {http://www.developer.nokia.com/Devices/Device_specifications/?filter1=qt} + {Device specifications} provide information on which devices have a + pre-installed Qt and the used Qt version. + + To create your own Qt installation package, do as follows: \snippet doc/src/snippets/code/doc_src_installation.qdoc 29 - The Qt libraries are built with "All -Tcb" capability, so that - they can support all types of application. - If you don't have a suitable certificate, it is possible to patch - the binaries as follows: - - If you have no certificate, build a self signed Qt: -\snippet doc/src/snippets/code/doc_src_installation.qdoc 34 + The Qt libraries are built with "All -Tcb" capability, so they can support + all types of applications. If you don't have a suitable certificate, you can + patch the binaries in either of the following ways: + + \list + \o If you have no certificate, build a self-signed Qt: + \snippet doc/src/snippets/code/doc_src_installation.qdoc 34 - If you have a symbian-signed developer certificate, specify the + \o If you have a symbian-signed developer certificate, specify the capabilities you can sign for, for example: -\snippet doc/src/snippets/code/doc_src_installation.qdoc 35 + \snippet doc/src/snippets/code/doc_src_installation.qdoc 35 + \endlist \section1 Running Qt demos @@ -740,6 +768,9 @@ to build the libraries using RVCT or to build the libraries using GCCE. +Type \c{./configure -help} to get a list of all available options. +The \l{Configuration Options for Qt} page gives a brief overview +of these. \section1 Step 5: Build Qt @@ -1303,7 +1334,12 @@ We hope you will enjoy using Qt. \brief Setting up the Symbian platform environment for Qt. \previouspage General Qt Requirements - Qt for the Symbian platform requires the following software installed on your development PC: + \l {http://qt.nokia.com/downloads}{Qt SDK} provides all the necessary tools + and libraries for developing Qt applications. However, if you want to build + Qt itself for Symbian, follow the instructions below. + + Qt for the Symbian platform requires the following software installed on + your development PC: \list \o \l{http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/}{Carbide.c++ v2.3.0 or higher recommended}. \list @@ -1368,253 +1404,263 @@ We hope you will enjoy using Qt. /*! \page configure-options.html - \title Configure options for Qt + \title Configuration Options for Qt \ingroup installation - \brief Brief description of available options building Qt. - - This page gives a brief description of the different options - available when building Qt using configure. To build Qt using - default options, just call configure from the command line like - showed below. If you would like to customize your build, please - use the options listed in the following tables. - - \c {.\configure.exe} - - \section2 Cross platform options: - - \table - \header \o Option \o Description \o Note - \row \o \c {-buildkey } \o Build the Qt library and plugins - using the specified \o - \row \o \c {} \o When the library loads plugins, it will only - load those that have a matching . \o - \row \o \c {-release } \o Compile and link Qt with debugging turned off. \o - \row \o \c {-debug } \o Compile and link Qt with debugging turned on. - \o Default value. - \row \o \c {-debug-and-release} \o Compile and link two Qt libraries, - with and without debugging turned on. \o This option denotes a default - value and needs to be evaluated. If the evaluation succeeds, the - feature is included. - \row \o \c {-opensource} \o Compile and link the Open-Source Edition - of Qt. \o - \row \o \c {-commercial } \o Compile and link the Commercial Edition - of Qt. \o - \row \o \c {-developer-build} \o Compile and link Qt with Qt developer - options including auto-tests exporting) \o - \row \o \c {-shared} \o Create and use shared Qt libraries. \o Default - value. - \row \o \c {-static} \o Create and use static Qt libraries. \o - \row \o \c {-ltcg} \o Use Link Time Code Generation. \o Apply to release - builds only. - \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Default - value. - \row \o \c {-no-fast} \o Configure Qt normally by generating Makefiles for - all project files. \o Default value. - \row \o \c {-fast} \o Configure Qt quickly by generating Makefiles only for - library and subdirectory targets. \o All other Makefiles are created as - wrappers which will in turn run qmake. - \row \o \c {-no-exceptions} \o Disable exceptions on platforms that support - it. \o - \row \o \c {-exceptions} \o Enable exceptions on platforms that support it. - \o Default value. - \row \o \c {-no-accessibility} \o Do not compile Windows Active - Accessibility support. \o - \row \o \c {-accessibility} \o Compile Windows Active Accessibility - support. \o Default value. - \row \o \c {-no-stl} \o Do not compile STL support. \o - \row \o \c {-stl} \o Compile STL support. \o Default value. - \row \o \c {-no-sql-} \o Disable SQL entirely, by default - none are turned on. \o - \row \o \c {-qt-sql-} \o Enable a SQL in the Qt Library. - \o - \row \o \c {-plugin-sql-} \o Enable SQL as a plugin to be - linked to at run time. \o Available values for : mysql, psql, - oci, odbc, tds, db2, sqlite, sqlite2, ibase. Drivers marked with a - '+' during configure have been detected as available on this system. - \row \o \c {-system-sqlite} \o Use sqlite from the operating system. \o - \row \o \c {-no-qt3support} \o Disables the Qt 3 support functionality. \o - \row \o \c {-no-opengl} \o Disables OpenGL functionality \o - \row \o \c {-opengl } \o Enable OpenGL support with specified API - version. \o Available values for : desktop - Enable support for - Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common - Profile, es2 - Enable support for OpenGL ES 2.0. - \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Default value. - \row \o \c {-openvg} \o Enables OpenVG functionality \o Requires EGL - support, typically supplied by an OpenGL or other graphics - implementation. - \row \o \c {-platform } \o The operating system and compiler you - are building on. \o The default value is %QMAKESPEC%. - \row \o \c {-xplatform } \o The operating system and compiler you - are cross compiling for. \o See the README file for a list of supported - operating systems and compilers. - \row \o \c {-qtnamespace } \o Wraps all Qt library code in - 'namespace name {..} \o - \row \o \c {-qtlibinfix } \o Renames all Qt* libs to Qt* - \o - \row \o \c {-D } \o Add an explicit define to the preprocessor. - \o - \row \o \c {-I } \o Add an explicit include path. \o - \row \o \c {-L } \o Add an explicit library path. \o - \row \o \c {-l } \o Add an explicit library name, residing - in a librarypath. \o - \row \o \c {-graphicssystem } \o Specify which graphics system should - be used. \o Available values for : * raster - Software rasterizer, - opengl - Using OpenGL acceleration, experimental!, openvg - Using - OpenVG acceleration, experimental! - \row \o \c {-help, -h, -?} \o Display this information. \o - \endtable - - \section2 Third Party Libraries: - \table - \header \o Option \o Description \o Note - \row \o \c {-qt-zlib} \o Use the zlib bundled with Qt. \o - \row \o \c {-system-zlib} \o Use zlib from the operating system. - \o See http://www.gzip.org/zlib - \row \o \c {-no-gif} \o Do not compile GIF reading support. - \o This option denotes a default value and needs to be evaluated. - If the evaluation succeeds, the feature is included. - \row \o \c {-qt-gif} \o Compile GIF reading support. \o See also - src/gui/image/qgifhandler_p.h - \row \o \c {-no-libpng} \o Do not compile PNG support. \o - \row \o \c {-qt-libpng} \o Use the libpng bundled with Qt. - \o This option denotes a default value and needs to be evaluated. - If the evaluation succeeds, the feature is included. - \row \o \c {-system-libpng} \o Use libpng from the operating system. - \o See http://www.libpng.org/pub/png - \row \o \c {-no-libmng} \o Do not compile MNG support. \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-qt-libmng} \o Use the libmng bundled with Qt. \o - \row \o \c {-system-libmng} \o Use libmng from the operating system. - \o See http://www.libmng.com - \row \o \c {-no-libtiff} \o Do not compile TIFF support. \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-qt-libtiff} \o Use the libtiff bundled with Qt. \o - \row \o \c {-system-libtiff} \o Use libtiff from the operating system. - \o See http://www.libtiff.org - \row \o \c {-no-libjpeg} \o Do not compile JPEG support. \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-qt-libjpeg} \o Use the libjpeg bundled with Qt. \o - \row \o \c {-system-libjpeg} \o Use libjpeg from the operating system. - \o See http://www.ijg.org. This option denotes a default value and - needs to be evaluated. If the evaluation succeeds, the feature is - included. - \endtable - - \section2 Qt for Windows only: - \table - \header \o Option \o Description \o Note - \row \o \c {-no-dsp} \o Do not generate VC++ .dsp files. \o - \row \o \c {-dsp} \o Generate VC++ .dsp files, only if spec "win32-msvc". - \o Default value. - \row \o \c {-no-vcproj} \o Do not generate VC++ .vcproj files. \o - \row \o \c {-vcproj} \o Generate VC++ .vcproj files, only if platform - "win32-msvc.net". \o Default value. - \row \o \c {-no-incredibuild-xge} \o Do not add IncrediBuild XGE distribution - commands to custom build steps. \o - \row \o \c {-incredibuild-xge} \o Add IncrediBuild XGE distribution commands - to custom build steps. This will distribute MOC and UIC steps, and other - custom buildsteps which are added to the INCREDIBUILD_XGE variable. - \o The IncrediBuild distribution commands are only added to Visual Studio - projects. This option denotes a default value and needs to be evaluated. - If the evaluation succeeds, the feature is included. - \row \o \c {-no-plugin-manifests} \o Do not embed manifests in plugins. \o - \row \o \c {-plugin-manifests} \o Embed manifests in plugins. - \o Default value. - \row \o \c {-no-qmake} \o Do not compile qmake. \o - \row \o \c {-qmake} \o Compile qmake. \o Default value - \row \o \c {-dont-process} \o Do not generate Makefiles/Project files. This - will override -no-fast if specified. \o - \row \o \c {-process} \o Generate Makefiles/Project files. \o Default value. - \row \o \c {-no-rtti} \o Do not compile runtime type information. \o - \row \o \c {-rtti} \o Compile runtime type information. \o Default value. - \row \o \c {-no-mmx} \o Do not compile with use of MMX instructions \o - \row \o \c {-mmx} \o Compile with use of MMX instructions \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-no-3dnow} \o Do not compile with use of 3DNOW instructions \o - \row \o \c {-3dnow} \o Compile with use of 3DNOW instructions \o This - option denotes a default value and needs to be evaluated. If the - evaluation succeeds, the feature is included. - \row \o \c {-no-sse} \o Do not compile with use of SSE instructions \o - \row \o \c {-sse} \o Compile with use of SSE instructions \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-no-sse2} \o Do not compile with use of SSE2 instructions \o - \row \o \c {-sse2} \o Compile with use of SSE2 instructions \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-no-openssl} \o Do not compile in OpenSSL support \o - \row \o \c {-openssl} \o Compile in run-time OpenSSL support \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-openssl-linked} \o Compile in linked OpenSSL support \o - \row \o \c {-no-dbus} \o Do not compile in D-Bus support \o - \row \o \c {-dbus} \o Compile in D-Bus support and load libdbus-1 dynamically. - \o This option denotes a default value and needs to be evaluated. - If the evaluation succeeds, the feature is included. - \row \o \c {-dbus-linked} \o Compile in D-Bus support and link to - libdbus-1 \o - \row \o \c {-no-phonon} \o Do not compile in the Phonon module \o - \row \o \c {-phonon} \o Compile the Phonon module. \o Phonon is built if a - decent C++ compiler is used. This option denotes a default value and needs - to be evaluated. If the evaluation succeeds, the feature is included. - \row \o \c {-no-phonon-backend} \o Do not compile the platform-specific - Phonon backend-plugin \o - \row \o \c {-phonon-backend} \o Compile in the platform-specific Phonon - backend-plugin \o Default value. - \row \o \c {-no-multimedia} \o Do not compile the multimedia module \o - \row \o \c {-multimedia} \o Compile in multimedia module \o Default value. - \row \o \c {-no-audio-backend} \o Do not compile in the platform audio - backend into QtMultimedia \o - \row \o \c {-audio-backend} \o Compile in the platform audio backend into - QtMultimedia \o This option denotes a default value and needs to be - evaluated. If the evaluation succeeds, the feature is included. - \row \o \c {-no-webkit} \o Do not compile in the WebKit module \o - \row \o \c {-webkit} \o Compile in the WebKit module \o WebKit is built - if a decent C++ compiler is used. This option denotes a default value - and needs to be evaluated. If the evaluation succeeds, the feature is - included. - \row \o \c {-webkit-debug} \o Compile in the WebKit module with debug - symbols. \o - \row \o \c {-no-script} \o Do not build the QtScript module. \o - \row \o \c {-script} \o Build the QtScript module. \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-no-scripttools} \o Do not build the QtScriptTools module. \o - \row \o \c {-scripttools} \o Build the QtScriptTools module. \o This - option denotes a default value and needs to be evaluated. If the - evaluation succeeds, the feature is included. - \row \o \c {-no-declarative} \o Do not build the declarative module \o - \row \o \c {-declarative} \o Build the declarative module \o This option - denotes a default value and needs to be evaluated. If the evaluation - succeeds, the feature is included. - \row \o \c {-no-declarative-debug} \o Do not build the declarative debugging - support \o - \row \o \c {-declarative-debug} \o Build the declarative debugging support - \o Default value. - \row \o \c {-arch } \o Specify an architecture. \o Available values for - : * windows, windowsce, symbian, boundschecker, generic. - \row \o \c {-no-style-