Changeset View
Changeset View
Standalone View
Standalone View
src/SessionController.cpp
| Show First 20 Lines • Show All 342 Lines • ▼ Show 20 Line(s) | 337 | { | |||
|---|---|---|---|---|---|
| 343 | 343 | | |||
| 344 | // handle local paths | 344 | // handle local paths | ||
| 345 | if (url.isLocalFile()) { | 345 | if (url.isLocalFile()) { | ||
| 346 | QString path = url.toLocalFile(); | 346 | QString path = url.toLocalFile(); | ||
| 347 | _session->sendTextToTerminal(QStringLiteral("cd ") + KShell::quoteArg(path), QLatin1Char('\r')); | 347 | _session->sendTextToTerminal(QStringLiteral("cd ") + KShell::quoteArg(path), QLatin1Char('\r')); | ||
| 348 | } else if (url.scheme().isEmpty()) { | 348 | } else if (url.scheme().isEmpty()) { | ||
| 349 | // QUrl couldn't parse what the user entered into the URL field | 349 | // QUrl couldn't parse what the user entered into the URL field | ||
| 350 | // so just dump it to the shell | 350 | // so just dump it to the shell | ||
| 351 | QString command = url.toDisplayString(); | 351 | // If you change this, change it also in autotests/BookMarkTest.cpp | ||
| 352 | QString command = QUrl::fromPercentEncoding(url.toEncoded()); | ||||
| 352 | if (!command.isEmpty()) { | 353 | if (!command.isEmpty()) { | ||
| 353 | _session->sendTextToTerminal(command, QLatin1Char('\r')); | 354 | _session->sendTextToTerminal(command, QLatin1Char('\r')); | ||
| 354 | } | 355 | } | ||
| 355 | } else if (url.scheme() == QLatin1String("ssh")) { | 356 | } else if (url.scheme() == QLatin1String("ssh")) { | ||
| 356 | QString sshCommand = QStringLiteral("ssh "); | 357 | QString sshCommand = QStringLiteral("ssh "); | ||
| 357 | 358 | | |||
| 358 | if (url.port() > -1) { | 359 | if (url.port() > -1) { | ||
| 359 | sshCommand += QStringLiteral("-p %1 ").arg(url.port()); | 360 | sshCommand += QStringLiteral("-p %1 ").arg(url.port()); | ||
| ▲ Show 20 Lines • Show All 1458 Lines • Show Last 20 Lines | |||||