diff options
author | Friedemann Kleint <[email protected]> | 2012-01-31 10:57:10 +0100 |
---|---|---|
committer | Tobias Hunger <[email protected]> | 2012-01-31 11:26:52 +0100 |
commit | e2ace515e2f3c9c8508e7922dabc1fffdfe57402 (patch) | |
tree | ba4fa85ccd3e3dda4d0b0ba9ade1397213e7cfda /src/plugins/git/clonewizardpage.cpp | |
parent | cdae5f2102cbf32931fe6ea19e47feaee1b4638a (diff) |
Version control: Compile with QT_NO_CAST_FROM_ASCII.
Change-Id: I85c007045efdb207f397b42fbce7a554ac9c9819
Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/git/clonewizardpage.cpp')
-rw-r--r-- | src/plugins/git/clonewizardpage.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/git/clonewizardpage.cpp b/src/plugins/git/clonewizardpage.cpp index e8f75a34369..ba6f441e9d2 100644 --- a/src/plugins/git/clonewizardpage.cpp +++ b/src/plugins/git/clonewizardpage.cpp @@ -65,7 +65,7 @@ bool CloneWizardPagePrivate::urlIsLocal(const QString &url) { if (url.startsWith(QLatin1String("file://")) || url.startsWith(QLatin1Char('/')) - || (url.at(0).isLetter() && url.at(1) == QChar(':') && url.at(2) == QChar('\\'))) + || (url.at(0).isLetter() && url.at(1) == QLatin1Char(':') && url.at(2) == QLatin1Char('\\'))) return true; return false; } @@ -103,10 +103,9 @@ QString CloneWizardPage::directoryFromRepository(const QString &urlIn) const /* Try to figure out a good directory name from something like: * 'user@host:qt/qt.git', 'http://host/qt/qt.git' 'local repo' * ------> 'qt' . */ - - QString url = urlIn.trimmed().replace(QChar('\\'), QChar('/')); - const QChar slash = QLatin1Char('/'); + QString url = urlIn.trimmed().replace(QLatin1Char('\\'), slash); + // remove host const int protocolDelimiterPos = url.indexOf(d->protocolDelimiter); // "://" const int startRepoSearchPos = protocolDelimiterPos == -1 ? 0 : protocolDelimiterPos + d->protocolDelimiter.size(); |