Commit b1b4cb83 authored by Michael Reeves's avatar Michael Reeves

Fix text file diff not shown on comparison to empty/missing file.

CCBUG:410008
parent 3bb755c5
Pipeline #5914 passed with stage
in 12 minutes and 22 seconds
......@@ -193,7 +193,7 @@ const QString& SourceData::getText() const
bool SourceData::isText()
{
return m_normalData.isText();
return m_normalData.isText() || m_normalData.isEmpty();
}
bool SourceData::isIncompleteConversion()
......@@ -513,7 +513,7 @@ QStringList SourceData::readAndPreprocess(QTextCodec* pEncoding, bool bAutoDetec
return errors;
}
Q_ASSERT(m_lmppData.isText());
Q_ASSERT(m_lmppData.isText() && !m_lmppData.isEmpty());
//TODO: Needed?
if(m_lmppData.m_vSize < m_normalData.m_vSize)
{
......
......@@ -111,7 +111,7 @@ class SourceData
bool isEmpty() { return m_size == 0; }
bool isText() { return m_bIsText; }
bool isText() { return m_bIsText || isEmpty(); }
};
FileData m_normalData;
FileData m_lmppData;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment