debugger: fix QDir gdb pretty printer for Qt 4.8

Change-Id: Iff0f28b37abed29920379302dc540d46588fc787
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2012-03-05 10:57:38 +01:00
committed by hjk
parent a913f3f68c
commit 98565438c3
2 changed files with 25 additions and 1 deletions
+7 -1
View File
@@ -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")
@@ -688,6 +688,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();