diff options
| author | 2015-01-30 17:00:07 -0500 | |
|---|---|---|
| committer | 2015-01-30 17:00:07 -0500 | |
| commit | 016003905ca0e8e459e3dc33e786beda8ec92f45 (patch) | |
| tree | 34aba2d2e0d66fbf2c3821ee8358f56e40c4c95e /SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp | |
| parent | 724c012ada23ef480c61fe99e3c9784b91aeb1ca (diff) | |
Imported Upstream version 3.0.2upstream/3.0.2
Diffstat (limited to 'SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp')
| -rw-r--r-- | SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp b/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp index 3595b21..8ff4f0d 100644 --- a/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp +++ b/SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp @@ -32,13 +32,14 @@ #include "plugins/populateplugin.h" #include "services/bugreporter.h" #include "services/extralicensemanager.h" +#include "translations.h" #include <QProcessEnvironment> #include <QThreadPool> #include <QCoreApplication> DEFINE_SINGLETON(SQLiteStudio) -static const int sqlitestudioVersion = 30001; +static const int sqlitestudioVersion = 30002; SQLiteStudio::SQLiteStudio() { @@ -49,6 +50,21 @@ SQLiteStudio::SQLiteStudio() SQLiteStudio::~SQLiteStudio() { } +QStringList SQLiteStudio::getInitialTranslationFiles() const +{ + return initialTranslationFiles; +} + +void SQLiteStudio::setInitialTranslationFiles(const QStringList& value) +{ + initialTranslationFiles = value; +} + + +QString SQLiteStudio::getCurrentLang() const +{ + return currentLang; +} ExtraLicenseManager* SQLiteStudio::getExtraLicenseManager() const { @@ -263,6 +279,9 @@ void SQLiteStudio::init(const QStringList& cmdListArguments, bool guiAvailable) config = new ConfigImpl(); config->init(); + currentLang = CFG_CORE.General.Language.get(); + loadTranslations(initialTranslationFiles); + pluginManager = new PluginManagerImpl(); dbManager = new DbManagerImpl(); @@ -325,7 +344,9 @@ void SQLiteStudio::cleanUp() disconnect(pluginManager, SIGNAL(unloaded(QString,PluginType*)), this, SLOT(pluginUnloaded(QString,PluginType*))); if (!immediateQuit) { - pluginManager->deinit(); + if (pluginManager) + pluginManager->deinit(); + safe_delete(pluginManager); // PluginManager before DbManager, so Db objects are deleted while DbManager still exists safe_delete(updateManager); safe_delete(bugReporter); |
