Make MachineInfo a singleton class

Because on windows MachineInfo take a little time to init, we make it to
a singleton.
MachineInfo is build the first time in main.cpp.
Now all other places where we use MachineInfo (aboutqetdialog and
configdialog) gui don't hang anymore in waiting to MachineInfo finish to
build.
This commit is contained in:
joshua
2021-03-22 19:20:07 +01:00
parent 3d25beaea0
commit d53bb22509
6 changed files with 45 additions and 45 deletions

View File

@@ -152,8 +152,7 @@ void AboutQETDialog::setVersion()
QString str = "<span style=\"font-weight:bold;font-size:16pt;\">QElectroTech V "
+ QET::displayedVersion
+ "</span>";
MachineInfo mi_;
ui->m_version_label->setText(str + mi_.compilation_info());
ui->m_version_label->setText(str + MachineInfo::instance()->compilation_info());
}
/**