Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Kamm <mail@ckamm.de>2015-11-11 15:28:20 +0300
committerChristian Kamm <mail@ckamm.de>2015-11-11 15:28:20 +0300
commit05d1cc9a94d03dfbaac99942db1b8a8e2040178c (patch)
tree8a2b03e1d18bc93dc25ae328be2f6dd955f8722f /src/gui/ocssharejob.cpp
parent196ee05fccc4687187376f4f8e44ceca69a4300f (diff)
Sharing: Fix crash with share deletion #4111
The problem was that Share could be deleted *before* the OcsShareJob itself finished. Since Share was the parent of the network job, its object would be deleted too early. In general, it's unnecessary to assign parents to the OcsJobs because they delete themselves when finished.
Diffstat (limited to 'src/gui/ocssharejob.cpp')
-rw-r--r--src/gui/ocssharejob.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/ocssharejob.cpp b/src/gui/ocssharejob.cpp
index 37ca5aa39..93c0c1d14 100644
--- a/src/gui/ocssharejob.cpp
+++ b/src/gui/ocssharejob.cpp
@@ -20,8 +20,8 @@
namespace OCC {
-OcsShareJob::OcsShareJob(AccountPtr account, QObject* parent)
-: OcsJob(account, parent)
+OcsShareJob::OcsShareJob(AccountPtr account)
+: OcsJob(account)
{
setPath("ocs/v1.php/apps/files_sharing/api/v1/shares");
connect(this, SIGNAL(jobFinished(QVariantMap)), this, SLOT(jobDone(QVariantMap)));