diff options
author | Simon Rettberg | 2018-06-15 14:05:25 +0200 |
---|---|---|
committer | Simon Rettberg | 2018-06-15 14:05:25 +0200 |
commit | ba3c5aa40274c11f9cefd4e9842be3488cad07b4 (patch) | |
tree | 2865703ae78ed397f24fa32fca642332ac7b3a49 /src/dialog.cpp | |
parent | fileDownloader.* -> filedownloader.* (diff) | |
download | vmchooser2-ba3c5aa40274c11f9cefd4e9842be3488cad07b4.tar.gz vmchooser2-ba3c5aa40274c11f9cefd4e9842be3488cad07b4.tar.xz vmchooser2-ba3c5aa40274c11f9cefd4e9842be3488cad07b4.zip |
Fix indentation, cleanup, refactoring, deletions
* Remove unused methods for adding hostname and user to xml
* Avoid copying/(de)serializing XML a thousand times
* Fix Session::isValid() or rather make it a bit more usable
(although it's unused currently)
* baseDir is global, not per VSession, which doesn't make any
sense without the legacy approach of recusively loading
one xml file per entry
Diffstat (limited to 'src/dialog.cpp')
-rw-r--r-- | src/dialog.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp index 926c65b..7e22962 100644 --- a/src/dialog.cpp +++ b/src/dialog.cpp @@ -52,7 +52,7 @@ Dialog::Dialog(int defaultTab, bool examMode, QWidget *parent) ui->treeView->setFocusProxy(ui->filterEdit); // ui->filterEdit->installEventFilter(this); - qApp->installEventFilter(this); + QCoreApplication::instance()->installEventFilter(this); ui->helpBox->hide(); ui->newsBox->hide(); @@ -286,7 +286,7 @@ bool Dialog::selectSession(const QString& name) { bool Dialog::selectSessionByUuid(const QString& name) { QModelIndex root(ui->treeView->rootIndex()); - for (int tab = 0; tab < TAB_COUNT; ++tab) { + for (int tab = 0; tab < TAB_COUNT; ++tab) { for (int i = 0; i < model_[tab]->rowCount(root); ++i) { QModelIndex section(model_[tab]->index(i, 0, root)); if (!section.isValid()) { @@ -405,7 +405,7 @@ void Dialog::onCenterTimer() { if (autoQuit_ > 0) { autoQuit_--; if (autoQuit_ == 0) { - qApp->exit(0); + QCoreApplication::instance()->exit(0); } else if (autoQuit_ < 60) { ui->lblAutoQuit->setText(this->trUtf8("Auto logout in %1").arg(autoQuit_)); ui->lblAutoQuit->show(); |