summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qiodevice.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-11-01 17:01:29 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-11-01 17:01:29 (GMT)
commit837cfd75e6e806d6d77f4d50ce5aa113f891230a (patch)
tree3e6a1843fd5a31108ebe3e4e78636c4ea0bee422 /src/corelib/io/qiodevice.cpp
parent5d09315ecc731b23636fbf4b19e1b0e9b9876887 (diff)
parentdebf1ea609ee10eb9429f02d1d1f63a2490529d5 (diff)
downloadQt-837cfd75e6e806d6d77f4d50ce5aa113f891230a.zip
Qt-837cfd75e6e806d6d77f4d50ce5aa113f891230a.tar.gz
Qt-837cfd75e6e806d6d77f4d50ce5aa113f891230a.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-symbian-team: (62 commits) Correct faulty 4.7->4.8 merge of Symbian def-files SSL documentation: correct enum name Updated changelog for Qt 4.8 Fix QFile::copy() returning false but error() being NoError Symbian - disable memory mapping in QNetworkDiskCache Revert "Fixed deployment problems with MSVC 2005 and 2008 SP1" Harfbuzz shaper: kerning adjustment does not need to be modified by RTL QIODevice - disallow setTextMode when not open Adding items to a view with no delegate crashes. Update changelog for Qt 4.8 Fix possible crash in glyph cache when deleting and creating contexts Added Lithuanian translation of Qt. Remove idc from mingw build. Update changelog for Qt 4.8 Update changelog for Qt 4.8 Doc: Fix example code Regression caused by 2be143ebb5246bb2f9b674bb09d23df5b2b6c504 Add the ability to enable various SSL bug workarounds. Fix security issue on website due to bad JS. Fix security problem on webpage due to bad JS ...
Diffstat (limited to 'src/corelib/io/qiodevice.cpp')
-rw-r--r--src/corelib/io/qiodevice.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index dae4e82..56fff90 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -468,11 +468,17 @@ void QIODevice::setOpenMode(OpenMode openMode)
otherwise the \l Text flag is removed. This feature is useful for classes
that provide custom end-of-line handling on a QIODevice.
+ The IO device should be opened before calling this function.
+
\sa open(), setOpenMode()
*/
void QIODevice::setTextModeEnabled(bool enabled)
{
Q_D(QIODevice);
+ if (!isOpen()) {
+ qWarning("QIODevice::setTextModeEnabled: The device is not open");
+ return;
+ }
if (enabled)
d->openMode |= Text;
else