CppToolsPlugin: Partially pimpl and remove use of global object pool

Change-Id: Iee09bf2fc7c945b8dcf950edfe94889d35c63735
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
hjk
2018-02-07 11:05:48 +01:00
parent 5e55c1e947
commit 577bf7c08a
2 changed files with 45 additions and 29 deletions

View File

@@ -47,6 +47,7 @@ class CppCodeModelSettings;
namespace Internal {
struct CppFileSettings;
class CppToolsPluginPluginPrivate;
class CppToolsPlugin : public ExtensionSystem::IPlugin
{
@@ -55,7 +56,7 @@ class CppToolsPlugin : public ExtensionSystem::IPlugin
public:
CppToolsPlugin();
~CppToolsPlugin();
~CppToolsPlugin() final;
static CppToolsPlugin *instance();
static const QStringList &headerSearchPaths();
@@ -66,13 +67,13 @@ public:
static Utils::FileName licenseTemplatePath();
static QString licenseTemplate();
bool initialize(const QStringList &arguments, QString *errorMessage);
void extensionsInitialized();
ShutdownFlag aboutToShutdown();
bool initialize(const QStringList &arguments, QString *errorMessage) final;
void extensionsInitialized() final;
QSharedPointer<CppCodeModelSettings> codeModelSettings() const;
static StringTable &stringTable();
public slots:
void switchHeaderSource();
void switchHeaderSourceInNextSplit();
@@ -179,10 +180,9 @@ private slots:
#endif
private:
friend class CppToolsPluginPluginPrivate;
CppToolsPluginPluginPrivate *d = nullptr;
QSharedPointer<CppFileSettings> m_fileSettings;
QSharedPointer<CppCodeModelSettings> m_codeModelSettings;
CppToolsSettings *m_settings = nullptr;
StringTable m_stringTable;
};
} // namespace Internal