sqlitetablemodel: return back 'cheap BLOB test' for data DisplayRole

This commit is contained in:
schdub
2015-05-01 15:10:46 +03:00
parent 7e3d9cd0a3
commit 517ecec18b

View File

@@ -244,7 +244,7 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
while(index.row() >= m_data.size() && canFetchMore())
const_cast<SqliteTableModel*>(this)->fetchMore(); // Nothing evil to see here, move along
if(role == Qt::DisplayRole && isBinary(index))
if(role == Qt::DisplayRole && m_data.at(index.row()).at(index.column()).left(1024).contains('\0'))
return "BLOB";
else if(role == Qt::DisplayRole && m_data.at(index.row()).at(index.column()).isNull())
return PreferencesDialog::getSettingsValue("databrowser", "null_text").toString();