From a5b3a70e7db0f90614679e02f99f3e0d9f35afea Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sun, 23 Sep 2018 17:25:32 +0200 Subject: [PATCH] some temporary workarounds for MSVC problems --- src/controls/QskTextInput.cpp | 8 ++++++++ src/graphic/QskGraphicTextureFactory.cpp | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/src/controls/QskTextInput.cpp b/src/controls/QskTextInput.cpp index 978e150d..03776c45 100644 --- a/src/controls/QskTextInput.cpp +++ b/src/controls/QskTextInput.cpp @@ -92,6 +92,13 @@ namespace bool fixup() { +#ifdef _MSC_VER + /* + We can't call hasAcceptableInput with MSVC + and need to find our own code instead TODO ... + */ + return true; +#else auto d = QQuickTextInputPrivate::get( this ); // QQuickTextInputPrivate::checkIsValid ??? @@ -102,6 +109,7 @@ namespace isAcceptable = d->fixup(); return isAcceptable; +#endif } void updateColors(); diff --git a/src/graphic/QskGraphicTextureFactory.cpp b/src/graphic/QskGraphicTextureFactory.cpp index c1b5faf9..7a965e22 100644 --- a/src/graphic/QskGraphicTextureFactory.cpp +++ b/src/graphic/QskGraphicTextureFactory.cpp @@ -78,6 +78,14 @@ static uint qskTextureRaster( const QRect& rect, Qt::AspectRatioMode scalingMode, const QskGraphic& graphic, const QskColorFilter& filter ) { +#ifdef _MSC_VER + /* + We can't access the internals of QOpenGLTexture with MSVC + and have to replace the code below by doing OpenGL calls directly. + Until this is not done we disable using the raster + */ + return qskTextureFBO( rect, scalingMode, graphic, filter ); +#else QImage image( rect.size(), QImage::Format_RGBA8888_Premultiplied ); image.fill( Qt::transparent ); @@ -98,6 +106,7 @@ static uint qskTextureRaster( uint textureId = 0; qSwap( texture.d_func()->textureId, textureId ); return textureId; +#endif } QskGraphicTextureFactory::QskGraphicTextureFactory()