diff --git a/playground/grids/GridQuick.cpp b/playground/grids/GridQuick.cpp index f10d5a0b..03cb2983 100644 --- a/playground/grids/GridQuick.cpp +++ b/playground/grids/GridQuick.cpp @@ -71,7 +71,6 @@ GridQuick::~GridQuick() void GridQuick::insert( const QByteArray& colorName, int row, int column, int rowSpan, int columnSpan ) { -#if QT_VERSION >= QT_VERSION_CHECK( 5, 15, 0 ) /* We need to create a temporary layout in QML, so that the object for the attachedProperties is created early @@ -82,9 +81,6 @@ void GridQuick::insert( const QByteArray& colorName, rectangle->setParent( nullptr ); delete layout; -#else - auto rectangle = createQml( "import QtQuick 2.0\nRectangle {}" ); -#endif rectangle->setParent( m_grid ); rectangle->setParentItem( m_grid ); diff --git a/src/common/QskGlobal.h b/src/common/QskGlobal.h index 147731e5..1bd1c98b 100644 --- a/src/common/QskGlobal.h +++ b/src/common/QskGlobal.h @@ -9,6 +9,10 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK( 5, 15, 0 ) + static_assert( false, "QSkinny requires Qt >= 5.15" ); +#endif + // QSK_VERSION is (major << 16) + (minor << 8) + patch. #define QSK_VERSION 0x000001 diff --git a/src/common/QskRgbValue.cpp b/src/common/QskRgbValue.cpp index bd6ac812..fb29be32 100644 --- a/src/common/QskRgbValue.cpp +++ b/src/common/QskRgbValue.cpp @@ -60,7 +60,6 @@ static inline QColor qskInterpolatedColor( return QColor::fromHsl( h, s, l, a ); } -#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 ) case QColor::ExtendedRgb: { const qreal r = valueF( c1.redF(), c2.redF(), ratio ); @@ -70,7 +69,6 @@ static inline QColor qskInterpolatedColor( return QColor::fromRgbF( r, g, b, a ); } -#endif case QColor::Invalid: break; } diff --git a/src/controls/QskEvent.cpp b/src/controls/QskEvent.cpp index fb09bca5..ba479d7a 100644 --- a/src/controls/QskEvent.cpp +++ b/src/controls/QskEvent.cpp @@ -76,11 +76,7 @@ QPointF qskHoverPosition( const QHoverEvent* event ) QPointF qskWheelPosition( const QWheelEvent* event ) { -#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 ) return event->position(); -#else - return event->posF(); -#endif } #endif diff --git a/src/controls/QskSkinManager.cpp b/src/controls/QskSkinManager.cpp index a2bc7d29..1537a527 100644 --- a/src/controls/QskSkinManager.cpp +++ b/src/controls/QskSkinManager.cpp @@ -19,11 +19,7 @@ static inline QStringList qskSplitPath( const QString& s ) { const auto separator = QDir::listSeparator(); -#if QT_VERSION >= QT_VERSION_CHECK( 5, 15, 0 ) return s.split( separator, Qt::SkipEmptyParts ); -#else - return s.split( separator, QString::SkipEmptyParts ); -#endif } /* diff --git a/src/inputpanel/QskHunspellTextPredictor.cpp b/src/inputpanel/QskHunspellTextPredictor.cpp index 0136380c..c36ffddf 100644 --- a/src/inputpanel/QskHunspellTextPredictor.cpp +++ b/src/inputpanel/QskHunspellTextPredictor.cpp @@ -140,16 +140,9 @@ QPair< QString, QString > QskHunspellTextPredictor::affAndDicFile( void QskHunspellTextPredictor::loadDictionaries() { - const auto splitBehavior = -#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 ) - Qt::SkipEmptyParts; -#else - QString::SkipEmptyParts; -#endif - const auto userPaths = QString::fromUtf8( qgetenv( "QSK_HUNSPELL_PATH" ) ); - auto paths = userPaths.split( QDir::listSeparator(), splitBehavior ); + auto paths = userPaths.split( QDir::listSeparator(), Qt::SkipEmptyParts ); #if !defined( Q_OS_WIN32 ) paths += QStringLiteral( "/usr/share/hunspell" ); diff --git a/src/nodes/QskTextureRenderer.cpp b/src/nodes/QskTextureRenderer.cpp index 137226ab..16bc8074 100644 --- a/src/nodes/QskTextureRenderer.cpp +++ b/src/nodes/QskTextureRenderer.cpp @@ -165,17 +165,12 @@ QSGTexture* QskTextureRenderer::textureFromId( texture = QNativeInterface::QSGOpenGLTexture::fromNative( textureId, window, size, flags ); -#elif QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 ) +#else const int nativeLayout = 0; // VkImageLayout in case of Vulkan texture = window->createTextureFromNativeObject( QQuickWindow::NativeObjectTexture, &textureId, nativeLayout, size, flags ); - -#else - - texture = window->createTextureFromId( textureId, size, flags ); - #endif return texture;