Commit 0214402c authored by hjk's avatar hjk

debugger: prepare some manual test for a potential QScriptValue dumper

parent 5a6aa4bb
...@@ -69,6 +69,9 @@ ...@@ -69,6 +69,9 @@
#include <QtGui/QTextCursor> #include <QtGui/QTextCursor>
#include <QtGui/QTextDocument> #include <QtGui/QTextDocument>
#include <QtScript/QScriptEngine>
#include <QtScript/QScriptValue>
#include <QtNetwork/QHostAddress> #include <QtNetwork/QHostAddress>
#include <deque> #include <deque>
...@@ -2061,12 +2064,14 @@ void testStuff() ...@@ -2061,12 +2064,14 @@ void testStuff()
Ty x; Ty x;
x.doit(); x.doit();
char *s = x.m_buffer.GetStringPtr(); char *s = x.m_buffer.GetStringPtr();
Q_UNUSED(s);
} }
void testStuff3() void testStuff3()
{ {
typedef unsigned char byte; typedef unsigned char byte;
byte f = '2'; byte f = '2';
Q_UNUSED(f);
testConditional("foo"); testConditional("foo");
testConditional(fooxx()); testConditional(fooxx());
testConditional("bar"); testConditional("bar");
...@@ -2186,7 +2191,6 @@ void testSSE() ...@@ -2186,7 +2191,6 @@ void testSSE()
#endif #endif
} }
void testQSettings() void testQSettings()
{ {
// Note: Construct a QCoreApplication first. // Note: Construct a QCoreApplication first.
...@@ -2196,6 +2200,18 @@ void testQSettings() ...@@ -2196,6 +2200,18 @@ void testQSettings()
Q_UNUSED(x); Q_UNUSED(x);
} }
void testQScriptValue(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QScriptEngine engine;
QDateTime date = QDateTime::currentDateTime();
QVariant var;
QScriptValue s = engine.newDate(date);
s = engine.newVariant(var);
s.setProperty("a", QScriptValue());
QScriptValue d = s.data();
}
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
testMemoryView(); testMemoryView();
...@@ -2279,6 +2295,7 @@ int main(int argc, char *argv[]) ...@@ -2279,6 +2295,7 @@ int main(int argc, char *argv[])
testQSharedPointer(); testQSharedPointer();
# endif # endif
testQStringList(); testQStringList();
testQScriptValue(argc, argv);
testStruct(); testStruct();
//testQThread(); //testQThread();
testQVariant1(); testQVariant1();
......
...@@ -6,6 +6,7 @@ DESTDIR = . ...@@ -6,6 +6,7 @@ DESTDIR = .
SOURCES += simple_gdbtest_app.cpp SOURCES += simple_gdbtest_app.cpp
QT += network QT += network
QT += script
#unix: QMAKE_CXXFLAGS += -msse2 #unix: QMAKE_CXXFLAGS += -msse2
message("this says <foo & bar>") message("this says <foo & bar>")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment