aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonlanguageclient.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2025-10-28 10:50:15 +0100
committerDavid Schulz <david.schulz@qt.io>2025-10-28 09:54:56 +0000
commit86fea009e73c0c8c1e193e017358c4ac296c84bd (patch)
tree5fdfd3f8e9b9707b1a3056067914baabee988fcc /src/plugins/python/pythonlanguageclient.cpp
parentd1b63750b210385bc258c9bd444301f3e5396089 (diff)
Python: fix crash when updating extra compilers in the pylsclientv18.0.0
Before 3d6eeea5dc40702cb11afffa72a1a05b7f0dfe31 we took the extracompilers out of m_extraCompilers and readded the ones that are still relevant. After the change we only append, which potentially results in multiple compilers in that list, which in turn closes and deletes some to early. Change-Id: Ic3d199d84e49b54bcd15d2470c6276b6c500fd95 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/python/pythonlanguageclient.cpp')
-rw-r--r--src/plugins/python/pythonlanguageclient.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/python/pythonlanguageclient.cpp b/src/plugins/python/pythonlanguageclient.cpp
index 13381454988..d0084455b07 100644
--- a/src/plugins/python/pythonlanguageclient.cpp
+++ b/src/plugins/python/pythonlanguageclient.cpp
@@ -249,6 +249,7 @@ void PyLSClient::buildConfigurationClosed(BuildConfiguration *bc)
void PyLSClient::updateExtraCompilers(const QList<PySideUicExtraCompiler *> &extraCompilers)
{
auto oldCompilers = m_extraCompilers;
+ m_extraCompilers.clear();
for (PySideUicExtraCompiler *extraCompiler : extraCompilers) {
QTC_ASSERT(extraCompiler->targets().size() == 1 , continue);
int index = oldCompilers.indexOf(extraCompiler);