diff --git a/examples/gallery/slider/CustomSliderSkinlet.cpp b/examples/gallery/slider/CustomSliderSkinlet.cpp index 54dd1cea..75a7f990 100644 --- a/examples/gallery/slider/CustomSliderSkinlet.cpp +++ b/examples/gallery/slider/CustomSliderSkinlet.cpp @@ -37,11 +37,7 @@ namespace TicksNode( const QColor& color ) : m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 ) { -#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 ) m_geometry.setDrawingMode( QSGGeometry::DrawLines ); -#else - m_geometry.setDrawingMode( GL_LINES ); -#endif m_geometry.setVertexDataPattern( QSGGeometry::StaticPattern ); m_material.setColor( color ); diff --git a/examples/iotdashboard/iotdashboard.pro b/examples/iotdashboard/iotdashboard.pro index 1b6a87b7..1669d26d 100644 --- a/examples/iotdashboard/iotdashboard.pro +++ b/examples/iotdashboard/iotdashboard.pro @@ -1,6 +1,7 @@ CONFIG += qskexample QT += svg +QT += quick_private # TODO: examples should not use private headers SOURCES += \ Box.cpp \ diff --git a/examples/iotdashboard/nodes/DiagramDataNode.cpp b/examples/iotdashboard/nodes/DiagramDataNode.cpp index cd155df3..a5fa2006 100644 --- a/examples/iotdashboard/nodes/DiagramDataNode.cpp +++ b/examples/iotdashboard/nodes/DiagramDataNode.cpp @@ -48,11 +48,7 @@ void DiagramDataNode::update( const QRectF& rect, Type type, m_type = type; const auto drawingMode = -#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 ) ( m_type == Line ) ? QSGGeometry::DrawLines : QSGGeometry::DrawTriangleStrip; -#else - ( m_type == Line ) ? GL_LINES : GL_TRIANGLE_STRIP; -#endif m_geometry.setDrawingMode( drawingMode ); diff --git a/examples/iotdashboard/nodes/DiagramSegmentsNode.cpp b/examples/iotdashboard/nodes/DiagramSegmentsNode.cpp index 9ec72f56..976abae7 100644 --- a/examples/iotdashboard/nodes/DiagramSegmentsNode.cpp +++ b/examples/iotdashboard/nodes/DiagramSegmentsNode.cpp @@ -10,11 +10,7 @@ DiagramSegmentsNode::DiagramSegmentsNode() : m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 ) { -#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 ) m_geometry.setDrawingMode( QSGGeometry::DrawLines ); -#else - m_geometry.setDrawingMode( GL_LINES ); -#endif setGeometry( &m_geometry ); setMaterial( &m_material ); diff --git a/examples/iotdashboard/nodes/RadialTickmarksNode.cpp b/examples/iotdashboard/nodes/RadialTickmarksNode.cpp index 13a86dbc..cb5d7449 100644 --- a/examples/iotdashboard/nodes/RadialTickmarksNode.cpp +++ b/examples/iotdashboard/nodes/RadialTickmarksNode.cpp @@ -24,11 +24,7 @@ class RadialTickmarksNodePrivate final : public QSGGeometryNodePrivate RadialTickmarksNodePrivate() : geometry( QSGGeometry::defaultAttributes_Point2D(), 0 ) { -#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 ) geometry.setDrawingMode( QSGGeometry::DrawLines ); -#else - geometry.setDrawingMode( GL_LINES ); -#endif geometry.setVertexDataPattern( QSGGeometry::StaticPattern ); } diff --git a/features/qskconfig.pri b/features/qskconfig.pri index f25494e7..136c76b8 100644 --- a/features/qskconfig.pri +++ b/features/qskconfig.pri @@ -37,7 +37,7 @@ CONFIG += no_private_qt_headers_warning CONFIG += warn_on CONFIG += no_keywords CONFIG += silent -CONFIG -= depend_includepath +#CONFIG -= depend_includepath CONFIG += strict_c++ CONFIG += c++11 @@ -64,16 +64,6 @@ RCC_DIR = rcc QSK_CONFIG += QskDll -*-g++* { - - GCC_VERSION = $$system("$$QMAKE_CXX -dumpversion") - equals(GCC_VERSION,4) || contains(GCC_VERSION, 4.* ) { - - # gcc4 is too old for certain checks - CONFIG -= pedantic sanitize - } -} - linux { pedantic { @@ -83,14 +73,17 @@ linux { # Qt headers do not stand pedantic checks, so it's better # to exclude them by declaring them as system includes + #CONFIG += qtassysteminclude + } + + qtassysteminclude { + # As most distros set QT_INSTALL_HEADERS to /usr/include we # would run into gcc compiler errors and better drop it # from the list below. Should be no problem as we don't # add the Qt module to our includes and therefore don't # need this path. - # QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS] - QMAKE_CXXFLAGS += \ -isystem $$[QT_INSTALL_HEADERS]/QtCore \ -isystem $$[QT_INSTALL_HEADERS]/QtGui \ @@ -114,13 +107,6 @@ linux-g++ | linux-g++-64 { # QMAKE_CXXFLAGS_RELEASE *= -Ofast # QMAKE_CXXFLAGS_RELEASE *= -Os - - # Some versions ( here 2.31.1 ) of the BFD linker may generate shared - # libraries with corrupt symbol version info which leads to - # "invalid version 21" errors when the corrupt shared library is used. - # One possible workaround is to use the gold linker instead. - - # QMAKE_LFLAGS *= -Wl,-fuse-ld=gold } pedantic { @@ -172,8 +158,7 @@ sanitize { CONFIG += sanitizer CONFIG += sanitize_address - #CONFIG *= sanitize_memory - CONFIG *= sanitize_undefined + # CONFIG *= sanitize_undefined linux-g++ | linux-g++-64 { #QMAKE_CXXFLAGS *= -fsanitize-address-use-after-scope @@ -185,9 +170,6 @@ debug { DEFINES += ITEM_STATISTICS=1 } -# Help out Qt Creator -ide: DEFINES += QT_IDE - # DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000 LOCAL_PRI=$$(QSK_LOCAL_PRI) diff --git a/playground/images/Image.h b/playground/images/Image.h index b3c9df96..3eaabe49 100644 --- a/playground/images/Image.h +++ b/playground/images/Image.h @@ -7,17 +7,18 @@ #include "QskGlobal.h" -#ifdef QT_NO_KEYWORDS - -// qquickimage_p.h uses emit -#define emit Q_EMIT -#include -#undef emit +QSK_QT_PRIVATE_BEGIN +#ifndef emit + #define emit + #include + #undef emit #else -#include + #include #endif +QSK_QT_PRIVATE_END + #include class Image : public QQuickImage diff --git a/playground/shadows/BoxShadowNode.cpp b/playground/shadows/BoxShadowNode.cpp index 0087fa58..f1a5ef1a 100644 --- a/playground/shadows/BoxShadowNode.cpp +++ b/playground/shadows/BoxShadowNode.cpp @@ -94,9 +94,7 @@ namespace bool updateMaterial = ( oldMaterial == nullptr ) || newMaterial->compare( oldMaterial ) != 0; -#if QT_VERSION >= QT_VERSION_CHECK( 5, 12, 0 ) updateMaterial |= state.isCachedMaterialDataDirty(); -#endif if ( updateMaterial ) { diff --git a/src/common/QskFunctions.cpp b/src/common/QskFunctions.cpp index aa5870bc..ded47fa5 100644 --- a/src/common/QskFunctions.cpp +++ b/src/common/QskFunctions.cpp @@ -159,11 +159,7 @@ qreal qskHorizontalAdvance( const QFont& font, const QString& text ) qreal qskHorizontalAdvance( const QFontMetricsF& fontMetrics, const QString& text ) { -#if QT_VERSION >= QT_VERSION_CHECK( 5, 11, 0 ) return fontMetrics.horizontalAdvance( text ); -#else - return fontMetrics.width( text ); -#endif } qreal qskFuzzyFloor( qreal value, qreal stepSize ) diff --git a/src/common/QskGlobal.h b/src/common/QskGlobal.h index 56361c17..9bb265fe 100644 --- a/src/common/QskGlobal.h +++ b/src/common/QskGlobal.h @@ -17,15 +17,15 @@ #ifdef QSK_DLL #if defined( QSK_MAKEDLL ) // create a DLL library -#define QSK_EXPORT Q_DECL_EXPORT + #define QSK_EXPORT Q_DECL_EXPORT #else // use a DLL library -#define QSK_EXPORT Q_DECL_IMPORT + #define QSK_EXPORT Q_DECL_IMPORT #endif #endif // QSK_DLL #ifndef QSK_EXPORT -#define QSK_EXPORT + #define QSK_EXPORT #endif #define QSK_QT_PRIVATE_BEGIN \ @@ -39,10 +39,4 @@ #define QSK_QT_PRIVATE_END \ QT_WARNING_POP -#ifdef Q_FALLTHROUGH -#define QSK_FALLTHROUGH Q_FALLTHROUGH -#else -#define QSK_FALLTHROUGH -#endif - #endif diff --git a/src/controls/QskListView.cpp b/src/controls/QskListView.cpp index f0a30301..331f8f8b 100644 --- a/src/controls/QskListView.cpp +++ b/src/controls/QskListView.cpp @@ -8,10 +8,8 @@ #include "QskColorFilter.h" #include "QskEvent.h" -#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 ) #include #include -#endif #include diff --git a/src/inputpanel/QskInputPanel.cpp b/src/inputpanel/QskInputPanel.cpp index c2eb0974..bcad0e63 100644 --- a/src/inputpanel/QskInputPanel.cpp +++ b/src/inputpanel/QskInputPanel.cpp @@ -455,7 +455,6 @@ void QskInputPanel::updateInputPanel( Qt::InputMethodQueries queries ) setLocale( event.value( Qt::ImPreferredLanguage ).toLocale() ); } -#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 ) if ( queries & Qt::ImInputItemClipRectangle ) { /* @@ -463,7 +462,6 @@ void QskInputPanel::updateInputPanel( Qt::InputMethodQueries queries ) so that it does not hide the item. */ } -#endif } void QskInputPanel::updateLocale( const QLocale& locale ) diff --git a/src/src.pro b/src/src.pro index 9358bdf2..a25be7da 100644 --- a/src/src.pro +++ b/src/src.pro @@ -12,8 +12,6 @@ DEPENDPATH *= $${QSK_SUBDIRS} # CONFIG += pinyin # CONFIG += hunspell -# DEFINES += QSK_LAYOUT_COMPAT - HEADERS += \ common/QskArcMetrics.h \ common/QskAspect.h \