[okular] [Bug 399360] Okular CHM cannot open any chm file and input chinese

Yuri Chornoivan bugzilla_noreply at kde.org
Mon Oct 8 12:07:13 BST 2018


https://bugs.kde.org/show_bug.cgi?id=399360

--- Comment #7 from Yuri Chornoivan <yurchor at ukr.net> ---
(In reply to Evel from comment #6)
> My QT seems too new, it require now newer than QT5.6 but I upgrade to newest
> QT5.11 so I even cannot build from source code on the kchmviewer.

Just tested on the newest Qt (5.11 for my distribution, raw packages from
repos).

Yes, the first file's encoding is not recognized right by Okular and
kchmviewer. Kchmviwer shows "Table of contents is present but is empty; wrong
parsing?" and refuses to show the content. Okular shows a gibberish instead of
content (first I was thinking that it is a consequence of the missing Chinese
fonts). The second file displays correctly in both applications.

I do not know what to advise. Sorry. This must be a libchm problem, but
kchmviewer is abandoned for 2 years and I'm not sure that there is a reason to
report the bug to its developer.

Just FYI, kchmviewer can be built on Qt 5.11 (tested) with a simple patch from
Debian:

diff --git a/src/src.pro b/src/src.pro
index 2524b5e..c6d5ca4 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -40,7 +40,6 @@ SOURCES += config.cpp \
     textencodings.cpp \
     treeitem_toc.cpp \
     treeitem_index.cpp
-LIBS += -lchm -lzip
 TARGET = ../bin/kchmviewer
 CONFIG += threads \
     warn_on \
@@ -67,10 +66,6 @@ QT += webkit \
     webkitwidgets \
     printsupport

-linux-g++*:{
-    LIBS += -lX11
-}
-
 # This is used by cross-build on 64-bit when building a 32-bit version
 linux-g++-32: {
        LIBS += -L.
@@ -112,22 +107,17 @@ unix:!macx: {
     POST_TARGETDEPS += ../lib/libebook/libebook.a
 }

+LIBS += -lchm -lzip
+linux-g++*:{
+    LIBS += -lX11
+}
+
 greaterThan(QT_MAJOR_VERSION, 4) {
     # Qt 5
-    greaterThan(QT_MINOR_VERSION, 5) {
-        # Qt 5.6+
-        error("You use Qt5.6+ - QWebEngine is not yet suitable for kchmviewer
and is not supported")
-        QT += webengine webenginewidgets
-        DEFINES += USE_WEBENGINE
-        SOURCES += viewwindow_webengine.cpp dataprovider_qwebengine.cpp
-        HEADERS += dataprovider_qwebengine.h viewwindow_webengine.h
-    } else {
-        # Qt 5.0-5.5
         QT += webkit webkitwidgets
         DEFINES += USE_WEBKIT
         SOURCES += viewwindow_webkit.cpp dataprovider_qwebkit.cpp
         HEADERS += dataprovider_qwebkit.h viewwindow_webkit.h
-    }
 } else {
     message("Qt4 is not supported anymore, please do not report any errors")
     QT += webkit webkitwidgets

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list