From a49453f1414ea094eb5fbd67865659b7d1a65c04 Mon Sep 17 00:00:00 2001 From: Konrad Rosenbaum Date: Wed, 26 Dec 2012 15:41:02 +0100 Subject: [PATCH] update for Qt5 and GCC 4.7 --- src/elam.pro | 24 ++++++++++++------------ src/elambinary.cpp | 6 +++--- src/elamunary.cpp | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/elam.pro b/src/elam.pro index adf6142..edf89f9 100644 --- a/src/elam.pro +++ b/src/elam.pro @@ -10,17 +10,17 @@ DEFINES += ELAM_LIBRARY_BUILD VERSION = 0.3.0 HEADERS += \ - elam.h \ - elamunary.h \ - elambinary.h \ - elamcharclass.h \ - elamengine.h \ - elamexpression.h \ - elamvalue.h \ - elamintengine.h \ - elamfloatengine.h \ - elamboolengine.h \ - elamstringengine.h + ../include/elam.h \ + ../include/elamunary.h \ + ../include/elambinary.h \ + ../include/elamcharclass.h \ + ../include/elamengine.h \ + ../include/elamexpression.h \ + ../include/elamvalue.h \ + ../include/elamintengine.h \ + ../include/elamfloatengine.h \ + ../include/elamboolengine.h \ + ../include/elamstringengine.h SOURCES += \ elamvalue.cpp \ @@ -37,4 +37,4 @@ SOURCES += \ INCLUDEPATH += . ../include DEPENDPATH += . ../include ../dptr -QMAKE_CXXFLAGS+=-std=gnu++0x \ No newline at end of file +QMAKE_CXXFLAGS+=-std=gnu++11 \ No newline at end of file diff --git a/src/elambinary.cpp b/src/elambinary.cpp index 2687ab1..4db88c2 100644 --- a/src/elambinary.cpp +++ b/src/elambinary.cpp @@ -63,7 +63,7 @@ QVariant BinaryOperator::execute ( const QVariant&op1,const QVariant&op2,Engine& BinaryOperatorCall BinaryOperator::getCallback ( QString type1, QString type2 ) const { - QPairk( QVariant::nameToType(type1.toAscii().data()), QVariant::nameToType(type2.toAscii().data())); + QPairk( QVariant::nameToType(type1.toLatin1().data()), QVariant::nameToType(type2.toLatin1().data())); if(d->callmap.contains(k)) return d->callmap[k]; else @@ -93,7 +93,7 @@ QList< QPair< QString, QString > > BinaryOperator::getTypeNames() const } void BinaryOperator::removeCallback ( QString t1, QString t2) { - removeCallback( QVariant::nameToType(t1.toAscii().data()), QVariant::nameToType(t2.toAscii().data())); + removeCallback( QVariant::nameToType(t1.toLatin1().data()), QVariant::nameToType(t2.toLatin1().data())); } void BinaryOperator::removeCallback ( int t1, int t2) { @@ -101,7 +101,7 @@ void BinaryOperator::removeCallback ( int t1, int t2) } void BinaryOperator::setCallback ( BinaryOperatorCall callback, QString type1, QString type2 ) { - setCallback(callback, QVariant::nameToType(type1.toAscii().data()), QVariant::nameToType(type2.toAscii().data())); + setCallback(callback, QVariant::nameToType(type1.toLatin1().data()), QVariant::nameToType(type2.toLatin1().data())); } void BinaryOperator::setCallback ( BinaryOperatorCall callback, int type1, int type2 ) { diff --git a/src/elamunary.cpp b/src/elamunary.cpp index 3cfef6e..f3b6e5d 100644 --- a/src/elamunary.cpp +++ b/src/elamunary.cpp @@ -73,7 +73,7 @@ QStringList UnaryOperator::getTypeNames() const UnaryOperatorCall UnaryOperator::getCallback(QString type) const { - return getCallback(QVariant::nameToType(type.toAscii().data())); + return getCallback(QVariant::nameToType(type.toLatin1().data())); } UnaryOperatorCall UnaryOperator::getCallback(int type) const @@ -97,12 +97,12 @@ void UnaryOperator::setCallback(UnaryOperatorCall callback, int type) void UnaryOperator::setCallback(UnaryOperatorCall callback, QString type) { - setCallback(callback,QVariant::nameToType(type.toAscii().data())); + setCallback(callback,QVariant::nameToType(type.toLatin1().data())); } void UnaryOperator::removeCallback(QString t) { - removeCallback(QVariant::nameToType(t.toAscii().data())); + removeCallback(QVariant::nameToType(t.toLatin1().data())); } void UnaryOperator::removeCallback(int t) -- 1.7.2.5