summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2010-11-03 15:45:56 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2010-11-03 15:45:56 (GMT)
commitbaefea22f3286f731272b867da76d5662e9353b0 (patch)
treebb64609791cfda6326e852f91af70cd8a9f49e70 /src/corelib
parent0b9aa12659d5ea6b15fe72f963cc98db9af585fc (diff)
parent18b6067fa99004d1572e3d6b8fbc181729ad96be (diff)
downloadQt-baefea22f3286f731272b867da76d5662e9353b0.zip
Qt-baefea22f3286f731272b867da76d5662e9353b0.tar.gz
Qt-baefea22f3286f731272b867da76d5662e9353b0.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/io/qsettings.cpp21
-rw-r--r--src/corelib/kernel/qmimedata.cpp2
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp2
3 files changed, 15 insertions, 10 deletions
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 53af822..8ee42e7 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -1231,16 +1231,21 @@ QConfFileSettingsPrivate::~QConfFileSettingsPrivate()
if (confFiles[i] && !confFiles[i]->ref.deref()) {
if (confFiles[i]->size == 0) {
delete confFiles[i].take();
- } else if (unusedCache) {
+ } else {
if (usedHash)
usedHash->remove(confFiles[i]->name);
- QT_TRY {
- // compute a better size?
- unusedCache->insert(confFiles[i]->name, confFiles[i].data(),
- 10 + (confFiles[i]->originalKeys.size() / 4));
- confFiles[i].take();
- } QT_CATCH(...) {
- // out of memory. Do not cache the file.
+ if (unusedCache) {
+ QT_TRY {
+ // compute a better size?
+ unusedCache->insert(confFiles[i]->name, confFiles[i].data(),
+ 10 + (confFiles[i]->originalKeys.size() / 4));
+ confFiles[i].take();
+ } QT_CATCH(...) {
+ // out of memory. Do not cache the file.
+ delete confFiles[i].take();
+ }
+ } else {
+ // unusedCache is gone - delete the entry to prevent a memory leak
delete confFiles[i].take();
}
}
diff --git a/src/corelib/kernel/qmimedata.cpp b/src/corelib/kernel/qmimedata.cpp
index bf4001a..899ca7b 100644
--- a/src/corelib/kernel/qmimedata.cpp
+++ b/src/corelib/kernel/qmimedata.cpp
@@ -249,7 +249,7 @@ QVariant QMimeDataPrivate::retrieveTypedData(const QString &format, QVariant::Ty
\o We can subclass QMimeData and reimplement hasFormat(),
formats(), and retrieveData().
- \o If the drag and drop operation occurs withing a single
+ \o If the drag and drop operation occurs within a single
application, we can subclass QMimeData and add extra data in
it, and use a qobject_cast() in the receiver's drop event
handler. For example:
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index 4b371f7..6324cc9 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -178,7 +178,7 @@ QT_BEGIN_NAMESPACE
QStateMachinePrivate::QStateMachinePrivate()
{
- QAbstractStatePrivate::isMachine = true;
+ isMachine = true;
state = NotRunning;
_startState = 0;