From c33decf1b0a0c52a56282bfc734bed86c835b7f3 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 5 Jun 2024 11:20:23 +0200 Subject: [PATCH] Utils: Fix editing in environment widget In the edge case that the name of one variable starts with the name of another followed by an underscore, we mistakenly stopped at the former when searching for the latter in the text widget. Fixes: QTCREATORBUG-30855 Change-Id: I6decf7805a937d52d25e6c62899ae062f636a2a1 Reviewed-by: Christian Stenger --- src/libs/utils/namevaluesdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/utils/namevaluesdialog.cpp b/src/libs/utils/namevaluesdialog.cpp index 89482b99105..5a45c54a75e 100644 --- a/src/libs/utils/namevaluesdialog.cpp +++ b/src/libs/utils/namevaluesdialog.cpp @@ -142,7 +142,7 @@ bool NameValueItemsWidget::editVariable(const QString &name, Selection selection skipWhiteSpace(); if (offset < line.length()) { QChar nextChar = line.at(offset); - if (nextChar.isLetterOrNumber()) + if (nextChar.isLetterOrNumber() || nextChar == '_') continue; if (nextChar == '=') { if (++offset < line.length() && line.at(offset) == '+')