forked from qt-creator/qt-creator
don't stack up "no highlighting information" info bars
don't try to add another bar one if there is one already Task-number: QTCREATORBUG-4951 Change-Id: Ia7282a5ee96d3b6b08b3f66c3bc162b1c4a5a015 Reviewed-on: http://codereview.qt.nokia.com/32 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
committed by
Leandro T. C. Melo
parent
0bf18d008b
commit
61afe9d365
@@ -228,6 +228,7 @@ public:
|
||||
|
||||
bool m_fileIsReadOnly;
|
||||
bool m_hasDecodingError;
|
||||
bool m_hasHighlightWarning;
|
||||
QByteArray m_decodingErrorSample;
|
||||
static const int kChunkSize;
|
||||
|
||||
@@ -245,6 +246,7 @@ BaseTextDocumentPrivate::BaseTextDocumentPrivate(BaseTextDocument *q) :
|
||||
m_fileHasUtf8Bom(false),
|
||||
m_fileIsReadOnly(false),
|
||||
m_hasDecodingError(false),
|
||||
m_hasHighlightWarning(false),
|
||||
m_autoSaveRevision(-1)
|
||||
{
|
||||
}
|
||||
@@ -716,6 +718,16 @@ void BaseTextDocument::documentClosing()
|
||||
}
|
||||
}
|
||||
|
||||
bool BaseTextDocument::hasHighlightWarning() const
|
||||
{
|
||||
return d->m_hasHighlightWarning;
|
||||
}
|
||||
|
||||
void BaseTextDocument::setHighlightWarning(bool has)
|
||||
{
|
||||
d->m_hasHighlightWarning = has;
|
||||
}
|
||||
|
||||
} // namespace TextEditor
|
||||
|
||||
#include "basetextdocument.moc"
|
||||
|
||||
Reference in New Issue
Block a user