Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalDisplay.cpp
Show First 20 Lines • Show All 3680 Lines • ▼ Show 20 Line(s) | 3680 | if (!urls.isEmpty()) { | |||
---|---|---|---|---|---|
3681 | for (int i = 0 ; i < urls.count() ; i++) { | 3681 | for (int i = 0 ; i < urls.count() ; i++) { | ||
3682 | KIO::StatJob* job = KIO::mostLocalUrl(urls[i], KIO::HideProgressInfo); | 3682 | KIO::StatJob* job = KIO::mostLocalUrl(urls[i], KIO::HideProgressInfo); | ||
3683 | bool ok = job->exec(); | 3683 | bool ok = job->exec(); | ||
3684 | if (!ok) { | 3684 | if (!ok) { | ||
3685 | continue; | 3685 | continue; | ||
3686 | } | 3686 | } | ||
3687 | 3687 | | |||
3688 | QUrl url = job->mostLocalUrl(); | 3688 | QUrl url = job->mostLocalUrl(); | ||
3689 | QString urlText; | 3689 | QString urlText = url.isLocalFile() ? url.path() : url.url(); | ||
3690 | | ||||
3691 | if (url.isLocalFile()) { | | |||
3692 | urlText = url.path(); | | |||
3693 | } else { | | |||
3694 | urlText = url.url(); | | |||
3695 | } | | |||
3696 | 3690 | | |||
3697 | // in future it may be useful to be able to insert file names with drag-and-drop | 3691 | // in future it may be useful to be able to insert file names with drag-and-drop | ||
3698 | // without quoting them (this only affects paths with spaces in) | 3692 | // without quoting them (this only affects paths with spaces in) | ||
3699 | urlText = KShell::quoteArg(urlText); | 3693 | urlText = KShell::quoteArg(urlText); | ||
3700 | 3694 | | |||
3701 | dropText += urlText; | 3695 | dropText += urlText; | ||
3702 | 3696 | | |||
3703 | // Each filename(including the last) should be followed by one space. | 3697 | // Each filename(including the last) should be followed by one space. | ||
▲ Show 20 Lines • Show All 225 Lines • Show Last 20 Lines |