diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2011-06-28 23:33:34 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-06-29 15:10:14 +0200 |
commit | 6fa1bbdce09bbbee2ea50b9360c821e54c81be51 (patch) | |
tree | 98796b534428c36023bf107b1c0b1e49ae75f755 /src/corelib/io/qtextstream.h | |
parent | 369696dc231450c774a5cc253d061aad2f3b6a19 (diff) |
remove QT3_SUPPORT in corelib/io
Change-Id: Ia9ad0bebacc538a7392afb0fdcca40e8a2bb687b
Reviewed-on: http://codereview.qt.nokia.com/865
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
Diffstat (limited to 'src/corelib/io/qtextstream.h')
-rw-r--r-- | src/corelib/io/qtextstream.h | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/src/corelib/io/qtextstream.h b/src/corelib/io/qtextstream.h index 3747fab6f6..db038855a8 100644 --- a/src/corelib/io/qtextstream.h +++ b/src/corelib/io/qtextstream.h @@ -48,12 +48,6 @@ #include <QtCore/qlocale.h> #include <QtCore/qscopedpointer.h> -#ifndef QT_NO_TEXTCODEC -# ifdef QT3_SUPPORT -# include <QtCore/qtextcodec.h> -# endif -#endif - #include <stdio.h> #ifdef Status @@ -199,63 +193,7 @@ public: QTextStream &operator<<(const char *c); QTextStream &operator<<(const void *ptr); -#ifdef QT3_SUPPORT - // not marked as QT3_SUPPORT to avoid double compiler warnings, as - // they are used in the QT3_SUPPORT functions below. - inline QT3_SUPPORT int flags() const { return flagsInternal(); } - inline QT3_SUPPORT int flags(int f) { return flagsInternal(f); } - - inline QT3_SUPPORT int setf(int bits) - { int old = flagsInternal(); flagsInternal(flagsInternal() | bits); return old; } - inline QT3_SUPPORT int setf(int bits, int mask) - { int old = flagsInternal(); flagsInternal(flagsInternal() | (bits & mask)); return old; } - inline QT3_SUPPORT int unsetf(int bits) - { int old = flagsInternal(); flagsInternal(flagsInternal() & ~bits); return old; } - - inline QT3_SUPPORT int width(int w) - { int old = fieldWidth(); setFieldWidth(w); return old; } - inline QT3_SUPPORT int fill(int f) - { QChar ch = padChar(); setPadChar(QChar(f)); return ch.unicode(); } - inline QT3_SUPPORT int precision(int p) - { int old = realNumberPrecision(); setRealNumberPrecision(p); return old; } - - enum { - skipws = 0x0001, // skip whitespace on input - left = 0x0002, // left-adjust output - right = 0x0004, // right-adjust output - internal = 0x0008, // pad after sign - bin = 0x0010, // binary format integer - oct = 0x0020, // octal format integer - dec = 0x0040, // decimal format integer - hex = 0x0080, // hex format integer - showbase = 0x0100, // show base indicator - showpoint = 0x0200, // force decimal point (float) - uppercase = 0x0400, // upper-case hex output - showpos = 0x0800, // add '+' to positive integers - scientific = 0x1000, // scientific float output - fixed = 0x2000 // fixed float output - }; - enum { - basefield = bin | oct | dec | hex, - adjustfield = left | right | internal, - floatfield = scientific | fixed - }; - -#ifndef QT_NO_TEXTCODEC - enum Encoding { Locale, Latin1, Unicode, UnicodeNetworkOrder, - UnicodeReverse, RawUnicode, UnicodeUTF8 }; - QT3_SUPPORT void setEncoding(Encoding encoding); -#endif - inline QT3_SUPPORT QString read() { return readAll(); } - inline QT3_SUPPORT void unsetDevice() { setDevice(0); } -#endif - private: -#ifdef QT3_SUPPORT - int flagsInternal() const; - int flagsInternal(int flags); -#endif - Q_DISABLE_COPY(QTextStream) QScopedPointer<QTextStreamPrivate> d_ptr; @@ -344,32 +282,6 @@ inline QTextStreamManipulator qSetRealNumberPrecision(int precision) return QTextStreamManipulator(func, precision); } -#ifdef QT3_SUPPORT -typedef QTextStream QTS; - -class Q_CORE_EXPORT QTextIStream : public QTextStream -{ -public: - inline explicit QTextIStream(const QString *s) : QTextStream(const_cast<QString *>(s), QIODevice::ReadOnly) {} - inline explicit QTextIStream(QByteArray *a) : QTextStream(a, QIODevice::ReadOnly) {} - inline QTextIStream(FILE *f) : QTextStream(f, QIODevice::ReadOnly) {} - -private: - Q_DISABLE_COPY(QTextIStream) -}; - -class Q_CORE_EXPORT QTextOStream : public QTextStream -{ -public: - inline explicit QTextOStream(QString *s) : QTextStream(s, QIODevice::WriteOnly) {} - inline explicit QTextOStream(QByteArray *a) : QTextStream(a, QIODevice::WriteOnly) {} - inline QTextOStream(FILE *f) : QTextStream(f, QIODevice::WriteOnly) {} - -private: - Q_DISABLE_COPY(QTextOStream) -}; -#endif - QT_END_NAMESPACE QT_END_HEADER |