summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-05-14 09:09:07 (GMT)
committerRoberto Raggi <roberto.raggi@nokia.com>2009-05-14 09:09:07 (GMT)
commite83bf531362a9626ad41b97dd3fbfa39d6665c85 (patch)
treea830fdbf1fbb7ea407c3ac6ab1e12e9527642bf0
parentf6d5b57a759133f20d9c74bf9770b1bcacbef6aa (diff)
downloadQt-e83bf531362a9626ad41b97dd3fbfa39d6665c85.zip
Qt-e83bf531362a9626ad41b97dd3fbfa39d6665c85.tar.gz
Qt-e83bf531362a9626ad41b97dd3fbfa39d6665c85.tar.bz2
Removed javascriptvalue.h
-rw-r--r--src/declarative/qml/parser/javascriptengine_p.cpp13
-rw-r--r--src/declarative/qml/parser/javascriptengine_p.h1
-rw-r--r--src/declarative/qml/parser/javascriptlexer.cpp2
-rw-r--r--src/declarative/qml/parser/javascriptprettypretty.cpp2
-rw-r--r--src/declarative/qml/parser/javascriptvalue.h6
-rw-r--r--src/declarative/qml/parser/parser.pri3
6 files changed, 9 insertions, 18 deletions
diff --git a/src/declarative/qml/parser/javascriptengine_p.cpp b/src/declarative/qml/parser/javascriptengine_p.cpp
index ca15b75..56ee76c 100644
--- a/src/declarative/qml/parser/javascriptengine_p.cpp
+++ b/src/declarative/qml/parser/javascriptengine_p.cpp
@@ -29,7 +29,6 @@
#include "javascriptengine_p.h"
#include "javascriptnodepool_p.h"
-#include "javascriptvalue.h"
#include <qnumeric.h>
#include <QHash>
@@ -37,7 +36,7 @@ QT_BEGIN_NAMESPACE
namespace JavaScript {
-QString numberToString(qjsreal value)
+QString numberToString(double value)
{ return QString::number(value); }
int Ecma::RegExp::flagFromChar(const QChar &ch)
@@ -93,12 +92,12 @@ static int toDigit(char c)
return -1;
}
-qjsreal integerFromString(const char *buf, int size, int radix)
+double integerFromString(const char *buf, int size, int radix)
{
if (size == 0)
return qSNaN();
- qjsreal sign = 1.0;
+ double sign = 1.0;
int i = 0;
if (buf[0] == '+') {
++i;
@@ -130,7 +129,7 @@ qjsreal integerFromString(const char *buf, int size, int radix)
if ((d == -1) || (d >= radix))
break;
}
- qjsreal result;
+ double result;
if (j == i) {
if (!qstrcmp(buf, "Infinity"))
result = qInf();
@@ -138,7 +137,7 @@ qjsreal integerFromString(const char *buf, int size, int radix)
result = qSNaN();
} else {
result = 0;
- qjsreal multiplier = 1;
+ double multiplier = 1;
for (--i ; i >= j; --i, multiplier *= radix)
result += toDigit(buf[i]) * multiplier;
}
@@ -146,7 +145,7 @@ qjsreal integerFromString(const char *buf, int size, int radix)
return result;
}
-qjsreal integerFromString(const QString &str, int radix)
+double integerFromString(const QString &str, int radix)
{
QByteArray ba = str.trimmed().toUtf8();
return integerFromString(ba.constData(), ba.size(), radix);
diff --git a/src/declarative/qml/parser/javascriptengine_p.h b/src/declarative/qml/parser/javascriptengine_p.h
index 1e6e568..7941b27 100644
--- a/src/declarative/qml/parser/javascriptengine_p.h
+++ b/src/declarative/qml/parser/javascriptengine_p.h
@@ -30,7 +30,6 @@
#ifndef JAVASCRIPTENGINE_P_H
#define JAVASCRIPTENGINE_P_H
-#include "javascriptvalue.h"
#include <QString>
#include <QSet>
diff --git a/src/declarative/qml/parser/javascriptlexer.cpp b/src/declarative/qml/parser/javascriptlexer.cpp
index c0a4b63..dbb7351 100644
--- a/src/declarative/qml/parser/javascriptlexer.cpp
+++ b/src/declarative/qml/parser/javascriptlexer.cpp
@@ -73,7 +73,7 @@ extern double qstrtod(const char *s00, char const **se, bool *ok);
while (0)
namespace JavaScript {
-extern qjsreal integerFromString(const char *buf, int size, int radix);
+extern double integerFromString(const char *buf, int size, int radix);
}
JavaScript::Lexer::Lexer(JavaScriptEnginePrivate *eng)
diff --git a/src/declarative/qml/parser/javascriptprettypretty.cpp b/src/declarative/qml/parser/javascriptprettypretty.cpp
index 6e632b7..9685de5 100644
--- a/src/declarative/qml/parser/javascriptprettypretty.cpp
+++ b/src/declarative/qml/parser/javascriptprettypretty.cpp
@@ -57,7 +57,7 @@
QT_BEGIN_NAMESPACE
namespace JavaScript {
-QString numberToString(qjsreal value);
+QString numberToString(double value);
}
using namespace JavaScript;
diff --git a/src/declarative/qml/parser/javascriptvalue.h b/src/declarative/qml/parser/javascriptvalue.h
deleted file mode 100644
index c68b817..0000000
--- a/src/declarative/qml/parser/javascriptvalue.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef JAVASCRIPTVALUE_H
-#define JAVASCRIPTVALUE_H
-
-typedef double qjsreal;
-
-#endif // JAVASCRIPTVALUE_H
diff --git a/src/declarative/qml/parser/parser.pri b/src/declarative/qml/parser/parser.pri
index 130aeaf..b4d226a 100644
--- a/src/declarative/qml/parser/parser.pri
+++ b/src/declarative/qml/parser/parser.pri
@@ -8,8 +8,7 @@ HEADERS += $$PWD/javascriptast_p.h \
$$PWD/javascriptmemorypool_p.h \
$$PWD/javascriptnodepool_p.h \
$$PWD/javascriptparser_p.h \
- $$PWD/javascriptprettypretty_p.h \
- $$PWD/javascriptvalue.h \
+ $$PWD/javascriptprettypretty_p.h
SOURCES += $$PWD/javascriptast.cpp \
$$PWD/javascriptastvisitor.cpp \