Changeset View
Changeset View
Standalone View
Standalone View
krusader/FileSystem/filesystem.cpp
Show First 20 Lines • Show All 143 Lines • ▼ Show 20 Line(s) | 100 | { | |||
---|---|---|---|---|---|
144 | 144 | | |||
145 | clear(tempFileItems); | 145 | clear(tempFileItems); | ||
146 | 146 | | |||
147 | updateFilesystemInfo(); | 147 | updateFilesystemInfo(); | ||
148 | 148 | | |||
149 | return true; | 149 | return true; | ||
150 | } | 150 | } | ||
151 | 151 | | |||
152 | void FileSystem::deleteFiles(const QStringList &fileNames, bool moveToTrash) | 152 | void FileSystem::deleteFiles(const QList<QUrl> &urls, bool moveToTrash) | ||
153 | { | | |||
154 | // get absolute URLs for file names | | |||
155 | deleteAnyFiles(getUrls(fileNames), moveToTrash); | | |||
156 | } | | |||
157 | | ||||
158 | void FileSystem::deleteAnyFiles(const QList<QUrl> &urls, bool moveToTrash) | | |||
159 | { | 153 | { | ||
160 | KrJob *krJob = KrJob::createDeleteJob(urls, moveToTrash); | 154 | KrJob *krJob = KrJob::createDeleteJob(urls, moveToTrash); | ||
161 | connect(krJob, &KrJob::started, this, [=](KIO::Job *job) { | 155 | connect(krJob, &KrJob::started, this, [=](KIO::Job *job) { | ||
162 | connectJobToSources(job, urls); | 156 | connectJobToSources(job, urls); | ||
163 | }); | 157 | }); | ||
164 | 158 | | |||
165 | if (moveToTrash) { | 159 | if (moveToTrash) { | ||
166 | // update destination: the trash bin (in case a panel/tab is showing it) | 160 | // update destination: the trash bin (in case a panel/tab is showing it) | ||
▲ Show 20 Lines • Show All 174 Lines • Show Last 20 Lines |