diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-12-19 18:56:43 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-20 09:53:04 -0800 |
commit | bffceb18e79fa82fbaa674c814afd5c2612bcdaf (patch) | |
tree | 026d615f147cfe596fc8e08b3caec841dd0ad46e /qt-ui/tagwidget.cpp | |
parent | 2ead1ebe08a50fcc98f2b288528522cae0aa4197 (diff) | |
download | subsurface-bffceb18e79fa82fbaa674c814afd5c2612bcdaf.tar.gz |
Do not New / Delete the item, use the Stack.
This should be somewhat faster, and the code is cleaner.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/tagwidget.cpp')
-rw-r--r-- | qt-ui/tagwidget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp index 494a473d0..7ec0472ea 100644 --- a/qt-ui/tagwidget.cpp +++ b/qt-ui/tagwidget.cpp @@ -183,9 +183,8 @@ 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); - delete fakeEvent; + QKeyEvent fakeEvent(e->type(), Qt::Key_Comma, e->modifiers(), QString(",")); + GroupedLineEdit::keyPressEvent(&fakeEvent); } else { GroupedLineEdit::keyPressEvent(e); } |