forked from qt-creator/qt-creator
Avoid crash on qmljs plugin unload
The unload of qmljs plugin caused qmljs code style settings to be deleted, while core still had a pointer to them and used it afterwards. Added unregisterCodeStyle* methods for symmetry and used them on plugin destruction. Change-Id: I49f0fc52f3e71d053e6ada604672a4cc3eafa486 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -92,15 +92,18 @@ public:
|
||||
ICodeStylePreferencesFactory *codeStyleFactory(Core::Id languageId) const;
|
||||
QMap<Core::Id, ICodeStylePreferencesFactory *> codeStyleFactories() const;
|
||||
void registerCodeStyleFactory(ICodeStylePreferencesFactory *codeStyleFactory);
|
||||
void unregisterCodeStyleFactory(Core::Id languageId);
|
||||
|
||||
CodeStylePool *codeStylePool() const;
|
||||
CodeStylePool *codeStylePool(Core::Id languageId) const;
|
||||
void registerCodeStylePool(Core::Id languageId, CodeStylePool *pool);
|
||||
void unregisterCodeStylePool(Core::Id languageId);
|
||||
|
||||
ICodeStylePreferences *codeStyle() const;
|
||||
ICodeStylePreferences *codeStyle(Core::Id languageId) const;
|
||||
QMap<Core::Id, ICodeStylePreferences *> codeStyles() const;
|
||||
void registerCodeStyle(Core::Id languageId, ICodeStylePreferences *prefs);
|
||||
void unregisterCodeStyle(Core::Id languageId);
|
||||
|
||||
void registerMimeTypeForLanguageId(const QString &mimeType, Core::Id languageId);
|
||||
Core::Id languageId(const QString &mimeType) const;
|
||||
|
||||
Reference in New Issue
Block a user