mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
DiagramContextWidget: Fix verification of keys
This commit is contained in:
committed by
Laurent Trinques
parent
a8d42b0f9a
commit
e9a5fded5c
@@ -120,8 +120,6 @@ void DiagramContextWidget::clear()
|
||||
*/
|
||||
int DiagramContextWidget::highlightNonAcceptableKeys()
|
||||
{
|
||||
static QRegularExpression re(DiagramContext::validKeyRegExp());
|
||||
|
||||
QBrush fg_brush = ui->m_table->palette().brush(QPalette::WindowText);
|
||||
|
||||
int invalid_keys = 0;
|
||||
@@ -135,7 +133,7 @@ int DiagramContextWidget::highlightNonAcceptableKeys()
|
||||
bool highlight = false;
|
||||
if (!qtwi_name -> text().isEmpty())
|
||||
{
|
||||
if (re!=QRegularExpression(qtwi_name -> text()))
|
||||
if (! DiagramContext::isKeyAcceptable(qtwi_name->text()))
|
||||
{
|
||||
highlight = true;
|
||||
++ invalid_keys;
|
||||
|
||||
Reference in New Issue
Block a user