summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-01-13 15:27:30 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-01-13 15:27:30 +0100
commitb1833cf50dace47a755e575b1faa5372b7fb7d1a (patch)
tree1f2327b8e10f7277922d143e488ec405264ebaba
parentcf3bddf185cee68613aebfa784597de29f57257c (diff)
downloadkbookreader-b1833cf50dace47a755e575b1faa5372b7fb7d1a.tar.gz
kbookreader-b1833cf50dace47a755e575b1faa5372b7fb7d1a.zip
Added controlled conversions to char* instead of automatic ascii conversions.
The definition of -UTQT_NO_ASCII_CAST is no longer needed. Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/bookwidget.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf31ff6..7c70150 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,7 @@ include( ConfigureChecks.cmake )
###### global compiler settings
-add_definitions( -DHAVE_CONFIG_H -UTQT_NO_ASCII_CAST )
+add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
diff --git a/src/bookwidget.cpp b/src/bookwidget.cpp
index c645524..7a23d70 100644
--- a/src/bookwidget.cpp
+++ b/src/bookwidget.cpp
@@ -83,7 +83,7 @@ void BookWidget::openURL(const KURL & url)
m_stream.reset(new TQTextStream(&m_file));
m_textLines.reset(new TQStringList);
TQString name(encoding());
- TQTextCodec *codec = TQTextCodec::codecForName(encoding()); // get the codec
+ TQTextCodec *codec = TQTextCodec::codecForName(encoding().latin1()); // get the codec
if (codec)
m_stream->setCodec(codec);
//show progress dialog