update for Qt5 and GCC 4.7
authorKonrad Rosenbaum <konrad@silmor.de>
Wed, 26 Dec 2012 14:41:02 +0000 (15:41 +0100)
committerKonrad Rosenbaum <konrad@silmor.de>
Wed, 26 Dec 2012 14:41:02 +0000 (15:41 +0100)
src/elam.pro
src/elambinary.cpp
src/elamunary.cpp

index adf6142..edf89f9 100644 (file)
@@ -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
index 2687ab1..4db88c2 100644 (file)
@@ -63,7 +63,7 @@ QVariant BinaryOperator::execute ( const QVariant&op1,const QVariant&op2,Engine&
 
 BinaryOperatorCall BinaryOperator::getCallback ( QString type1, QString type2 ) const
 {
-       QPair<int,int>k( QVariant::nameToType(type1.toAscii().data()), QVariant::nameToType(type2.toAscii().data()));
+       QPair<int,int>k( 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 )
 {
index 3cfef6e..f3b6e5d 100644 (file)
@@ -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)