obsolete code for earlier versions removed
This commit is contained in:
parent
3bfdd9ed93
commit
7f5d289808
|
@ -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 );
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
CONFIG += qskexample
|
||||
|
||||
QT += svg
|
||||
QT += quick_private # TODO: examples should not use private headers
|
||||
|
||||
SOURCES += \
|
||||
Box.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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -7,17 +7,18 @@
|
|||
|
||||
#include "QskGlobal.h"
|
||||
|
||||
#ifdef QT_NO_KEYWORDS
|
||||
|
||||
// qquickimage_p.h uses emit
|
||||
#define emit Q_EMIT
|
||||
#include <private/qquickimage_p.h>
|
||||
#undef emit
|
||||
QSK_QT_PRIVATE_BEGIN
|
||||
|
||||
#ifndef emit
|
||||
#define emit
|
||||
#include <private/qquickimage_p.h>
|
||||
#undef emit
|
||||
#else
|
||||
#include <private/qquickimage_p.h>
|
||||
#include <private/qquickimage_p.h>
|
||||
#endif
|
||||
|
||||
QSK_QT_PRIVATE_END
|
||||
|
||||
#include <memory>
|
||||
|
||||
class Image : public QQuickImage
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,10 +8,8 @@
|
|||
#include "QskColorFilter.h"
|
||||
#include "QskEvent.h"
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 )
|
||||
#include <qguiapplication.h>
|
||||
#include <qstylehints.h>
|
||||
#endif
|
||||
|
||||
#include <qmath.h>
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -12,8 +12,6 @@ DEPENDPATH *= $${QSK_SUBDIRS}
|
|||
# CONFIG += pinyin
|
||||
# CONFIG += hunspell
|
||||
|
||||
# DEFINES += QSK_LAYOUT_COMPAT
|
||||
|
||||
HEADERS += \
|
||||
common/QskArcMetrics.h \
|
||||
common/QskAspect.h \
|
||||
|
|
Loading…
Reference in New Issue