forked from qt-creator/qt-creator
C++: handle file type changes for choosing highlighters.
If the file type (mime type) of an editor changes, it might need a different kind of highlighter/highlighting-support. Change-Id: I470dbf69e71856c9593d201416c4d4bd2958aaec Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
dc4822d123
commit
033ad8875b
@@ -113,7 +113,10 @@ QString BaseTextDocument::mimeType() const
|
||||
|
||||
void BaseTextDocument::setMimeType(const QString &mt)
|
||||
{
|
||||
d->m_mimeType = mt;
|
||||
if (d->m_mimeType != mt) {
|
||||
d->m_mimeType = mt;
|
||||
emit mimeTypeChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void BaseTextDocument::setTypingSettings(const TypingSettings &typingSettings)
|
||||
|
||||
Reference in New Issue
Block a user