void CloudUploader::handleUploadFinished (const QString& localPath, CloudStorageError error, const QString& errorStr) { emit finishedCopying (); const bool remove = CurrentJob_.RemoveOnFinish_; CurrentJob_ = UploadJob (); if (!Queue_.isEmpty ()) StartJob (Queue_.takeFirst ()); if (error == CloudStorageError::NoError && remove) QFile::remove (localPath); if (!errorStr.isEmpty () && error != CloudStorageError::NoError) Core::Instance ().SendEntity (Util::MakeNotification ("LMP", tr ("Error uploading file %1 to cloud: %2.") .arg (QFileInfo (localPath).fileName ()) .arg (errorStr), PWarning_)); }
SyncUnmountableManager::SyncUnmountableManager (QObject *parent) : SyncManagerBase (parent) , CopyMgr_ (new CopyManager<CopyJob> (this)) { connect (CopyMgr_, SIGNAL (startedCopying (QString)), this, SLOT (handleStartedCopying (QString))); connect (CopyMgr_, SIGNAL (finishedCopying ()), this, SLOT (handleFinishedCopying ())); connect (CopyMgr_, SIGNAL (copyProgress (qint64, qint64)), this, SLOT (handleCopyProgress (qint64, qint64))); connect (CopyMgr_, SIGNAL (errorCopying (QString, QString)), this, SLOT (handleErrorCopying (QString, QString))); }