aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/pathchooser.cpp
diff options
context:
space:
mode:
authorMartin Kampas <martin.kampas@jolla.com>2015-11-20 12:41:24 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-11-23 09:07:55 +0000
commit7081b7aecb63270103c4f41f3a020842993dce90 (patch)
tree06426cbf1a3bc47065606fb6585d1acbf0f9e0e2 /src/libs/utils/pathchooser.cpp
parent708fda792e67a27ae48c6551318ef4c3a08728df (diff)
PathChooser: Fix segfault on destruction
I was only able to crash it with the Mer plugin (not in tree). Change-Id: Ie478f74c48ac6686418207fd1af8b727bcfed3cd Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Diffstat (limited to 'src/libs/utils/pathchooser.cpp')
-rw-r--r--src/libs/utils/pathchooser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/utils/pathchooser.cpp b/src/libs/utils/pathchooser.cpp
index 997f4c2f76..4288979395 100644
--- a/src/libs/utils/pathchooser.cpp
+++ b/src/libs/utils/pathchooser.cpp
@@ -250,6 +250,10 @@ PathChooser::PathChooser(QWidget *parent) :
PathChooser::~PathChooser()
{
+ // Since it is our focusProxy it can receive focus-out and emit the signal
+ // even when the possible ancestor-receiver is in mid of its destruction.
+ disconnect(d->m_lineEdit, &QLineEdit::editingFinished, this, &PathChooser::editingFinished);
+
delete d;
}