obsolete code for earlier versions removed
This commit is contained in:
parent
3bfdd9ed93
commit
7f5d289808
|
@ -37,11 +37,7 @@ namespace
|
||||||
TicksNode( const QColor& color )
|
TicksNode( const QColor& color )
|
||||||
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
|
|
||||||
m_geometry.setDrawingMode( QSGGeometry::DrawLines );
|
m_geometry.setDrawingMode( QSGGeometry::DrawLines );
|
||||||
#else
|
|
||||||
m_geometry.setDrawingMode( GL_LINES );
|
|
||||||
#endif
|
|
||||||
m_geometry.setVertexDataPattern( QSGGeometry::StaticPattern );
|
m_geometry.setVertexDataPattern( QSGGeometry::StaticPattern );
|
||||||
|
|
||||||
m_material.setColor( color );
|
m_material.setColor( color );
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
CONFIG += qskexample
|
CONFIG += qskexample
|
||||||
|
|
||||||
QT += svg
|
QT += svg
|
||||||
|
QT += quick_private # TODO: examples should not use private headers
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
Box.cpp \
|
Box.cpp \
|
||||||
|
|
|
@ -48,11 +48,7 @@ void DiagramDataNode::update( const QRectF& rect, Type type,
|
||||||
m_type = type;
|
m_type = type;
|
||||||
|
|
||||||
const auto drawingMode =
|
const auto drawingMode =
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
|
|
||||||
( m_type == Line ) ? QSGGeometry::DrawLines : QSGGeometry::DrawTriangleStrip;
|
( m_type == Line ) ? QSGGeometry::DrawLines : QSGGeometry::DrawTriangleStrip;
|
||||||
#else
|
|
||||||
( m_type == Line ) ? GL_LINES : GL_TRIANGLE_STRIP;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_geometry.setDrawingMode( drawingMode );
|
m_geometry.setDrawingMode( drawingMode );
|
||||||
|
|
||||||
|
|
|
@ -10,11 +10,7 @@
|
||||||
DiagramSegmentsNode::DiagramSegmentsNode()
|
DiagramSegmentsNode::DiagramSegmentsNode()
|
||||||
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
|
|
||||||
m_geometry.setDrawingMode( QSGGeometry::DrawLines );
|
m_geometry.setDrawingMode( QSGGeometry::DrawLines );
|
||||||
#else
|
|
||||||
m_geometry.setDrawingMode( GL_LINES );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
setGeometry( &m_geometry );
|
setGeometry( &m_geometry );
|
||||||
setMaterial( &m_material );
|
setMaterial( &m_material );
|
||||||
|
|
|
@ -24,11 +24,7 @@ class RadialTickmarksNodePrivate final : public QSGGeometryNodePrivate
|
||||||
RadialTickmarksNodePrivate()
|
RadialTickmarksNodePrivate()
|
||||||
: geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
: geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
|
|
||||||
geometry.setDrawingMode( QSGGeometry::DrawLines );
|
geometry.setDrawingMode( QSGGeometry::DrawLines );
|
||||||
#else
|
|
||||||
geometry.setDrawingMode( GL_LINES );
|
|
||||||
#endif
|
|
||||||
geometry.setVertexDataPattern( QSGGeometry::StaticPattern );
|
geometry.setVertexDataPattern( QSGGeometry::StaticPattern );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ CONFIG += no_private_qt_headers_warning
|
||||||
CONFIG += warn_on
|
CONFIG += warn_on
|
||||||
CONFIG += no_keywords
|
CONFIG += no_keywords
|
||||||
CONFIG += silent
|
CONFIG += silent
|
||||||
CONFIG -= depend_includepath
|
#CONFIG -= depend_includepath
|
||||||
|
|
||||||
CONFIG += strict_c++
|
CONFIG += strict_c++
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
@ -64,16 +64,6 @@ RCC_DIR = rcc
|
||||||
|
|
||||||
QSK_CONFIG += QskDll
|
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 {
|
linux {
|
||||||
|
|
||||||
pedantic {
|
pedantic {
|
||||||
|
@ -83,14 +73,17 @@ linux {
|
||||||
# Qt headers do not stand pedantic checks, so it's better
|
# Qt headers do not stand pedantic checks, so it's better
|
||||||
# to exclude them by declaring them as system includes
|
# to exclude them by declaring them as system includes
|
||||||
|
|
||||||
|
#CONFIG += qtassysteminclude
|
||||||
|
}
|
||||||
|
|
||||||
|
qtassysteminclude {
|
||||||
|
|
||||||
# As most distros set QT_INSTALL_HEADERS to /usr/include we
|
# As most distros set QT_INSTALL_HEADERS to /usr/include we
|
||||||
# would run into gcc compiler errors and better drop it
|
# would run into gcc compiler errors and better drop it
|
||||||
# from the list below. Should be no problem as we don't
|
# from the list below. Should be no problem as we don't
|
||||||
# add the Qt module to our includes and therefore don't
|
# add the Qt module to our includes and therefore don't
|
||||||
# need this path.
|
# need this path.
|
||||||
|
|
||||||
# QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += \
|
QMAKE_CXXFLAGS += \
|
||||||
-isystem $$[QT_INSTALL_HEADERS]/QtCore \
|
-isystem $$[QT_INSTALL_HEADERS]/QtCore \
|
||||||
-isystem $$[QT_INSTALL_HEADERS]/QtGui \
|
-isystem $$[QT_INSTALL_HEADERS]/QtGui \
|
||||||
|
@ -114,13 +107,6 @@ linux-g++ | linux-g++-64 {
|
||||||
|
|
||||||
# QMAKE_CXXFLAGS_RELEASE *= -Ofast
|
# QMAKE_CXXFLAGS_RELEASE *= -Ofast
|
||||||
# QMAKE_CXXFLAGS_RELEASE *= -Os
|
# 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 {
|
pedantic {
|
||||||
|
@ -172,8 +158,7 @@ sanitize {
|
||||||
|
|
||||||
CONFIG += sanitizer
|
CONFIG += sanitizer
|
||||||
CONFIG += sanitize_address
|
CONFIG += sanitize_address
|
||||||
#CONFIG *= sanitize_memory
|
# CONFIG *= sanitize_undefined
|
||||||
CONFIG *= sanitize_undefined
|
|
||||||
|
|
||||||
linux-g++ | linux-g++-64 {
|
linux-g++ | linux-g++-64 {
|
||||||
#QMAKE_CXXFLAGS *= -fsanitize-address-use-after-scope
|
#QMAKE_CXXFLAGS *= -fsanitize-address-use-after-scope
|
||||||
|
@ -185,9 +170,6 @@ debug {
|
||||||
DEFINES += ITEM_STATISTICS=1
|
DEFINES += ITEM_STATISTICS=1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Help out Qt Creator
|
|
||||||
ide: DEFINES += QT_IDE
|
|
||||||
|
|
||||||
# DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
|
# DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x000000
|
||||||
|
|
||||||
LOCAL_PRI=$$(QSK_LOCAL_PRI)
|
LOCAL_PRI=$$(QSK_LOCAL_PRI)
|
||||||
|
|
|
@ -7,17 +7,18 @@
|
||||||
|
|
||||||
#include "QskGlobal.h"
|
#include "QskGlobal.h"
|
||||||
|
|
||||||
#ifdef QT_NO_KEYWORDS
|
QSK_QT_PRIVATE_BEGIN
|
||||||
|
|
||||||
// qquickimage_p.h uses emit
|
#ifndef emit
|
||||||
#define emit Q_EMIT
|
#define emit
|
||||||
#include <private/qquickimage_p.h>
|
#include <private/qquickimage_p.h>
|
||||||
#undef emit
|
#undef emit
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#include <private/qquickimage_p.h>
|
#include <private/qquickimage_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
QSK_QT_PRIVATE_END
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class Image : public QQuickImage
|
class Image : public QQuickImage
|
||||||
|
|
|
@ -94,9 +94,7 @@ namespace
|
||||||
bool updateMaterial = ( oldMaterial == nullptr )
|
bool updateMaterial = ( oldMaterial == nullptr )
|
||||||
|| newMaterial->compare( oldMaterial ) != 0;
|
|| newMaterial->compare( oldMaterial ) != 0;
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 12, 0 )
|
|
||||||
updateMaterial |= state.isCachedMaterialDataDirty();
|
updateMaterial |= state.isCachedMaterialDataDirty();
|
||||||
#endif
|
|
||||||
|
|
||||||
if ( updateMaterial )
|
if ( updateMaterial )
|
||||||
{
|
{
|
||||||
|
|
|
@ -159,11 +159,7 @@ qreal qskHorizontalAdvance( const QFont& font, const QString& text )
|
||||||
|
|
||||||
qreal qskHorizontalAdvance( const QFontMetricsF& fontMetrics, const QString& text )
|
qreal qskHorizontalAdvance( const QFontMetricsF& fontMetrics, const QString& text )
|
||||||
{
|
{
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 11, 0 )
|
|
||||||
return fontMetrics.horizontalAdvance( text );
|
return fontMetrics.horizontalAdvance( text );
|
||||||
#else
|
|
||||||
return fontMetrics.width( text );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qreal qskFuzzyFloor( qreal value, qreal stepSize )
|
qreal qskFuzzyFloor( qreal value, qreal stepSize )
|
||||||
|
|
|
@ -39,10 +39,4 @@
|
||||||
#define QSK_QT_PRIVATE_END \
|
#define QSK_QT_PRIVATE_END \
|
||||||
QT_WARNING_POP
|
QT_WARNING_POP
|
||||||
|
|
||||||
#ifdef Q_FALLTHROUGH
|
|
||||||
#define QSK_FALLTHROUGH Q_FALLTHROUGH
|
|
||||||
#else
|
|
||||||
#define QSK_FALLTHROUGH
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
#include "QskColorFilter.h"
|
#include "QskColorFilter.h"
|
||||||
#include "QskEvent.h"
|
#include "QskEvent.h"
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 )
|
|
||||||
#include <qguiapplication.h>
|
#include <qguiapplication.h>
|
||||||
#include <qstylehints.h>
|
#include <qstylehints.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <qmath.h>
|
#include <qmath.h>
|
||||||
|
|
||||||
|
|
|
@ -455,7 +455,6 @@ void QskInputPanel::updateInputPanel( Qt::InputMethodQueries queries )
|
||||||
setLocale( event.value( Qt::ImPreferredLanguage ).toLocale() );
|
setLocale( event.value( Qt::ImPreferredLanguage ).toLocale() );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
|
|
||||||
if ( queries & Qt::ImInputItemClipRectangle )
|
if ( queries & Qt::ImInputItemClipRectangle )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -463,7 +462,6 @@ void QskInputPanel::updateInputPanel( Qt::InputMethodQueries queries )
|
||||||
so that it does not hide the item.
|
so that it does not hide the item.
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskInputPanel::updateLocale( const QLocale& locale )
|
void QskInputPanel::updateLocale( const QLocale& locale )
|
||||||
|
|
|
@ -12,8 +12,6 @@ DEPENDPATH *= $${QSK_SUBDIRS}
|
||||||
# CONFIG += pinyin
|
# CONFIG += pinyin
|
||||||
# CONFIG += hunspell
|
# CONFIG += hunspell
|
||||||
|
|
||||||
# DEFINES += QSK_LAYOUT_COMPAT
|
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
common/QskArcMetrics.h \
|
common/QskArcMetrics.h \
|
||||||
common/QskAspect.h \
|
common/QskAspect.h \
|
||||||
|
|
Loading…
Reference in New Issue