Changeset View
Changeset View
Standalone View
Standalone View
src/core-impl/collections/support/FileCollectionLocation.cpp
Show All 12 Lines | |||||
13 | * * | 13 | * * | ||
14 | * You should have received a copy of the GNU General Public License along with * | 14 | * You should have received a copy of the GNU General Public License along with * | ||
15 | * this program. If not, see <http://www.gnu.org/licenses/>. * | 15 | * this program. If not, see <http://www.gnu.org/licenses/>. * | ||
16 | ****************************************************************************************/ | 16 | ****************************************************************************************/ | ||
17 | 17 | | |||
18 | #include "FileCollectionLocation.h" | 18 | #include "FileCollectionLocation.h" | ||
19 | 19 | | |||
20 | #include "core/collections/CollectionLocationDelegate.h" | 20 | #include "core/collections/CollectionLocationDelegate.h" | ||
21 | #include "core/interfaces/Logger.h" | 21 | #include "core/logger/Logger.h" | ||
22 | #include "core/support/Components.h" | 22 | #include "core/support/Components.h" | ||
23 | #include "core/support/Debug.h" | 23 | #include "core/support/Debug.h" | ||
24 | 24 | | |||
25 | 25 | | |||
26 | #include <kio/job.h> | 26 | #include <kio/job.h> | ||
27 | #include <kio/jobclasses.h> | 27 | #include <kio/jobclasses.h> | ||
28 | #include <kio/deletejob.h> | 28 | #include <kio/deletejob.h> | ||
29 | 29 | | |||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 72 | { | |||
79 | debug() << "deleting " << src; | 79 | debug() << "deleting " << src; | ||
80 | KIO::JobFlags flags = KIO::HideProgressInfo; | 80 | KIO::JobFlags flags = KIO::HideProgressInfo; | ||
81 | job = KIO::del( src, flags ); | 81 | job = KIO::del( src, flags ); | ||
82 | connect( job, &KIO::Job::result, this, &FileCollectionLocation::slotRemoveJobFinished ); | 82 | connect( job, &KIO::Job::result, this, &FileCollectionLocation::slotRemoveJobFinished ); | ||
83 | QString name = track->prettyName(); | 83 | QString name = track->prettyName(); | ||
84 | if( track->artist() ) | 84 | if( track->artist() ) | ||
85 | name = QString( "%1 - %2" ).arg( track->artist()->name(), track->prettyName() ); | 85 | name = QString( "%1 - %2" ).arg( track->artist()->name(), track->prettyName() ); | ||
86 | 86 | | |||
87 | Amarok::Components::logger()->newProgressOperation( job, i18n( "Removing: %1", name ) ); | 87 | Amarok::Logger::newProgressOperation( job, i18n( "Removing: %1", name ) ); | ||
88 | m_removejobs.insert( job, track ); | 88 | m_removejobs.insert( job, track ); | ||
89 | } | 89 | } | ||
90 | } | 90 | } | ||
91 | 91 | | |||
92 | void FileCollectionLocation::slotRemoveJobFinished( KJob *job ) | 92 | void FileCollectionLocation::slotRemoveJobFinished( KJob *job ) | ||
93 | { | 93 | { | ||
94 | // ignore and error that the file did not exist in the first place. Perhaps destination | 94 | // ignore and error that the file did not exist in the first place. Perhaps destination | ||
95 | // collection too eager? :-) | 95 | // collection too eager? :-) | ||
Show All 39 Lines |