Changeset View
Changeset View
Standalone View
Standalone View
src/kmoretools/kmoretoolsmenufactory.cpp
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Line(s) | 154 | { | |||
---|---|---|---|---|---|
229 | 229 | | |||
230 | } else if (groupingName == QLatin1String("git-clients-and-actions")) { | 230 | } else if (groupingName == QLatin1String("git-clients-and-actions")) { | ||
231 | // Here we change the default item text and make sure that the url | 231 | // Here we change the default item text and make sure that the url | ||
232 | // argument is properly handled. | 232 | // argument is properly handled. | ||
233 | // | 233 | // | ||
234 | 234 | | |||
235 | menuBuilder->setInitialItemTextTemplate(QStringLiteral("$Name")); // just use the application name | 235 | menuBuilder->setInitialItemTextTemplate(QStringLiteral("$Name")); // just use the application name | ||
236 | 236 | | |||
237 | Q_FOREACH(auto kmtService, kmtServiceList) { | 237 | for (auto kmtService : qAsConst(kmtServiceList)) { | ||
238 | // Check the pointer just in case a null pointer got in somewhere | 238 | // Check the pointer just in case a null pointer got in somewhere | ||
239 | if (!kmtService) continue; | 239 | if (!kmtService) continue; | ||
240 | QUrl argUrl = url; | 240 | QUrl argUrl = url; | ||
241 | 241 | | |||
242 | if (url.isLocalFile()) { // this can only be done for local files, remote urls probably won't work for git clients anyway | 242 | if (url.isLocalFile()) { // this can only be done for local files, remote urls probably won't work for git clients anyway | ||
243 | // by default we need an URL pointing to a directory | 243 | // by default we need an URL pointing to a directory | ||
244 | // (this impl currently leads to wrong behaviour if the root dir of a git repo is chosen because it always goes one level up) | 244 | // (this impl currently leads to wrong behaviour if the root dir of a git repo is chosen because it always goes one level up) | ||
245 | argUrl = KmtUrlUtil::localFileAbsoluteDir(url); // needs local file | 245 | argUrl = KmtUrlUtil::localFileAbsoluteDir(url); // needs local file | ||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |