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:
|
||||
CppToolsPluginPrivate()
|
||||
{
|
||||
StringTable::initialize();
|
||||
CppModelManager::createCppModelManager(m_instance);
|
||||
m_settings = new CppToolsSettings(m_instance); // force registration of cpp tools settings
|
||||
m_codeModelSettings.fromSettings(ICore::settings());
|
||||
@@ -91,12 +90,12 @@ public:
|
||||
|
||||
~CppToolsPluginPrivate()
|
||||
{
|
||||
StringTable::destroy();
|
||||
if (m_cppCodeStyleSettingsPage)
|
||||
delete m_cppCodeStyleSettingsPage;
|
||||
ExtensionSystem::PluginManager::removeObject(&m_cppProjectUpdaterFactory);
|
||||
}
|
||||
|
||||
StringTable stringTable;
|
||||
CppCodeModelSettings m_codeModelSettings;
|
||||
CppToolsSettings *m_settings = nullptr;
|
||||
CppFileSettings m_fileSettings;
|
||||
|
@@ -111,12 +111,12 @@ void StringTable::scheduleGC()
|
||||
QMetaObject::invokeMethod(&m_instance->m_gcCountDown, "start", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void StringTable::initialize()
|
||||
StringTable::StringTable()
|
||||
{
|
||||
m_instance = new StringTablePrivate;
|
||||
}
|
||||
|
||||
void StringTable::destroy()
|
||||
StringTable::~StringTable()
|
||||
{
|
||||
delete m_instance;
|
||||
m_instance = nullptr;
|
||||
|
@@ -30,8 +30,6 @@
|
||||
namespace CppTools {
|
||||
namespace Internal {
|
||||
|
||||
class CppToolsPluginPrivate;
|
||||
|
||||
class StringTable
|
||||
{
|
||||
public:
|
||||
@@ -40,8 +38,8 @@ public:
|
||||
|
||||
private:
|
||||
friend class CppToolsPluginPrivate;
|
||||
static void initialize();
|
||||
static void destroy();
|
||||
StringTable();
|
||||
~StringTable();
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
Reference in New Issue
Block a user