forked from qt-creator/qt-creator
CppTools: Use a normal plugin pimpl member for StringTable
Change-Id: I2804b623b7ec03f6f4375452c9a422604468aafa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -82,7 +82,6 @@ class CppToolsPluginPrivate
|
|||||||
public:
|
public:
|
||||||
CppToolsPluginPrivate()
|
CppToolsPluginPrivate()
|
||||||
{
|
{
|
||||||
StringTable::initialize();
|
|
||||||
CppModelManager::createCppModelManager(m_instance);
|
CppModelManager::createCppModelManager(m_instance);
|
||||||
m_settings = new CppToolsSettings(m_instance); // force registration of cpp tools settings
|
m_settings = new CppToolsSettings(m_instance); // force registration of cpp tools settings
|
||||||
m_codeModelSettings.fromSettings(ICore::settings());
|
m_codeModelSettings.fromSettings(ICore::settings());
|
||||||
@@ -91,12 +90,12 @@ public:
|
|||||||
|
|
||||||
~CppToolsPluginPrivate()
|
~CppToolsPluginPrivate()
|
||||||
{
|
{
|
||||||
StringTable::destroy();
|
|
||||||
if (m_cppCodeStyleSettingsPage)
|
if (m_cppCodeStyleSettingsPage)
|
||||||
delete m_cppCodeStyleSettingsPage;
|
delete m_cppCodeStyleSettingsPage;
|
||||||
ExtensionSystem::PluginManager::removeObject(&m_cppProjectUpdaterFactory);
|
ExtensionSystem::PluginManager::removeObject(&m_cppProjectUpdaterFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
StringTable stringTable;
|
||||||
CppCodeModelSettings m_codeModelSettings;
|
CppCodeModelSettings m_codeModelSettings;
|
||||||
CppToolsSettings *m_settings = nullptr;
|
CppToolsSettings *m_settings = nullptr;
|
||||||
CppFileSettings m_fileSettings;
|
CppFileSettings m_fileSettings;
|
||||||
|
@@ -111,12 +111,12 @@ void StringTable::scheduleGC()
|
|||||||
QMetaObject::invokeMethod(&m_instance->m_gcCountDown, "start", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(&m_instance->m_gcCountDown, "start", Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringTable::initialize()
|
StringTable::StringTable()
|
||||||
{
|
{
|
||||||
m_instance = new StringTablePrivate;
|
m_instance = new StringTablePrivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringTable::destroy()
|
StringTable::~StringTable()
|
||||||
{
|
{
|
||||||
delete m_instance;
|
delete m_instance;
|
||||||
m_instance = nullptr;
|
m_instance = nullptr;
|
||||||
|
@@ -30,8 +30,6 @@
|
|||||||
namespace CppTools {
|
namespace CppTools {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class CppToolsPluginPrivate;
|
|
||||||
|
|
||||||
class StringTable
|
class StringTable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -40,8 +38,8 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
friend class CppToolsPluginPrivate;
|
friend class CppToolsPluginPrivate;
|
||||||
static void initialize();
|
StringTable();
|
||||||
static void destroy();
|
~StringTable();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
Reference in New Issue
Block a user