From 016003905ca0e8e459e3dc33e786beda8ec92f45 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Fri, 30 Jan 2015 17:00:07 -0500 Subject: Imported Upstream version 3.0.2 --- SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'SQLiteStudio3/coreSQLiteStudio/sqlitestudio.cpp') 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 #include #include 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); -- cgit v1.2.3