Changeset View
Changeset View
Standalone View
Standalone View
src/core-impl/collections/ipodcollection/IpodCollectionLocation.cpp
Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Line(s) | |||||
68 | { | 68 | { | ||
69 | if( !isWritable() ) | 69 | if( !isWritable() ) | ||
70 | return; // mostly unreachable, CollectionLocation already checks this and issues a warning | 70 | return; // mostly unreachable, CollectionLocation already checks this and issues a warning | ||
71 | ensureDirectoriesExist(); | 71 | ensureDirectoriesExist(); | ||
72 | 72 | | |||
73 | IpodCopyTracksJob *job = new IpodCopyTracksJob( sources, m_coll, configuration, isGoingToRemoveSources() ); | 73 | IpodCopyTracksJob *job = new IpodCopyTracksJob( sources, m_coll, configuration, isGoingToRemoveSources() ); | ||
74 | int trackCount = sources.size(); | 74 | int trackCount = sources.size(); | ||
75 | Amarok::Components::logger()->newProgressOperation( job, | 75 | Amarok::Components::logger()->newProgressOperation( job, | ||
76 | operationInProgressText( configuration, trackCount ), trackCount, job, SLOT(abort()) ); | 76 | operationInProgressText( configuration, trackCount ), | ||
77 | trackCount, job, &IpodCopyTracksJob::abort ); | ||||
77 | 78 | | |||
78 | qRegisterMetaType<IpodCopyTracksJob::CopiedStatus>( "IpodCopyTracksJob::CopiedStatus" ); | 79 | qRegisterMetaType<IpodCopyTracksJob::CopiedStatus>( "IpodCopyTracksJob::CopiedStatus" ); | ||
79 | connect( job, &IpodCopyTracksJob::signalTrackProcessed, | 80 | connect( job, &IpodCopyTracksJob::signalTrackProcessed, | ||
80 | this, &IpodCollectionLocation::slotCopyTrackProcessed ); | 81 | this, &IpodCollectionLocation::slotCopyTrackProcessed ); | ||
81 | connect( job, &IpodCopyTracksJob::done, this, &IpodCollectionLocation::slotCopyOperationFinished ); | 82 | connect( job, &IpodCopyTracksJob::done, this, &IpodCollectionLocation::slotCopyOperationFinished ); | ||
82 | connect( job, &IpodCopyTracksJob::done, job, &QObject::deleteLater ); | 83 | connect( job, &IpodCopyTracksJob::done, job, &QObject::deleteLater ); | ||
83 | ThreadWeaver::Queue::instance()->enqueue( QSharedPointer<ThreadWeaver::Job>(job) ); | 84 | ThreadWeaver::Queue::instance()->enqueue( QSharedPointer<ThreadWeaver::Job>(job) ); | ||
84 | } | 85 | } | ||
▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines |