Changeset View
Changeset View
Standalone View
Standalone View
src/kdeinit/ktoolinvocation_x11.cpp
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Line(s) | 127 | { | |||
---|---|---|---|---|---|
226 | for (int i = 0; i < cmdTokens.count(); ++i) { | 226 | for (int i = 0; i < cmdTokens.count(); ++i) { | ||
227 | if (cmdTokens.at(i) == QLatin1String("%A")) { | 227 | if (cmdTokens.at(i) == QLatin1String("%A")) { | ||
228 | if (attachURLs.isEmpty()) { | 228 | if (attachURLs.isEmpty()) { | ||
229 | cmdTokens.removeAt(i); | 229 | cmdTokens.removeAt(i); | ||
230 | } else { | 230 | } else { | ||
231 | const QString previousStr = cmdTokens.at(i-1); | 231 | const QString previousStr = cmdTokens.at(i-1); | ||
232 | cmdTokens.removeAt(i); | 232 | cmdTokens.removeAt(i); | ||
233 | const int currentPos = i; | 233 | const int currentPos = i; | ||
234 | Q_FOREACH(const QString &url, attachURLs) { | 234 | for(const QString &url : attachURLs) { | ||
235 | cmdTokens.insert(currentPos, previousStr); | 235 | cmdTokens.insert(currentPos, previousStr); | ||
236 | cmdTokens.insert(currentPos, url); | 236 | cmdTokens.insert(currentPos, url); | ||
237 | i += 2; | 237 | i += 2; | ||
238 | } | 238 | } | ||
239 | } | 239 | } | ||
240 | } else { | 240 | } else { | ||
241 | const QString str = KMacroExpander::expandMacros(cmdTokens.at(i), keyMap); | 241 | const QString str = KMacroExpander::expandMacros(cmdTokens.at(i), keyMap); | ||
242 | cmdTokens[i] = str; | 242 | cmdTokens[i] = str; | ||
▲ Show 20 Lines • Show All 145 Lines • Show Last 20 Lines |