diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-11 22:45:44 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-04-11 22:45:44 (GMT) |
commit | b9f86cea356e4fcb25305c337d5795a14393cb84 (patch) | |
tree | caedbff3f927394410bfa3af1181ddfd653e3218 | |
parent | 3803244af1040a318915b65e5b4be17ae15694b6 (diff) | |
parent | ab621c7092944f96886f973867d46db8cb38ede7 (diff) | |
download | Qt-b9f86cea356e4fcb25305c337d5795a14393cb84.zip Qt-b9f86cea356e4fcb25305c337d5795a14393cb84.tar.gz Qt-b9f86cea356e4fcb25305c337d5795a14393cb84.tar.bz2 |
Merge branch '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team
* '4.7' of git://scm.dev.nokia.troll.no/qt/qt-doc-team:
Doc: Fixed reference to a name in a table.
Ensured that incomplete downloads are removed.
-rw-r--r-- | doc/src/examples/ftp.qdoc | 4 | ||||
-rw-r--r-- | examples/network/qftp/ftpwindow.cpp | 6 | ||||
-rw-r--r-- | src/gui/itemviews/qdatawidgetmapper.cpp | 2 |
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. |