Skip to content

Commit

Permalink
sqlitetablemodel: Don't apply NULL fields colours to BLOB fields
Browse files Browse the repository at this point in the history
  • Loading branch information
samiraguiar committed Mar 14, 2015
1 parent 7a6410c commit c3c8f8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/sqlitetablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,13 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
font.setItalic(true);
return font;
} else if(role == Qt::TextColorRole) {
if(m_data.at(index.row()).at(index.column()).isNull() || isBinary(index))
if(m_data.at(index.row()).at(index.column()).isNull())
return QColor(PreferencesDialog::getSettingsValue("databrowser", "null_fg_colour").toString());
else if (isBinary(index))
return QColor(Qt::gray);
return QVariant();
} else if (role == Qt::BackgroundRole) {
if(m_data.at(index.row()).at(index.column()).isNull() || isBinary(index))
if(m_data.at(index.row()).at(index.column()).isNull())
return QColor(PreferencesDialog::getSettingsValue("databrowser", "null_bg_colour").toString());
return QVariant();
} else {
Expand Down

0 comments on commit c3c8f8c

Please sign in to comment.