mirror of
https://github.com/openwrt/video.git
synced 2026-04-15 10:51:58 +00:00
qt5base: activate iconv support when libiconv-full is avaliable
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
@@ -38,7 +38,8 @@ PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_qt5base-gui \
|
||||
CONFIG_PACKAGE_qt5base-plugin-imageformats-gif \
|
||||
CONFIG_PACKAGE_qt5base-plugin-platforms-linuxfb \
|
||||
CONFIG_PACKAGE_qt5base-plugin-platforms-minimal
|
||||
CONFIG_PACKAGE_qt5base-plugin-platforms-minimal \
|
||||
CONFIG_PACKAGE_libiconv-full
|
||||
|
||||
define Package/qt5base/Default
|
||||
SECTION:=video-frameworks
|
||||
@@ -65,7 +66,7 @@ endef
|
||||
define Package/qt5base-core
|
||||
$(call Package/qt5base/Default)
|
||||
TITLE+=core
|
||||
DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt
|
||||
DEPENDS+=+libpthread +zlib +libpcre16 +libstdcpp +librt +PACKAGE_libiconv-full:libiconv-full
|
||||
endef
|
||||
|
||||
define Package/qt5base-gui
|
||||
@@ -304,7 +305,7 @@ define Build/Configure
|
||||
-widgets \
|
||||
-no-optimized-qmake \
|
||||
-no-cups \
|
||||
-no-iconv \
|
||||
$(if $(CONFIG_PACKAGE_libiconv-full),-iconv,-no-iconv) \
|
||||
-evdev \
|
||||
-no-icu \
|
||||
-fontconfig \
|
||||
|
||||
43
frameworks/qt5base/patches/010-iconv-cast.patch
Normal file
43
frameworks/qt5base/patches/010-iconv-cast.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
--- a/src/corelib/codecs/qiconvcodec.cpp
|
||||
+++ b/src/corelib/codecs/qiconvcodec.cpp
|
||||
@@ -137,7 +137,7 @@ QIconvCodec::IconvState::IconvState(icon
|
||||
|
||||
QIconvCodec::IconvState::~IconvState()
|
||||
{
|
||||
- if (cd != reinterpret_cast<iconv_t>(-1))
|
||||
+ if (cd != (iconv_t)-1)
|
||||
iconv_close(cd);
|
||||
if (buffer != array)
|
||||
delete[] buffer;
|
||||
@@ -200,7 +200,7 @@ QString QIconvCodec::convertToUnicode(co
|
||||
if (!*pstate) {
|
||||
// first time, create the state
|
||||
iconv_t cd = createIconv_t(UTF16, 0);
|
||||
- if (cd == reinterpret_cast<iconv_t>(-1)) {
|
||||
+ if (cd == (iconv_t)-1) {
|
||||
static int reported = 0;
|
||||
if (!reported++) {
|
||||
fprintf(stderr,
|
||||
@@ -345,19 +345,19 @@ QByteArray QIconvCodec::convertFromUnico
|
||||
IconvState *&state = ts ? ts->localData() : temporaryState;
|
||||
if (!state) {
|
||||
iconv_t cd = createIconv_t(0, UTF16);
|
||||
- if (cd != reinterpret_cast<iconv_t>(-1)) {
|
||||
+ if (cd != (iconv_t)-1) {
|
||||
if (!setByteOrder(cd)) {
|
||||
perror("QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed for BOM");
|
||||
|
||||
iconv_close(cd);
|
||||
- cd = reinterpret_cast<iconv_t>(-1);
|
||||
+ cd = (iconv_t)-1;
|
||||
|
||||
return QString(uc, len).toLatin1();
|
||||
}
|
||||
}
|
||||
state = new IconvState(cd);
|
||||
}
|
||||
- if (state->cd == reinterpret_cast<iconv_t>(-1)) {
|
||||
+ if (state->cd == (iconv_t)-1) {
|
||||
static int reported = 0;
|
||||
if (!reported++) {
|
||||
fprintf(stderr,
|
||||
Reference in New Issue
Block a user