Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/util/path.cpp
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Line(s) | 136 | { | |||
---|---|---|---|---|---|
154 | } | 154 | } | ||
155 | 155 | | |||
156 | // build string representation | 156 | // build string representation | ||
157 | QString res; | 157 | QString res; | ||
158 | res.reserve(totalLength); | 158 | res.reserve(totalLength); | ||
159 | 159 | | |||
160 | #ifdef Q_OS_WIN | 160 | #ifdef Q_OS_WIN | ||
161 | if (start == 0 && isLocalFile) { | 161 | if (start == 0 && isLocalFile) { | ||
162 | if(!data.at(0).endsWith(QLatin1Char(':'))) { | ||||
163 | qWarning("Path::generatePathOrUrl: invalid Windows drive encountered (expected C: or similar): \"%s\"", | ||||
kfunk: Ah, one thing: Could you use `qCWarning(UTIL)` here? | |||||
volden: Sure. Will fix that now. | |||||
164 | qPrintable(data.at(0))); | ||||
165 | } | ||||
162 | Q_ASSERT(data.at(0).endsWith(QLatin1Char(':'))); // assume something along "C:" | 166 | Q_ASSERT(data.at(0).endsWith(QLatin1Char(':'))); // assume something along "C:" | ||
163 | res += data.at(0); | 167 | res += data.at(0); | ||
164 | start++; | 168 | start++; | ||
165 | } | 169 | } | ||
166 | #endif | 170 | #endif | ||
167 | 171 | | |||
168 | for (int i = start; i < size; ++i) { | 172 | for (int i = start; i < size; ++i) { | ||
169 | if (i || isLocalFile) { | 173 | if (i || isLocalFile) { | ||
▲ Show 20 Lines • Show All 342 Lines • Show Last 20 Lines |
Ah, one thing: Could you use qCWarning(UTIL) here?