From 0e43261b5767f21ecd3872b7c0b6bf2452d51b25 2012-08-28 07:38:20 From: Marek Rosa Date: 2012-08-28 07:38:20 Subject: [PATCH] Disabled QDateTimeAxis on ARM --- diff --git a/config.pri b/config.pri index cee84b9..cbf6e03 100644 --- a/config.pri +++ b/config.pri @@ -64,6 +64,10 @@ mac: { QMAKE_LFLAGS *= -mmacosx-version-min=10.5 } +linux-arm*: { + DEFINES+=QT_ON_ARM +} + ##################### INCLUDES ############################################################ diff --git a/examples/examples.pro b/examples/examples.pro index 612723a..e71e07f 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -30,6 +30,10 @@ SUBDIRS += \ donut \ donutbreakdown \ scrollchart \ - datetimeaxis \ populationpyramid \ donutchart + +!linux-arm*: { +SUBDIRS += \ + datetimeaxis +} diff --git a/plugins/declarative/declarativechart.cpp b/plugins/declarative/declarativechart.cpp index d81d7d0..f748b01 100644 --- a/plugins/declarative/declarativechart.cpp +++ b/plugins/declarative/declarativechart.cpp @@ -29,10 +29,13 @@ #include "declarativescatterseries.h" #include "qbarcategoryaxis.h" #include "qvalueaxis.h" -#include "qdatetimeaxis.h" #include "qcategoryaxis.h" #include "qabstractseries_p.h" +#ifndef QT_ON_ARM + #include "qdatetimeaxis.h" +#endif + QTCOMMERCIALCHART_BEGIN_NAMESPACE /*! @@ -638,9 +641,11 @@ void DeclarativeChart::createDefaultAxes(QAbstractSeries* series) case QAbstractAxis::AxisTypeCategory: m_chart->setAxisX(new QCategoryAxis(this), series); break; +#ifndef QT_ON_ARM case QAbstractAxis::AxisTypeDateTime: m_chart->setAxisX(new QDateTimeAxis(this), series); break; +#endif default: // Do nothing, assume AxisTypeNoAxis break; @@ -659,9 +664,11 @@ void DeclarativeChart::createDefaultAxes(QAbstractSeries* series) case QAbstractAxis::AxisTypeCategory: m_chart->setAxisY(new QCategoryAxis(this), series); break; +#ifndef QT_ON_ARM case QAbstractAxis::AxisTypeDateTime: m_chart->setAxisY(new QDateTimeAxis(this), series); break; +#endif default: // Do nothing, assume AxisTypeNoAxis break; diff --git a/src/axis/axis.pri b/src/axis/axis.pri index 935e724..350f8b4 100644 --- a/src/axis/axis.pri +++ b/src/axis/axis.pri @@ -3,14 +3,12 @@ INCLUDEPATH += $$PWD \ $$PWD/valueaxis \ $$PWD/barcategoryaxis \ - $$PWD/categoryaxis \ - $$PWD/datetimeaxis + $$PWD/categoryaxis DEPENDPATH += $$PWD \ $$PWD/valueaxis \ $$PWD/barcategoryaxis \ - $$PWD/categoryaxis \ - $$PWD/datetimeaxis + $$PWD/categoryaxis SOURCES += \ $$PWD/chartaxis.cpp \ @@ -23,10 +21,7 @@ SOURCES += \ $$PWD/barcategoryaxis/qbarcategoryaxis.cpp \ $$PWD/categoryaxis/chartcategoryaxisx.cpp \ $$PWD/categoryaxis/chartcategoryaxisy.cpp \ - $$PWD/categoryaxis/qcategoryaxis.cpp \ - $$PWD/datetimeaxis/chartdatetimeaxisx.cpp \ - $$PWD/datetimeaxis/chartdatetimeaxisy.cpp \ - $$PWD/datetimeaxis/qdatetimeaxis.cpp + $$PWD/categoryaxis/qcategoryaxis.cpp PRIVATE_HEADERS += \ $$PWD/chartaxis_p.h \ @@ -39,14 +34,31 @@ PRIVATE_HEADERS += \ $$PWD/barcategoryaxis/qbarcategoryaxis_p.h \ $$PWD/categoryaxis/chartcategoryaxisx_p.h \ $$PWD/categoryaxis/chartcategoryaxisy_p.h \ - $$PWD/categoryaxis/qcategoryaxis_p.h \ - $$PWD/datetimeaxis/chartdatetimeaxisx_p.h \ - $$PWD/datetimeaxis/chartdatetimeaxisy_p.h \ - $$PWD/datetimeaxis/qdatetimeaxis_p.h + $$PWD/categoryaxis/qcategoryaxis_p.h PUBLIC_HEADERS += \ $$PWD/qabstractaxis.h \ $$PWD/valueaxis/qvalueaxis.h \ $$PWD/barcategoryaxis/qbarcategoryaxis.h \ - $$PWD/categoryaxis/qcategoryaxis.h \ + $$PWD/categoryaxis/qcategoryaxis.h + +!linux-arm*: { +INCLUDEPATH += \ + $$PWD/datetimeaxis + +DEPENDPATH += \ + $$PWD/datetimeaxis + +SOURCES += \ + $$PWD/datetimeaxis/chartdatetimeaxisx.cpp \ + $$PWD/datetimeaxis/chartdatetimeaxisy.cpp \ + $$PWD/datetimeaxis/qdatetimeaxis.cpp + +PRIVATE_HEADERS += \ + $$PWD/datetimeaxis/chartdatetimeaxisx_p.h \ + $$PWD/datetimeaxis/chartdatetimeaxisy_p.h \ + $$PWD/datetimeaxis/qdatetimeaxis_p.h + +PUBLIC_HEADERS += \ $$PWD/datetimeaxis/qdatetimeaxis.h +} diff --git a/src/chartdataset.cpp b/src/chartdataset.cpp index 9bb0ae6..2b4e227 100644 --- a/src/chartdataset.cpp +++ b/src/chartdataset.cpp @@ -24,13 +24,16 @@ #include "qbarcategoryaxis.h" #include "qvalueaxis_p.h" #include "qcategoryaxis.h" -#include "qdatetimeaxis.h" #include "qabstractseries_p.h" #include "qabstractbarseries.h" #include "qstackedbarseries.h" #include "qpercentbarseries.h" #include "qpieseries.h" +#ifndef QT_ON_ARM + #include "qdatetimeaxis.h" +#endif + QTCOMMERCIALCHART_BEGIN_NAMESPACE ChartDataSet::ChartDataSet(QChart *parent):QObject(parent) @@ -187,9 +190,11 @@ QAbstractAxis* ChartDataSet::createAxis(QAbstractAxis::AxisType type, Qt::Orient case QAbstractAxis::AxisTypeCategory: axis = new QCategoryAxis(this); break; +#ifndef Q_WS_QWS case QAbstractAxis::AxisTypeDateTime: axis = new QDateTimeAxis(this); break; +#endif default: axis = 0; break; diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index dec5190..c444a4a 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -22,9 +22,13 @@ SUBDIRS += \ qhorizontalpercentbarseries \ qvalueaxis \ qcategoryaxis \ - qdatetimeaxis \ qbarcategoryaxis +!linux-arm*: { +SUBDIRS += \ + qdatetimeaxis +} + test_private:{ SUBDIRS += domain chartdataset }