Make a singleton out of the PythonCaller

Prevents unnecessary instances of PythonCaller.
This commit is contained in:
2021-08-16 15:35:34 +02:00
parent a126fa86bf
commit 65aa8e83e0
6 changed files with 21 additions and 17 deletions

View File

@@ -33,6 +33,7 @@
* Janik Schlemminger
* Robert Gernhardt
* Matthias Jung
* Derek Christ
*/
#include "traceanalyzer.h"
@@ -122,8 +123,7 @@ void TraceAnalyzer::openTracefile(const QString &path)
ui->actionReload_all->setEnabled(true);
ui->actionSaveChangesToDB->setEnabled(true);
PythonCaller pythonCaller;
if (pythonCaller.vcdExportDependenciesAvailable())
if (PythonCaller::instance().vcdExportDependenciesAvailable())
ui->actionExportAsVCD->setEnabled(true);
ui->actionClose_all->setEnabled(true);