mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Simplify code
Do not call the setAttributte *everytime* the Preferences is called, call it once on the constructor. Also, no need to call the LanguageModel::instance() on the instance method, it will be already called on the constructor it seems that it's a leftover from a long while. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4eb0c77d85
commit
d120755d15
1 changed files with 1 additions and 2 deletions
|
@ -23,14 +23,13 @@
|
|||
PreferencesDialog *PreferencesDialog::instance()
|
||||
{
|
||||
static PreferencesDialog *dialog = new PreferencesDialog(MainWindow::instance());
|
||||
dialog->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
LanguageModel::instance();
|
||||
return dialog;
|
||||
}
|
||||
|
||||
PreferencesDialog::PreferencesDialog(QWidget *parent, Qt::WindowFlags f) : QDialog(parent, f)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
setAttribute(Qt::WA_QuitOnClose, false);
|
||||
|
||||
#if defined(Q_OS_ANDROID) || !defined(FBSUPPORT)
|
||||
for (int i = 0; i < ui.listWidget->count(); i++) {
|
||||
|
|
Loading…
Add table
Reference in a new issue