diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-07 21:59:34 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-07 21:59:34 (GMT) |
commit | 9528e67dae43aa5771b8c98d84564f514ed50bac (patch) | |
tree | 1b9140ce639d8e0cc2cadda9a961f34a3838ec0a /Swift | |
parent | fd7a668326dde86c11dd57c2c2e201fd959b02f5 (diff) | |
download | swift-9528e67dae43aa5771b8c98d84564f514ed50bac.zip swift-9528e67dae43aa5771b8c98d84564f514ed50bac.tar.bz2 |
Tweaked code style of event filter in login window.
Diffstat (limited to 'Swift')
-rw-r--r-- | Swift/QtUI/QtLoginWindow.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp index d028253..a3e52dc 100644 --- a/Swift/QtUI/QtLoginWindow.cpp +++ b/Swift/QtUI/QtLoginWindow.cpp @@ -191,13 +191,12 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream) : QMainWindow() { bool QtLoginWindow::eventFilter(QObject *obj, QEvent *event) { if (obj == username_->view() && event->type() == QEvent::KeyPress) { - QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event); - if(keyEvent->key() == Qt::Key_Delete || Qt::Key_Backspace) { - QMessageBox::information(this, "Delete this login data?", "Remove the save login data regarding the jid: " + username_->view()->currentIndex().data().toString()); + QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event); + if (keyEvent->key() == Qt::Key_Delete || keyEvent->key() == Qt::Key_Backspace) { + QMessageBox::information(this, "Remove profile", "Remove the profile '" + username_->view()->currentIndex().data().toString() + "'?"); return true; } } - // standard event processing return QObject::eventFilter(obj, event); } |