From 13d438ef43a3cb2a90acfaa5304cba34b31fb627 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Thu, 9 Jun 2011 10:42:09 +0200 Subject: Fix some issues introduced in df6713b8f55fc007796f40. Remove homeDirPath(), which is part of Qt3Support. Add a #else to the #ifdef QT_BUILD_INTERNAL so that the autotest compiles also with non-developer builds. Reviewed-by: TrustMe --- src/gui/dialogs/qfiledialog.cpp | 2 +- tests/auto/qfiledialog/tst_qfiledialog.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index 8da60e6..d7716f7 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -871,7 +871,7 @@ Q_AUTOTEST_EXPORT QString qt_tildeExpansion(const QString &path, bool *expanded QString ret = path; QStringList tokens = ret.split(QDir::separator()); if (tokens.first() == QLatin1String("~")) { - ret.replace(0, 1, QDir::homeDirPath()); + ret.replace(0, 1, QDir::homePath()); } else { QString userName = tokens.first(); userName.remove(0, 1); diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 24ac9f7..955860d 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -1353,11 +1353,12 @@ void tst_QFiledialog::tildeExpansion() { #ifndef QT_BUILD_INTERNAL QSKIP("Test case relies on developer build (AUTOTEST_EXPORT)", SkipAll); -#endif +#else QFETCH(QString, tildePath); QFETCH(QString, expandedPath); QCOMPARE(qt_tildeExpansion(tildePath), expandedPath); +#endif } #endif -- cgit v0.12