Commit 709f24b0 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: fix QDir gdb pretty printer for Qt 4.8



Change-Id: Iff0f28b37abed29920379302dc540d46588fc787
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 3c16aaf5
......@@ -213,8 +213,14 @@ def qdump__QDateTime(d, value):
def qdump__QDir(d, value):
d.putStringValue(value["d_ptr"]["d"].dereference()["path"])
d.putNumChild(1)
data = value["d_ptr"]["d"].dereference()
try:
# Up to Qt 4.7
d.putStringValue(data["path"])
except:
# Qt 4.8 and later.
d.putStringValue(data["dirEntry"]["m_filePath"])
if d.isExpanded():
with Children(d):
d.putCallItem("absolutePath", value, "absolutePath")
......
......@@ -689,6 +689,23 @@ namespace qdatetime {
} // namespace qdatetime
namespace qdir {
void testQDir()
{
QDir dir("/tmp");
dir.absolutePath();
BREAK_HERE;
// Check dir "/tmp" QDir.
// Check dir.absolutePath "/tmp" QString.
// Check dir.canonicalPath "/tmp" QString.
// Continue.
dummyStatement(&dir);
}
} // namespace qdir
namespace qfileinfo {
void testQFileInfo()
......@@ -6095,6 +6112,7 @@ int main(int argc, char *argv[])
qbytearray::testQByteArray();
qdatetime::testDateTime();
qdir::testQDir();
qfileinfo::testQFileInfo();
qhash::testQHash();
qlinkedlist::testQLinkedList();
......
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