GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add setting to allow user to change the background color of NULL valu… · feng2010java/sqlitebrowser@eda00dc

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src
    • sqlitetablemodel.cpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/sqlitetablemodel.cpp‎

Copy file name to clipboardExpand all lines: src/sqlitetablemodel.cpp
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "sqlitedb.h"
33
#include "sqlite.h"
44

5+
#include "PreferencesDialog.h"
56
#include <QDebug>
67
#include <QMessageBox>
78
#include <QApplication>
@@ -243,6 +244,10 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
243244
if(m_data.at(index.row()).at(index.column()).isNull() || isBinary(index))
244245
return QColor(Qt::gray);
245246
return QColor(Qt::black);
247+
} else if (role == Qt::BackgroundRole) {
248+
if(m_data.at(index.row()).at(index.column()).isNull() || isBinary(index))
249+
return QColor(PreferencesDialog::getSettingsValue("syntaxhighlighter", "null_colour").toString());
250+
return QVariant();
246251
} else {
247252
return QVariant();
248253
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.