From 2ae91491b48a8684b3bba76664d82cedad92bfcd Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Fri, 13 Jan 2012 00:24:13 +0100 Subject: [PATCH] move plugin text codecs to QtCore Having plugin text codecs adds considerable complexity to configuring Qt. The plugin interface is designed for optional features, but text codecs tend to be used for essential functions. A dramatic example is loading a codec plugin from a file whose path needs to be converted by the codec. Codec plugins can also be a nuisance to builders of applications linking to static Qt. This is because the application might need to explicilty import the static codec plugins which are actually dependencies of QtCore. For these reasons, it has been decided not to have text codec plugins any longer. Change-Id: Ic6c80a9c949bd42e881e932d1edae23fe4fe4c88 Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/codecs/codecs.pri | 30 ++-- .../codecs/cp949codetbl_p.h} | 0 .../tw => corelib/codecs}/qbig5codec.cpp | 0 .../codecs/qbig5codec_p.h} | 0 .../jp => corelib/codecs}/qeucjpcodec.cpp | 0 .../codecs/qeucjpcodec_p.h} | 0 .../kr => corelib/codecs}/qeuckrcodec.cpp | 0 .../codecs/qeuckrcodec_p.h} | 0 .../jp => corelib/codecs}/qfontjpcodec.cpp | 0 .../codecs/qfontjpcodec_p.h} | 0 .../cn => corelib/codecs}/qgb18030codec.cpp | 0 .../codecs/qgb18030codec_p.h} | 0 .../jp => corelib/codecs}/qjiscodec.cpp | 0 .../codecs/qjiscodec_p.h} | 0 .../jp => corelib/codecs}/qjpunicode.cpp | 0 .../codecs/qjpunicode_p.h} | 0 .../jp => corelib/codecs}/qsjiscodec.cpp | 0 .../codecs/qsjiscodec_p.h} | 0 src/corelib/codecs/qtextcodec.cpp | 14 +- src/plugins/codecs/cn/cn.pro | 14 -- src/plugins/codecs/cn/main.cpp | 145 ----------------- src/plugins/codecs/codecs.pro | 4 - src/plugins/codecs/jp/jp.pro | 25 --- src/plugins/codecs/jp/main.cpp | 149 ------------------ src/plugins/codecs/kr/kr.pro | 18 --- src/plugins/codecs/kr/main.cpp | 131 --------------- src/plugins/codecs/tw/main.cpp | 138 ---------------- src/plugins/codecs/tw/tw.pro | 14 -- src/plugins/plugins.pro | 5 - 29 files changed, 22 insertions(+), 665 deletions(-) rename src/{plugins/codecs/kr/cp949codetbl.h => corelib/codecs/cp949codetbl_p.h} (100%) rename src/{plugins/codecs/tw => corelib/codecs}/qbig5codec.cpp (100%) rename src/{plugins/codecs/tw/qbig5codec.h => corelib/codecs/qbig5codec_p.h} (100%) rename src/{plugins/codecs/jp => corelib/codecs}/qeucjpcodec.cpp (100%) rename src/{plugins/codecs/jp/qeucjpcodec.h => corelib/codecs/qeucjpcodec_p.h} (100%) rename src/{plugins/codecs/kr => corelib/codecs}/qeuckrcodec.cpp (100%) rename src/{plugins/codecs/kr/qeuckrcodec.h => corelib/codecs/qeuckrcodec_p.h} (100%) rename src/{plugins/codecs/jp => corelib/codecs}/qfontjpcodec.cpp (100%) rename src/{plugins/codecs/jp/qfontjpcodec.h => corelib/codecs/qfontjpcodec_p.h} (100%) rename src/{plugins/codecs/cn => corelib/codecs}/qgb18030codec.cpp (100%) rename src/{plugins/codecs/cn/qgb18030codec.h => corelib/codecs/qgb18030codec_p.h} (100%) rename src/{plugins/codecs/jp => corelib/codecs}/qjiscodec.cpp (100%) rename src/{plugins/codecs/jp/qjiscodec.h => corelib/codecs/qjiscodec_p.h} (100%) rename src/{plugins/codecs/jp => corelib/codecs}/qjpunicode.cpp (100%) rename src/{plugins/codecs/jp/qjpunicode.h => corelib/codecs/qjpunicode_p.h} (100%) rename src/{plugins/codecs/jp => corelib/codecs}/qsjiscodec.cpp (100%) rename src/{plugins/codecs/jp/qsjiscodec.h => corelib/codecs/qsjiscodec_p.h} (100%) delete mode 100644 src/plugins/codecs/cn/cn.pro delete mode 100644 src/plugins/codecs/cn/main.cpp delete mode 100644 src/plugins/codecs/codecs.pro delete mode 100644 src/plugins/codecs/jp/jp.pro delete mode 100644 src/plugins/codecs/jp/main.cpp delete mode 100644 src/plugins/codecs/kr/kr.pro delete mode 100644 src/plugins/codecs/kr/main.cpp delete mode 100644 src/plugins/codecs/tw/main.cpp delete mode 100644 src/plugins/codecs/tw/tw.pro diff --git a/src/corelib/codecs/codecs.pri b/src/corelib/codecs/codecs.pri index 934242e49b..0478ecfde3 100644 --- a/src/corelib/codecs/codecs.pri +++ b/src/corelib/codecs/codecs.pri @@ -9,13 +9,13 @@ HEADERS += \ codecs/qtsciicodec_p.h \ codecs/qutfcodec_p.h \ codecs/qtextcodecplugin.h \ - ../plugins/codecs/cn/qgb18030codec.h \ - ../plugins/codecs/jp/qeucjpcodec.h \ - ../plugins/codecs/jp/qjiscodec.h \ - ../plugins/codecs/jp/qsjiscodec.h \ - ../plugins/codecs/kr/qeuckrcodec.h \ - ../plugins/codecs/tw/qbig5codec.h \ - ../plugins/codecs/jp/qfontjpcodec.h + codecs/qgb18030codec_p.h \ + codecs/qeucjpcodec_p.h \ + codecs/qjiscodec_p.h \ + codecs/qsjiscodec_p.h \ + codecs/qeuckrcodec_p.h \ + codecs/qbig5codec_p.h \ + codecs/qfontjpcodec_p.h SOURCES += \ codecs/qisciicodec.cpp \ @@ -25,14 +25,14 @@ SOURCES += \ codecs/qtsciicodec.cpp \ codecs/qutfcodec.cpp \ codecs/qtextcodecplugin.cpp \ - ../plugins/codecs/cn/qgb18030codec.cpp \ - ../plugins/codecs/jp/qjpunicode.cpp \ - ../plugins/codecs/jp/qeucjpcodec.cpp \ - ../plugins/codecs/jp/qjiscodec.cpp \ - ../plugins/codecs/jp/qsjiscodec.cpp \ - ../plugins/codecs/kr/qeuckrcodec.cpp \ - ../plugins/codecs/tw/qbig5codec.cpp \ - ../plugins/codecs/jp/qfontjpcodec.cpp + codecs/qgb18030codec.cpp \ + codecs/qjpunicode.cpp \ + codecs/qeucjpcodec.cpp \ + codecs/qjiscodec.cpp \ + codecs/qsjiscodec.cpp \ + codecs/qeuckrcodec.cpp \ + codecs/qbig5codec.cpp \ + codecs/qfontjpcodec.cpp unix { SOURCES += codecs/qfontlaocodec.cpp diff --git a/src/plugins/codecs/kr/cp949codetbl.h b/src/corelib/codecs/cp949codetbl_p.h similarity index 100% rename from src/plugins/codecs/kr/cp949codetbl.h rename to src/corelib/codecs/cp949codetbl_p.h diff --git a/src/plugins/codecs/tw/qbig5codec.cpp b/src/corelib/codecs/qbig5codec.cpp similarity index 100% rename from src/plugins/codecs/tw/qbig5codec.cpp rename to src/corelib/codecs/qbig5codec.cpp diff --git a/src/plugins/codecs/tw/qbig5codec.h b/src/corelib/codecs/qbig5codec_p.h similarity index 100% rename from src/plugins/codecs/tw/qbig5codec.h rename to src/corelib/codecs/qbig5codec_p.h diff --git a/src/plugins/codecs/jp/qeucjpcodec.cpp b/src/corelib/codecs/qeucjpcodec.cpp similarity index 100% rename from src/plugins/codecs/jp/qeucjpcodec.cpp rename to src/corelib/codecs/qeucjpcodec.cpp diff --git a/src/plugins/codecs/jp/qeucjpcodec.h b/src/corelib/codecs/qeucjpcodec_p.h similarity index 100% rename from src/plugins/codecs/jp/qeucjpcodec.h rename to src/corelib/codecs/qeucjpcodec_p.h diff --git a/src/plugins/codecs/kr/qeuckrcodec.cpp b/src/corelib/codecs/qeuckrcodec.cpp similarity index 100% rename from src/plugins/codecs/kr/qeuckrcodec.cpp rename to src/corelib/codecs/qeuckrcodec.cpp diff --git a/src/plugins/codecs/kr/qeuckrcodec.h b/src/corelib/codecs/qeuckrcodec_p.h similarity index 100% rename from src/plugins/codecs/kr/qeuckrcodec.h rename to src/corelib/codecs/qeuckrcodec_p.h diff --git a/src/plugins/codecs/jp/qfontjpcodec.cpp b/src/corelib/codecs/qfontjpcodec.cpp similarity index 100% rename from src/plugins/codecs/jp/qfontjpcodec.cpp rename to src/corelib/codecs/qfontjpcodec.cpp diff --git a/src/plugins/codecs/jp/qfontjpcodec.h b/src/corelib/codecs/qfontjpcodec_p.h similarity index 100% rename from src/plugins/codecs/jp/qfontjpcodec.h rename to src/corelib/codecs/qfontjpcodec_p.h diff --git a/src/plugins/codecs/cn/qgb18030codec.cpp b/src/corelib/codecs/qgb18030codec.cpp similarity index 100% rename from src/plugins/codecs/cn/qgb18030codec.cpp rename to src/corelib/codecs/qgb18030codec.cpp diff --git a/src/plugins/codecs/cn/qgb18030codec.h b/src/corelib/codecs/qgb18030codec_p.h similarity index 100% rename from src/plugins/codecs/cn/qgb18030codec.h rename to src/corelib/codecs/qgb18030codec_p.h diff --git a/src/plugins/codecs/jp/qjiscodec.cpp b/src/corelib/codecs/qjiscodec.cpp similarity index 100% rename from src/plugins/codecs/jp/qjiscodec.cpp rename to src/corelib/codecs/qjiscodec.cpp diff --git a/src/plugins/codecs/jp/qjiscodec.h b/src/corelib/codecs/qjiscodec_p.h similarity index 100% rename from src/plugins/codecs/jp/qjiscodec.h rename to src/corelib/codecs/qjiscodec_p.h diff --git a/src/plugins/codecs/jp/qjpunicode.cpp b/src/corelib/codecs/qjpunicode.cpp similarity index 100% rename from src/plugins/codecs/jp/qjpunicode.cpp rename to src/corelib/codecs/qjpunicode.cpp diff --git a/src/plugins/codecs/jp/qjpunicode.h b/src/corelib/codecs/qjpunicode_p.h similarity index 100% rename from src/plugins/codecs/jp/qjpunicode.h rename to src/corelib/codecs/qjpunicode_p.h diff --git a/src/plugins/codecs/jp/qsjiscodec.cpp b/src/corelib/codecs/qsjiscodec.cpp similarity index 100% rename from src/plugins/codecs/jp/qsjiscodec.cpp rename to src/corelib/codecs/qsjiscodec.cpp diff --git a/src/plugins/codecs/jp/qsjiscodec.h b/src/corelib/codecs/qsjiscodec_p.h similarity index 100% rename from src/plugins/codecs/jp/qsjiscodec.h rename to src/corelib/codecs/qsjiscodec_p.h diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index a5e91c5c95..2d142cc335 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -66,16 +66,16 @@ # include "qisciicodec_p.h" #if !defined(Q_OS_INTEGRITY) # if !defined(QT_BOOTSTRAPPED) -# include "../../plugins/codecs/cn/qgb18030codec.h" -# include "../../plugins/codecs/jp/qeucjpcodec.h" -# include "../../plugins/codecs/jp/qjiscodec.h" -# include "../../plugins/codecs/jp/qsjiscodec.h" -# include "../../plugins/codecs/kr/qeuckrcodec.h" -# include "../../plugins/codecs/tw/qbig5codec.h" +# include "qgb18030codec_p.h" +# include "qeucjpcodec_p.h" +# include "qjiscodec_p.h" +# include "qsjiscodec_p.h" +# include "qeuckrcodec_p.h" +# include "qbig5codec_p.h" # endif // !QT_BOOTSTRAPPED # if defined(Q_OS_UNIX) && !defined(QT_BOOTSTRAPPED) # include "qfontlaocodec_p.h" -# include "../../plugins/codecs/jp/qfontjpcodec.h" +# include "qfontjpcodec_p.h" # endif #endif // !Q_OS_INTEGRITY #endif // QT_NO_CODECS diff --git a/src/plugins/codecs/cn/cn.pro b/src/plugins/codecs/cn/cn.pro deleted file mode 100644 index 11a3dd0e6c..0000000000 --- a/src/plugins/codecs/cn/cn.pro +++ /dev/null @@ -1,14 +0,0 @@ -TARGET = qcncodecs -load(qt_plugin) - -CONFIG += warn_on -DESTDIR = $$QT.core.plugins/codecs -QT = core - -HEADERS = qgb18030codec.h - -SOURCES = qgb18030codec.cpp \ - main.cpp - -target.path += $$[QT_INSTALL_PLUGINS]/codecs -INSTALLS += target diff --git a/src/plugins/codecs/cn/main.cpp b/src/plugins/codecs/cn/main.cpp deleted file mode 100644 index fb1e61a451..0000000000 --- a/src/plugins/codecs/cn/main.cpp +++ /dev/null @@ -1,145 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#include "qgb18030codec.h" - -#ifndef QT_NO_TEXTCODECPLUGIN - -QT_BEGIN_NAMESPACE - -class CNTextCodecs : public QTextCodecPlugin -{ -public: - CNTextCodecs() {} - - QList names() const; - QList aliases() const; - QList mibEnums() const; - - QTextCodec *createForMib(int); - QTextCodec *createForName(const QByteArray &); -}; - -QList CNTextCodecs::names() const -{ - QList list; - list += QGb18030Codec::_name(); - list += QGbkCodec::_name(); - list += QGb2312Codec::_name(); -#ifdef Q_OS_UNIX - list += QFontGb2312Codec::_name(); - list += QFontGbkCodec::_name(); -#endif - return list; -} - -QList CNTextCodecs::aliases() const -{ - QList list; - list += QGb18030Codec::_aliases(); - list += QGbkCodec::_aliases(); - list += QGb2312Codec::_aliases(); -#ifdef Q_OS_UNIX - list += QFontGb2312Codec::_aliases(); - list += QFontGbkCodec::_aliases(); -#endif - return list; -} - -QList CNTextCodecs::mibEnums() const -{ - QList list; - list += QGb18030Codec::_mibEnum(); - list += QGbkCodec::_mibEnum(); - list += QGb2312Codec::_mibEnum(); -#ifdef Q_OS_UNIX - list += QFontGb2312Codec::_mibEnum(); - list += QFontGbkCodec::_mibEnum(); -#endif - return list; -} - -QTextCodec *CNTextCodecs::createForMib(int mib) -{ - if (mib == QGb18030Codec::_mibEnum()) - return new QGb18030Codec; - if (mib == QGbkCodec::_mibEnum()) - return new QGbkCodec; - if (mib == QGb2312Codec::_mibEnum()) - return new QGb2312Codec; -#ifdef Q_OS_UNIX - if (mib == QFontGbkCodec::_mibEnum()) - return new QFontGbkCodec; - if (mib == QFontGb2312Codec::_mibEnum()) - return new QFontGb2312Codec; -#endif - return 0; -} - - -QTextCodec *CNTextCodecs::createForName(const QByteArray &name) -{ - if (name == QGb18030Codec::_name() || QGb18030Codec::_aliases().contains(name)) - return new QGb18030Codec; - if (name == QGbkCodec::_name() || QGbkCodec::_aliases().contains(name)) - return new QGbkCodec; - if (name == QGb2312Codec::_name() || QGb2312Codec::_aliases().contains(name)) - return new QGb2312Codec; -#ifdef Q_OS_UNIX - if (name == QFontGbkCodec::_name() || QFontGbkCodec::_aliases().contains(name)) - return new QFontGbkCodec; - if (name == QFontGb2312Codec::_name() || QFontGb2312Codec::_aliases().contains(name)) - return new QFontGb2312Codec; -#endif - return 0; -} - - -Q_EXPORT_STATIC_PLUGIN(CNTextCodecs) -Q_EXPORT_PLUGIN2(qcncodecs, CNTextCodecs) - -QT_END_NAMESPACE - -#endif // QT_NO_TEXTCODECPLUGIN diff --git a/src/plugins/codecs/codecs.pro b/src/plugins/codecs/codecs.pro deleted file mode 100644 index 8474a88bc7..0000000000 --- a/src/plugins/codecs/codecs.pro +++ /dev/null @@ -1,4 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS = cn jp tw kr - diff --git a/src/plugins/codecs/jp/jp.pro b/src/plugins/codecs/jp/jp.pro deleted file mode 100644 index f2e51cd57d..0000000000 --- a/src/plugins/codecs/jp/jp.pro +++ /dev/null @@ -1,25 +0,0 @@ -TARGET = qjpcodecs -load(qt_plugin) - -CONFIG += warn_on -DESTDIR = $$QT.core.plugins/codecs -QT = core - -HEADERS = qjpunicode.h \ - qeucjpcodec.h \ - qjiscodec.h \ - qsjiscodec.h - -SOURCES = qeucjpcodec.cpp \ - qjiscodec.cpp \ - qsjiscodec.cpp \ - qjpunicode.cpp \ - main.cpp - -unix { - HEADERS += qfontjpcodec.h - SOURCES += qfontjpcodec.cpp -} - -target.path += $$[QT_INSTALL_PLUGINS]/codecs -INSTALLS += target diff --git a/src/plugins/codecs/jp/main.cpp b/src/plugins/codecs/jp/main.cpp deleted file mode 100644 index e4b22935db..0000000000 --- a/src/plugins/codecs/jp/main.cpp +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#ifndef QT_NO_TEXTCODECPLUGIN - -#include "qeucjpcodec.h" -#include "qjiscodec.h" -#include "qsjiscodec.h" -#ifdef Q_OS_UNIX -#include "qfontjpcodec.h" -#endif - -QT_BEGIN_NAMESPACE - -class JPTextCodecs : public QTextCodecPlugin -{ -public: - JPTextCodecs() {} - - QList names() const; - QList aliases() const; - QList mibEnums() const; - - QTextCodec *createForMib(int); - QTextCodec *createForName(const QByteArray &); -}; - -QList JPTextCodecs::names() const -{ - QList list; - list += QEucJpCodec::_name(); - list += QJisCodec::_name(); - list += QSjisCodec::_name(); -#ifdef Q_OS_UNIX - list += QFontJis0201Codec::_name(); - list += QFontJis0208Codec::_name(); -#endif - return list; -} - -QList JPTextCodecs::aliases() const -{ - QList list; - list += QEucJpCodec::_aliases(); - list += QJisCodec::_aliases(); - list += QSjisCodec::_aliases(); -#ifdef Q_OS_UNIX - list += QFontJis0201Codec::_aliases(); - list += QFontJis0208Codec::_aliases(); -#endif - return list; -} - -QList JPTextCodecs::mibEnums() const -{ - QList list; - list += QEucJpCodec::_mibEnum(); - list += QJisCodec::_mibEnum(); - list += QSjisCodec::_mibEnum(); -#ifdef Q_OS_UNIX - list += QFontJis0201Codec::_mibEnum(); - list += QFontJis0208Codec::_mibEnum(); -#endif - return list; -} - -QTextCodec *JPTextCodecs::createForMib(int mib) -{ - if (mib == QEucJpCodec::_mibEnum()) - return new QEucJpCodec; - if (mib == QJisCodec::_mibEnum()) - return new QJisCodec; - if (mib == QSjisCodec::_mibEnum()) - return new QSjisCodec; -#ifdef Q_OS_UNIX - if (mib == QFontJis0208Codec::_mibEnum()) - return new QFontJis0208Codec; - if (mib == QFontJis0201Codec::_mibEnum()) - return new QFontJis0201Codec; -#endif - return 0; -} - - -QTextCodec *JPTextCodecs::createForName(const QByteArray &name) -{ - if (name == QEucJpCodec::_name() || QEucJpCodec::_aliases().contains(name)) - return new QEucJpCodec; - if (name == QJisCodec::_name() || QJisCodec::_aliases().contains(name)) - return new QJisCodec; - if (name == QSjisCodec::_name() || QSjisCodec::_aliases().contains(name)) - return new QSjisCodec; -#ifdef Q_OS_UNIX - if (name == QFontJis0208Codec::_name() || QFontJis0208Codec::_aliases().contains(name)) - return new QFontJis0208Codec; - if (name == QFontJis0201Codec::_name() || QFontJis0201Codec::_aliases().contains(name)) - return new QFontJis0201Codec; -#endif - return 0; -} - -Q_EXPORT_STATIC_PLUGIN(JPTextCodecs); -Q_EXPORT_PLUGIN2(qjpcodecs, JPTextCodecs); - -QT_END_NAMESPACE - -#endif // QT_NO_TEXTCODECPLUGIN diff --git a/src/plugins/codecs/kr/kr.pro b/src/plugins/codecs/kr/kr.pro deleted file mode 100644 index 6c0ea3d415..0000000000 --- a/src/plugins/codecs/kr/kr.pro +++ /dev/null @@ -1,18 +0,0 @@ -TARGET = qkrcodecs -load(qt_plugin) - -CONFIG += warn_on -DESTDIR = $$QT.core.plugins/codecs -QT = core - -HEADERS = qeuckrcodec.h \ - cp949codetbl.h -SOURCES = qeuckrcodec.cpp \ - main.cpp - -wince*: { - SOURCES += ../../../corelib/kernel/qfunctions_wince.cpp -} - -target.path += $$[QT_INSTALL_PLUGINS]/codecs -INSTALLS += target diff --git a/src/plugins/codecs/kr/main.cpp b/src/plugins/codecs/kr/main.cpp deleted file mode 100644 index 16c49b6eea..0000000000 --- a/src/plugins/codecs/kr/main.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#include "qeuckrcodec.h" - -QT_BEGIN_NAMESPACE - -#ifndef QT_NO_TEXTCODECPLUGIN - -class KRTextCodecs : public QTextCodecPlugin -{ -public: - KRTextCodecs() {} - - QList names() const; - QList aliases() const; - QList mibEnums() const; - - QTextCodec *createForMib(int); - QTextCodec *createForName(const QByteArray &); -}; - -QList KRTextCodecs::names() const -{ - QList list; - list += QEucKrCodec::_name(); -#ifdef Q_OS_UNIX - list += QFontKsc5601Codec::_name(); -#endif - list += QCP949Codec::_name(); - return list; -} - -QList KRTextCodecs::aliases() const -{ - QList list; - list += QEucKrCodec::_aliases(); -#ifdef Q_OS_UNIX - list += QFontKsc5601Codec::_aliases(); -#endif - list += QCP949Codec::_aliases(); - return list; -} - -QList KRTextCodecs::mibEnums() const -{ - QList list; - list += QEucKrCodec::_mibEnum(); -#ifdef Q_OS_UNIX - list += QFontKsc5601Codec::_mibEnum(); -#endif - list += QCP949Codec::_mibEnum(); - return list; -} - -QTextCodec *KRTextCodecs::createForMib(int mib) -{ - if (mib == QEucKrCodec::_mibEnum()) - return new QEucKrCodec; -#ifdef Q_OS_UNIX - if (mib == QFontKsc5601Codec::_mibEnum()) - return new QFontKsc5601Codec; -#endif - if (mib == QCP949Codec::_mibEnum()) - return new QCP949Codec; - return 0; -} - - -QTextCodec *KRTextCodecs::createForName(const QByteArray &name) -{ - if (name == QEucKrCodec::_name() || QEucKrCodec::_aliases().contains(name)) - return new QEucKrCodec; -#ifdef Q_OS_UNIX - if (name == QFontKsc5601Codec::_name() || QFontKsc5601Codec::_aliases().contains(name)) - return new QFontKsc5601Codec; -#endif - if (name == QCP949Codec::_name() || QCP949Codec::_aliases().contains(name)) - return new QCP949Codec; - return 0; -} - - -Q_EXPORT_STATIC_PLUGIN(KRTextCodecs); -Q_EXPORT_PLUGIN2(qkrcodecs, KRTextCodecs); - -#endif // QT_NO_TEXTCODECPLUGIN - -QT_END_NAMESPACE diff --git a/src/plugins/codecs/tw/main.cpp b/src/plugins/codecs/tw/main.cpp deleted file mode 100644 index 159752cc26..0000000000 --- a/src/plugins/codecs/tw/main.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** This file may be used under the terms of the GNU Lesser General Public -** License version 2.1 as published by the Free Software Foundation and -** appearing in the file LICENSE.LGPL included in the packaging of this -** file. Please review the following information to ensure the GNU Lesser -** General Public License version 2.1 requirements will be met: -** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include -#include - -#ifndef QT_NO_TEXTCODECPLUGIN - -#include "qbig5codec.h" - -QT_BEGIN_NAMESPACE - -class TWTextCodecs : public QTextCodecPlugin -{ -public: - TWTextCodecs() {} - - QList names() const; - QList aliases() const; - QList mibEnums() const; - - QTextCodec *createForMib(int); - QTextCodec *createForName(const QByteArray &); -}; - -QList TWTextCodecs::names() const -{ - QList list; - list += QBig5Codec::_name(); - list += QBig5hkscsCodec::_name(); -#ifdef Q_OS_UNIX - list += QFontBig5Codec::_name(); - list += QFontBig5hkscsCodec::_name(); -#endif - return list; -} - -QList TWTextCodecs::aliases() const -{ - QList list; - list += QBig5Codec::_aliases(); - list += QBig5hkscsCodec::_aliases(); -#ifdef Q_OS_UNIX - list += QFontBig5Codec::_aliases(); - list += QFontBig5hkscsCodec::_aliases(); -#endif - return list; -} - -QList TWTextCodecs::mibEnums() const -{ - QList list; - list += QBig5Codec::_mibEnum(); - list += QBig5hkscsCodec::_mibEnum(); -#ifdef Q_OS_UNIX - list += QFontBig5Codec::_mibEnum(); - list += QFontBig5hkscsCodec::_mibEnum(); -#endif - return list; -} - -QTextCodec *TWTextCodecs::createForMib(int mib) -{ - if (mib == QBig5Codec::_mibEnum()) - return new QBig5Codec; - if (mib == QBig5hkscsCodec::_mibEnum()) - return new QBig5hkscsCodec; -#ifdef Q_OS_UNIX - if (mib == QFontBig5hkscsCodec::_mibEnum()) - return new QFontBig5hkscsCodec; - if (mib == QFontBig5Codec::_mibEnum()) - return new QFontBig5Codec; -#endif - return 0; -} - - -QTextCodec *TWTextCodecs::createForName(const QByteArray &name) -{ - if (name == QBig5Codec::_name() || QBig5Codec::_aliases().contains(name)) - return new QBig5Codec; - if (name == QBig5hkscsCodec::_name() || QBig5hkscsCodec::_aliases().contains(name)) - return new QBig5hkscsCodec; -#ifdef Q_OS_UNIX - if (name == QFontBig5hkscsCodec::_name() || QFontBig5hkscsCodec::_aliases().contains(name)) - return new QFontBig5hkscsCodec; - if (name == QFontBig5Codec::_name() || QFontBig5Codec::_aliases().contains(name)) - return new QFontBig5Codec; -#endif - return 0; -} - - -Q_EXPORT_STATIC_PLUGIN(TWTextCodecs); -Q_EXPORT_PLUGIN2(qtwcodecs, TWTextCodecs); - -#endif // QT_NO_TEXTCODECPLUGIN - -QT_END_NAMESPACE diff --git a/src/plugins/codecs/tw/tw.pro b/src/plugins/codecs/tw/tw.pro deleted file mode 100644 index d63876c5d8..0000000000 --- a/src/plugins/codecs/tw/tw.pro +++ /dev/null @@ -1,14 +0,0 @@ -TARGET = qtwcodecs -load(qt_plugin) - -CONFIG += warn_on -DESTDIR = $$QT.core.plugins/codecs -QT = core - -HEADERS = qbig5codec.h - -SOURCES = qbig5codec.cpp \ - main.cpp - -target.path += $$[QT_INSTALL_PLUGINS]/codecs -INSTALLS += target diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 8880da3709..b92ccff985 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -1,11 +1,6 @@ TEMPLATE = subdirs SUBDIRS *= sqldrivers bearer -unix { - contains(QT_CONFIG,iconv)|contains(QT_CONFIG,gnu-libiconv)|contains(QT_CONFIG,sun-libiconv):SUBDIRS *= codecs -} else { - SUBDIRS *= codecs -} !contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats !isEmpty(QT.widgets.name): SUBDIRS += accessible