summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2011-04-13 07:31:27 (GMT)
committerMartin Smith <martin.smith@nokia.com>2011-04-13 07:31:27 (GMT)
commitacaaa87b5ff35981d96a4ed9666f436822ccdb3f (patch)
tree49dc83038209f577e185f5d57dc58a0756814c95
parent16fe5d5b87ed1d819bf0791fabbd121481d62d22 (diff)
parentab621c7092944f96886f973867d46db8cb38ede7 (diff)
downloadQt-acaaa87b5ff35981d96a4ed9666f436822ccdb3f.zip
Qt-acaaa87b5ff35981d96a4ed9666f436822ccdb3f.tar.gz
Qt-acaaa87b5ff35981d96a4ed9666f436822ccdb3f.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
-rw-r--r--doc/src/examples/ftp.qdoc4
-rw-r--r--examples/network/qftp/ftpwindow.cpp6
-rw-r--r--src/gui/itemviews/qdatawidgetmapper.cpp2
3 files changed, 10 insertions, 2 deletions
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
index 4fa2cfd..841d298 100644
--- a/doc/src/examples/ftp.qdoc
+++ b/doc/src/examples/ftp.qdoc
@@ -131,7 +131,9 @@
\snippet examples/network/qftp/ftpwindow.cpp 5
- QFtp supports canceling the download of files.
+ QFtp supports canceling the download of files. We make sure that
+ any file that is currently being written to is closed and removed,
+ and tidy up by deleting the file object.
\snippet examples/network/qftp/ftpwindow.cpp 6
diff --git a/examples/network/qftp/ftpwindow.cpp b/examples/network/qftp/ftpwindow.cpp
index c3e629f..159cad6 100644
--- a/examples/network/qftp/ftpwindow.cpp
+++ b/examples/network/qftp/ftpwindow.cpp
@@ -243,6 +243,12 @@ void FtpWindow::downloadFile()
void FtpWindow::cancelDownload()
{
ftp->abort();
+
+ if (file->exists()) {
+ file->close();
+ file->remove();
+ }
+ delete file;
}
//![5]
diff --git a/src/gui/itemviews/qdatawidgetmapper.cpp b/src/gui/itemviews/qdatawidgetmapper.cpp
index 745ef5a..dac4613 100644
--- a/src/gui/itemviews/qdatawidgetmapper.cpp
+++ b/src/gui/itemviews/qdatawidgetmapper.cpp
@@ -291,7 +291,7 @@ void QDataWidgetMapperPrivate::_q_modelDestroyed()
\snippet doc/src/snippets/code/src_gui_itemviews_qdatawidgetmapper.cpp 0
After the call to toFirst(), \c mySpinBox displays the value \c{1}, \c myLineEdit
- displays \c {Nokia Corporation and/or its subsidiary(-ies)} and \c myCountryChooser displays \c{Oslo}. The
+ displays \c{Qt Norway} and \c myCountryChooser displays \c{Oslo}. The
navigational functions toFirst(), toNext(), toPrevious(), toLast() and setCurrentIndex()
can be used to navigate in the model and update the widgets with contents from
the model.