diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-09-29 04:09:01 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-09-29 04:09:01 (GMT) |
commit | 575ad2c60482b279f828cfa87186b5fbb10f76c6 (patch) | |
tree | 101df52cd4b769dc8d10ef60714f25d819636e70 /doc/src/snippets | |
parent | a913e326409062bbc1cad4d5898181c7b81cba23 (diff) | |
parent | 638f46a96b68d21137c4903c68015752ebdf58dc (diff) | |
download | Qt-575ad2c60482b279f828cfa87186b5fbb10f76c6.zip Qt-575ad2c60482b279f828cfa87186b5fbb10f76c6.tar.gz Qt-575ad2c60482b279f828cfa87186b5fbb10f76c6.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts:
configure.exe
mkspecs/features/qt.prf
Diffstat (limited to 'doc/src/snippets')
-rw-r--r-- | doc/src/snippets/audio/main.cpp | 3 | ||||
-rw-r--r-- | doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc | 78 | ||||
-rw-r--r-- | doc/src/snippets/code/src_corelib_global_qglobal.cpp | 3 | ||||
-rw-r--r-- | doc/src/snippets/code/src_qtestlib_qtestcase.cpp | 6 | ||||
-rw-r--r-- | doc/src/snippets/statemachine/eventtest.cpp | 2 | ||||
-rw-r--r-- | doc/src/snippets/widgets-tutorial/template.cpp | 2 |
6 files changed, 15 insertions, 79 deletions
diff --git a/doc/src/snippets/audio/main.cpp b/doc/src/snippets/audio/main.cpp index e663115..0910865 100644 --- a/doc/src/snippets/audio/main.cpp +++ b/doc/src/snippets/audio/main.cpp @@ -98,8 +98,7 @@ private: //![2] format.setSampleType(QAudioFormat::SignedInt); - QAudioDeviceId id = QAudioDeviceInfo::defaultOutputDevice(); - QAudioDeviceInfo info(id); + QAudioDeviceInfo info(QAudioDeviceInfo::defaultOutputDevice()); if (!info.isFormatSupported(format)) format = info.nearestFormat(format); diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc index 7f4c89b..2d5babb 100644 --- a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc +++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc @@ -248,8 +248,8 @@ declare variable $insertion := "example"; declare default element namespace "http://cookbook/namespace"; let $docURI := 'cookbook.xml' return if(doc-available($docURI)) - then doc($docURI)//recipe/<resept>{./node()}</resept> - else <resept>Failed to load {$docURI}</resept> + then doc($docURI)//recipe/<oppskrift>{./node()}</oppskrift> + else <oppskrift>Failed to load {$docURI}</oppskrift> //! [40] //! [41] @@ -312,79 +312,5 @@ for $a in doc('doc.txt')//p <p>f0</p> //! [49] -//! [100] -<?xml version="1.0" encoding="UTF-8"?> -<cookbook> - <recipe xml:id="MushroomSoup"> - <title>Quick and Easy Mushroom Soup</title> - <ingredient name="Fresh mushrooms" - quantity="7" - unit="pieces"/> - <ingredient name="Garlic" - quantity="1" - unit="cloves"/> - <ingredient name="Olive oil" - quantity="2" - unit="tablespoons"/> - <ingredient name="Milk" - quantity="200" - unit="milliliters"/> - <ingredient name="Water" - quantity="200" - unit="milliliters"/> - <ingredient name="Cream" - quantity="100" - unit="milliliters"/> - <ingredient name="Vegetable soup cube" - quantity="1/2" - unit="cubes"/> - <ingredient name="Ground black pepper" - quantity="1/2" - unit="teaspoons"/> - <ingredient name="Dried parsley" - quantity="1" - unit="teaspoons"/> - <time quantity="20" - unit="minutes"/> - <method> - <step>1. Slice mushrooms and garlic.</step> - <step>2. Fry mushroom slices and garlic with olive oil.</step> - <step>3. Once mushrooms are cooked, add milk, cream water. Stir.</step> - <step>4. Add vegetable soup cube.</step> - <step>5. Reduce heat, add pepper and parsley.</step> - <step>6. Turn off the stove before the mixture boils.</step> - <step>7. Blend the mixture.</step> - </method> - </recipe> - <recipe xml:id="CheeseOnToast"> - <title>Cheese on Toast</title> - <ingredient name="Bread" - quantity="2" - unit="slices"/> - <ingredient name="Cheese" - quantity="2" - unit="slices"/> - <time quantity="3" - unit="minutes"/> - <method> - <step>1. Slice the bread and cheese.</step> - <step>2. Grill one side of each slice of bread.</step> - <step>3. Turn over the bread and place a slice of cheese on each piece.</step> - <step>4. Grill until the cheese has started to melt.</step> - <step>5. Serve and enjoy!</step> - </method> - </recipe> - <recipe xml:id="HardBoiledEggs"> - <title>Hard-Boiled Eggs</title> - <ingredient name="Eggs" - quantity="3" - unit="eggs"/> - <time quantity="3" - unit="minutes"/> - <method/> - </recipe> -</cookbook> -//! [100] - } diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp index 3c61281..16b1073 100644 --- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp +++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp @@ -529,3 +529,6 @@ class MyClass : public QObject qFuzzyCompare(1 + 0.0, 1 + 1.0e-200); // This will return true //! [46] +//! [47] +CApaApplication *myApplicationFactory(); +//! [47] diff --git a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp index bf2a897..951dfbb 100644 --- a/doc/src/snippets/code/src_qtestlib_qtestcase.cpp +++ b/doc/src/snippets/code/src_qtestlib_qtestcase.cpp @@ -225,5 +225,11 @@ void MyTestClass::cleanup() QTest::qSleep(250); //! [23] +//! [24] +QWidget widget; +widget.show(); +QTest::qWaitForWindowShown(&widget); +//! [24] + } diff --git a/doc/src/snippets/statemachine/eventtest.cpp b/doc/src/snippets/statemachine/eventtest.cpp index b6397ba..817dbfc 100644 --- a/doc/src/snippets/statemachine/eventtest.cpp +++ b/doc/src/snippets/statemachine/eventtest.cpp @@ -52,7 +52,7 @@ protected: bool eventTest(QEvent *event) { if (event->type() == QEvent::Wrapped) { - QEvent *wrappedEvent = static_cast<QWrappedEvent *>(event)->event(); + QEvent *wrappedEvent = static_cast<QStateMachine::WrappedEvent *>(event)->event(); if (wrappedEvent->type() == QEvent::KeyPress) { QKeyEvent *keyEvent = static_cast<QKeyEvent *>(wrappedEvent); // Do your event test diff --git a/doc/src/snippets/widgets-tutorial/template.cpp b/doc/src/snippets/widgets-tutorial/template.cpp index 19902cc..2ced971 100644 --- a/doc/src/snippets/widgets-tutorial/template.cpp +++ b/doc/src/snippets/widgets-tutorial/template.cpp @@ -39,6 +39,7 @@ ** ****************************************************************************/ +//! [main.cpp body] #include <QtGui> // Include header files for application components. @@ -53,3 +54,4 @@ int main(int argc, char *argv[]) return app.exec(); } +//! [main.cpp body] |