diff options
Diffstat (limited to 'lib/libchmfile')
-rw-r--r-- | lib/libchmfile/libchmfileimpl.cpp | 4 | ||||
-rw-r--r-- | lib/libchmfile/libchmfileimpl.h | 4 | ||||
-rw-r--r-- | lib/libchmfile/libchmurlfactory.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/libchmfile/libchmfileimpl.cpp b/lib/libchmfile/libchmfileimpl.cpp index a5ad04c..51bd7b4 100644 --- a/lib/libchmfile/libchmfileimpl.cpp +++ b/lib/libchmfile/libchmfileimpl.cpp @@ -864,7 +864,7 @@ TQCString LCHMFileImpl::convertSearchWord( const TQString & src ) }; if ( !m_textCodec ) - return (TQCString) src.lower(); + return src.lower().utf8(); TQCString dest = m_textCodec->fromUnicode (src); @@ -996,7 +996,7 @@ bool LCHMFileImpl::parseFileAndFillArray( const TQString & file, QT34VECTOR< LCH else if ( tagword == "/object" && in_object ) { // a topic entry closed. Add a tree item - if ( entry.name ) + if ( !entry.name.isEmpty() ) { if ( !root_indent_offset_set ) { diff --git a/lib/libchmfile/libchmfileimpl.h b/lib/libchmfile/libchmfileimpl.h index c0a606f..d596d81 100644 --- a/lib/libchmfile/libchmfileimpl.h +++ b/lib/libchmfile/libchmfileimpl.h @@ -109,7 +109,7 @@ class LCHMFileImpl //! Encode the string with the currently selected text codec, if possible. Or return as-is, if not. inline TQString encodeWithCurrentCodec (const TQString& str) const { - return (m_textCodec ? m_textCodec->toUnicode (str) : str); + return (m_textCodec ? m_textCodec->toUnicode (str.utf8()) : str); } //! Encode the string with the currently selected text codec, if possible. Or return as-is, if not. @@ -122,7 +122,7 @@ class LCHMFileImpl //! Or return as-is, if not. inline TQString encodeInternalWithCurrentCodec (const TQString& str) const { - return (m_textCodecForSpecialFiles ? m_textCodecForSpecialFiles->toUnicode (str) : str); + return (m_textCodecForSpecialFiles ? m_textCodecForSpecialFiles->toUnicode (str.utf8()) : str); } //! Encode the string from internal files with the currently selected text codec, if possible. diff --git a/lib/libchmfile/libchmurlfactory.h b/lib/libchmfile/libchmurlfactory.h index a897138..fba5614 100644 --- a/lib/libchmfile/libchmurlfactory.h +++ b/lib/libchmfile/libchmurlfactory.h @@ -113,7 +113,7 @@ static inline bool handleFileType( const TQString& link, TQString& generated ) if ( !link.endsWith( intext ) ) return false; - TQString filelink = link.left( link.length() - strlen( intext ) ); + TQString filelink = link.left( link.length() - intext.length() ); generated = "<html><body><img src=\"" + filelink + "\"></body></html>"; return true; } |