diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-19 02:06:21 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-19 02:06:21 (GMT) |
commit | fb6775d423f1ebe7e624951edf39d79ca0433d4a (patch) | |
tree | 4b5b93d3c2d835b268ce16f2fe9a91e4b89ecfde /doc/src/snippets/qstring | |
parent | 9c7c859647771d5d2fa466b0a3ff9d408edecd38 (diff) | |
parent | f9f08de9d41fd55d9c7d01578191ef5d4099c9e6 (diff) | |
download | Qt-fb6775d423f1ebe7e624951edf39d79ca0433d4a.zip Qt-fb6775d423f1ebe7e624951edf39d79ca0433d4a.tar.gz Qt-fb6775d423f1ebe7e624951edf39d79ca0433d4a.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts:
configure.exe
tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'doc/src/snippets/qstring')
-rw-r--r-- | doc/src/snippets/qstring/main.cpp | 4 | ||||
-rw-r--r-- | doc/src/snippets/qstring/stringbuilder.cpp | 28 |
2 files changed, 30 insertions, 2 deletions
diff --git a/doc/src/snippets/qstring/main.cpp b/doc/src/snippets/qstring/main.cpp index 150044b..067c2ef 100644 --- a/doc/src/snippets/qstring/main.cpp +++ b/doc/src/snippets/qstring/main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). -** Contact: Qt Software Information (qt-info@nokia.com) +** Contact: Nokia Corporation (qt-info@nokia.com) ** ** This file is part of the documentation of the Qt Toolkit. ** @@ -34,7 +34,7 @@ ** met: http://www.gnu.org/copyleft/gpl.html. ** ** If you are unsure which license is appropriate for your use, please -** contact the sales department at qt-sales@nokia.com. +** contact the sales department at http://www.qtsoftware.com/contact. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/doc/src/snippets/qstring/stringbuilder.cpp b/doc/src/snippets/qstring/stringbuilder.cpp new file mode 100644 index 0000000..90803e2 --- /dev/null +++ b/doc/src/snippets/qstring/stringbuilder.cpp @@ -0,0 +1,28 @@ + +//! [0] + QString foo; + QString type = "long"; + + foo->setText(QLatin1String("vector<") + type + QLatin1String(">::iterator")); + + if (foo.startsWith("(" + type + ") 0x")) + ... +//! [0] + +//! [3] + #define QT_USE_FAST_CONCATENATION +//! [3] + +//! [4] + #define QT_USE_FAST_CONCATENATION + #define QT_USE_FAST_OPERATOR_PLUS +//! [4] + +//! [5] + #include <QStringBuilder> + + QString hello("hello"); + QStringRef el(&hello, 2, 3); + QLatin1String world("world"); + QString message = hello % el % world % QChar('!'); +//! [5] |