Commit 66ae6cef authored by hjk's avatar hjk

Debugger: Fix QDir dumper and auto-test

Change-Id: I3dfac334e54873409e77cfc18c95cc5f27fba395
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 7a286a50
......@@ -253,12 +253,8 @@ def qdump__QDir(d, value):
qdir = d.ns + "QDir::"
d.putCallItem("absolutePath", value, "absolutePath")
d.putCallItem("canonicalPath", value, "canonicalPath")
d.putSubItem("entryList", parseAndEvaluate(
"'%sentryList'(%s, %sNoFilter, %sNoSort)"
% (qdir, value.address, qdir, qdir)), False)
d.putSubItem("entryInfoList", parseAndEvaluate(
"'%sentryInfoList'(%s, %sNoFilter, %sNoSort)"
% (qdir, value.address, qdir, qdir)), False)
d.putSubItem("entryList", data["files"])
d.putSubItem("entryInfoList", data["fileInfos"])
def qdump__QFile(d, value):
......
......@@ -610,20 +610,19 @@ void tst_Dumpers::dumper_data()
% Check("date.toString", "\"Tue Jan 1 13:15:32 1980\"", "@QString")
% Check("date.toUTC", "Tue Jan 1 13:15:32 1980", "@QDateTime");
QTest::newRow("QDir")
#ifdef Q_OS_WIN
<< Data("#include <QDir>\n",
"QDir dir(\"C:\\\\Program Files\");")
% Check("dir", "C:/Program Files", "@QDir")
% Check("dir.absolutePath", "C:/Program Files", "@QString")
% Check("dir.canonicalPath", "C:/Program Files", "@QString");
QByteArray tempDir = "\"C:/Program Files\"";
#else
<< Data("#include <QDir>\n",
"QDir dir(\"/tmp\"); QString s = dir.absolutePath();")
% Check("dir", "/tmp", "@QDir")
% Check("dir.absolutePath", "\"/tmp\"", "@QString")
% Check("dir.canonicalPath", "\"/tmp\"", "@QString");
QByteArray tempDir = "\"/tmp\"";
#endif
QTest::newRow("QDir")
<< Data("#include <QDir>\n",
"QDir dir(" + tempDir + ");\n"
"QString s = dir.absolutePath();\n"
"unused(&dir, &s);\n")
% Check("dir", tempDir, "@QDir")
% Check("dir.absolutePath", tempDir, "@QString")
% Check("dir.canonicalPath", tempDir, "@QString");
QTest::newRow("QFileInfo")
#ifdef Q_OS_WIN
......
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