diff options
author | Liang Qi <liang.qi@qt.io> | 2018-10-02 12:59:24 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-11-07 13:19:54 +0000 |
commit | 825f98815683faea06144ab0262129b0367798ee (patch) | |
tree | 48b10de0d86c6312d07700eb4e690dbd87ab8db0 /qmake | |
parent | b5d249f9538bf3dc44f11879c2244deb5a37bf97 (diff) |
Modernize the "textcodec" feature
Also clean up QTextCodec usage in qmake build and some includes
of qtextcodec.h.
Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/Makefile.unix | 6 | ||||
-rw-r--r-- | qmake/Makefile.win32 | 1 | ||||
-rw-r--r-- | qmake/library/qmakevfs.cpp | 8 | ||||
-rw-r--r-- | qmake/library/qmakevfs.h | 6 | ||||
-rw-r--r-- | qmake/qmake.pro | 2 |
5 files changed, 8 insertions, 15 deletions
diff --git a/qmake/Makefile.unix b/qmake/Makefile.unix index 426387f0c2..e9f8c48651 100644 --- a/qmake/Makefile.unix +++ b/qmake/Makefile.unix @@ -17,7 +17,7 @@ OBJS = \ #qt code (please keep in order matching DEPEND_SRC) QOBJS = \ - qtextcodec.o qutfcodec.o \ + qutfcodec.o \ qglobal.o qlogging.o qmalloc.o qnumeric.o qoperatingsystemversion.o qrandom.o \ qabstractfileengine.o qbuffer.o qdatastream.o qdebug.o \ qdir.o qdiriterator.o \ @@ -66,7 +66,6 @@ DEPEND_SRC = \ $(QMKGENSRC)/win32/msvc_vcxproj.cpp \ $(QMKGENSRC)/win32/winmakefile.cpp \ $(QMKGENSRC)/xmloutput.cpp \ - $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp \ $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp \ $(SOURCE_PATH)/src/corelib/global/qglobal.cpp \ $(SOURCE_PATH)/src/corelib/global/qlibraryinfo.cpp \ @@ -337,9 +336,6 @@ qcore_foundation.o: $(SOURCE_PATH)/src/corelib/kernel/qcore_foundation.mm qutfcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qutfcodec.cpp $(CXX) -c -o $@ $(CXXFLAGS) $< -qtextcodec.o: $(SOURCE_PATH)/src/corelib/codecs/qtextcodec.cpp - $(CXX) -c -o $@ $(CXXFLAGS) $< - qstring.o: $(SOURCE_PATH)/src/corelib/tools/qstring.cpp $(CXX) -c -o $@ $(CXXFLAGS) $< diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32 index 5292332187..6234616c2d 100644 --- a/qmake/Makefile.win32 +++ b/qmake/Makefile.win32 @@ -99,7 +99,6 @@ QTOBJS= \ qoperatingsystemversion.obj \ qoperatingsystemversion_win.obj \ qregexp.obj \ - qtextcodec.obj \ qutfcodec.obj \ qstring.obj \ qstring_compat.obj \ diff --git a/qmake/library/qmakevfs.cpp b/qmake/library/qmakevfs.cpp index 2239a2beec..265f1e60d3 100644 --- a/qmake/library/qmakevfs.cpp +++ b/qmake/library/qmakevfs.cpp @@ -35,7 +35,7 @@ using namespace QMakeInternal; #include <qfile.h> #include <qfileinfo.h> -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) #include <qtextcodec.h> #endif @@ -49,7 +49,7 @@ QMakeVfs::QMakeVfs() , m_magicExisting(fL1S("existing")) #endif { -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) m_textCodec = 0; #endif } @@ -219,7 +219,7 @@ QMakeVfs::ReadResult QMakeVfs::readFile(int id, QString *contents, QString *errS return ReadOtherError; } *contents = -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) m_textCodec ? m_textCodec->toUnicode(bcont) : #endif QString::fromLocal8Bit(bcont); @@ -273,7 +273,7 @@ void QMakeVfs::invalidateContents() } #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void QMakeVfs::setTextCodec(const QTextCodec *textCodec) { m_textCodec = textCodec; diff --git a/qmake/library/qmakevfs.h b/qmake/library/qmakevfs.h index 1217225471..7d4f9bb890 100644 --- a/qmake/library/qmakevfs.h +++ b/qmake/library/qmakevfs.h @@ -38,7 +38,7 @@ # include <qmutex.h> #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) QT_FORWARD_DECLARE_CLASS(QTextCodec) #endif @@ -89,7 +89,7 @@ public: void invalidateContents(); #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) void setTextCodec(const QTextCodec *textCodec); #endif @@ -125,7 +125,7 @@ private: QString m_magicMissing; QString m_magicExisting; #endif -#ifndef QT_NO_TEXTCODEC +#if QT_CONFIG(textcodec) const QTextCodec *m_textCodec; #endif }; diff --git a/qmake/qmake.pro b/qmake/qmake.pro index 7c3ce3ef89..ebd61751b7 100644 --- a/qmake/qmake.pro +++ b/qmake/qmake.pro @@ -152,7 +152,6 @@ SOURCES += \ qstringlist.cpp \ qsystemerror.cpp \ qtemporaryfile.cpp \ - qtextcodec.cpp \ qtextstream.cpp \ qutfcodec.cpp \ quuid.cpp \ @@ -204,7 +203,6 @@ HEADERS += \ qstringmatcher.h \ qsystemerror_p.h \ qtemporaryfile.h \ - qtextcodec.h \ qtextstream.h \ qutfcodec.h \ quuid.h \ |