summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-03-31 15:54:58 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-03-31 15:54:58 +0200
commit37feac98c573a099502fddfb5703c2359711b4c4 (patch)
tree33d74f9650065de4564bc0d749ca50bd65b13a2c /src
parent7b18baf23b1e8c663872b2b25b1323798b1d09df (diff)
parentb764d3e6cb114988394e7500236ba087a3385a50 (diff)
downloadqt4-tools-37feac98c573a099502fddfb5703c2359711b4c4.tar.gz
Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7
Conflicts: doc/src/declarative/example-slideswitch.qdoc doc/src/development/qmake-manual.qdoc doc/src/snippets/code/doc_src_qmake-manual.pro doc/src/snippets/code/doc_src_qtscript.qdoc src/corelib/animation/qabstractanimation.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def src/s60installs/eabi/QtOpenVGu.def tests/auto/qdir/qdir.pro tests/auto/qsslsocket/tst_qsslsocket.cpp tools/qdoc3/doc/qdoc-manual.qdocconf
Diffstat (limited to 'src')
-rw-r--r--src/corelib/animation/qabstractanimation.cpp6
-rw-r--r--src/corelib/animation/qabstractanimation_p.h1
-rw-r--r--src/corelib/concurrent/qfutureinterface.cpp2
-rw-r--r--src/corelib/global/global.pri5
-rw-r--r--src/corelib/global/qglobal.cpp116
-rw-r--r--src/corelib/global/qglobal.h10
-rw-r--r--src/corelib/global/qnamespace.qdoc92
-rw-r--r--src/corelib/io/qiodevice.cpp9
-rw-r--r--src/corelib/io/qresource.cpp6
-rw-r--r--src/corelib/kernel/qtranslator.cpp13
-rw-r--r--src/corelib/plugin/qplugin.qdoc8
-rw-r--r--src/corelib/statemachine/qhistorystate.cpp3
-rw-r--r--src/corelib/tools/qalgorithms.qdoc52
-rw-r--r--src/corelib/tools/qbytearray.cpp2
-rw-r--r--src/corelib/tools/qcache.qdoc6
-rw-r--r--src/corelib/tools/qiterator.qdoc80
-rw-r--r--src/corelib/tools/qmap.cpp2
-rw-r--r--src/corelib/tools/qpair.qdoc6
-rw-r--r--src/corelib/tools/qset.qdoc30
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp30
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc8
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp14
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp3
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp46
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp17
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp174
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp6
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp2
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp6
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp13
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp12
-rw-r--r--src/declarative/util/qdeclarativespringanimation.cpp20
-rw-r--r--src/declarative/util/qdeclarativestate.cpp4
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp6
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp22
-rw-r--r--src/declarative/util/qdeclarativeview.cpp12
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp18
-rw-r--r--src/gui/dialogs/qmessagebox.cpp48
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp20
-rw-r--r--src/gui/image/qicon.cpp13
-rw-r--r--src/gui/image/qimage.cpp4
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp5
-rw-r--r--src/gui/inputmethod/qinputcontext.cpp7
-rw-r--r--src/gui/itemviews/qheaderview.cpp8
-rw-r--r--src/gui/itemviews/qlistwidget.cpp7
-rw-r--r--src/gui/itemviews/qtreewidget.cpp6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp68
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp8
-rw-r--r--src/gui/kernel/qt_s60_p.h25
-rw-r--r--src/gui/kernel/qwidget.cpp4
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp52
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp2
-rw-r--r--src/gui/painting/qpainterpath.cpp16
-rw-r--r--src/gui/styles/qs60style.cpp80
-rw-r--r--src/gui/styles/qs60style_p.h2
-rw-r--r--src/gui/styles/qs60style_s60.cpp18
-rw-r--r--src/gui/styles/qs60style_simulated.cpp5
-rw-r--r--src/gui/text/qtextcontrol.cpp2
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/gui/widgets/qabstractslider.cpp2
-rw-r--r--src/gui/widgets/qcombobox.cpp10
-rw-r--r--src/gui/widgets/qmenu.cpp36
-rw-r--r--src/gui/widgets/qscrollbar.cpp2
-rw-r--r--src/gui/widgets/qsplitter.cpp2
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp2
-rw-r--r--src/network/access/qftp.cpp4
-rw-r--r--src/network/ssl/qsslcertificate.cpp34
-rw-r--r--src/network/ssl/qsslcertificate_p.h1
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp7
-rw-r--r--src/opengl/qgl.cpp2
-rw-r--r--src/opengl/qgl_symbian.cpp44
-rw-r--r--src/opengl/qglpaintdevice.cpp2
-rw-r--r--src/opengl/qpixmapdata_gl_p.h10
-rw-r--r--src/opengl/qpixmapdata_poolgl.cpp21
-rw-r--r--src/openvg/qpixmapdata_vg.cpp7
-rw-r--r--src/openvg/qpixmapdata_vg_p.h2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp5
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp2
-rw-r--r--src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp12
-rw-r--r--src/qt3support/tools/q3asciidict.qdoc6
-rw-r--r--src/qt3support/tools/q3dict.qdoc4
-rw-r--r--src/qt3support/tools/q3intdict.qdoc6
-rw-r--r--src/qt3support/tools/q3memarray.qdoc8
-rw-r--r--src/qt3support/tools/q3ptrdict.qdoc6
-rw-r--r--src/qt3support/tools/q3ptrlist.qdoc10
-rw-r--r--src/qt3support/tools/q3valuelist.qdoc10
-rw-r--r--src/qt3support/tools/q3valuestack.qdoc2
-rw-r--r--src/qt3support/tools/q3valuevector.qdoc10
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def3
-rw-r--r--src/s60installs/s60installs.pro2
-rw-r--r--src/testlib/qsignalspy.qdoc10
-rw-r--r--src/testlib/qtestevent.qdoc2
101 files changed, 895 insertions, 690 deletions
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 2d5cfabe2f..f20bbf4628 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -206,6 +206,10 @@ void QUnifiedTimer::ensureTimerUpdate()
void QUnifiedTimer::updateAnimationsTime()
{
+ //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations
+ if(insideTick)
+ return;
+
qint64 totalElapsed = time.elapsed();
// ignore consistentTiming in case the pause timer is active
int delta = (consistentTiming && !isPauseTimerActive) ?
@@ -223,12 +227,14 @@ void QUnifiedTimer::updateAnimationsTime()
//it might happen in some cases that the time doesn't change because events are delayed
//when the CPU load is high
if (delta) {
+ insideTick = true;
for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) {
QAbstractAnimation *animation = animations.at(currentAnimationIdx);
int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime
+ (animation->direction() == QAbstractAnimation::Forward ? delta : -delta);
animation->setCurrentTime(elapsed);
}
+ insideTick = false;
currentAnimationIdx = 0;
}
}
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 1ab05cdef0..ba92960f6b 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -202,6 +202,7 @@ private:
qint64 lastTick;
int timingInterval;
int currentAnimationIdx;
+ bool insideTick;
bool consistentTiming;
bool slowMode;
diff --git a/src/corelib/concurrent/qfutureinterface.cpp b/src/corelib/concurrent/qfutureinterface.cpp
index 627d0c76de..c5bd802480 100644
--- a/src/corelib/concurrent/qfutureinterface.cpp
+++ b/src/corelib/concurrent/qfutureinterface.cpp
@@ -219,7 +219,7 @@ QString QFutureInterfaceBase::progressText() const
bool QFutureInterfaceBase::isProgressUpdateNeeded() const
{
QMutexLocker locker(&d->m_mutex);
- return (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond));
+ return !d->progressTime.isValid() || (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond));
}
void QFutureInterfaceBase::reportStarted()
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index d80706ab7e..68582bf2d5 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -26,6 +26,9 @@ linux*:!static:!symbian-gcce:!*-armcc* {
}
# Compensate for lack of platform defines in Symbian3 and Symbian4
-symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
+symbian {
+ DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_)) \
+ S60_VERSION_$$upper($$replace(S60_VERSION,\\.,_))
+}
include(../../../tools/shared/symbian/epocroot.pri)
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 54b9d89370..bcaed4112e 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -86,7 +86,6 @@
# include "private/qcore_symbian_p.h"
_LIT(qt_S60Filter, "Series60v?.*.sis");
-_LIT(qt_symbianFilter, "Symbianv*.sis");
_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\");
#endif
@@ -1203,7 +1202,7 @@ bool qSharedBuild()
\value SV_SF_1 Symbian^1
\value SV_SF_2 Symbian^2
\value SV_SF_3 Symbian^3
- \value SV_SF_4 Symbian^4
+ \value SV_SF_4 \e{This enum value is deprecated.}
\value SV_Unknown An unknown and currently unsupported platform
\sa S60Version, WinVersion, MacVersion
@@ -1221,7 +1220,8 @@ bool qSharedBuild()
\value SV_S60_3_2 S60 3rd Edition Feature Pack 2
\value SV_S60_5_0 S60 5th Edition
\value SV_S60_5_1 S60 5th Edition Feature Pack 1
- \value SV_S60_5_2 S60 5th Edition Feature Pack 2
+ \value SV_S60_5_2 Symbian^3
+ \value SV_S60_5_3 To be determined - FIXME
\value SV_S60_Unknown An unknown and currently unsupported platform
\omitvalue SV_S60_None
@@ -1829,12 +1829,10 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
#ifdef Q_OS_SYMBIAN
static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1);
+static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
-QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+static void symbianInitVersions()
{
- if (cachedSymbianVersion != -1)
- return cachedSymbianVersion;
-
// Use pure Symbian code, because if done using QDir, there will be a call back
// to this method, resulting doing this expensive operation twice before the cache kicks in.
// Pure Symbian code also makes this method ~10x faster, speeding up the application launch.
@@ -1842,21 +1840,8 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
TFindFile fileFinder(rfs);
CDir* contents;
- // Check for Symbian4
- TInt err = fileFinder.FindWildByDir(qt_symbianFilter, qt_symbianSystemInstallDir, contents);
- if (err == KErrNone) {
- QScopedPointer<CDir> contentsDeleter(contents);
- err = contents->Sort(EDescending|ESortByName);
- if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 9) {
- TInt major = (*contents)[0].iName[8] - '0';
- if (major == 4) {
- return cachedSymbianVersion = SV_SF_4;
- }
- }
- }
-
- // Check for S60 and Symbian3 platforms, which use older .sis naming scheme
- err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
+ // Check for platform version
+ TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
if (err == KErrNone) {
QScopedPointer<CDir> contentsDeleter(contents);
err = contents->Sort(EDescending|ESortByName);
@@ -1865,61 +1850,76 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
TInt minor = (*contents)[0].iName[11] - '0';
if (major == 3) {
if (minor == 1) {
- return cachedSymbianVersion = SV_9_2;
+ cachedS60Version = QSysInfo::SV_S60_3_1;
+ cachedSymbianVersion = QSysInfo::SV_9_2;
} else if (minor == 2) {
- return cachedSymbianVersion = SV_9_3;
+ cachedS60Version = QSysInfo::SV_S60_3_2;
+ cachedSymbianVersion = QSysInfo::SV_9_3;
}
} else if (major == 5) {
if (minor == 0) {
- return cachedSymbianVersion = SV_9_4;
- }
- else if (minor == 1) {
- return cachedSymbianVersion = SV_SF_2;
- }
- else if (minor >= 2) {
- return cachedSymbianVersion = SV_SF_3;
+ cachedS60Version = QSysInfo::SV_S60_5_0;
+ cachedSymbianVersion = QSysInfo::SV_9_4;
+ } else if (minor == 1) {
+ cachedS60Version = QSysInfo::SV_S60_5_1;
+ cachedSymbianVersion = QSysInfo::SV_SF_2;
+ } else if (minor == 2) {
+ cachedS60Version = QSysInfo::SV_S60_5_2;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
+ } else if (minor >= 3) {
+ cachedS60Version = QSysInfo::SV_S60_5_3;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
}
}
}
}
# ifdef Q_CC_NOKIAX86
- // Some emulator environments may not contain the version specific .sis files, so
- // simply hardcode the version on those environments. Note that can't use
- // SYMBIAN_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
- // right anyway in case .sis files are not found.
+ if (cachedS60Version == -1) {
+ // Some emulator environments may not contain the version specific .sis files, so
+ // simply hardcode the version on those environments. Note that can't use
+ // S60_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
+ // right anyway in case .sis files are not found.
# if defined(__SERIES60_31__)
- return cachedSymbianVersion = SV_9_2;
+ cachedS60Version = QSysInfo::SV_S60_3_1;
+ cachedSymbianVersion = QSysInfo::SV_9_2;
# elif defined(__S60_32__)
- return cachedSymbianVersion = SV_9_3;
+ cachedS60Version = QSysInfo::SV_S60_3_2;
+ cachedSymbianVersion = QSysInfo::SV_9_3;
# elif defined(__S60_50__)
- return cachedSymbianVersion = SV_9_4;
-# elif defined(SYMBIAN_VERSION_SYMBIAN3)
- return cachedSymbianVersion = SV_SF_3;
-# elif defined(SYMBIAN_VERSION_SYMBIAN4)
- return cachedSymbianVersion = SV_SF_4;
+ cachedS60Version = QSysInfo::SV_S60_5_0;
+ cachedSymbianVersion = QSysInfo::SV_9_4;
+# elif defined(S60_VERSION_5_2)
+ cachedS60Version = QSysInfo::SV_S60_5_2;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
+# elif defined(S60_VERSION_5_3)
+ cachedS60Version = QSysInfo::SV_S60_5_3;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
# endif
+ }
# endif
- //If reaching here, it was not possible to determine the version
- return cachedSymbianVersion = SV_Unknown;
+
+ if (cachedS60Version == -1) {
+ //If reaching here, it was not possible to determine the version
+ cachedS60Version = QSysInfo::SV_S60_Unknown;
+ cachedSymbianVersion = QSysInfo::SV_Unknown;
+ }
+}
+
+QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+{
+ if (cachedSymbianVersion == -1)
+ symbianInitVersions();
+
+ return cachedSymbianVersion;
}
QSysInfo::S60Version QSysInfo::s60Version()
{
- switch (symbianVersion()) {
- case SV_9_2:
- return SV_S60_3_1;
- case SV_9_3:
- return SV_S60_3_2;
- case SV_9_4:
- return SV_S60_5_0;
- case SV_SF_2:
- return SV_S60_5_1;
- case SV_SF_3:
- return SV_S60_5_2;
- default:
- return SV_S60_Unknown;
- }
+ if (cachedS60Version == -1)
+ symbianInitVersions();
+
+ return cachedS60Version;
}
#endif // ifdef Q_OS_SYMBIAN
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 8dd8850008..d3b3e14507 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1599,7 +1599,7 @@ public:
SV_SF_1 = SV_9_4,
SV_SF_2 = 40,
SV_SF_3 = 50,
- SV_SF_4 = 60
+ SV_SF_4 = 60 // Deprecated
};
static SymbianVersion symbianVersion();
enum S60Version {
@@ -1608,9 +1608,9 @@ public:
SV_S60_3_1 = SV_9_2,
SV_S60_3_2 = SV_9_3,
SV_S60_5_0 = SV_9_4,
- //versions beyond 5.0 are to be confirmed - it is better to use symbian version
SV_S60_5_1 = SV_SF_2,
- SV_S60_5_2 = SV_SF_3
+ SV_S60_5_2 = SV_SF_3,
+ SV_S60_5_3 = 70
};
static S60Version s60Version();
#endif
@@ -2517,6 +2517,10 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
#define Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS
#endif
+#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
+#define Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION
+#endif
+
//Symbian does not support data imports from a DLL
#define Q_NO_DATA_RELOCATION
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index bc15514f93..07a9503606 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -242,81 +242,25 @@
/*!
\enum Qt::GlobalColor
- \raw HTML
- <style type="text/css" id="colorstyles">
- #white { background-color: #ffffff; color: #000000 }
- #black { background-color: #000000; color: #ffffff }
- #red { background-color: #ff0000; color: #000000 }
- #darkRed { background-color: #800000; color: #ffffff }
- #green { background-color: #00ff00; color: #000000 }
- #darkGreen { background-color: #008000; color: #ffffff }
- #blue { background-color: #0000ff; color: #ffffff }
- #darkBlue { background-color: #000080; color: #ffffff }
- #cyan { background-color: #00ffff; color: #000000 }
- #darkCyan { background-color: #008080; color: #ffffff }
- #magenta { background-color: #ff00ff; color: #000000 }
- #darkMagenta { background-color: #800080; color: #ffffff }
- #yellow { background-color: #ffff00; color: #000000 }
- #darkYellow { background-color: #808000; color: #ffffff }
- #gray { background-color: #a0a0a4; color: #000000 }
- #darkGray { background-color: #808080; color: #ffffff }
- #lightGray { background-color: #c0c0c0; color: #000000 }
- </style>
- \endraw
-
Qt's predefined QColor objects:
- \value white \raw HTML
- White <tt id="white">(#ffffff)</tt>
- \endraw
- \value black \raw HTML
- Black <tt id="black">(#000000)</tt>
- \endraw
- \value red \raw HTML
- Red <tt id="red">(#ff0000)</tt>
- \endraw
- \value darkRed \raw HTML
- Dark red <tt id="darkRed">(#800000)</tt>
- \endraw
- \value green \raw HTML
- Green <tt id="green">(#00ff00)</tt>
- \endraw
- \value darkGreen \raw HTML
- Dark green <tt id="darkGreen">(#008000)</tt>
- \endraw
- \value blue \raw HTML
- Blue <tt id="blue">(#0000ff)</tt>
- \endraw
- \value darkBlue \raw HTML
- Dark blue <tt id="darkBlue">(#000080)</tt>
- \endraw
- \value cyan \raw HTML
- Cyan <tt id="cyan">(#00ffff)</tt>
- \endraw
- \value darkCyan \raw HTML
- Dark cyan <tt id="darkCyan">(#008080)</tt>
- \endraw
- \value magenta \raw HTML
- Magenta <tt id="magenta">(#ff00ff)</tt>
- \endraw
- \value darkMagenta \raw HTML
- Dark magenta <tt id="darkMagenta">(#800080)</tt>
- \endraw
- \value yellow \raw HTML
- Yellow <tt id="yellow">(#ffff00)</tt>
- \endraw
- \value darkYellow \raw HTML
- Dark yellow <tt id="darkYellow">(#808000)</tt>
- \endraw
- \value gray \raw HTML
- Gray <tt id="gray">(#a0a0a4)</tt>
- \endraw
- \value darkGray \raw HTML
- Dark gray <tt id="darkGray">(#808080)</tt>
- \endraw
- \value lightGray \raw HTML
- Light gray <tt id="lightGray">(#c0c0c0)</tt>
- \endraw
+ \value white \span {id="color-white"} {White (#ffffff) }
+ \value black \span {id="color-black"} {Black (#000000) }
+ \value red \span {id="color-red"} {Red (#ff0000) }
+ \value darkRed \span {id="color-darkRed"} {Dark red (#800000) }
+ \value green \span {id="color-green"} {Green (#00ff00) }
+ \value darkGreen \span {id="color-darkGreen"} {Dark green (#008000) }
+ \value blue \span {id="color-blue"} {Blue (#0000ff) }
+ \value darkBlue \span {id="color-darkBlue"} {Dark blue (#000080) }
+ \value cyan \span {id="color-cyan"} {Cyan (#00ffff) }
+ \value darkCyan \span {id="color-darkCyan"} {Dark cyan (#008080) }
+ \value magenta \span {id="color-magenta"} {Magenta (#ff00ff) }
+ \value darkMagenta \span {id="color-darkMagenta"} {Dark magenta (#800080) }
+ \value yellow \span {id="color-yellow"} {Yellow (#ffff00) }
+ \value darkYellow \span {id="color-darkYellow"} {Dark yellow (#808000) }
+ \value gray \span {id="color-gray"} {Gray (#a0a0a4) }
+ \value darkGray \span {id="color-darkGray"} {Dark gray (#808080) }
+ \value lightGray \span {id="color-lightGray"} {Light gray (#c0c0c0) }
\value transparent a transparent black value (i.e., QColor(0, 0, 0, 0))
\value color0 0 pixel value (for bitmaps)
\value color1 1 pixel value (for bitmaps)
@@ -2882,7 +2826,7 @@
INT_MIN, inclusive. For example, you can define custom priorities
as being relative to each other:
- \snippet doc/src/snippets/code/doc_src_qnamespace.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qnamespace.cpp 1
\sa QCoreApplication::postEvent()
*/
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 76e8409aa9..8759f8b4c4 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1628,10 +1628,11 @@ QString QIODevice::errorString() const
\fn qint64 QIODevice::readData(char *data, qint64 maxSize)
Reads up to \a maxSize bytes from the device into \a data, and
- returns the number of bytes read or -1 if an error occurred. If
- there are no bytes to be read, this function should return -1 if
- there can never be more bytes available (for example: socket
- closed, pipe closed, sub-process finished).
+ returns the number of bytes read or -1 if an error occurred.
+
+ If there are no bytes to be read and there can never be more bytes
+ available (examples include socket closed, pipe closed, sub-process
+ finished), this function returns -1.
This function is called by QIODevice. Reimplement this function
when creating a subclass of QIODevice.
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 0435256b34..cd8c1a3076 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -373,7 +373,7 @@ QResourcePrivate::ensureChildren() const
Constructs a QResource pointing to \a file. \a locale is used to
load a specific localization of a resource data.
- \sa QFileInfo, searchPaths(), setFileName(), setLocale()
+ \sa QFileInfo, QDir::searchPaths(), setFileName(), setLocale()
*/
QResource::QResource(const QString &file, const QLocale &locale) : d_ptr(new QResourcePrivate(this))
@@ -418,7 +418,7 @@ QLocale QResource::locale() const
/*!
Sets a QResource to point to \a file. \a file can either be absolute,
in which case it is opened directly, if relative then the file will be
- tried to be found in searchPaths().
+ tried to be found in QDir::searchPaths().
\sa absoluteFilePath()
*/
@@ -446,7 +446,7 @@ QString QResource::fileName() const
/*!
Returns the real path that this QResource represents, if the resource
- was found via the searchPaths() it will be indicated in the path.
+ was found via the QDir::searchPaths() it will be indicated in the path.
\sa fileName()
*/
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index daa5dc6250..3570564007 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -354,10 +354,15 @@ QTranslator::~QTranslator()
}
/*!
- Loads \a filename + \a suffix (".qm" if the \a suffix is
- not specified), which may be an absolute file name or relative
- to \a directory. Returns true if the translation is successfully
- loaded; otherwise returns false.
+
+ Loads \a filename + \a suffix (".qm" if the \a suffix is not
+ specified), which may be an absolute file name or relative to \a
+ directory. Returns true if the translation is successfully loaded;
+ otherwise returns false.
+
+ If \a directory is not specified, the directory of the
+ application's executable is used (i.e., as
+ \l{QCoreApplication::}{applicationDirPath()}).
The previous contents of this translator object are discarded.
diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc
index 54b2b387f2..7043fa0a27 100644
--- a/src/corelib/plugin/qplugin.qdoc
+++ b/src/corelib/plugin/qplugin.qdoc
@@ -51,7 +51,7 @@
If you want to use Q_DECLARE_INTERFACE with interface classes
declared in a namespace then you have to make sure the Q_DECLARE_INTERFACE
is not inside a namespace though. For example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 0
\sa Q_INTERFACES(), Q_EXPORT_PLUGIN2(), {How to Create Qt Plugins}
*/
@@ -82,7 +82,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 1
See the \l{tools/plugandpaint}{Plug & Paint} example for details.
@@ -102,14 +102,14 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 2
Static plugins must also be included by the linker when your
application is built. For Qt's predefined plugins,
you can use the \c QTPLUGIN to add
the required plugins to your build. For example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qplugin.pro 3
\sa {Static Plugins}, {How to Create Qt Plugins}, {Using qmake}
*/
diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp
index 350c1a080a..7093c327ac 100644
--- a/src/corelib/statemachine/qhistorystate.cpp
+++ b/src/corelib/statemachine/qhistorystate.cpp
@@ -168,6 +168,9 @@ QAbstractState *QHistoryState::defaultState() const
/*!
Sets this history state's default state to be the given \a state.
\a state must be a sibling of this history state.
+
+ Note that this function does not set \a state as the initial state
+ of its parent.
*/
void QHistoryState::setDefaultState(QAbstractState *state)
{
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc
index 34918a35ed..a9b7ddca7a 100644
--- a/src/corelib/tools/qalgorithms.qdoc
+++ b/src/corelib/tools/qalgorithms.qdoc
@@ -60,14 +60,14 @@
a particular value. If you need that functionality, you can use
qFill():
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 0
qFill() takes a begin iterator, an end iterator, and a value.
In the example above, we pass \c list.begin() and \c list.end()
as the begin and end iterators, but this doesn't have to be
the case:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 1
Different algorithms can have different requirements for the
iterators they accept. For example, qFill() accepts two
@@ -98,13 +98,13 @@
name_table array and return the corresponding Unicode value from
the \c value_table if the entity is recognized:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 2
This kind of code is for advanced users only; for most
applications, a QMap- or QHash-based approach would work just as
well:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 3
\section1 Types of Iterators
@@ -185,7 +185,7 @@
position \a begin2 + 1; and so on.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 4
\sa qCopyBackward(), {input iterators}, {output iterators}
*/
@@ -201,7 +201,7 @@
at position \a end2 - 2; and so on.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 5
\sa qCopy(), {bidirectional iterators}
*/
@@ -214,7 +214,7 @@
items compare equal; otherwise returns false.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 6
This function requires the item type (in the example above,
QString) to implement \c operator==().
@@ -228,7 +228,7 @@
Fills the range [\a begin, \a end) with \a value.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 7
\sa qCopy(), {forward iterators}
*/
@@ -249,7 +249,7 @@
value isn't found.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 8
This function requires the item type (in the example above,
QString) to implement \c operator==().
@@ -278,7 +278,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 9
This function requires the item type (in the example above,
\c int) to implement \c operator==().
@@ -302,7 +302,7 @@ of \a value in the variable passed as a reference in argument \a n.
Exchanges the values of variables \a var1 and \a var2.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 10
*/
/*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end)
@@ -312,7 +312,7 @@ of \a value in the variable passed as a reference in argument \a n.
using the quicksort algorithm.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 11
The sort algorithm is efficient on large data sets. It operates
in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
@@ -338,13 +338,13 @@ of \a value in the variable passed as a reference in argument \a n.
For example, here's how to sort the strings in a QStringList
in case-insensitive alphabetical order:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 12
To sort values in reverse order, pass
\l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 13
If neither of the two items is "less than" the other, the items are
taken to be equal. It is then undefined which one of the two
@@ -356,7 +356,7 @@ of \a value in the variable passed as a reference in argument \a n.
following code shows how to sort a list of strings case
insensitively using QMap:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 14
\sa QMap
*/
@@ -382,7 +382,7 @@ of \a value in the variable passed as a reference in argument \a n.
property is often useful when sorting user-visible data.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 15
The sort algorithm is efficient on large data sets. It operates
in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
@@ -405,7 +405,7 @@ of \a value in the variable passed as a reference in argument \a n.
For example, here's how to sort the strings in a QStringList
in case-insensitive alphabetical order:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 16
Note that earlier versions of Qt allowed using a lessThan function that took its
arguments by non-const reference. From 4.3 and on this is no longer possible,
@@ -415,7 +415,7 @@ of \a value in the variable passed as a reference in argument \a n.
\l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 17
If neither of the two items is "less than" the other, the items are
taken to be equal. The item that appeared before the other in the
@@ -444,7 +444,7 @@ of \a value in the variable passed as a reference in argument \a n.
ascending order; see qSort().
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 18
This function requires the item type (in the example above,
\c{int}) to implement \c operator<().
@@ -452,7 +452,7 @@ of \a value in the variable passed as a reference in argument \a n.
qLowerBound() can be used in conjunction with qUpperBound() to
iterate over all occurrences of the same value:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 19
\sa qUpperBound(), qBinaryFind()
*/
@@ -494,7 +494,7 @@ of \a value in the variable passed as a reference in argument \a n.
ascending order; see qSort().
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 20
This function requires the item type (in the example above,
\c{int}) to implement \c operator<().
@@ -502,7 +502,7 @@ of \a value in the variable passed as a reference in argument \a n.
qUpperBound() can be used in conjunction with qLowerBound() to
iterate over all occurrences of the same value:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 21
\sa qLowerBound(), qBinaryFind()
*/
@@ -545,7 +545,7 @@ of \a value in the variable passed as a reference in argument \a n.
finer control.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 22
This function requires the item type (in the example above,
QString) to implement \c operator<().
@@ -587,7 +587,7 @@ of \a value in the variable passed as a reference in argument \a n.
example, \c{QWidget *}).
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 23
Notice that qDeleteAll() doesn't remove the items from the
container; it merely calls \c delete on them. In the example
@@ -618,7 +618,7 @@ of \a value in the variable passed as a reference in argument \a n.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 24
\sa {qGreater()}{qGreater<T>()}
*/
@@ -631,7 +631,7 @@ of \a value in the variable passed as a reference in argument \a n.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 25
\sa {qLess()}{qLess<T>()}
*/
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 4799abd284..1c9b6541e3 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1387,7 +1387,7 @@ QByteArray::QByteArray(int size, Qt::Initialization)
If \a size is less than the current size, bytes are removed from
the end.
- \sa size()
+ \sa size(), truncate()
*/
void QByteArray::resize(int size)
diff --git a/src/corelib/tools/qcache.qdoc b/src/corelib/tools/qcache.qdoc
index 991238bb32..9e12c92c1c 100644
--- a/src/corelib/tools/qcache.qdoc
+++ b/src/corelib/tools/qcache.qdoc
@@ -39,11 +39,11 @@
definition of a cache that stores objects of type Employee
associated with an integer key:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 0
Here's how to insert an object in the cache:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 1
The advantage of using QCache over some other key-based data
structure (such as QMap or QHash) is that QCache automatically
@@ -59,7 +59,7 @@
By default, QCache's maxCost() is 100. You can specify a
different value in the QCache constructor:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 2
Each time you call insert(), you can specify a cost as third
argument (after the key and a pointer to the object to insert).
diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc
index d651343d20..6830442d63 100644
--- a/src/corelib/tools/qiterator.qdoc
+++ b/src/corelib/tools/qiterator.qdoc
@@ -50,7 +50,7 @@
the list (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 0
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -65,7 +65,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 1
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -98,7 +98,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 2
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -113,7 +113,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 3
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -150,7 +150,7 @@
of the vector (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 4
The next() function returns the next item in the vector and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -165,7 +165,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 5
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -197,7 +197,7 @@
the first item). Here's how to iterate over all the elements
sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 6
The next() function returns the next item in the set and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -212,7 +212,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 7
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -251,7 +251,7 @@
of the list (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 8
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -266,7 +266,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 9
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -277,7 +277,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 10
The example traverses a list, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -312,7 +312,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 11
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -327,7 +327,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 12
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -338,7 +338,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 13
The example traverses a list, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -378,7 +378,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 14
The next() function returns the next item in the vector and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -393,7 +393,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 15
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -404,7 +404,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 16
The example traverses a vector, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -440,7 +440,7 @@
of the set (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 17
The next() function returns the next item in the set and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -455,7 +455,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 18
If you want to remove items as you iterate over the set, use
remove().
@@ -755,7 +755,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 19
\sa insert(), setValue()
*/
@@ -766,7 +766,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 20
\sa insert(), setValue()
*/
@@ -777,7 +777,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 21
\sa insert(), setValue()
*/
@@ -788,7 +788,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 22
\sa value()
*/
@@ -802,7 +802,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 23
\sa value(), remove(), insert()
*/
@@ -816,7 +816,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 24
\sa value(), remove(), insert()
*/
@@ -830,7 +830,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 25
\sa value(), remove(), insert()
*/
@@ -889,7 +889,7 @@
the map (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 26
The next() function returns the next item in the map and
advances the iterator. The key() and value() functions return the
@@ -906,12 +906,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 27
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 28
Multiple iterators can be used on the same map. If the map is
modified while a QMapIterator is active, the QMapIterator will
@@ -941,7 +941,7 @@
the hash (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 29
The next() function returns the next item in the hash and
advances the iterator. The key() and value() functions return the
@@ -958,12 +958,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 30
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 31
Multiple iterators can be used on the same hash. If the hash is
modified while a QHashIterator is active, the QHashIterator will
@@ -994,7 +994,7 @@
of the map (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 32
The next() function returns the next item in the map and
advances the iterator. The key() and value() functions return the
@@ -1011,12 +1011,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 33
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 34
If you want to remove items as you iterate over the map, use
remove(). If you want to modify the value of an item, use
@@ -1024,7 +1024,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 35
The example removes all (key, value) pairs where the key and the
value are the same.
@@ -1059,7 +1059,7 @@
of the hash (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 36
The next() function returns the next item in the hash and
advances the iterator. The key() and value() functions return the
@@ -1076,12 +1076,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 37
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 38
If you want to remove items as you iterate over the hash, use
remove(). If you want to modify the value of an item, use
@@ -1089,7 +1089,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 39
The example removes all (key, value) pairs where the key and the
value are the same.
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index c548663f9e..9e13fcc05e 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -1087,7 +1087,7 @@ void QMapData::dump()
\overload
- The prefix -- operator (\c{--i}) makes the preceding item
+ The postfix -- operator (\c{i--}) makes the preceding item
current and returns an iterator pointing to the previously
current item.
*/
diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc
index b900c4fb2a..925100d4e5 100644
--- a/src/corelib/tools/qpair.qdoc
+++ b/src/corelib/tools/qpair.qdoc
@@ -40,12 +40,12 @@
Here's an example of a QPair that stores one QString and one \c
double value:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 0
The components are accessible as public data members called \l
first and \l second. For example:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 1
QPair's template data types (T1 and T2) must be \l{assignable
data types}. You cannot, for example, store a QWidget as a value;
@@ -186,7 +186,7 @@
Returns a QPair\<T1, T2\> that contains \a value1 and \a value2.
Example:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 2
This is equivalent to QPair<T1, T2>(\a value1, \a value2), but
usually requires less typing.
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index 30880d569d..8748fd94bd 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -40,19 +40,19 @@
Here's an example QSet with QString values:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 0
To insert a value into the set, use insert():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 1
Another way to insert items into the set is to use operator<<():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 2
To test whether an item belongs to the set or not, use contains():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 3
If you want to navigate through all the values stored in a QSet,
you can use an iterator. QSet supports both \l{Java-style
@@ -60,18 +60,18 @@
iterators} (QSet::iterator and QSet::const_iterator). Here's how
to iterate over a QSet<QWidget *> using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 4
Here's the same code, but using an STL-style iterator:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 5
QSet is unordered, so an iterator's sequence cannot be assumed to
be predictable. If ordering by key is required, use a QMap.
To navigate through a QSet, you can also use \l{foreach}:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 6
Items can be removed from the set using remove(). There is also a
clear() function that removes all items.
@@ -194,7 +194,7 @@
This function is useful for code that needs to build a huge set
and wants to avoid repeated reallocation. For example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 7
Ideally, \a size should be slightly more than the maximum number
of elements expected in the set. \a size doesn't have to be prime,
@@ -610,18 +610,18 @@
start iterating. Here's a typical loop that prints all the items
stored in a set:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 8
Here's a loop that removes certain items (all those that start
with 'J') from a set while iterating:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 9
STL-style iterators can be used as arguments to \l{generic
algorithms}. For example, here's how to find an item in the set
using the qFind() algorithm:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 10
Multiple iterators can be used on the same set. However, you may
not attempt to modify the container while iterating on it.
@@ -653,13 +653,13 @@
start iterating. Here's a typical loop that prints all the items
stored in a set:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 11
STL-style iterators can be used as arguments to \l{generic
algorithms}. For example, here's how to find an item in the set
using the qFind() algorithm:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 12
Multiple iterators can be used on the same set. However, you may
not attempt to modify the container while iterating on it.
@@ -893,7 +893,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 13
\sa fromList(), QList::fromSet(), qSort()
*/
@@ -918,7 +918,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 14
\sa toList(), QList::toSet()
*/
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index c2bb094dab..34bc406309 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -457,33 +457,23 @@ QTextBoundaryFinder::BoundaryReasons QTextBoundaryFinder::boundaryReasons() cons
return NotAtBoundary;
return StartWord;
}
- if (pos >= length - 1) {
+ if (pos == length) {
if (d->attributes[length-1].whiteSpace)
return NotAtBoundary;
return EndWord;
}
- BoundaryReasons answer;
- const bool nextIsSpace = d->attributes[pos + 1].whiteSpace;
+ const bool nextIsSpace = d->attributes[pos].whiteSpace;
const bool prevIsSpace = d->attributes[pos - 1].whiteSpace;
- if (d->attributes[pos].whiteSpace)
- answer = EndWord;
- else if (!prevIsSpace) {
- answer = StartWord;
- answer |= EndWord;
- }
-
- if (prevIsSpace)
- answer |= StartWord;
- if (nextIsSpace)
- answer |= EndWord;
- if (answer == 0) {
- answer = StartWord;
- answer |= EndWord;
- }
-
- return answer;
+ if (prevIsSpace && !nextIsSpace)
+ return StartWord;
+ else if (!prevIsSpace && nextIsSpace)
+ return EndWord;
+ else if (!prevIsSpace && !nextIsSpace)
+ return BoundaryReasons(StartWord | EndWord);
+ else
+ return NotAtBoundary;
}
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 957bca7103..3c80c1cbbd 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -35,12 +35,12 @@
The C++ language doesn't support variable-length arrays on the stack.
For example, the following code won't compile:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 0
The alternative is to allocate the array on the heap (with
\c{new}):
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 1
However, if myfunc() is called very frequently from the
application's inner loop, heap allocation can be a major source
@@ -53,7 +53,7 @@
it is much faster than heap allocation.
Example:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 2
In the example above, QVarLengthArray will preallocate 1024
elements on the stack and use them unless \c{n + 1} is greater
@@ -223,7 +223,7 @@
be used to access and modify the items in the array.
Example:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 3
The pointer remains valid as long as the array isn't reallocated.
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index bfebff6aca..f42e55ad17 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -399,7 +399,7 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage flickable.gif
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 5fda758c3d..d23374b512 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -86,13 +86,13 @@ public:
The following example shows a Flipable item that flips whenever it is
clicked, rotating about the y-axis.
- This flipable item has a \c flipped boolean property that is toggled
- whenever the MouseArea within the flipable is clicked. When
- \c flipped is true, the item changes to the "back" state; in this
+ This flipable item has a \c flipped boolean property that is toggled
+ whenever the MouseArea within the flipable is clicked. When
+ \c flipped is true, the item changes to the "back" state; in this
state, the \c angle of the \l Rotation item is changed to 180
degrees to produce the flipping effect. When \c flipped is false, the
- item reverts to the default state, in which the \c angle value is 0.
-
+ item reverts to the default state, in which the \c angle value is 0.
+
\snippet doc/src/snippets/declarative/flipable/flipable.qml 0
\image flipable.gif
@@ -103,8 +103,8 @@ public:
its old and new values.
See \l {QML States} for details on state changes and the default
- state, and \l {QML Animation} for more information on how animations
- work within transitions.
+ state, and \l {QML Animation and Transitions} for more information on how
+ animations work within transitions.
\sa {declarative/ui-components/flipable}{Flipable example}
*/
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 0cbe1acc8c..ce47d88397 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -197,6 +197,7 @@ public:
if (q->isComponentComplete()) {
clear();
updateGrid();
+ setPosition(0);
q->refill();
updateCurrent(currentIndex);
}
@@ -689,7 +690,6 @@ void QDeclarativeGridViewPrivate::updateGrid()
q->setContentHeight(endPosition() - startPosition());
else
q->setContentWidth(lastPosition() - originPosition());
- setPosition(0);
}
}
@@ -1246,7 +1246,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0
- \div {float-right}
+ \div {class="float-right"}
\inlineimage gridview-simple.png
\enddiv
@@ -1262,7 +1262,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\codeline
\snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple
- \div {float-right}
+ \div {class="float-right"}
\inlineimage gridview-highlight.png
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 4af91ceba8..6602dda28b 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -2747,7 +2747,7 @@ QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
}
\endqml
- \sa {qdeclarativeanimation.html#transitions}{QML Transitions}
+ \sa {QML Animation and Transitions}{Transitions}
*/
@@ -3455,7 +3455,7 @@ qreal QDeclarativeItem::implicitHeight() const
Setting the implicit size is useful for defining components that have a preferred size
based on their content, for example:
- \code
+ \qml
// Label.qml
import QtQuick 1.1
@@ -3472,7 +3472,7 @@ qreal QDeclarativeItem::implicitHeight() const
anchors.verticalCenter: parent.verticalCenter
}
}
- \endcode
+ \endqml
\bold Note: using implicitWidth of Text or TextEdit and setting the width explicitly
incurs a performance penalty as the text must be laid out twice.
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index da11b007ad..f5145d0728 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -216,7 +216,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage qml-mousearea-snippet.png
\enddiv
@@ -315,7 +315,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
The \e accepted property of the MouseEvent parameter is ignored in this handler.
- \sa onCanceled()
+ \sa onCanceled
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 8f5907360e..b3235ef2d1 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -134,7 +134,7 @@ void QDeclarativeGradientStop::updateGradient()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage qml-gradient.png
\enddiv
@@ -220,7 +220,7 @@ void QDeclarativeGradient::doUpdate()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage declarative-rect.png
\enddiv
@@ -272,7 +272,7 @@ void QDeclarativeRectangle::doUpdate()
rectangle (as documented for QRect rendering). This can cause unintended effects if
\c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item:
- \div {float-right}
+ \div {class="float-right"}
\inlineimage rect-border-width.png
\enddiv
@@ -296,7 +296,7 @@ QDeclarativePen *QDeclarativeRectangle::border()
This property allows for the construction of simple vertical gradients.
Other gradients may by formed by adding rotation to the rectangle.
- \div {float-left}
+ \div {class="float-left"}
\inlineimage declarative-rect_gradient.png
\enddiv
@@ -364,7 +364,7 @@ void QDeclarativeRectangle::setRadius(qreal radius)
The default color is white.
- \div {float-right}
+ \div {class="float-right"}
\inlineimage rect-color.png
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index a8082f8273..97ce0592a4 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -839,7 +839,8 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
QML only operates on list data. \c rootIndex allows the children of
any node in a QAbstractItemModel to be provided by this model.
- This property only affects models of type QAbstractItemModel.
+ This property only affects models of type QAbstractItemModel that
+ are hierarchical (e.g, a tree model).
For example, here is a simple interactive file system browser.
When a directory name is clicked, the view's \c rootIndex is set to the
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index fc393d1e5e..c284307403 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -137,7 +137,7 @@ class QByteArray;
}
\endcode
- \sa {Using QML in C++ Applications}, {Integrating QML with existing Qt UI code}
+ \sa {Using QML Bindings in C++ Applications}, {Integrating QML Code with Existing Qt UI Code}
*/
/*!
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index dc6b0853ec..7637b72eb3 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -72,10 +72,10 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
Contexts allow data to be exposed to the QML components instantiated by the
QML engine.
- Each QDeclarativeContext contains a set of properties, distinct from its QObject
- properties, that allow data to be explicitly bound to a context by name. The
- context properties are defined and updated by calling
- QDeclarativeContext::setContextProperty(). The following example shows a Qt model
+ Each QDeclarativeContext contains a set of properties, distinct from its QObject
+ properties, that allow data to be explicitly bound to a context by name. The
+ context properties are defined and updated by calling
+ QDeclarativeContext::setContextProperty(). The following example shows a Qt model
being bound to a context and then accessed from a QML file.
\code
@@ -97,8 +97,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
To simplify binding and maintaining larger data sets, a context object can be set
on a QDeclarativeContext. All the properties of the context object are available
by name in the context, as though they were all individually added through calls
- to QDeclarativeContext::setContextProperty(). Changes to the property's values are
- detected through the property's notify signal. Setting a context object is both
+ to QDeclarativeContext::setContextProperty(). Changes to the property's values are
+ detected through the property's notify signal. Setting a context object is both
faster and easier than manually adding and maintaing context property values.
The following example has the same effect as the previous one, but it uses a context
@@ -121,7 +121,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
component.create(context);
\endcode
- All properties added explicitly by QDeclarativeContext::setContextProperty() take
+ All properties added explicitly by QDeclarativeContext::setContextProperty() take
precedence over the context object's properties.
\section2 The Context Hierarchy
@@ -147,8 +147,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
context2->setContextProperty("b", 15);
\endcode
- While QML objects instantiated in a context are not strictly owned by that
- context, their bindings are. If a context is destroyed, the property bindings of
+ While QML objects instantiated in a context are not strictly owned by that
+ context, their bindings are. If a context is destroyed, the property bindings of
outstanding QML objects will stop evaluating.
\warning Setting the context object or adding new context properties after an object
@@ -156,7 +156,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
to reevaluate). Thus whenever possible you should complete "setup" of the context
before using it to create any objects.
- \sa {Using QML in C++ Applications}
+ \sa {Using QML Bindings in C++ Applications}
*/
/*! \internal */
@@ -223,7 +223,7 @@ QDeclarativeContext::~QDeclarativeContext()
/*!
Returns whether the context is valid.
- To be valid, a context must have a engine, and it's contextObject(), if any,
+ To be valid, a context must have a engine, and it's contextObject(), if any,
must not have been deleted.
*/
bool QDeclarativeContext::isValid() const
@@ -384,7 +384,7 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const
if (data->contextObject) {
QObject *obj = data->contextObject;
QDeclarativePropertyCache::Data local;
- QDeclarativePropertyCache::Data *property =
+ QDeclarativePropertyCache::Data *property =
QDeclarativePropertyCache::property(data->engine, obj, name, local);
if (property) value = obj->metaObject()->property(property->coreIndex).read(obj);
@@ -461,7 +461,7 @@ QUrl QDeclarativeContext::baseUrl() const
{
Q_D(const QDeclarativeContext);
const QDeclarativeContextData* data = d->data;
- while (data && data->url.isEmpty())
+ while (data && data->url.isEmpty())
data = data->parent;
if (data)
@@ -515,7 +515,7 @@ QDeclarativeContextData::QDeclarativeContextData(QDeclarativeContext *ctxt)
void QDeclarativeContextData::invalidate()
{
- while (childContexts)
+ while (childContexts)
childContexts->invalidate();
while (componentAttached) {
@@ -570,7 +570,7 @@ void QDeclarativeContextData::clearContext()
void QDeclarativeContextData::destroy()
{
- if (linkedContext)
+ if (linkedContext)
linkedContext->destroy();
if (engine) invalidate();
@@ -626,9 +626,9 @@ void QDeclarativeContextData::setParent(QDeclarativeContextData *p)
}
}
-/*
-Refreshes all expressions that could possibly depend on this context. Refreshing flushes all
-context-tree dependent caches in the expressions, and should occur every time the context tree
+/*
+Refreshes all expressions that could possibly depend on this context. Refreshing flushes all
+context-tree dependent caches in the expressions, and should occur every time the context tree
*structure* (not values) changes.
*/
void QDeclarativeContextData::refreshExpressions()
@@ -656,7 +656,7 @@ void QDeclarativeContextData::addObject(QObject *o)
data->outerContext = this;
data->nextContextObject = contextObjects;
- if (data->nextContextObject)
+ if (data->nextContextObject)
data->nextContextObject->prevContextObject = &data->nextContextObject;
data->prevContextObject = &contextObjects;
contextObjects = data;
@@ -664,7 +664,7 @@ void QDeclarativeContextData::addObject(QObject *o)
void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object::ScriptBlock &script)
{
- if (!engine)
+ if (!engine)
return;
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
@@ -684,7 +684,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
scriptContext->pushScope(enginePriv->contextClass->newUrlContext(url));
scriptContext->pushScope(enginePriv->globalClass->staticGlobalObject());
-
+
QScriptValue scope = QScriptDeclarativeClass::newStaticScopeObject(scriptEngine);
scriptContext->pushScope(scope);
@@ -752,7 +752,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const
for (int i=0; i<idValueCount; i++) {
if (idValues[i] == obj)
return propertyNames->findId(i);
- }
+ }
if (linkedContext)
return linkedContext->findObjectId(obj);
@@ -761,7 +761,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const
QDeclarativeContext *QDeclarativeContextData::asQDeclarativeContext()
{
- if (!publicContext)
+ if (!publicContext)
publicContext = new QDeclarativeContext(this);
return publicContext;
}
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index b7a02f12ae..9fde18c81c 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -2117,7 +2117,7 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val
The newly added \a path will be first in the importPathList().
- \sa setImportPathList(), \l {QML Modules}
+ \sa setImportPathList(), {QML Modules}
*/
void QDeclarativeEngine::addImportPath(const QString& path)
{
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 36cdde979a..26f3996871 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -629,7 +629,18 @@ QDeclarativeTypeLoader::~QDeclarativeTypeLoader()
}
/*!
-Return a QDeclarativeTypeData for \a url. The QDeclarativeTypeData may be cached.
+\enum QDeclarativeTypeLoader::Option
+
+This enum defines the options that control the way type data is handled.
+
+\value None The default value, indicating that no other options
+ are enabled.
+\value PreserveParser The parser used to handle the type data is preserved
+ after the data has been parsed.
+*/
+
+/*!
+Returns a QDeclarativeTypeData for the specified \a url. The QDeclarativeTypeData may be cached.
*/
QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url)
{
@@ -650,8 +661,10 @@ QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url)
}
/*!
-Return a QDeclarativeTypeData for \a data with the provided base \a url. The
+Returns a QDeclarativeTypeData for the given \a data with the provided base \a url. The
QDeclarativeTypeData will not be cached.
+
+The specified \a options control how the loader handles type data.
*/
QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QByteArray &data, const QUrl &url, Options options)
{
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index dc6d524477..b3bf84b9f5 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Animation QDeclarativeAbstractAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\brief The Animation element is the base of all QML animations.
@@ -554,7 +554,7 @@ void QDeclarativeAbstractAnimation::timelineComplete()
/*!
\qmlclass PauseAnimation QDeclarativePauseAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits Animation
\brief The PauseAnimation element provides a pause for an animation.
@@ -571,7 +571,7 @@ void QDeclarativeAbstractAnimation::timelineComplete()
}
\endcode
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent)
@@ -630,27 +630,27 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\inherits PropertyAnimation
\brief The ColorAnimation element animates changes in color values.
- ColorAnimation is a specialized PropertyAnimation that defines an
+ ColorAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a color value changes.
- Here is a ColorAnimation applied to the \c color property of a \l Rectangle
- as a property value source. It animates the \c color property's value from
+ Here is a ColorAnimation applied to the \c color property of a \l Rectangle
+ as a property value source. It animates the \c color property's value from
its current value to a value of "red", over 1000 milliseconds:
\snippet doc/src/snippets/declarative/coloranimation.qml 0
Like any other animation element, a ColorAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
-
- For convenience, when a ColorAnimation is used in a \l Transition, it will
- animate any \c color properties that have been modified during the state
- change. If a \l{PropertyAnimation::}{property} or
- \l{PropertyAnimation::}{properties} are explicitly set for the animation,
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
+
+ For convenience, when a ColorAnimation is used in a \l Transition, it will
+ animate any \c color properties that have been modified during the state
+ change. If a \l{PropertyAnimation::}{property} or
+ \l{PropertyAnimation::}{properties} are explicitly set for the animation,
then those are used instead.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -686,10 +686,10 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
If the ColorAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QColor QDeclarativeColorAnimation::from() const
{
@@ -712,7 +712,7 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QColor QDeclarativeColorAnimation::to() const
{
@@ -868,7 +868,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\inherits Animation
\brief The PropertyAction element allows immediate property changes during animation.
- PropertyAction is used to specify an immediate property change during an
+ PropertyAction is used to specify an immediate property change during an
animation. The property change is not animated.
It is useful for setting non-animated property values during an animation.
@@ -879,9 +879,9 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\snippet doc/src/snippets/declarative/propertyaction.qml standalone
- PropertyAction is also useful for setting the exact point at which a property
- change should occur during a \l Transition. For example, if PropertyChanges
- was used in a \l State to rotate an item around a particular
+ PropertyAction is also useful for setting the exact point at which a property
+ change should occur during a \l Transition. For example, if PropertyChanges
+ was used in a \l State to rotate an item around a particular
\l {Item::}{transformOrigin}, it might be implemented like this:
\snippet doc/src/snippets/declarative/propertyaction.qml transition
@@ -893,13 +893,13 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
before the RotationAnimation begins:
\snippet doc/src/snippets/declarative/propertyaction-sequential.qml sequential
-
+
This immediately sets the \c transformOrigin property to the value defined
- in the end state of the \l Transition (i.e. the value defined in the
+ in the end state of the \l Transition (i.e. the value defined in the
PropertyAction object) so that the rotation animation begins with the
correct transform origin.
- \sa {QML Animation}, QtDeclarative
+ \sa {QML Animation and Transitions}, QtDeclarative
*/
QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent)
@@ -1129,25 +1129,25 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\inherits PropertyAnimation
\brief The NumberAnimation element animates changes in qreal-type values.
- NumberAnimation is a specialized PropertyAnimation that defines an
+ NumberAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a numerical value changes.
- Here is a NumberAnimation applied to the \c x property of a \l Rectangle
- as a property value source. It animates the \c x value from its current
+ Here is a NumberAnimation applied to the \c x property of a \l Rectangle
+ as a property value source. It animates the \c x value from its current
value to a value of 50, over 1000 milliseconds:
\snippet doc/src/snippets/declarative/numberanimation.qml 0
Like any other animation element, a NumberAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
Note that NumberAnimation may not animate smoothly if there are irregular
changes in the number value that it is tracking. If this is the case, use
SmoothedAnimation instead.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -1193,10 +1193,10 @@ void QDeclarativeNumberAnimation::init()
If the NumberAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeNumberAnimation::from() const
@@ -1219,7 +1219,7 @@ void QDeclarativeNumberAnimation::setFrom(qreal f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeNumberAnimation::to() const
{
@@ -1241,15 +1241,15 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
\inherits PropertyAnimation
\brief The Vector3dAnimation element animates changes in QVector3d values.
- Vector3dAnimation is a specialized PropertyAnimation that defines an
+ Vector3dAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a Vector3d value changes.
Like any other animation element, a Vector3dAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -1270,10 +1270,10 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation()
If the Vector3dAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVector3D QDeclarativeVector3dAnimation::from() const
{
@@ -1295,7 +1295,7 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVector3D QDeclarativeVector3dAnimation::to() const
{
@@ -1318,7 +1318,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
\brief The RotationAnimation element animates changes in rotation values.
RotationAnimation is a specialized PropertyAnimation that gives control
- over the direction of rotation during an animation.
+ over the direction of rotation during an animation.
By default, it rotates in the direction
of the numerical change; a rotation from 0 to 240 will rotate 240 degrees
@@ -1334,7 +1334,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
Notice the RotationAnimation did not need to set a \l target
value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
- your own properties via \l {PropertyAnimation::properties}{properties} or
+ your own properties via \l {PropertyAnimation::properties}{properties} or
\l {PropertyAnimation::property}{property}.
Also, note the \l Rectangle will be rotated around its default
@@ -1344,11 +1344,11 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
PropertyAction documentation for more details.
Like any other animation element, a RotationAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
{
@@ -1421,10 +1421,10 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation()
If the RotationAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeRotationAnimation::from() const
{
@@ -1446,7 +1446,7 @@ void QDeclarativeRotationAnimation::setFrom(qreal f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeRotationAnimation::to() const
{
@@ -1572,15 +1572,15 @@ QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGro
if this is the preferred behavior.
Like any other animation element, a SequentialAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \note Once an animation has been grouped into a SequentialAnimation or
+ \note Once an animation has been grouped into a SequentialAnimation or
ParallelAnimation, it cannot be individually started and stopped; the
SequentialAnimation or ParallelAnimation must be started and stopped as a group.
-
- \sa ParallelAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+
+ \sa ParallelAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSequentialAnimation::QDeclarativeSequentialAnimation(QObject *parent) :
@@ -1642,15 +1642,15 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
\snippet doc/src/snippets/declarative/parallelanimation.qml 0
Like any other animation element, a ParallelAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \note Once an animation has been grouped into a SequentialAnimation or
+ \note Once an animation has been grouped into a SequentialAnimation or
ParallelAnimation, it cannot be individually started and stopped; the
SequentialAnimation or ParallelAnimation must be started and stopped as a group.
- \sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa SequentialAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) :
QDeclarativeAnimationGroup(parent)
@@ -1745,14 +1745,14 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
\inherits Animation
\brief The PropertyAnimation element animates changes in property values.
- PropertyAnimation provides a way to animate changes to a property's value.
+ PropertyAnimation provides a way to animate changes to a property's value.
It can be used to define animations in a number of ways:
-
+
\list
\o In a \l Transition
- For example, to animate any objects that have changed their \c x or \c y properties
+ For example, to animate any objects that have changed their \c x or \c y properties
as a result of a state change, using an \c InOutQuad easing curve:
\snippet doc/src/snippets/declarative/propertyanimation.qml transition
@@ -1792,12 +1792,12 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
Depending on how the animation is used, the set of properties normally used will be
different. For more information see the individual property documentation, as well
- as the \l{QML Animation} introduction.
+ as the \l{QML Animation and Transitions} introduction.
Note that PropertyAnimation inherits the abstract \l Animation element.
This includes additional properties and methods for controlling the animation.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QObject *parent)
@@ -1857,10 +1857,10 @@ void QDeclarativePropertyAnimation::setDuration(int duration)
If the PropertyAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVariant QDeclarativePropertyAnimation::from() const
{
@@ -1887,7 +1887,7 @@ void QDeclarativePropertyAnimation::setFrom(const QVariant &f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVariant QDeclarativePropertyAnimation::to() const
{
@@ -2254,7 +2254,7 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop)
As seen in the above example, properties is specified as a comma-separated string of property names to animate.
- \sa exclude, {QML Animation}
+ \sa exclude, {QML Animation and Transitions}
*/
QDeclarativeListProperty<QObject> QDeclarativePropertyAnimation::targets()
{
@@ -2437,7 +2437,7 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
ParentAnimation is used to animate a parent change for an \l Item.
For example, the following ParentChange changes \c blueRect to become
- a child of \c redRect when it is clicked. The inclusion of the
+ a child of \c redRect when it is clicked. The inclusion of the
ParentAnimation, which defines a NumberAnimation to be applied during
the transition, ensures the item animates smoothly as it moves to
its new parent:
@@ -2452,17 +2452,17 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
to animate the parent change via another item that does not have clipping
enabled. Such an item can be set using the \l via property.
- For convenience, when a ParentAnimation is used in a \l Transition, it will
- animate any ParentChange that has occurred during the state change.
+ For convenience, when a ParentAnimation is used in a \l Transition, it will
+ animate any ParentChange that has occurred during the state change.
This can be overridden by setting a specific target item using the
\l target property.
Like any other animation element, a ParentAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeParentAnimation::QDeclarativeParentAnimation(QObject *parent)
: QDeclarativeAnimationGroup(*(new QDeclarativeParentAnimationPrivate), parent)
@@ -2765,6 +2765,8 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions,
d->endAction->setAnimAction(d->via ? viaData : data, QActionAnimation::DeleteWhenStopped);
d->startAction->setAnimAction(d->via ? data : 0, QActionAnimation::DeleteWhenStopped);
}
+ if (!d->via)
+ delete viaData;
} else {
delete data;
delete viaData;
@@ -2793,23 +2795,23 @@ QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation()
\inherits Animation
\brief The AnchorAnimation element animates changes in anchor values.
- AnchorAnimation is used to animate an anchor change.
+ AnchorAnimation is used to animate an anchor change.
In the following snippet we animate the addition of a right anchor to a \l Rectangle:
\snippet doc/src/snippets/declarative/anchoranimation.qml 0
- For convenience, when an AnchorAnimation is used in a \l Transition, it will
- animate any AnchorChanges that have occurred during the state change.
+ For convenience, when an AnchorAnimation is used in a \l Transition, it will
+ animate any AnchorChanges that have occurred during the state change.
This can be overridden by setting a specific target item using the
\l target property.
Like any other animation element, an AnchorAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, AnchorChanges
+ \sa {QML Animation and Transitions}, AnchorChanges
*/
QDeclarativeAnchorAnimation::QDeclarativeAnchorAnimation(QObject *parent)
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
index e584476700..41f8fe5181 100644
--- a/src/declarative/util/qdeclarativebehavior.cpp
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -76,7 +76,7 @@ public:
\since 4.7
\brief The Behavior element allows you to specify a default animation for a property change.
- A Behavior defines the default animation to be applied whenever a
+ A Behavior defines the default animation to be applied whenever a
particular property value changes.
For example, the following Behavior defines a NumberAnimation to be run
@@ -93,7 +93,7 @@ public:
Behavior, the \l Transition animation overrides the Behavior for that
state change.
- \sa {QML Animation}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
+ \sa {QML Animation and Transitions}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
*/
@@ -205,7 +205,7 @@ void QDeclarativeBehavior::write(const QVariant &value)
d->animation->qtAnimation()->start();
d->blockRunningChanged = false;
if (!after.contains(d->property))
- QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
}
void QDeclarativeBehavior::setTarget(const QDeclarativeProperty &property)
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index 5a66aabcea..83a7d83161 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -117,6 +117,8 @@ public:
id: area
}
// ...
+ \endqml
+ \qml
Connections {
target: area
onClicked: foo(parameters)
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 80b52fda25..fb77ec3cf0 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -108,7 +108,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
The following example shows a ListModel containing three elements, with the roles
"name" and "cost".
- \div {float-right}
+ \div {class="float-right"}
\inlineimage listmodel.png
\enddiv
@@ -133,7 +133,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
The delegate displays all the fruit attributes:
- \div {float-right}
+ \div {class="float-right"}
\inlineimage listmodel-nested.png
\enddiv
@@ -143,7 +143,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
\section1 Modifying List Models
The content of a ListModel may be created and modified using the clear(),
- append(), set() and setProperty() methods. For example:
+ append(), set(), insert() and setProperty() methods. For example:
\snippet doc/src/snippets/declarative/listmodel-modify.qml delegate
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index 9bcb2638d1..b03630d854 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -118,12 +118,13 @@ QT_BEGIN_NAMESPACE
\section2 Immediate property changes in transitions
- When \l Transitions are used to animate state changes, they animate
- properties from their values in the current state to those defined in the
- new state (as defined by PropertyChanges objects). However,
- it is sometimes desirable to set a property value \e immediately during a
- \l Transition, without animation; in these cases, the PropertyAction
- element can be used to force an immediate property change.
+ When \l{QML Animation and Transitions}{Transitions} are used to animate
+ state changes, they animate properties from their values in the current
+ state to those defined in the new state (as defined by PropertyChanges
+ objects). However, it is sometimes desirable to set a property value
+ \e immediately during a \l Transition, without animation; in these cases,
+ the PropertyAction element can be used to force an immediate property
+ change.
See the PropertyAction documentation for more details.
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index e2f6e3c768..9def5b4ca8 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -257,8 +257,8 @@ void QSmoothedAnimation::init()
A SmoothedAnimation animates a property's value to a set target value
using an ease in/out quad easing curve. When the target value changes,
- the easing curves used to animate between the old and new target values
- are smoothly spliced together to create a smooth movement to the new
+ the easing curves used to animate between the old and new target values
+ are smoothly spliced together to create a smooth movement to the new
target value that maintains the current velocity.
The follow example shows one \l Rectangle tracking the position of another
@@ -288,11 +288,11 @@ void QSmoothedAnimation::init()
of 0.5 will take 2000 ms to complete.
Like any other animation element, a SmoothedAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa SpringAnimation, NumberAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa SpringAnimation, NumberAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent)
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp
index 1212a1c2d2..bb58b0a7c4 100644
--- a/src/declarative/util/qdeclarativespringanimation.cpp
+++ b/src/declarative/util/qdeclarativespringanimation.cpp
@@ -246,19 +246,19 @@ void QDeclarativeSpringAnimationPrivate::updateMode()
You can also limit the maximum \l velocity of the animation.
- The following \l Rectangle moves to the position of the mouse using a
+ The following \l Rectangle moves to the position of the mouse using a
SpringAnimation when the mouse is clicked. The use of the \l Behavior
- on the \c x and \c y values indicates that whenever these values are
+ on the \c x and \c y values indicates that whenever these values are
changed, a SpringAnimation should be applied.
\snippet doc/src/snippets/declarative/springanimation.qml 0
Like any other animation element, a SpringAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa SmoothedAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
+ \sa SmoothedAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
*/
QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent)
@@ -299,7 +299,7 @@ void QDeclarativeSpringAnimation::setVelocity(qreal velocity)
This property describes how strongly the target is pulled towards the
source. The default value is 0 (that is, the spring-like motion is disabled).
-
+
The useful value range is 0 - 5.0.
When this property is set and the \l velocity value is greater than 0,
@@ -394,9 +394,9 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus)
\qmlproperty real SpringAnimation::mass
This property holds the "mass" of the property being moved.
- The value is 1.0 by default.
-
- A greater mass causes slower movement and a greater spring-like
+ The value is 1.0 by default.
+
+ A greater mass causes slower movement and a greater spring-like
motion when an item comes to rest.
*/
qreal QDeclarativeSpringAnimation::mass() const
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 5a4e2b1f99..5718e29f90 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -152,14 +152,14 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
Notice the default state is referred to using an empty string ("").
- States are commonly used together with \l {Transitions} to provide
+ States are commonly used together with \l{QML Animation and Transitions}{Transitions} to provide
animations when state changes occur.
\note Setting the state of an object from within another state of the same object is
not allowed.
\sa {declarative/animation/states}{states example}, {qmlstates}{States},
- {qdeclarativeanimation.html#transitions}{QML Transitions}, QtDeclarative
+ {QML Animation and Transitions}{Transitions}, QtDeclarative
*/
QDeclarativeState::QDeclarativeState(QObject *parent)
: QObject(*(new QDeclarativeStatePrivate), parent)
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
index f1d09971e9..6459bf9ae3 100644
--- a/src/declarative/util/qdeclarativestategroup.cpp
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -88,7 +88,7 @@ public:
/*!
\qmlclass StateGroup QDeclarativeStateGroup
- \ingroup qml-state-elements
+ \ingroup qml-state-elements
\since 4.7
\brief The StateGroup element provides state support for non-Item elements.
@@ -113,7 +113,7 @@ public:
}
\endqml
- \sa {qmlstate}{States} {Transitions}, {QtDeclarative}
+ \sa {qmlstate}{States} {QML Animation and Transitions}{Transitions}, {QtDeclarative}
*/
QDeclarativeStateGroup::QDeclarativeStateGroup(QObject *parent)
@@ -213,7 +213,7 @@ void QDeclarativeStateGroupPrivate::clear_states(QDeclarativeListProperty<QDecla
}
\endqml
- \sa {Transitions}
+ \sa {QML Animation and Transitions}{Transitions}
*/
QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeStateGroup::transitionsProperty()
{
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 063ec3e2c1..1a574b8960 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -60,24 +60,24 @@ QT_BEGIN_NAMESPACE
A Transition defines the animations to be applied when a \l State change occurs.
For example, the following \l Rectangle has two states: the default state, and
- an added "moved" state. In the "moved state, the rectangle's position changes
+ an added "moved" state. In the "moved state, the rectangle's position changes
to (50, 50). The added Transition specifies that when the rectangle
changes between the default and the "moved" state, any changes
to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad.
\snippet doc/src/snippets/declarative/transition.qml 0
- Notice the example does not require \l{PropertyAnimation::}{to} and
+ Notice the example does not require \l{PropertyAnimation::}{to} and
\l{PropertyAnimation::}{from} values for the NumberAnimation. As a convenience,
these properties are automatically set to the values of \c x and \c y before
and after the state change; the \c from values are provided by
the current values of \c x and \c y, and the \c to values are provided by
- the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and
+ the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and
\l{PropertyAnimation::}{from} values anyway to override the default values.
- By default, a Transition's animations are applied for any state change in the
- parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to}
- values can be set to restrict the animations to only be applied when changing
+ By default, a Transition's animations are applied for any state change in the
+ parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to}
+ values can be set to restrict the animations to only be applied when changing
from one particular state to another.
To define multiple transitions, specify \l Item::transitions as a list:
@@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE
\l Behavior, the Transition animation overrides the \l Behavior for that
state change.
- \sa {QML Animation}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
+ \sa {QML Animation and Transitions}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
*/
//ParallelAnimationWrapper allows us to do a "callback" when the animation finishes, rather than connecting
@@ -111,8 +111,8 @@ class QDeclarativeTransitionPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QDeclarativeTransition)
public:
- QDeclarativeTransitionPrivate()
- : fromState(QLatin1String("*")), toState(QLatin1String("*")),
+ QDeclarativeTransitionPrivate()
+ : fromState(QLatin1String("*")), toState(QLatin1String("*")),
reversed(false), reversible(false), endState(0)
{
group.trans = this;
@@ -249,7 +249,7 @@ void QDeclarativeTransition::setFromState(const QString &f)
is reversed, and it is not necessary to set this property to reverse
the transition.
- However, if a SequentialAnimation is used, or if the \l from or \l to
+ However, if a SequentialAnimation is used, or if the \l from or \l to
properties have been set, this property will need to be set to reverse
a transition when a state change is reverted. For example, the following
transition applies a sequential animation when the mouse is pressed,
@@ -257,7 +257,7 @@ void QDeclarativeTransition::setFromState(const QString &f)
\snippet doc/src/snippets/declarative/transition-reversible.qml 0
- If the transition did not set the \c to and \c reversible values, then
+ If the transition did not set the \c to and \c reversible values, then
on the mouse release, the transition would play the PropertyAnimation
before the ColorAnimation instead of reversing the sequence.
*/
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 1b50a566ae..065b171f13 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -194,9 +194,9 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
\since 4.7
\brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.
- QDeclarativeItem objects can be placed on a standard QGraphicsScene and
- displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass
- provided as a convenience for displaying QML files, and connecting between
+ QDeclarativeItem objects can be placed on a standard QGraphicsScene and
+ displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass
+ provided as a convenience for displaying QML files, and connecting between
QML and C++ Qt objects.
QDeclarativeView provides:
@@ -236,7 +236,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
If you're using your own QGraphicsScene-based scene with QDeclarativeView, remember to
enable scene's sticky focus mode and to set itemIndexMethod to QGraphicsScene::NoIndex.
- \sa {Integrating QML with existing Qt UI code}, {Using QML in C++ Applications}
+ \sa {Integrating QML Code with Existing Qt UI Code}, {Using QML Bindings in C++ Applications}
*/
@@ -250,7 +250,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
/*!
\fn QDeclarativeView::QDeclarativeView(QWidget *parent)
-
+
Constructs a QDeclarativeView with the given \a parent.
*/
QDeclarativeView::QDeclarativeView(QWidget *parent)
@@ -704,7 +704,7 @@ void QDeclarativeView::paintEvent(QPaintEvent *event)
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Painting);
int time = 0;
- if (frameRateDebug())
+ if (frameRateDebug())
time = d->frameTimer.restart();
#ifdef Q_WS_MAC
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index 33170189d7..ef46697c2c 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -381,19 +381,11 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
If the dialog is accepted by the user, the QPrinter object is
correctly configured for printing.
- \raw HTML
- <table align="center">
- <tr><td>
- \endraw
- \inlineimage plastique-printdialog.png
- \raw HTML
- </td><td>
- \endraw
- \inlineimage plastique-printdialog-properties.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \table
+ \row
+ \o \inlineimage plastique-printdialog.png
+ \o \inlineimage plastique-printdialog-properties.png
+ \endtable
The printer dialog (shown above in Plastique style) enables access to common
printing properties. On X11 platforms that use the CUPS printing system, the
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 09bb56cd4b..d6dbcf6e78 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -1536,10 +1536,12 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
/*!
\since 4.2
- Opens an information message box with the specified \a title and
- \a text. The standard \a buttons are added to the message box. \a
- defaultButton specifies the button used when \key Enter is
- pressed. \a defaultButton must refer to a button that was given in \a buttons.
+ Opens an information message box with the given \a title and
+ \a text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box.
+ \a defaultButton specifies the button used when \key Enter is pressed.
+ \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
chooses a suitable default automatically.
@@ -1547,9 +1549,13 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
\key Esc was pressed instead, the \l{Default and Escape Keys}
{escape button} is returned.
- The message box is an \l{Qt::ApplicationModal} {application modal}
+ The message box is an \l{Qt::ApplicationModal}{application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa question(), warning(), critical()
*/
QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QString &title,
@@ -1564,8 +1570,10 @@ QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QStr
/*!
\since 4.2
- Opens a question message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a question message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1578,6 +1586,10 @@ QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QStr
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa information(), warning(), critical()
*/
QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString &title,
@@ -1590,8 +1602,10 @@ QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString
/*!
\since 4.2
- Opens a warning message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a warning message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1604,6 +1618,10 @@ QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa question(), information(), critical()
*/
QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString &title,
@@ -1616,8 +1634,10 @@ QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString
/*!
\since 4.2
- Opens a critical message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a critical message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1630,9 +1650,9 @@ QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
- \warning Do not delete \a parent during the execution of the dialog.
- If you want to do this, you should create the dialog
- yourself using one of the QMessageBox constructors.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
\sa question(), warning(), information()
*/
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index 014b61bfbc..9bb5424641 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -56,7 +56,7 @@
Items that are anchored are automatically added to the layout, and if items
are removed, all their anchors will be automatically removed.
- \div {float-left}
+ \div {class="float-left"}
\inlineimage simpleanchorlayout-example.png Using an anchor layout to align simple colored widgets.
\enddiv
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 0af36ac10b..e342783c97 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -579,19 +579,21 @@
QGraphicsItem pointer). The return value is unused; you cannot adjust
anything in this notification.
- \value ItemSceneChange The item is moved to a new scene. This notification
- is also sent when the item is added to its initial scene, and when it is
- removed. The value argument is the new scene (i.e., a QGraphicsScene
+ \value ItemSceneChange The item is moved to a new scene. This notification is
+ also sent when the item is added to its initial scene, and when it is removed.
+ The item's scene() is the old scene (or 0 if the item has not been added to a
+ scene yet). The value argument is the new scene (i.e., a QGraphicsScene
pointer), or a null pointer if the item is removed from a scene. Do not
- override this change by passing this item to QGraphicsScene::addItem() as
- this notification is delivered; instead, you can return the new scene from
+ override this change by passing this item to QGraphicsScene::addItem() as this
+ notification is delivered; instead, you can return the new scene from
itemChange(). Use this feature with caution; objecting to a scene change can
quickly lead to unwanted recursion.
- \value ItemSceneHasChanged The item's scene has changed. The value
- argument is the new scene (i.e., a pointer to a QGraphicsScene). Do not
- call setScene() in itemChange() as this notification is delivered. The
- return value is ignored.
+ \value ItemSceneHasChanged The item's scene has changed. The item's scene() is
+ the new scene. This notification is also sent when the item is added to its
+ initial scene, and when it is removed.The value argument is the new scene
+ (i.e., a pointer to a QGraphicsScene). Do not call setScene() in itemChange()
+ as this notification is delivered. The return value is ignored.
\value ItemCursorChange The item's cursor changes. The value argument is
the new cursor (i.e., a QCursor). Do not call setCursor() in itemChange()
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 158f9ab8b1..7182062e59 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -972,12 +972,15 @@ QString QIcon::themeName()
Returns the QIcon corresponding to \a name in the current
icon theme. If no such icon is found in the current theme
- \a fallback is return instead.
+ \a fallback is returned instead.
- The lastest version of the freedesktop icon specification and naming
- spesification can be obtained here:
- http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
- http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
+ The latest version of the freedesktop icon specification and naming
+ specification can be obtained here:
+
+ \list
+ \o \l{http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}
+ \o \l{http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html}
+ \endlist
To fetch an icon from the current icon theme:
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index d992dd538f..62116f3d24 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -797,6 +797,8 @@ QImage::QImage()
Constructs an image with the given \a width, \a height and \a
format.
+ A \l{isNull()}{null} image will be returned if memory cannot be allocated.
+
\warning This will create a QImage with uninitialized data. Call
fill() to fill the image with an appropriate pixel value before
drawing onto it with QPainter.
@@ -810,6 +812,8 @@ QImage::QImage(int width, int height, Format format)
/*!
Constructs an image with the given \a size and \a format.
+ A \l{isNull()}{null} image is returned if memory cannot be allocated.
+
\warning This will create a QImage with uninitialized data. Call
fill() to fill the image with an appropriate pixel value before
drawing onto it with QPainter.
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 41abe957bf..2c70ade296 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -416,7 +416,8 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget)
int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1));
if (index != -1)
disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
- QGraphicsItem *rootItem;
+
+ QGraphicsItem *rootItem = 0;
foreach (QGraphicsItem *item, gv->scene()->items()) {
if (!item->parentItem()) {
rootItem = item;
@@ -828,7 +829,7 @@ void QCoeFepInputContext::translateInputWidget()
return;
// Fetch root item (i.e. graphicsitem with no parent)
- QGraphicsItem *rootItem;
+ QGraphicsItem *rootItem = 0;
foreach (QGraphicsItem *item, gv->scene()->items()) {
if (!item->parentItem()) {
rootItem = item;
diff --git a/src/gui/inputmethod/qinputcontext.cpp b/src/gui/inputmethod/qinputcontext.cpp
index 063aefd652..f083e51981 100644
--- a/src/gui/inputmethod/qinputcontext.cpp
+++ b/src/gui/inputmethod/qinputcontext.cpp
@@ -355,9 +355,10 @@ void QInputContext::widgetDestroyed(QWidget *widget)
in complex input method. In the case, call QInputContext::reset()
to ensure proper termination of inputting.
- You must not send any QInputMethodEvent except empty InputMethodEnd event using
- QInputContext::reset() at reimplemented reset(). It will break
- input state consistency.
+ In a reimplementation of reset(), you must not send any
+ QInputMethodEvent containing preedit text. You can only commit
+ string and attributes; otherwise, you risk breaking input state
+ consistency.
*/
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index d6d9536d11..471c199bc2 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -643,8 +643,12 @@ int QHeaderView::sectionSize(int logicalIndex) const
}
/*!
- Returns the section position of the given \a logicalIndex, or -1 if the
- section is hidden.
+
+ Returns the section position of the given \a logicalIndex, or -1
+ if the section is hidden. The position is measured in pixels from
+ the first visible item's top-left corner to the top-left corner of
+ the item with \a logicalIndex. The measurement is along the x-axis
+ for horizontal headers and along the y-axis for vertical headers.
\sa sectionViewportPosition()
*/
diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp
index 94e3b76b1e..61a935fdc9 100644
--- a/src/gui/itemviews/qlistwidget.cpp
+++ b/src/gui/itemviews/qlistwidget.cpp
@@ -1500,7 +1500,9 @@ void QListWidget::setCurrentRow(int row, QItemSelectionModel::SelectionFlags com
}
/*!
- Returns a pointer to the item at the coordinates \a p.
+ Returns a pointer to the item at the coordinates \a p. The coordinates
+ are relative to the list widget's \l{QAbstractScrollArea::}{viewport()}.
+
*/
QListWidgetItem *QListWidget::itemAt(const QPoint &p) const
{
@@ -1514,6 +1516,9 @@ QListWidgetItem *QListWidget::itemAt(const QPoint &p) const
\overload
Returns a pointer to the item at the coordinates (\a x, \a y).
+ The coordinates are relative to the list widget's
+ \l{QAbstractScrollArea::}{viewport()}.
+
*/
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index 4db29d6525..2ea9a4316b 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -2830,7 +2830,8 @@ void QTreeWidget::setCurrentItem(QTreeWidgetItem *item, int column,
/*!
- Returns a pointer to the item at the coordinates \a p.
+ Returns a pointer to the item at the coordinates \a p. The coordinates
+ are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}.
\sa visualItemRect()
*/
@@ -2844,7 +2845,8 @@ QTreeWidgetItem *QTreeWidget::itemAt(const QPoint &p) const
\fn QTreeWidgetItem *QTreeWidget::itemAt(int x, int y) const
\overload
- Returns a pointer to the item at the coordinates (\a x, \a y).
+ Returns a pointer to the item at the coordinates (\a x, \a y). The coordinates
+ are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}.
*/
/*!
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 3d642d0419..769b136772 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1271,15 +1271,36 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowIcon_sys(true);
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
- // If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- QWidget *const window = qwidget->window();
- if (!window->parentWidget()) { // Only top level native windows have control over cba/status pane
- const bool decorationsVisible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
- const bool statusPaneVisibility = decorationsVisible;
- const bool isFullscreen = window->windowState() & Qt::WindowFullScreen;
- const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint;
- const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaVisibilityHint));
- S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
+ if (qwidget->isWindow()) {
+ QWidget *const window = qwidget->window();
+ QWidget *parentWindow = window->parentWidget();
+ if (parentWindow) {
+ while (parentWindow->parentWidget())
+ parentWindow = parentWindow->parentWidget();
+ } else {
+ parentWindow = window;
+ }
+
+ const bool parentDecorationsVisible = !(parentWindow->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool parentIsFullscreen = parentWindow->windowState() & Qt::WindowFullScreen;
+ const bool parentCbaVisibilityHint = parentWindow->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ bool buttonGroupVisibility = (parentDecorationsVisible || (parentIsFullscreen && parentCbaVisibilityHint));
+
+ // For non-toplevel normal and maximized windows, show cba if window has softkey
+ // actions even if topmost parent is not showing cba. Do the same for fullscreen
+ // windows that request it.
+ if (!buttonGroupVisibility
+ && window->parentWidget()
+ && !(window->windowState() & Qt::WindowMinimized)
+ && ((window->windowFlags() & Qt::WindowSoftkeysVisibleHint) || !(window->windowState() & Qt::WindowFullScreen))) {
+ for (int i = 0; i < window->actions().size(); ++i) {
+ if (window->actions().at(i)->softKeyRole() != QAction::NoSoftKey) {
+ buttonGroupVisibility = true;
+ break;
+ }
+ }
+ }
+ S60->setStatusPaneAndButtonGroupVisibility(parentDecorationsVisible, buttonGroupVisibility);
}
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
@@ -1455,6 +1476,35 @@ bool QSymbianControl::isControlActive()
return IsActivated() ? true : false;
}
+void QSymbianControl::ensureFixNativeOrientation()
+{
+#if defined(Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION)
+ // Call FixNativeOrientation() for fullscreen QDeclarativeViews that
+ // have a locked orientation matching the native orientation of the device.
+ // This avoids unnecessary window rotation on wserv level.
+ if (!qwidget->isWindow() || qwidget->windowType() == Qt::Desktop
+ || !qwidget->inherits("QDeclarativeView")
+ || S60->screenNumberForWidget(qwidget) > 0)
+ return;
+ const bool isFullScreen = qwidget->windowState().testFlag(Qt::WindowFullScreen);
+ const bool isFixed = qwidget->d_func()->fixNativeOrientationCalled;
+ const bool matchesNative = qwidget->testAttribute(
+ S60->nativeOrientationIsPortrait ? Qt::WA_LockPortraitOrientation
+ : Qt::WA_LockLandscapeOrientation);
+ if (isFullScreen && matchesNative) {
+ if (!isFixed) {
+ Window().FixNativeOrientation();
+ qwidget->d_func()->fixNativeOrientationCalled = true;
+ }
+ } else if (isFixed) {
+ qwidget->d_func()->fixNativeOrientationCalled = false;
+ qwidget->hide();
+ qwidget->d_func()->create_sys(0, false, true);
+ qwidget->show();
+ }
+#endif
+}
+
/*!
\typedef QApplication::QS60MainApplicationFactory
\since 4.6
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index 3496297403..09e2b5f6dd 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -113,12 +113,20 @@ void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonG
void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba)
{
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ QT_TRAP_THROWING(
+ //EAknSoftkeyEmpty is used, because using -1 adds softkeys without actions on Symbian3
+ cba.SetCommandL(0, EAknSoftkeyEmpty, KNullDesC);
+ cba.SetCommandL(2, EAknSoftkeyEmpty, KNullDesC);
+ );
+#else
QT_TRAP_THROWING(
//Using -1 instead of EAknSoftkeyEmpty to avoid flickering.
cba.SetCommandL(0, -1, KNullDesC);
// TODO: Should we clear also middle SK?
cba.SetCommandL(2, -1, KNullDesC);
);
+#endif
realSoftKeyActions.clear();
}
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 3bb27c3a37..102c0caa87 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -189,6 +189,8 @@ public:
int screenHeightInPixelsForScreen[qt_symbian_max_screens];
int screenWidthInTwipsForScreen[qt_symbian_max_screens];
int screenHeightInTwipsForScreen[qt_symbian_max_screens];
+
+ bool nativeOrientationIsPortrait;
};
Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data();
@@ -233,6 +235,8 @@ public:
bool isControlActive();
+ void ensureFixNativeOrientation();
+
#ifdef Q_WS_S60
void FadeBehindPopup(bool fade){ popupFader.FadeBehindPopup( this, this, fade); }
void HandleStatusPaneSizeChange();
@@ -327,9 +331,11 @@ inline QS60Data::QS60Data()
inline void QS60Data::updateScreenSize()
{
+ CWsScreenDevice *dev = S60->screenDevice();
+ int screenModeCount = dev->NumScreenModes();
+ int mode = dev->CurrentScreenMode();
TPixelsTwipsAndRotation params;
- int mode = S60->screenDevice()->CurrentScreenMode();
- S60->screenDevice()->GetScreenModeSizeAndRotation(mode, params);
+ dev->GetScreenModeSizeAndRotation(mode, params);
S60->screenWidthInPixels = params.iPixelSize.iWidth;
S60->screenHeightInPixels = params.iPixelSize.iHeight;
S60->screenWidthInTwips = params.iTwipsSize.iWidth;
@@ -352,6 +358,21 @@ inline void QS60Data::updateScreenSize()
S60->screenWidthInTwipsForScreen[i] = params.iTwipsSize.iWidth;
S60->screenHeightInTwipsForScreen[i] = params.iTwipsSize.iHeight;
}
+
+ // Look for a screen mode with rotation 0
+ // in order to decide what the native orientation is.
+ int nativeScreenWidthInPixels = 0;
+ int nativeScreenHeightInPixels = 0;
+ for (mode = 0; mode < screenModeCount; ++mode) {
+ TPixelsAndRotation sizeAndRotation;
+ dev->GetScreenModeSizeAndRotation(mode, sizeAndRotation);
+ if (sizeAndRotation.iRotation == CFbsBitGc::EGraphicsOrientationNormal) {
+ nativeScreenWidthInPixels = sizeAndRotation.iPixelSize.iWidth;
+ nativeScreenHeightInPixels = sizeAndRotation.iPixelSize.iHeight;
+ break;
+ }
+ }
+ S60->nativeOrientationIsPortrait = nativeScreenWidthInPixels <= nativeScreenHeightInPixels;
}
inline RWsSession& QS60Data::wsSession()
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 4b7349b1ec..3cc3e65a90 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -312,6 +312,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
, qd_hd(0)
#elif defined(Q_OS_SYMBIAN)
, symbianScreenNumber(0)
+ , fixNativeOrientationCalled(false)
#endif
{
if (!qApp) {
@@ -10970,6 +10971,9 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
}
QT_TRAP_THROWING(appUi->SetOrientationL(s60orientation));
S60->orientationSet = true;
+ QSymbianControl *window = static_cast<QSymbianControl *>(internalWinId());
+ if (window)
+ window->ensureFixNativeOrientation();
#endif
break;
}
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index e5a2c35ad5..919f8bc3da 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -908,6 +908,7 @@ public:
static QWidget *mouseGrabber;
static QWidget *keyboardGrabber;
int symbianScreenNumber; // only valid for desktop widget and top-levels
+ bool fixNativeOrientationCalled;
void s60UpdateIsOpaque();
void reparentChildren();
void registerTouchWindow();
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index b031936d92..d4eadaa1d3 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -278,6 +278,8 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
q->internalWinId()->SetRect(TRect(TPoint(x, y), TSize(w, h)));
topData()->normalGeometry = data.crect;
}
+ QSymbianControl *window = static_cast<QSymbianControl *>(q->internalWinId());
+ window->ensureFixNativeOrientation();
} else {
data.crect.setRect(x, y, w, h);
@@ -1208,17 +1210,41 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
}
#ifdef Q_WS_S60
- bool decorationsVisible(false);
- if (!parentWidget()) { // Only top level native windows have control over cba/status pane
- // Hide window decoration when switching to fullscreen / minimized otherwise show decoration.
- // The window decoration visibility has to be changed before doing actual window state
- // change since in that order the availableGeometry will return directly the right size and
- // we will avoid unnecessary redraws
- decorationsVisible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
- const bool statusPaneVisibility = decorationsVisible;
- const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaRequested));
- S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
+ // Hide window decoration when switching to fullscreen / minimized otherwise show decoration.
+ // The window decoration visibility has to be changed before doing actual window state
+ // change since in that order the availableGeometry will return directly the right size and
+ // we will avoid unnecessary redraws
+ Qt::WindowStates comparisonState = newstate;
+ QWidget *parentWindow = parentWidget();
+ if (parentWindow) {
+ while (parentWindow->parentWidget())
+ parentWindow = parentWindow->parentWidget();
+ comparisonState = parentWindow->windowState();
+ } else {
+ parentWindow = this;
+ }
+
+ const bool decorationsVisible = !(comparisonState & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool parentIsFullscreen = comparisonState & Qt::WindowFullScreen;
+ const bool parentCbaVisibilityHint = parentWindow->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ bool buttonGroupVisibility = (decorationsVisible || (parentIsFullscreen && parentCbaVisibilityHint));
+
+ // For non-toplevel normal and maximized windows, show cba if window has softkey
+ // actions even if topmost parent is not showing cba. Do the same for fullscreen
+ // windows that request it.
+ if (!buttonGroupVisibility
+ && parentWidget()
+ && !(newstate & Qt::WindowMinimized)
+ && ((windowFlags() & Qt::WindowSoftkeysVisibleHint) || !(newstate & Qt::WindowFullScreen))) {
+ for (int i = 0; i < actions().size(); ++i) {
+ if (actions().at(i)->softKeyRole() != QAction::NoSoftKey) {
+ buttonGroupVisibility = true;
+ break;
+ }
+ }
}
+ S60->setStatusPaneAndButtonGroupVisibility(decorationsVisible, buttonGroupVisibility);
+
#endif // Q_WS_S60
// Ensure the initial size is valid, since we store it as normalGeometry below.
@@ -1277,6 +1303,12 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
if (newstate & Qt::WindowActive)
activateWindow();
+ if (isWindow()) {
+ // Now that the new state is set, fix the display memory layout, if needed.
+ QSymbianControl *window = static_cast<QSymbianControl *>(effectiveWinId());
+ window->ensureFixNativeOrientation();
+ }
+
QWindowStateChangeEvent e(oldstate);
QApplication::sendEvent(this, &e);
}
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index 2f35dcd40a..8aab7c7a4b 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -972,7 +972,7 @@ void QCoreGraphicsPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, co
return;
bool differentSize = (QRectF(0, 0, pm.width(), pm.height()) != sr), doRestore = false;
- CGRect rect = CGRectMake(qRound(r.x()), qRound(r.y()), qRound(r.width()), qRound(r.height()));
+ CGRect rect = CGRectMake(r.x(), r.y(), r.width(), r.height());
QCFType<CGImageRef> image;
bool isBitmap = (pm.depth() == 1);
if (isBitmap) {
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 49f1a5fc57..2058040f6f 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1897,39 +1897,39 @@ static bool qt_painterpath_isect_line_rect(qreal x1, qreal y1, qreal x2, qreal y
return false;
}
-static bool qt_isect_curve_horizontal(const QBezier &bezier, qreal y, qreal x1, qreal x2)
+static bool qt_isect_curve_horizontal(const QBezier &bezier, qreal y, qreal x1, qreal x2, int depth = 0)
{
QRectF bounds = bezier.bounds();
if (y >= bounds.top() && y < bounds.bottom()
&& bounds.right() >= x1 && bounds.left() < x2) {
const qreal lower_bound = qreal(.01);
- if (bounds.width() < lower_bound && bounds.height() < lower_bound)
+ if (depth == 32 || bounds.width() < lower_bound && bounds.height() < lower_bound)
return true;
QBezier first_half, second_half;
bezier.split(&first_half, &second_half);
- if (qt_isect_curve_horizontal(first_half, y, x1, x2)
- || qt_isect_curve_horizontal(second_half, y, x1, x2))
+ if (qt_isect_curve_horizontal(first_half, y, x1, x2, depth + 1)
+ || qt_isect_curve_horizontal(second_half, y, x1, x2, depth + 1))
return true;
}
return false;
}
-static bool qt_isect_curve_vertical(const QBezier &bezier, qreal x, qreal y1, qreal y2)
+static bool qt_isect_curve_vertical(const QBezier &bezier, qreal x, qreal y1, qreal y2, int depth = 0)
{
QRectF bounds = bezier.bounds();
if (x >= bounds.left() && x < bounds.right()
&& bounds.bottom() >= y1 && bounds.top() < y2) {
const qreal lower_bound = qreal(.01);
- if (bounds.width() < lower_bound && bounds.height() < lower_bound)
+ if (depth == 32 || bounds.width() < lower_bound && bounds.height() < lower_bound)
return true;
QBezier first_half, second_half;
bezier.split(&first_half, &second_half);
- if (qt_isect_curve_vertical(first_half, x, y1, y2)
- || qt_isect_curve_vertical(second_half, x, y1, y2))
+ if (qt_isect_curve_vertical(first_half, x, y1, y2, depth + 1)
+ || qt_isect_curve_vertical(second_half, x, y1, y2, depth + 1))
return true;
}
return false;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index ac897b5396..2d9b6cd06b 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -107,8 +107,8 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = {
// *** generated pixel metrics ***
{5,0,-909,0,0,2,0,2,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106},
{5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106},
-{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
-{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,11,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,13,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106},
{9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184}
// *** End of generated data ***
@@ -1743,16 +1743,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QStyleOptionMenuItem optionMenuItem = *menuItem;
bool drawSubMenuIndicator = false;
+ bool drawSeparator = false;
switch(menuItem->menuItemType) {
- case QStyleOptionMenuItem::Scroller:
case QStyleOptionMenuItem::Separator:
- return; // no separators or scrollers in S60 menus
+ drawSeparator = true;
+ break;
+ case QStyleOptionMenuItem::Scroller:
+ return; // no scrollers in S60 menus
case QStyleOptionMenuItem::SubMenu:
drawSubMenuIndicator = true;
break;
default:
break;
}
+ if (drawSeparator) {
+ painter->save();
+ painter->setPen(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 10, 0));
+ painter->drawLine(optionMenuItem.rect.topLeft(), optionMenuItem.rect.bottomRight());
+ painter->restore();
+ return;
+ }
const bool enabled = optionMenuItem.state & State_Enabled;
const bool checkable = optionMenuItem.checkType != QStyleOptionMenuItem::NotCheckable;
bool ignoreCheckMark = false;
@@ -1856,20 +1866,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
//In Sym^3, native menu items have "lines" between them
if (QS60StylePrivate::isSingleClickUi()) {
- const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0);
- const int spacing = QS60StylePrivate::pixelMetric(PM_FrameCornerWidth);
- //native platform sets each color byte to same value for "line 16" which just defines alpha for
- //menuitem lines; lets use first byte "red".
- QColor lineColor = optionMenuItem.palette.text().color();
- if (lineColorAlpha.isValid())
- lineColor.setAlpha(lineColorAlpha.red());
- painter->save();
- painter->setPen(lineColor);
-
- const int lineStartX = optionMenuItem.rect.left() + (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) + spacing;
- const int lineEndX = optionMenuItem.rect.right() - (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) - spacing;
- painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom()));
- painter->restore();
+ int diff = widget->geometry().bottom() - optionMenuItem.rect.bottom();
+ if (const QComboBox *cb = qobject_cast<const QComboBox*>(widget))
+ diff = cb->view()->geometry().bottom() - optionMenuItem.rect.bottom();
+
+ // Skip drawing the horizontal line for the last menu item.
+ if (diff > optionMenuItem.rect.height()) {
+ const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0);
+ //native platform sets each color byte to same value for "line 16" which just defines alpha for
+ //menuitem lines; lets use first byte "red".
+ QColor lineColor = optionMenuItem.palette.text().color();
+ if (lineColorAlpha.isValid())
+ lineColor.setAlpha(lineColorAlpha.red());
+ painter->save();
+ painter->setPen(lineColor);
+ const int horizontalMargin = 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
+ const int lineStartX = optionMenuItem.rect.left() + horizontalMargin;
+ const int lineEndX = optionMenuItem.rect.right() - horizontalMargin;
+ painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom()));
+ painter->restore();
+ }
}
if (!enabled)
painter->restore();
@@ -2264,13 +2280,15 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif //QT_NO_MENU
) {
//Need extra check since dialogs have their own theme background
- if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) &&
- QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window))
- //todo: for combobox listviews, the background should include area for menu scrollers,
- //but this produces drawing issues as we need to turn clipping off.
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags);
- else
+ if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget)
+ && QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) {
+ // Add margin area to the background, to avoid background being cut for first and last item.
+ const int verticalMenuAdjustment = QS60StylePrivate::pixelMetric(PM_MenuVMargin);
+ const QRect adjustedMenuRect = option->rect.adjusted(0, -verticalMenuAdjustment, 0, verticalMenuAdjustment);
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, adjustedMenuRect, flags);
+ } else {
commonStyleDraws = true;
+ }
}
break;
case PE_FrameWindow:
@@ -2538,17 +2556,16 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) && tb->orientation() == Qt::Horizontal;
if (parentCanGrowHorizontally) {
- int visibleButtons = 0;
+ int buttons = 0;
//Make the auto-stretch to happen only for horizontal orientation
if (tb && tb->orientation() == Qt::Horizontal) {
QList<QAction*> actionList = tb->actions();
for (int i = 0; i < actionList.count(); i++) {
- if (actionList.at(i)->isVisible())
- visibleButtons++;
+ buttons++;
}
}
- if (widget->parentWidget() && visibleButtons > 0) {
+ if (widget->parentWidget() && buttons > 0) {
QWidget *w = const_cast<QWidget *>(widget);
int toolBarMaxWidth = 0;
int totalMargin = 0;
@@ -2571,7 +2588,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
toolBarMaxWidth -= totalMargin;
//ensure that buttons are side-by-side and not on top of each other
- const int toolButtonWidth = (toolBarMaxWidth / visibleButtons)
+ const int toolButtonWidth = (toolBarMaxWidth / buttons)
- pixelMetric(QStyle::PM_ToolBarItemSpacing)
- pixelMetric(QStyle::PM_ToolBarItemMargin)
//toolbar frame needs to be reduced again, since QToolBarLayout adds it for each toolbar action
@@ -2604,10 +2621,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz += QSize(2 * f->lineWidth, 4 * f->lineWidth);
break;
case CT_TabBarTab: {
- const QSize naviPaneSize = QS60StylePrivate::naviPaneSize();
sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
- if (naviPaneSize.height() > sz.height())
- sz.setHeight(naviPaneSize.height());
// Adjust beginning tabbar item size, if scrollbuttons are used. This is to ensure that the
// tabbar item content fits, since scrollbuttons are making beginning tabbar item smaller.
int scrollButtonSize = 0;
@@ -2627,7 +2641,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_ItemViewItem:
if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
- sz = QSize();
+ sz = QSize(menuItem->rect.width(), 1);
break;
}
}
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 3628b27397..e146a4e3ac 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -562,8 +562,6 @@ public:
void handleSkinChange();
#endif // Q_WS_S60
- static QSize naviPaneSize();
-
//Checks that the current brush is transparent or has BrushStyle NoBrush,
//so that theme graphic background can be drawn.
static bool canDrawThemeBackground(const QBrush &backgroundBrush, const QWidget *widget);
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 64d2ad2800..6a7158cab0 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -158,7 +158,6 @@ public:
static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part);
static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame);
static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags);
- static QSize naviPaneSize();
static TAknsItemID partSpecificThemeId(int part);
static QVariant themeDefinition(QS60StyleEnums::ThemeDefinitions definition, QS60StyleEnums::SkinParts part);
@@ -1478,23 +1477,6 @@ void QS60StylePrivate::handleSkinChange()
#endif
}
-QSize QS60StylePrivate::naviPaneSize()
-{
- return QS60StyleModeSpecifics::naviPaneSize();
-}
-
-QSize QS60StyleModeSpecifics::naviPaneSize()
-{
- CAknNavigationControlContainer* naviContainer;
- if (S60->statusPane()) {
- TRAPD(err, naviContainer = static_cast<CAknNavigationControlContainer*>
- (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi))));
- if (err==KErrNone)
- return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight);
- }
- return QSize(0,0);
-}
-
int QS60StylePrivate::currentAnimationFrame(QS60StyleEnums::SkinParts part)
{
QS60StyleAnimation *animation = animationDefinition(part);
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 7223c6bd53..a5aeac3fb9 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -318,11 +318,6 @@ QPixmap QS60StylePrivate::backgroundTexture(bool /*skipCreation*/)
return *m_background;
}
-QSize QS60StylePrivate::naviPaneSize()
-{
- return QSize(0, 0);
-}
-
bool QS60StylePrivate::isTouchSupported()
{
#ifdef QT_KEYPAD_NAVIGATION
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index b7a26974d0..66ce64bfbf 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1552,7 +1552,7 @@ void QTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton button, con
extendBlockwiseSelection(cursorPos);
else if (selectedWordOnDoubleClick.hasSelection())
extendWordwiseSelection(cursorPos, pos.x());
- else if (wordSelectionEnabled)
+ else if (!wordSelectionEnabled)
setCursorPosition(cursorPos, QTextCursor::KeepAnchor);
} else {
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index f948af9237..dabfec0225 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -511,7 +511,7 @@ QAbstractScrollArea::QAbstractScrollArea(QAbstractScrollAreaPrivate &dd, QWidget
/*!
Constructs a viewport.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
*/
QAbstractScrollArea::QAbstractScrollArea(QWidget *parent)
:QFrame(*new QAbstractScrollAreaPrivate, parent)
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index cb36398cb2..2570496262 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -265,7 +265,7 @@ void QAbstractSliderPrivate::setSteps(int single, int page)
/*!
Constructs an abstract slider.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
The \l minimum defaults to 0, the \l maximum to 99, with a \l
singleStep size of 1 and a \l pageStep size of 10, and an initial
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index d63ccfbf30..7b4ef50d48 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -947,7 +947,10 @@ QComboBox::QComboBox(bool rw, QWidget *parent, const char *name)
to set and get item data (e.g., setItemData() and itemText()). You
can also set a new model and view (with setModel() and setView()).
For the text and icon in the combobox label, the data in the model
- that has the Qt::DisplayRole and Qt::DecorationRole is used.
+ that has the Qt::DisplayRole and Qt::DecorationRole is used. Note
+ that you cannot alter the \l{QAbstractItemView::}{SelectionMode}
+ of the view(), e.g., by using
+ \l{QAbstractItemView::}{setSelectionMode()}.
\image qstyle-comboboxes.png Comboboxes in the different built-in styles.
@@ -2465,12 +2468,7 @@ void QComboBox::showPopup()
// available screen geometry.This may override the vertical position, but it is more
// important to show as much as possible of the popup.
const int height = !boundToScreen ? listRect.height() : qMin(listRect.height(), screen.height());
-#ifdef Q_WS_S60
- //popup needs to be stretched with screen minimum dimension
- listRect.setHeight(qMin(screen.height(), screen.width()));
-#else
listRect.setHeight(height);
-#endif
if (boundToScreen) {
if (listRect.top() < screen.top())
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index c09b5a4c72..b12e5c5528 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1247,37 +1247,15 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
response to button presses; these are just like context menus
except for how they are invoked.
- \raw HTML
- <table align="center" cellpadding="0">
- <tr>
- <td>
- \endraw
- \inlineimage plastique-menu.png
- \raw HTML
- </td>
- <td>
- \endraw
- \inlineimage windowsxp-menu.png
- \raw HTML
- </td>
- <td>
- \endraw
- \inlineimage macintosh-menu.png
- \raw HTML
- </td>
-
- </tr>
- <tr>
- <td colspan="3">
- \endraw
- A menu shown in \l{Plastique Style Widget Gallery}{Plastique widget style},
+ \table 100%
+ \row
+ \o \inlineimage plastique-menu.png
+ \o \inlineimage windowsxp-menu.png
+ \o \inlineimage macintosh-menu.png
+ \endtable
+ \caption Fig. A menu shown in \l{Plastique Style Widget Gallery}{Plastique widget style},
\l{Windows XP Style Widget Gallery}{Windows XP widget style},
and \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \raw HTML
- </td>
- </tr>
- </table>
- \endraw
\section1 Actions
diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp
index c895b1b275..87738a0083 100644
--- a/src/gui/widgets/qscrollbar.cpp
+++ b/src/gui/widgets/qscrollbar.cpp
@@ -330,7 +330,7 @@ void QScrollBar::initStyleOption(QStyleOptionSlider *option) const
/*!
Constructs a vertical scroll bar.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
The \l {QAbstractSlider::minimum} {minimum} defaults to 0, the
\l {QAbstractSlider::maximum} {maximum} to 99, with a
diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp
index 964a6e13fe..ca8fc3757a 100644
--- a/src/gui/widgets/qsplitter.cpp
+++ b/src/gui/widgets/qsplitter.cpp
@@ -1016,7 +1016,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
/*!
Constructs a horizontal splitter with the \a parent
- arguments is passed on to the QFrame constructor.
+ argument passed on to the QFrame constructor.
\sa setOrientation()
*/
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index c2a2e98941..aae6a010f1 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -136,7 +136,7 @@ public:
GestureArea is an invisible item: it is never painted.
- \sa MouseArea, {declarative/touchinteraction/gestures}{Gestures example}
+ \sa MouseArea
*/
/*!
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index ccc20e65d4..69e59d1f0d 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -363,9 +363,9 @@ qint64 QFtpDTP::read(char *data, qint64 maxlen)
if (socket && socket->state() == QTcpSocket::ConnectedState) {
read = socket->read(data, maxlen);
} else {
- read = bytesFromSocket.size();
+ read = qMin(maxlen, qint64(bytesFromSocket.size()));
memcpy(data, bytesFromSocket.data(), read);
- bytesFromSocket.clear();
+ bytesFromSocket.remove(0, read);
}
bytesDone += read;
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 618ac79c03..a5cdf011aa 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const
Returns true if this certificate is valid; otherwise returns
false.
- Note: Currently, this function only checks that the current
+ Note: Currently, this function checks that the current
data-time is within the date-time range during which the
- certificate is considered valid. No other checks are
- currently performed.
+ certificate is considered valid, and checks that the
+ certificate is not in a blacklist of fraudulent certificates.
\sa isNull()
*/
bool QSslCertificate::isValid() const
{
const QDateTime currentTime = QDateTime::currentDateTime();
- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter;
+ return currentTime >= d->notValidBefore &&
+ currentTime <= d->notValidAfter &&
+ ! QSslCertificatePrivate::isBlacklisted(*this);
}
/*!
@@ -798,6 +800,30 @@ QList<QSslCertificate> QSslCertificatePrivate::certificatesFromDer(const QByteAr
return certificates;
}
+// These certificates are known to be fraudulent and were created during the comodo
+// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
+static const char *certificate_blacklist[] = {
+ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e",
+ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06",
+ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3",
+ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29",
+ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71",
+ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47",
+ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43",
+ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0",
+ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0",
+ 0
+};
+
+bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate)
+{
+ for (int a = 0; certificate_blacklist[a] != 0; a++) {
+ if (certificate.serialNumber() == certificate_blacklist[a])
+ return true;
+ }
+ return false;
+}
+
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, const QSslCertificate &certificate)
{
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index cdceb0f85a..1ce33d3bfd 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -96,6 +96,7 @@ public:
static QSslCertificate QSslCertificate_from_X509(X509 *x509);
static QList<QSslCertificate> certificatesFromPem(const QByteArray &pem, int count = -1);
static QList<QSslCertificate> certificatesFromDer(const QByteArray &der, int count = -1);
+ static bool isBlacklisted(const QSslCertificate &certificate);
friend class QSslSocketBackendPrivate;
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index c1b17125cd..10f1f3038f 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -1237,6 +1237,13 @@ bool QSslSocketBackendPrivate::startHandshake()
X509 *x509 = q_SSL_get_peer_certificate(ssl);
configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509);
q_X509_free(x509);
+ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) {
+ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted"));
+ q->setSocketError(QAbstractSocket::SslHandshakeFailedError);
+ emit q->error(QAbstractSocket::SslHandshakeFailedError);
+ plainSocket->disconnectFromHost();
+ return false;
+ }
// Start translating errors.
QList<QSslError> errors;
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 4698a5c9b8..684116c8b0 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -69,6 +69,7 @@
#if !defined(QT_OPENGL_ES_1)
#include "gl2paintengineex/qpaintengineex_opengl2_p.h"
+#include <private/qwindowsurface_gl_p.h>
#endif
#ifndef QT_OPENGL_ES_2
@@ -90,7 +91,6 @@
#include <private/qpixmapdata_p.h>
#include <private/qpixmapdata_gl_p.h>
#include <private/qglpixelbuffer_p.h>
-#include <private/qwindowsurface_gl_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
#include "qcolormap.h"
#include "qfile.h"
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index 7caaabd619..1b41db47db 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -48,6 +48,7 @@
#include <private/qgl_p.h>
#include <private/qpaintengine_opengl_p.h>
#include <private/qwidget_p.h> // to access QWExtra
+#include <private/qnativeimagehandleprovider_p.h>
#include "qgl_egl_p.h"
#include "qpixmapdata_gl_p.h"
#include "qgltexturepool_p.h"
@@ -411,6 +412,11 @@ void QGLPixmapData::fromNativeType(void* pixmap, NativeType type)
m_hasAlpha = m_source.hasAlphaChannel();
m_hasFillColor = false;
m_dirty = true;
+ } else if (type == QPixmapData::NativeImageHandleProvider && pixmap) {
+ destroyTexture();
+ nativeImageHandleProvider = static_cast<QNativeImageHandleProvider *>(pixmap);
+ // Cannot defer the retrieval, we need at least the size right away.
+ createFromNativeImageHandleProvider();
}
}
@@ -425,4 +431,42 @@ void* QGLPixmapData::toNativeType(NativeType type)
return 0;
}
+bool QGLPixmapData::initFromNativeImageHandle(void *handle, const QString &type)
+{
+ if (type == QLatin1String("RSgImage")) {
+ fromNativeType(handle, QPixmapData::SgImage);
+ return true;
+ } else if (type == QLatin1String("CFbsBitmap")) {
+ fromNativeType(handle, QPixmapData::FbsBitmap);
+ return true;
+ }
+ return false;
+}
+
+void QGLPixmapData::createFromNativeImageHandleProvider()
+{
+ void *handle = 0;
+ QString type;
+ nativeImageHandleProvider->get(&handle, &type);
+ if (handle) {
+ if (initFromNativeImageHandle(handle, type)) {
+ nativeImageHandle = handle;
+ nativeImageType = type;
+ } else {
+ qWarning("QGLPixmapData: Unknown native image type '%s'", qPrintable(type));
+ }
+ } else {
+ qWarning("QGLPixmapData: Native handle is null");
+ }
+}
+
+void QGLPixmapData::releaseNativeImageHandle()
+{
+ if (nativeImageHandleProvider && nativeImageHandle) {
+ nativeImageHandleProvider->release(nativeImageHandle, nativeImageType);
+ nativeImageHandle = 0;
+ nativeImageType = QString();
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index 7d0eb5bb90..61d8f26fda 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -43,13 +43,13 @@
#include <private/qgl_p.h>
#include <private/qglpixelbuffer_p.h>
#include <private/qglframebufferobject_p.h>
-#include <private/qwindowsurface_gl_p.h>
#ifdef Q_WS_X11
#include <private/qpixmapdata_x11gl_p.h>
#endif
#if !defined(QT_OPENGL_ES_1)
#include <private/qpixmapdata_gl_p.h>
+#include <private/qwindowsurface_gl_p.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h
index 41740ddc8b..8855c20362 100644
--- a/src/opengl/qpixmapdata_gl_p.h
+++ b/src/opengl/qpixmapdata_gl_p.h
@@ -76,6 +76,10 @@ void qt_gl_unregister_pixmap(QGLPixmapData *pd);
void qt_gl_hibernate_pixmaps();
#endif
+#ifdef Q_OS_SYMBIAN
+class QNativeImageHandleProvider;
+#endif
+
class QGLFramebufferObjectPool
{
public:
@@ -160,6 +164,9 @@ public:
QImage::Format idealFormat(QImage &image, Qt::ImageConversionFlags flags);
void* toNativeType(NativeType type);
void fromNativeType(void* pixmap, NativeType type);
+ bool initFromNativeImageHandle(void *handle, const QString &type);
+ void createFromNativeImageHandleProvider();
+ void releaseNativeImageHandle();
#endif
private:
@@ -191,6 +198,9 @@ private:
mutable QGLContext *m_ctx;
#ifdef Q_OS_SYMBIAN
mutable QVolatileImage m_source;
+ mutable QNativeImageHandleProvider *nativeImageHandleProvider;
+ void *nativeImageHandle;
+ QString nativeImageType;
#else
mutable QImage m_source;
#endif
diff --git a/src/opengl/qpixmapdata_poolgl.cpp b/src/opengl/qpixmapdata_poolgl.cpp
index 64de29ed07..44d9c84522 100644
--- a/src/opengl/qpixmapdata_poolgl.cpp
+++ b/src/opengl/qpixmapdata_poolgl.cpp
@@ -49,6 +49,7 @@
#include <private/qgl_p.h>
#include <private/qdrawhelper_p.h>
#include <private/qimage_p.h>
+#include <private/qnativeimagehandleprovider_p.h>
#include <private/qpaintengineex_opengl2_p.h>
@@ -254,6 +255,8 @@ QGLPixmapData::QGLPixmapData(PixelType type)
, m_renderFbo(0)
, m_engine(0)
, m_ctx(0)
+ , nativeImageHandleProvider(0)
+ , nativeImageHandle(0)
, m_dirty(false)
, m_hasFillColor(false)
, m_hasAlpha(false)
@@ -292,6 +295,8 @@ void QGLPixmapData::destroyTexture()
}
m_texture.id = 0;
inTexturePool = false;
+
+ releaseNativeImageHandle();
}
QPixmapData *QGLPixmapData::createCompatiblePixmapData() const
@@ -342,6 +347,9 @@ void QGLPixmapData::ensureCreated() const
m_dirty = false;
+ if (nativeImageHandleProvider && !nativeImageHandle)
+ const_cast<QGLPixmapData *>(this)->createFromNativeImageHandleProvider();
+
QGLShareContextScope ctx(qt_gl_share_widget()->context());
m_ctx = ctx;
@@ -860,9 +868,16 @@ void QGLPixmapData::detachTextureFromPool()
void QGLPixmapData::hibernate()
{
- // If the texture was imported (e.g, from an SgImage under Symbian),
- // then we cannot copy it back to main memory for storage.
- if (m_texture.id && m_source.isNull())
+ // If the image was imported (e.g, from an SgImage under Symbian), then
+ // skip the hibernation, there is no sense in copying it back to main
+ // memory because the data is most likely shared between several processes.
+ bool skipHibernate = (m_texture.id && m_source.isNull());
+#if defined(Q_OS_SYMBIAN)
+ // However we have to proceed normally if the image was retrieved via
+ // a handle provider.
+ skipHibernate &= !nativeImageHandleProvider;
+#endif
+ if (skipHibernate)
return;
forceToImage();
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 3f67c79860..80f5b2fd91 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -458,7 +458,7 @@ void QVGPixmapData::hibernate()
if (skipHibernate)
return;
- forceToImage();
+ forceToImage(false); // no readback allowed here
destroyImageAndContext();
}
@@ -502,12 +502,13 @@ int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
// Ensures that the pixmap is backed by some valid data and forces the data to
// be re-uploaded to the VGImage when toVGImage() is called next time.
-void QVGPixmapData::forceToImage()
+void QVGPixmapData::forceToImage(bool allowReadback)
{
if (!isValid())
return;
- ensureReadback(false);
+ if (allowReadback)
+ ensureReadback(false);
if (source.isNull())
source = QVolatileImage(w, h, sourceFormat());
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h
index 15ff88953f..c28459674d 100644
--- a/src/openvg/qpixmapdata_vg_p.h
+++ b/src/openvg/qpixmapdata_vg_p.h
@@ -188,7 +188,7 @@ protected:
QString nativeImageType;
#endif
- void forceToImage();
+ void forceToImage(bool allowReadback = true);
QImage::Format sourceFormat() const;
QImage::Format idealFormat(QImage *image, Qt::ImageConversionFlags flags) const;
void updateSerial();
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index dc74c4eb2f..6d6fb02a68 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -1025,11 +1025,10 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
case QPainter::CompositionMode_DestinationOut:
surface->SetPorterDuff(surface, DSPD_DST_OUT);
break;
-#if (Q_DIRECTFB_VERSION >= 0x010209)
case QPainter::CompositionMode_Destination:
- surface->SetPorterDuff(surface, DSPD_DST);
+ surface->SetSrcBlendFunction(surface, DSBF_ZERO);
+ surface->SetDstBlendFunction(surface, DSBF_ONE);
break;
-#endif
#if (Q_DIRECTFB_VERSION >= 0x010000)
case QPainter::CompositionMode_SourceAtop:
surface->SetPorterDuff(surface, DSPD_SRC_ATOP);
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index c904c3cf55..69a69227f7 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -170,7 +170,7 @@ bool QMeeGoGraphicsSystemSwitchHandler::eventFilter(QObject *object, QEvent *eve
if (visibleWidgets() == 0)
QMeeGoGraphicsSystem::switchToRaster();
} else {
- if (visibleWidgets() == 1)
+ if (visibleWidgets() > 0)
QMeeGoGraphicsSystem::switchToMeeGo();
}
}
diff --git a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
index 0970b8909f..b6ba7ec29f 100644
--- a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
@@ -194,6 +194,8 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
void *data = 0;
int pitch = 0;
+ int surfaceWidth = 0;
+ int surfaceHeight = 0;
EGLSurface surface = 0;
QImage::Format format;
lockedImage = QImage();
@@ -206,9 +208,11 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_POINTER_KHR, (EGLint*) &data);
eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_PITCH_KHR, (EGLint*) &pitch);
+ eglQuerySurface(QEgl::display(), surface, EGL_WIDTH, (EGLint*) &surfaceWidth);
+ eglQuerySurface(QEgl::display(), surface, EGL_HEIGHT, (EGLint*) &surfaceHeight);
// Ok, here we know we just support those two formats. Real solution would be:
- // uqery also the format.
+ // query also the format.
if (backingX11Pixmap->depth() > 16)
format = QImage::Format_ARGB32_Premultiplied;
else
@@ -219,6 +223,12 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
return &lockedImage;
}
+ if (width() != surfaceWidth || height() != surfaceHeight) {
+ qWarning("Live texture dimensions don't match!");
+ QMeeGoExtensions::eglUnlockSurfaceKHR(QEgl::display(), surface);
+ return &lockedImage;
+ }
+
lockedImage = QImage((uchar *) data, width(), height(), pitch, format);
return &lockedImage;
}
diff --git a/src/qt3support/tools/q3asciidict.qdoc b/src/qt3support/tools/q3asciidict.qdoc
index e744633290..c276682ef8 100644
--- a/src/qt3support/tools/q3asciidict.qdoc
+++ b/src/qt3support/tools/q3asciidict.qdoc
@@ -43,7 +43,7 @@
performace as a Q3AsciiDict.
Example:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 0
In this example we use a dictionary to keep track of the line
edits we're using. We insert each line edit into the dictionary
with a unique name and then access the line edits via the
@@ -164,7 +164,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -295,7 +295,7 @@
iterator that operates on Q3AsciiDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 2
In the example we insert some line edits into a dictionary, then
iterate over the dictionary printing the strings associated with
those line edits.
diff --git a/src/qt3support/tools/q3dict.qdoc b/src/qt3support/tools/q3dict.qdoc
index 6b221f13e0..8fcbba4616 100644
--- a/src/qt3support/tools/q3dict.qdoc
+++ b/src/qt3support/tools/q3dict.qdoc
@@ -192,7 +192,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3dict.cpp 0
If there are two or more items with equal keys, then the last item
that was inserted will be replaced.
@@ -326,7 +326,7 @@
point to the next item in the (arbitrary) traversal order.
Example:
- \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3dict.cpp 1
In the example we insert some pointers to line edits into a
dictionary, then iterate over the dictionary printing the strings
associated with the line edits.
diff --git a/src/qt3support/tools/q3intdict.qdoc b/src/qt3support/tools/q3intdict.qdoc
index 684fc63529..f108f304c3 100644
--- a/src/qt3support/tools/q3intdict.qdoc
+++ b/src/qt3support/tools/q3intdict.qdoc
@@ -39,7 +39,7 @@
pointer. Dictionaries provide very fast insertion and lookup.
Example:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 0
See Q3Dict for full details, including the choice of dictionary
size, and how deletions are handled.
@@ -145,7 +145,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -270,7 +270,7 @@
iterator that operates on Q3IntDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 2
Note that the traversal order is arbitrary; you are not guaranteed the
order shown above.
diff --git a/src/qt3support/tools/q3memarray.qdoc b/src/qt3support/tools/q3memarray.qdoc
index f05f4339ad..5d6f9b2928 100644
--- a/src/qt3support/tools/q3memarray.qdoc
+++ b/src/qt3support/tools/q3memarray.qdoc
@@ -51,7 +51,7 @@
and less copying of data.
Example:
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 0
Program output:
\snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 1
@@ -63,7 +63,7 @@
the remaining bytes will typically be uninitialized, this can
cause find() etc. to fail to find the element. Example:
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 2
To work around this, make sure that you use a struct where
sizeof() returns the same as the sum of the sizes of the members
@@ -352,10 +352,10 @@
allocating memory or copying data.
Example I (intended use):
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 3
Example II (you don't want to do this):
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 4
\warning If you do not call resetRawData(), Q3MemArray will attempt
to deallocate or reallocate the raw data, which might not be too
diff --git a/src/qt3support/tools/q3ptrdict.qdoc b/src/qt3support/tools/q3ptrdict.qdoc
index 8831a55af0..21dcdfda7a 100644
--- a/src/qt3support/tools/q3ptrdict.qdoc
+++ b/src/qt3support/tools/q3ptrdict.qdoc
@@ -39,7 +39,7 @@
pointer. Dictionaries provide very fast insertion and lookup.
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 0
In this example we use a dictionary to add an extra property (a
char*) to the line edits we're using.
@@ -147,7 +147,7 @@
\a item may not be 0.
Equivalent to
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -272,7 +272,7 @@
iterator that operates on Q3PtrDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 2
In the example we insert some line edits into a dictionary,
associating a string with each. We then iterate over the
dictionary printing the associated strings.
diff --git a/src/qt3support/tools/q3ptrlist.qdoc b/src/qt3support/tools/q3ptrlist.qdoc
index 13e478e846..e19d6bf5ba 100644
--- a/src/qt3support/tools/q3ptrlist.qdoc
+++ b/src/qt3support/tools/q3ptrlist.qdoc
@@ -54,10 +54,10 @@
\target example
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 0
The output is
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 1
Q3PtrList has several member functions for traversing the list, but
using a Q3PtrListIterator can be more practical. Multiple list
@@ -353,7 +353,7 @@
auto-deletion\endlink is enabled.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 2
The item after the removed item becomes the new current list item
if the removed item is not the last item in the list. If the last
@@ -785,10 +785,10 @@
but it uses Q3PtrListIterator. The class Employee is
defined there.
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 3
The output is
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 4
Using a list iterator is a more robust way of traversing the list
than using the Q3PtrList member functions \link Q3PtrList::first()
diff --git a/src/qt3support/tools/q3valuelist.qdoc b/src/qt3support/tools/q3valuelist.qdoc
index 99f1634f2c..a5ebf6082a 100644
--- a/src/qt3support/tools/q3valuelist.qdoc
+++ b/src/qt3support/tools/q3valuelist.qdoc
@@ -71,7 +71,7 @@
prefer to use the STL-compatible functions.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 0
Notice that the latest changes to Mary's salary did not affect the
@@ -99,7 +99,7 @@
(your application will crash or do unpredictable things). Use
last() and first() with caution, for example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 1
Because Q3ValueList is value-based there is no need to be careful
about deleting items in the list. The list holds its own copies
@@ -352,7 +352,7 @@
Use the end() function instead. For example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 2
*/
@@ -364,7 +364,7 @@
Use the end() function instead. For example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 3
*/
@@ -443,7 +443,7 @@
iterator.
Example (see Q3ValueList for the complete code):
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 4
Q3ValueList is highly optimized for performance and memory usage.
This means that you must be careful: Q3ValueList does not know
diff --git a/src/qt3support/tools/q3valuestack.qdoc b/src/qt3support/tools/q3valuestack.qdoc
index 4ad0d7d503..6c2c57bee9 100644
--- a/src/qt3support/tools/q3valuestack.qdoc
+++ b/src/qt3support/tools/q3valuestack.qdoc
@@ -44,7 +44,7 @@
without removing it.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuestack.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuestack.cpp 0
Q3ValueStack is a specialized Q3ValueList provided for convenience.
All of Q3ValueList's functionality also applies to Q3PtrStack, for
diff --git a/src/qt3support/tools/q3valuevector.qdoc b/src/qt3support/tools/q3valuevector.qdoc
index 58bd8e35be..960bbacc27 100644
--- a/src/qt3support/tools/q3valuevector.qdoc
+++ b/src/qt3support/tools/q3valuevector.qdoc
@@ -70,10 +70,10 @@
objects it contains.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 0
Program output:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 1
As you can see, the most recent change to Joe's salary did not
affect the value in the vector because the vector created a copy
@@ -102,13 +102,13 @@
an element that does not exist (your application will probably
crash). For example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 2
Whenever inserting, removing or referencing elements in a vector,
always make sure you are referring to valid positions. For
example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 3
The iterators provided by vector are random access iterators,
therefore you can use them with many generic algorithms, for
@@ -127,7 +127,7 @@
application will crash or do unpredictable things). Use back() and
front() with caution, for example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 4
Because Q3ValueVector manages memory dynamically, it is recommended
that you contruct a vector with an initial size. Inserting and
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index 18f576bdd1..f2433d6612 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -134,7 +134,7 @@ EXPORTS
?drawTextItem@QVGPaintEngine@@UAEXABVQPointF@@ABVQTextItem@@@Z @ 133 NONAME ; void QVGPaintEngine::drawTextItem(class QPointF const &, class QTextItem const &)
?clearScissor@QVGCompositionHelper@@QAEXXZ @ 134 NONAME ; void QVGCompositionHelper::clearScissor(void)
?fill@QVGPaintEngine@@UAEXABVQVectorPath@@ABVQBrush@@@Z @ 135 NONAME ; void QVGPaintEngine::fill(class QVectorPath const &, class QBrush const &)
- ?forceToImage@QVGPixmapData@@IAEXXZ @ 136 NONAME ; void QVGPixmapData::forceToImage(void)
+ ?forceToImage@QVGPixmapData@@IAEXXZ @ 136 NONAME ABSENT ; void QVGPixmapData::forceToImage(void)
?drawPoints@QVGPaintEngine@@UAEXPBVQPoint@@H@Z @ 137 NONAME ; void QVGPaintEngine::drawPoints(class QPoint const *, int)
??_EQVGPaintEngine@@UAE@I@Z @ 138 NONAME ; QVGPaintEngine::~QVGPaintEngine(unsigned int)
?clip@QVGPaintEngine@@UAEXABVQPainterPath@@W4ClipOperation@Qt@@@Z @ 139 NONAME ; void QVGPaintEngine::clip(class QPainterPath const &, enum Qt::ClipOperation)
@@ -183,4 +183,5 @@ EXPORTS
?initFromNativeImageHandle@QVGPixmapData@@QAE_NPAXABVQString@@@Z @ 182 NONAME ; bool QVGPixmapData::initFromNativeImageHandle(void *, class QString const &)
?createFromNativeImageHandleProvider@QVGPixmapData@@QAEXXZ @ 183 NONAME ; void QVGPixmapData::createFromNativeImageHandleProvider(void)
?releaseNativeImageHandle@QVGPixmapData@@QAEXXZ @ 184 NONAME ; void QVGPixmapData::releaseNativeImageHandle(void)
+ ?forceToImage@QVGPixmapData@@IAEX_N@Z @ 185 NONAME ; void QVGPixmapData::forceToImage(bool)
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 1b5a5ce014..02c3da0d9f 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -42,7 +42,7 @@ symbian: {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
qts60plugindeployment = \
- "IF package(0x20022E6D)" \
+ "IF package(0x2003A678) OR package(0x20022E6D)" \
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
" \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x1028315F)" \
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index 298b2b7ba5..0c22868852 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -38,7 +38,7 @@
The following example records all signal emissions for the \c clicked() signal
of a QCheckBox:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 0
\c{spy.takeFirst()} returns the arguments for the first emitted signal, as a
list of QVariant objects. The \c clicked() signal has a single bool argument,
@@ -46,17 +46,17 @@
The example below catches a signal from a custom object:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 1
\bold {Note:} Non-standard data types need to be registered, using
the qRegisterMetaType() function, before you can create a
QSignalSpy. For example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 2
To retrieve the \c QModelIndex, you can use qvariant_cast:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 3
*/
/*! \fn QSignalSpy::QSignalSpy(QObject *object, const char *signal)
@@ -65,7 +65,7 @@
from the QObject \a object. Neither \a signal nor \a object can be null.
Example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 4
*/
/*! \fn QSignalSpy::isValid() const
diff --git a/src/testlib/qtestevent.qdoc b/src/testlib/qtestevent.qdoc
index 84e874bd32..4c695c2885 100644
--- a/src/testlib/qtestevent.qdoc
+++ b/src/testlib/qtestevent.qdoc
@@ -39,7 +39,7 @@
QWidget.
Example:
- \snippet doc/src/snippets/code/doc_src_qtestevent.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtestevent.cpp 0
The example above simulates the user entering the character \c a
followed by a backspace, waiting for 200 milliseconds and