diff options
| author | mio <stigma@disroot.org> | 2025-05-12 21:05:34 +1000 |
|---|---|---|
| committer | mio <stigma@disroot.org> | 2025-05-15 17:05:23 +1000 |
| commit | 519310b60e8e0f169f7df21ea0b82a994627873c (patch) | |
| tree | 234a50afedae4c4df652fb2bbfe74a0ac5d0104f | |
| parent | 2853c7182a4c8e1cef45517418e9d90aa3da879f (diff) | |
| download | bibletime-519310b6.tar.gz bibletime-519310b6.zip | |
Fix text rendering in display windows
sword 1.7 introduced new APIs to SWModule, one of which is renderText.
The old RenderText returned a const char*, however the new version
returns a SWBuf copy on the stack. This doesn't work when passing it to
TQString::fromUTF8 as the internal buffer is freed before the TQString
is constructed.
Note that RenderText in sword 1.7 and newer is a deprecated wrapper
around renderText.
Signed-off-by: mio <stigma@disroot.org>
(cherry picked from commit 022067805b453036d865565f72a4a27355eb4da5)
| -rw-r--r-- | bibletime/backend/cswordkey.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bibletime/backend/cswordkey.cpp b/bibletime/backend/cswordkey.cpp index 5e13e2b..527c53a 100644 --- a/bibletime/backend/cswordkey.cpp +++ b/bibletime/backend/cswordkey.cpp @@ -95,7 +95,7 @@ const TQString CSwordKey::renderedText( const CSwordKey::TextRenderType mode ) { Q_ASSERT(!key().isNull()); if (!key().isNull()) { //we have valid text - TQString text = TQString::fromUtf8( m_module->module()->RenderText() ); + TQString text = TQString::fromUtf8( m_module->module()->renderText().c_str() ); // This is yucky, but if we want strong lexicon refs we have to do it here. if (m_module->type() == CSwordModuleInfo::Lexicon) { |
