Made cpp file suffixes take effect after restart.

In CppTools, keep cpp file settings in plugin and settings page
via shared pointer and apply to mime DB in
extensionsInitialized() (after CppEditor has loaded
and registered the mime types).

Task-number: 252299
This commit is contained in:
Friedemann Kleint
2009-04-29 09:04:59 +02:00
parent 794dbc7410
commit 5740bd6410
4 changed files with 32 additions and 19 deletions

View File

@@ -32,6 +32,7 @@
#include <extensionsystem/iplugin.h>
#include <projectexplorer/projectexplorer.h>
#include <QtCore/QSharedPointer>
QT_BEGIN_NAMESPACE
class QFileInfo;
@@ -43,11 +44,12 @@ namespace Internal {
class CppCodeCompletion;
class CppModelManager;
struct CppFileSettings;
class CppToolsPlugin : public ExtensionSystem::IPlugin
{
Q_DISABLE_COPY(CppToolsPlugin)
Q_OBJECT
public:
static CppToolsPlugin *instance() { return m_instance; }
@@ -70,6 +72,7 @@ private:
int m_context;
CppModelManager *m_modelManager;
CppCodeCompletion *m_completion;
QSharedPointer<CppFileSettings> m_fileSettings;
static CppToolsPlugin *m_instance;
};