# HG changeset patch # User Hasan Yavuz ÖZDERYA # Date 2017-08-20 13:16:58 # Node ID ad511482dde14b29cb87a7ba7c5d0f775b76df3d # Parent e8b7f01c66b862735e14f26980d58ff2d45ad022 fix potential memory leak, dynamically created object needs a parent diff --git a/src/commandedit.cpp b/src/commandedit.cpp --- a/src/commandedit.cpp +++ b/src/commandedit.cpp @@ -1,5 +1,5 @@ /* - Copyright © 2015 Hasan Yavuz Özderya + Copyright © 2017 Hasan Yavuz Özderya This file is part of serialplot. @@ -62,7 +62,7 @@ CommandEdit::CommandEdit(QWidget *parent QLineEdit(parent) { hexValidator = new HexCommandValidator(this); - asciiValidator = new QRegExpValidator(QRegExp("[\\x0000-\\x007F]+")); + asciiValidator = new QRegExpValidator(QRegExp("[\\x0000-\\x007F]+"), this); ascii_mode = true; setValidator(asciiValidator); }