summaryrefslogtreecommitdiffstats
path: root/src/dialog.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2015-02-02 17:23:58 +0100
committerSimon Rettberg2015-02-02 17:23:58 +0100
commitb0968e467e59d9bf17a51ad74927b8979c618e23 (patch)
tree8208d61c2fbc7afc617dde3bbd7771af352083a8 /src/dialog.cpp
parentResize window on resolution change (diff)
downloadvmchooser2-b0968e467e59d9bf17a51ad74927b8979c618e23.tar.gz
vmchooser2-b0968e467e59d9bf17a51ad74927b8979c618e23.tar.xz
vmchooser2-b0968e467e59d9bf17a51ad74927b8979c618e23.zip
Start session on doubleClick signal instead of activated, so we get consistent behaviour on systems with and without KDE
Diffstat (limited to 'src/dialog.cpp')
-rw-r--r--src/dialog.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index c54dbb5..0344fcb 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -83,9 +83,9 @@ void Dialog::changeEvent(QEvent *e) {
}
}
-void Dialog::on_treeView_activated(QModelIndex index)
+void Dialog::on_treeView_doubleClicked(QModelIndex index)
{
- // this method gets called when a Session has been activated
+ // this method gets called when a Session has been selected to start
SessionTreeItem* item =
static_cast<SessionTreeItem*>(index.internalPointer());
@@ -181,7 +181,7 @@ void Dialog::on_pushButtonAbort_clicked() {
}
void Dialog::on_pushButtonStart_clicked() {
- this->on_treeView_activated(ui->treeView->selectionModel()->currentIndex());
+ this->on_treeView_doubleClicked(ui->treeView->selectionModel()->currentIndex());
}
bool Dialog::selectSession(const QString& name) {
@@ -266,7 +266,7 @@ void Dialog::setTheme() {
void Dialog::onCenterTimer() {
if (!autoStartEntry_.isEmpty()) {
if (this->selectSession(autoStartEntry_)) {
- this->on_treeView_activated(ui->treeView->selectionModel()->currentIndex());
+ this->on_treeView_doubleClicked(ui->treeView->selectionModel()->currentIndex());
} else {
QMessageBox::critical(this, "Autostart", QString::fromUtf8("Konnte %1 nicht starten.").arg(autoStartEntry_));
}