[pim/messagelib] messagecomposer/src/attachment: Move start after connection
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit ee8ccdfcd5bda1cadbf854993c55a87253639c12 by Laurent Montel.
Committed on 15/08/2026 at 06:08.
Pushed by mlaurent into branch 'master'.
Move start after connection
M +1 -1 messagecomposer/src/attachment/attachmentcontrollerbase.cpp
https://invent.kde.org/pim/messagelib/-/commit/ee8ccdfcd5bda1cadbf854993c55a87253639c12
diff --git a/messagecomposer/src/attachment/attachmentcontrollerbase.cpp b/messagecomposer/src/attachment/attachmentcontrollerbase.cpp
index 6c6ea7800..3972eb262 100644
--- a/messagecomposer/src/attachment/attachmentcontrollerbase.cpp
+++ b/messagecomposer/src/attachment/attachmentcontrollerbase.cpp
@@ -686,12 +686,12 @@ void AttachmentControllerBase::openWith(const KService::Ptr &offer)
auto job = new KIO::ApplicationLauncherJob(offer);
job->setUrls({url});
job->setUiDelegate(KIO::createDefaultJobUiDelegate(KJobUiDelegate::AutoHandlingEnabled, d->wParent));
- job->start();
connect(job, &KJob::result, this, [tempFile, job]() {
if (job->error()) {
delete tempFile;
}
});
+ job->start();
// Delete the file only when the composer is closed
// (and this object is destroyed).
tempFile->setParent(this); // Manages lifetime.