mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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>
This commit is contained in:
		
							parent
							
								
									2ead1ebe08
								
							
						
					
					
						commit
						bffceb18e7
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		|  | @ -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); | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue