From a3c224c8659a60e95f4c4170490ae8e5a2288e3c Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sun, 23 Sep 2018 16:36:58 +0200 Subject: [PATCH] trying to work around MSVC issues --- src/nodes/QskRichTextRenderer.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/nodes/QskRichTextRenderer.cpp b/src/nodes/QskRichTextRenderer.cpp index c32f01f1..3fa23e76 100644 --- a/src/nodes/QskRichTextRenderer.cpp +++ b/src/nodes/QskRichTextRenderer.cpp @@ -25,6 +25,15 @@ namespace public: TextItem() { +#if 1 + /* + QQuickTextPrivate::ExtraData::ExtraData is not exported with MSVC, so we + preallocate it by setting/unsetting the bottom padding + */ + setBottomPadding( 1 ); + setBottomPadding( 0 ); +#endif + // fonts are supposed to be defined in the application skin and we // probably don't want to have them scaled setFontSizeMode( QQuickText::FixedSize ); @@ -266,9 +275,9 @@ void QskRichTextRenderer::updateNode( if ( static_cast< int >( rect.height() - h ) % 2 ) { if ( static_cast< int >( h ) % 2 ) - d->extra.value().bottomPadding = 1; + d->extra->bottomPadding = 1; else - d->extra.value().topPadding = 1; + d->extra->topPadding = 1; } }