forked from blue/squawk
feat: copy pasted image file to download folder after successful upload
This commit is contained in:
parent
52551c1ce0
commit
39f2f3d975
6 changed files with 34 additions and 5 deletions
|
@ -405,7 +405,7 @@ void Squawk::fileError(const std::list<Shared::MessageInfo> msgs, const QString&
|
|||
rosterModel.fileError(msgs, error, up);
|
||||
}
|
||||
|
||||
void Squawk::fileUploadComplete(const std::list<Shared::MessageInfo> msgs, const QString& path)
|
||||
void Squawk::fileUploadComplete(const std::list<Shared::MessageInfo> msgs, const QString& url, const QString& path)
|
||||
{
|
||||
rosterModel.fileComplete(msgs, true);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public slots:
|
|||
void fileError(const std::list<Shared::MessageInfo> msgs, const QString& error, bool up);
|
||||
void fileProgress(const std::list<Shared::MessageInfo> msgs, qreal value, bool up);
|
||||
void fileDownloadComplete(const std::list<Shared::MessageInfo> msgs, const QString& path);
|
||||
void fileUploadComplete(const std::list<Shared::MessageInfo> msgs, const QString& path);
|
||||
void fileUploadComplete(const std::list<Shared::MessageInfo> msgs, const QString& url, const QString& path);
|
||||
void responseVCard(const QString& jid, const Shared::VCard& card);
|
||||
void changeMessage(const QString& account, const QString& jid, const QString& id, const QMap<QString, QVariant>& data);
|
||||
void requestPassword(const QString& account);
|
||||
|
|
|
@ -249,6 +249,10 @@ void Conversation::onImagePasted()
|
|||
tempFile->close();
|
||||
qDebug() << "image on paste temp file: " << tempFile->fileName();
|
||||
addAttachedFile(tempFile->fileName());
|
||||
|
||||
// The file, if successfully uploaded, will be copied to Download folder.
|
||||
// On application closing, this temporary file will be automatically removed by Qt.
|
||||
// See Core::NetworkAccess::onUploadFinished.
|
||||
}
|
||||
|
||||
void Conversation::onAttach()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue