vcs: better sanity checking

Change-Id: I1d3b347d291e9f5bc6a873e5c99506371749c0ef
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Tobias Hunger
2012-01-13 14:26:26 +01:00
parent 7d3ba0e9b4
commit e4a0bdd8e2

View File

@@ -128,7 +128,9 @@ public:
QTC_ASSERT(QDir(dir).isAbsolute(), return);
QTC_ASSERT(!dir.endsWith(QLatin1Char('/')), return);
QTC_ASSERT(QDir::fromNativeSeparators(dir) == dir, return);
QTC_ASSERT(dir.startsWith(topLevel + QLatin1Char('/')) || topLevel == dir, return);
QTC_ASSERT(dir.startsWith(topLevel + QLatin1Char('/'))
|| topLevel == dir || topLevel.isEmpty(), return);
QTC_ASSERT((topLevel.isEmpty() && !vc) || (!topLevel.isEmpty() && vc), return);
VcsInfo *newInfo = new VcsInfo(vc, topLevel);
bool createdNewInfo(true);