Changeset View
Changeset View
Standalone View
Standalone View
src/svnqt/url.cpp
Show All 38 Lines | |||||
39 | #include <svn_dirent_uri.h> | 39 | #include <svn_dirent_uri.h> | ||
40 | 40 | | |||
41 | #include <qglobal.h> | 41 | #include <qglobal.h> | ||
42 | 42 | | |||
43 | namespace svn | 43 | namespace svn | ||
44 | { | 44 | { | ||
45 | 45 | | |||
46 | Url::Url(const QUrl &url) | 46 | Url::Url(const QUrl &url) | ||
47 | : m_url(url.toString(QUrl::RemoveAuthority|QUrl::RemoveQuery|QUrl::NormalizePathSegments)) | ||||
48 | { | ||||
49 | } | ||||
50 | | ||||
51 | Url::Url(const svn::Path &url) | ||||
47 | : m_url(url) | 52 | : m_url(url) | ||
48 | { | 53 | { | ||
49 | } | 54 | } | ||
50 | 55 | | |||
51 | QByteArray Url::cstr() const | 56 | QByteArray Url::cstr() const | ||
52 | { | 57 | { | ||
53 | return m_url.toEncoded(QUrl::FullyEncoded|QUrl::NormalizePathSegments); | 58 | return m_url.cstr(); | ||
54 | } | 59 | } | ||
55 | 60 | | |||
56 | /* static helpers */ | 61 | /* static helpers */ | ||
57 | bool Url::isLocal(const QString &url) | 62 | bool Url::isLocal(const QString &url) | ||
58 | { | 63 | { | ||
59 | static const Qt::CaseSensitivity cs = Qt::CaseInsensitive; | 64 | static const Qt::CaseSensitivity cs = Qt::CaseInsensitive; | ||
60 | static const QLatin1String stf("file://"); | 65 | static const QLatin1String stf("file://"); | ||
61 | static const QLatin1String stsf("svn+file://"); | 66 | static const QLatin1String stsf("svn+file://"); | ||
▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines |