Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
0214402c
Commit
0214402c
authored
Feb 10, 2011
by
hjk
Browse files
debugger: prepare some manual test for a potential QScriptValue dumper
parent
5a6aa4bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp
View file @
0214402c
...
...
@@ -69,6 +69,9 @@
#include
<QtGui/QTextCursor>
#include
<QtGui/QTextDocument>
#include
<QtScript/QScriptEngine>
#include
<QtScript/QScriptValue>
#include
<QtNetwork/QHostAddress>
#include
<deque>
...
...
@@ -2061,12 +2064,14 @@ void testStuff()
Ty
x
;
x
.
doit
();
char
*
s
=
x
.
m_buffer
.
GetStringPtr
();
Q_UNUSED
(
s
);
}
void
testStuff3
()
{
typedef
unsigned
char
byte
;
byte
f
=
'2'
;
Q_UNUSED
(
f
);
testConditional
(
"foo"
);
testConditional
(
fooxx
());
testConditional
(
"bar"
);
...
...
@@ -2186,7 +2191,6 @@ void testSSE()
#endif
}
void
testQSettings
()
{
// Note: Construct a QCoreApplication first.
...
...
@@ -2196,6 +2200,18 @@ void testQSettings()
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
[])
{
testMemoryView
();
...
...
@@ -2279,6 +2295,7 @@ int main(int argc, char *argv[])
testQSharedPointer
();
# endif
testQStringList
();
testQScriptValue
(
argc
,
argv
);
testStruct
();
//testQThread();
testQVariant1
();
...
...
tests/manual/gdbdebugger/simple/simple_gdbtest_app.pro
View file @
0214402c
...
...
@@ -6,6 +6,7 @@ DESTDIR = .
SOURCES
+=
simple_gdbtest_app
.
cpp
QT
+=
network
QT
+=
script
#
unix
:
QMAKE_CXXFLAGS
+=
-
msse2
message
(
"this says <foo & bar>"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment