[PATCH 02/13] Use delete instead of free() in c++

Anton Lundin glance at acc.umu.se
Tue Dec 10 15:53:26 UTC 2013


Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 qt-ui/tagwidget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp
index 457f66c..2b180ba 100644
--- a/qt-ui/tagwidget.cpp
+++ b/qt-ui/tagwidget.cpp
@@ -166,7 +166,7 @@ void TagWidget::keyPressEvent(QKeyEvent *e) {
 	if (e->key() == Qt::Key_Tab) { // let's pretend this is a comma instead
 		QKeyEvent *fakeEvent = new QKeyEvent(e->type(), Qt::Key_Comma, e->modifiers(), QString(","));
 		GroupedLineEdit::keyPressEvent(fakeEvent);
-		free(fakeEvent);
+		delete fakeEvent;
 	} else {
 		GroupedLineEdit::keyPressEvent(e);
 	}
-- 
1.8.3.2



More information about the subsurface mailing list