void UpManager::handleError (const QString& str, const QString& path) { qWarning () << Q_FUNC_INFO << str << path; RemovePending (path); auto plugin = GetSenderPlugin (); const Entity& e = Util::MakeNotification (plugin->GetStorageName (), tr ("Failed to upload %1: %2.") .arg (path) .arg (str), PWarning_); Proxy_->GetEntityManager ()->HandleEntity (e); }
void UpManager::handleGotURL (const QUrl& url, const QString& path) { const QString& urlStr = url.toString (); qApp->clipboard ()->setText (urlStr, QClipboard::Clipboard); qApp->clipboard ()->setText (urlStr, QClipboard::Selection); RemovePending (path); auto plugin = GetSenderPlugin (); const Entity& e = Util::MakeNotification (plugin->GetStorageName (), tr ("%1 is successfully uploaded, URL is pasted into clipboard.") .arg (QFileInfo (path).fileName ()), PInfo_); emit gotEntity (e); }