forked from qt-creator/qt-creator
Generic highlighter: Notify editors when mime type registration is done.
Now it is no longer necessary to close the editor for the highlighting to take effect.
This commit is contained in:
@@ -74,7 +74,8 @@ PlainTextEditor::PlainTextEditor(QWidget *parent)
|
||||
|
||||
m_commentDefinition.clearCommentStyles();
|
||||
|
||||
connect(file(), SIGNAL(changed()), this, SLOT(fileChanged()));
|
||||
connect(file(), SIGNAL(changed()), this, SLOT(configure()));
|
||||
connect(Manager::instance(), SIGNAL(mimeTypesRegistered()), this, SLOT(configure()));
|
||||
}
|
||||
|
||||
PlainTextEditor::~PlainTextEditor()
|
||||
@@ -161,7 +162,7 @@ void PlainTextEditor::setTabSettings(const TextEditor::TabSettings &ts)
|
||||
}
|
||||
}
|
||||
|
||||
void PlainTextEditor::fileChanged()
|
||||
void PlainTextEditor::configure()
|
||||
{
|
||||
configure(Core::ICore::instance()->mimeDatabase()->findByFile(file()->fileName()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user