Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/jobuidelegate.cpp
Show All 32 Lines | |||||
33 | #include <ksslinfodialog.h> | 33 | #include <ksslinfodialog.h> | ||
34 | #include <clipboardupdater_p.h> | 34 | #include <clipboardupdater_p.h> | ||
35 | 35 | | |||
36 | #include <QDBusInterface> | 36 | #include <QDBusInterface> | ||
37 | #include <QGuiApplication> | 37 | #include <QGuiApplication> | ||
38 | #include <QPointer> | 38 | #include <QPointer> | ||
39 | #include <QWidget> | 39 | #include <QWidget> | ||
40 | #include <QIcon> | 40 | #include <QIcon> | ||
41 | #include <QRegularExpression> | ||||
41 | #include <QUrl> | 42 | #include <QUrl> | ||
42 | 43 | | |||
43 | #include "kio/scheduler.h" | 44 | #include "kio/scheduler.h" | ||
44 | 45 | | |||
45 | class Q_DECL_HIDDEN KIO::JobUiDelegate::Private | 46 | class Q_DECL_HIDDEN KIO::JobUiDelegate::Private | ||
46 | { | 47 | { | ||
47 | public: | 48 | public: | ||
48 | }; | 49 | }; | ||
▲ Show 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | 186 | { | |||
211 | if (ask) { | 212 | if (ask) { | ||
212 | QStringList prettyList; | 213 | QStringList prettyList; | ||
213 | prettyList.reserve(urls.size()); | 214 | prettyList.reserve(urls.size()); | ||
214 | for (const QUrl &url : urls) { | 215 | for (const QUrl &url : urls) { | ||
215 | if (url.scheme() == QLatin1String("trash")) { | 216 | if (url.scheme() == QLatin1String("trash")) { | ||
216 | QString path = url.path(); | 217 | QString path = url.path(); | ||
217 | // HACK (#98983): remove "0-foo". Note that it works better than | 218 | // HACK (#98983): remove "0-foo". Note that it works better than | ||
218 | // displaying KFileItem::name(), for files under a subdir. | 219 | // displaying KFileItem::name(), for files under a subdir. | ||
219 | path.remove(QRegExp(QStringLiteral("^/[0-9]*-"))); | 220 | path.remove(QRegularExpression(QStringLiteral("^/[0-9]*-"))); | ||
220 | prettyList.append(path); | 221 | prettyList.append(path); | ||
221 | } else { | 222 | } else { | ||
222 | prettyList.append(url.toDisplayString(QUrl::PreferLocalFile)); | 223 | prettyList.append(url.toDisplayString(QUrl::PreferLocalFile)); | ||
223 | } | 224 | } | ||
224 | } | 225 | } | ||
225 | 226 | | |||
226 | int result; | 227 | int result; | ||
227 | QWidget *widget = window(); | 228 | QWidget *widget = window(); | ||
▲ Show 20 Lines • Show All 202 Lines • Show Last 20 Lines |