mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
More consistent use of size_t for indexing table columns
Especially when we can remove the code for loading the binary bits of the old project file format, this should allow us to get rid of a ton of static_casts.
This commit is contained in:
@@ -128,7 +128,7 @@ QWidget* ExtendedTableWidgetEditorDelegate::createEditor(QWidget* parent, const
|
||||
{
|
||||
|
||||
SqliteTableModel* m = qobject_cast<SqliteTableModel*>(const_cast<QAbstractItemModel*>(index.model()));
|
||||
sqlb::ForeignKeyClause fk = m->getForeignKeyClause(index.column()-1);
|
||||
sqlb::ForeignKeyClause fk = m->getForeignKeyClause(static_cast<size_t>(index.column()-1));
|
||||
|
||||
if(fk.isSet()) {
|
||||
|
||||
@@ -854,19 +854,19 @@ int ExtendedTableWidget::numVisibleRows() const
|
||||
return row_bottom - row_top;
|
||||
}
|
||||
|
||||
std::unordered_set<int> ExtendedTableWidget::selectedCols() const
|
||||
std::unordered_set<size_t> ExtendedTableWidget::selectedCols() const
|
||||
{
|
||||
std::unordered_set<int> selectedCols;
|
||||
std::unordered_set<size_t> selectedCols;
|
||||
for(const auto& idx : selectionModel()->selectedColumns())
|
||||
selectedCols.insert(idx.column());
|
||||
selectedCols.insert(static_cast<size_t>(idx.column()));
|
||||
return selectedCols;
|
||||
}
|
||||
|
||||
std::unordered_set<int> ExtendedTableWidget::colsInSelection() const
|
||||
std::unordered_set<size_t> ExtendedTableWidget::colsInSelection() const
|
||||
{
|
||||
std::unordered_set<int> colsInSelection;
|
||||
std::unordered_set<size_t> colsInSelection;
|
||||
for(const QModelIndex & idx : selectedIndexes())
|
||||
colsInSelection.insert(idx.column());
|
||||
colsInSelection.insert(static_cast<size_t>(idx.column()));
|
||||
return colsInSelection;
|
||||
}
|
||||
|
||||
@@ -876,7 +876,7 @@ void ExtendedTableWidget::cellClicked(const QModelIndex& index)
|
||||
if(qApp->keyboardModifiers().testFlag(Qt::ControlModifier) && qApp->keyboardModifiers().testFlag(Qt::ShiftModifier) && model())
|
||||
{
|
||||
SqliteTableModel* m = qobject_cast<SqliteTableModel*>(model());
|
||||
sqlb::ForeignKeyClause fk = m->getForeignKeyClause(index.column()-1);
|
||||
sqlb::ForeignKeyClause fk = m->getForeignKeyClause(static_cast<size_t>(index.column()-1));
|
||||
|
||||
if(fk.isSet())
|
||||
emit foreignKeyClicked(sqlb::ObjectIdentifier(m->currentTableName().schema(), fk.table()),
|
||||
|
||||
@@ -53,9 +53,9 @@ public:
|
||||
|
||||
public:
|
||||
// Get set of selected columns (all cells in column has to be selected)
|
||||
std::unordered_set<int> selectedCols() const;
|
||||
std::unordered_set<size_t> selectedCols() const;
|
||||
// Get set of columns traversed by selection (only some cells in column has to be selected)
|
||||
std::unordered_set<int> colsInSelection() const;
|
||||
std::unordered_set<size_t> colsInSelection() const;
|
||||
|
||||
int numVisibleRows() const;
|
||||
|
||||
|
||||
@@ -96,25 +96,25 @@ void FilterTableHeader::adjustPositions()
|
||||
void FilterTableHeader::inputChanged(const QString& new_value)
|
||||
{
|
||||
// Just get the column number and the new value and send them to anybody interested in filter changes
|
||||
emit filterChanged(sender()->property("column").toInt(), new_value);
|
||||
emit filterChanged(sender()->property("column").toUInt(), new_value);
|
||||
}
|
||||
|
||||
void FilterTableHeader::addFilterAsCondFormat(const QString& filter)
|
||||
{
|
||||
// Just get the column number and the new value and send them to anybody interested in new conditional formatting
|
||||
emit addCondFormat(sender()->property("column").toInt(), filter);
|
||||
emit addCondFormat(sender()->property("column").toUInt(), filter);
|
||||
}
|
||||
|
||||
void FilterTableHeader::clearAllCondFormats()
|
||||
{
|
||||
// Just get the column number and send it to anybody responsible or interested in clearing conditional formatting
|
||||
emit allCondFormatsCleared(sender()->property("column").toInt());
|
||||
emit allCondFormatsCleared(sender()->property("column").toUInt());
|
||||
}
|
||||
|
||||
void FilterTableHeader::editCondFormats()
|
||||
{
|
||||
// Just get the column number and the new value and send them to anybody interested in editting conditional formatting
|
||||
emit condFormatsEdited(sender()->property("column").toInt());
|
||||
emit condFormatsEdited(sender()->property("column").toUInt());
|
||||
}
|
||||
|
||||
void FilterTableHeader::clearFilters()
|
||||
|
||||
@@ -23,10 +23,10 @@ public slots:
|
||||
void setFilter(size_t column, const QString& value);
|
||||
|
||||
signals:
|
||||
void filterChanged(int column, QString value);
|
||||
void addCondFormat(int column, QString filter);
|
||||
void allCondFormatsCleared(int column);
|
||||
void condFormatsEdited(int column);
|
||||
void filterChanged(size_t column, QString value);
|
||||
void addCondFormat(size_t column, QString filter);
|
||||
void allCondFormatsCleared(size_t column);
|
||||
void condFormatsEdited(size_t column);
|
||||
|
||||
protected:
|
||||
void updateGeometries() override;
|
||||
|
||||
@@ -2243,7 +2243,7 @@ static void loadBrowseDataTableSettings(BrowseDataTableSettings& settings, QXmlS
|
||||
} else if(xml.name() == "conditional_formats") {
|
||||
while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "conditional_formats") {
|
||||
if (xml.name() == "column") {
|
||||
int index = xml.attributes().value("index").toInt();
|
||||
size_t index = xml.attributes().value("index").toUInt();
|
||||
while(xml.readNext() != QXmlStreamReader::EndElement && xml.name() != "column") {
|
||||
if(xml.name() == "format") {
|
||||
QFont font;
|
||||
|
||||
@@ -187,9 +187,9 @@ TableBrowser::TableBrowser(QWidget* parent) :
|
||||
modifyColumnFormat(ui->dataTable->colsInSelection(), [](CondFormat& format) { format.setAlignment(CondFormat::AlignJustify); });
|
||||
});
|
||||
|
||||
connect(ui->actionEditCondFormats, &QAction::triggered, this, [this]() { editCondFormats(currentIndex().column()); });
|
||||
connect(ui->actionEditCondFormats, &QAction::triggered, this, [this]() { editCondFormats(static_cast<size_t>(currentIndex().column())); });
|
||||
connect(ui->actionClearFormat, &QAction::triggered, this, [this]() {
|
||||
for (int column : ui->dataTable->colsInSelection())
|
||||
for (size_t column : ui->dataTable->colsInSelection())
|
||||
clearAllCondFormats(column);
|
||||
});
|
||||
|
||||
@@ -559,19 +559,19 @@ void TableBrowser::clear()
|
||||
ui->editGlobalFilter->blockSignals(false);
|
||||
}
|
||||
|
||||
void TableBrowser::updateFilter(int column, const QString& value)
|
||||
void TableBrowser::updateFilter(size_t column, const QString& value)
|
||||
{
|
||||
// Set minimum width to the vertical header in order to avoid flickering while a filter is being updated.
|
||||
ui->dataTable->verticalHeader()->setMinimumWidth(ui->dataTable->verticalHeader()->width());
|
||||
|
||||
m_model->updateFilter(column, value);
|
||||
BrowseDataTableSettings& settings = m_settings[currentlyBrowsedTableName()];
|
||||
if(value.isEmpty() && settings.filterValues.remove(column) > 0)
|
||||
if(value.isEmpty() && settings.filterValues.remove(static_cast<int>(column)) > 0)
|
||||
{
|
||||
emit projectModified();
|
||||
} else {
|
||||
if (settings.filterValues[column] != value) {
|
||||
settings.filterValues[column] = value;
|
||||
if (settings.filterValues[static_cast<int>(column)] != value) {
|
||||
settings.filterValues[static_cast<int>(column)] = value;
|
||||
emit projectModified();
|
||||
}
|
||||
}
|
||||
@@ -582,7 +582,7 @@ void TableBrowser::updateFilter(int column, const QString& value)
|
||||
applySettings(settings, true);
|
||||
}
|
||||
|
||||
void TableBrowser::addCondFormat(int column, const QString& value)
|
||||
void TableBrowser::addCondFormat(size_t column, const QString& value)
|
||||
{
|
||||
QFont font = QFont(Settings::getValue("databrowser", "font").toString());
|
||||
font.setPointSize(Settings::getValue("databrowser", "fontsize").toInt());
|
||||
@@ -598,7 +598,7 @@ void TableBrowser::addCondFormat(int column, const QString& value)
|
||||
m_settings[currentlyBrowsedTableName()].condFormats[column].push_back(newCondFormat);
|
||||
}
|
||||
|
||||
void TableBrowser::clearAllCondFormats(int column)
|
||||
void TableBrowser::clearAllCondFormats(size_t column)
|
||||
{
|
||||
std::vector<CondFormat> emptyCondFormatVector = std::vector<CondFormat>();
|
||||
m_model->setCondFormats(column, emptyCondFormatVector);
|
||||
@@ -606,12 +606,12 @@ void TableBrowser::clearAllCondFormats(int column)
|
||||
emit projectModified();
|
||||
}
|
||||
|
||||
void TableBrowser::editCondFormats(int column)
|
||||
void TableBrowser::editCondFormats(size_t column)
|
||||
{
|
||||
CondFormatManager condFormatDialog(m_settings[currentlyBrowsedTableName()].condFormats[column],
|
||||
m_model->encoding(), this);
|
||||
condFormatDialog.setWindowTitle(tr("Conditional formats for \"%1\"").
|
||||
arg(m_model->headerData(column, Qt::Horizontal).toString()));
|
||||
arg(m_model->headerData(static_cast<int>(column), Qt::Horizontal).toString()));
|
||||
if (condFormatDialog.exec()) {
|
||||
std::vector<CondFormat> condFormatVector = condFormatDialog.getCondFormats();
|
||||
m_model->setCondFormats(column, condFormatVector);
|
||||
@@ -620,9 +620,9 @@ void TableBrowser::editCondFormats(int column)
|
||||
}
|
||||
}
|
||||
|
||||
void TableBrowser::modifyColumnFormat(std::unordered_set<int> columns, std::function<void(CondFormat&)> changeFunction)
|
||||
void TableBrowser::modifyColumnFormat(std::unordered_set<size_t> columns, std::function<void(CondFormat&)> changeFunction)
|
||||
{
|
||||
for (int column : columns) {
|
||||
for (size_t column : columns) {
|
||||
std::vector<CondFormat>& columnFormats = m_settings[currentlyBrowsedTableName()].condFormats[column];
|
||||
|
||||
auto it = std::find_if(columnFormats.begin(), columnFormats.end(), [](const CondFormat& format) {
|
||||
@@ -636,7 +636,7 @@ void TableBrowser::modifyColumnFormat(std::unordered_set<int> columns, std::func
|
||||
// Alignment is get from the current column since the default is different from text and numbers.
|
||||
QFont font = QFont(Settings::getValue("databrowser", "font").toString());
|
||||
font.setPointSize(Settings::getValue("databrowser", "fontsize").toInt());
|
||||
Qt::Alignment align = Qt::Alignment(m_model->data(currentIndex().sibling(currentIndex().row(), column),
|
||||
Qt::Alignment align = Qt::Alignment(m_model->data(currentIndex().sibling(currentIndex().row(), static_cast<int>(column)),
|
||||
Qt::TextAlignmentRole).toInt());
|
||||
|
||||
CondFormat newCondFormat(QString(""), QColor(Settings::getValue("databrowser", "reg_fg_colour").toString()),
|
||||
@@ -1024,10 +1024,10 @@ void TableBrowser::headerClicked(int logicalindex)
|
||||
|
||||
void TableBrowser::updateColumnWidth(int section, int /*old_size*/, int new_size)
|
||||
{
|
||||
std::unordered_set<int> selectedCols = ui->dataTable->selectedCols();
|
||||
std::unordered_set<size_t> selectedCols = ui->dataTable->selectedCols();
|
||||
sqlb::ObjectIdentifier tableName = currentlyBrowsedTableName();
|
||||
|
||||
if (selectedCols.find(section) == selectedCols.end())
|
||||
if (selectedCols.find(static_cast<size_t>(section)) == selectedCols.end())
|
||||
{
|
||||
if (m_settings[tableName].columnWidths[section] != new_size) {
|
||||
emit projectModified();
|
||||
@@ -1037,12 +1037,12 @@ void TableBrowser::updateColumnWidth(int section, int /*old_size*/, int new_size
|
||||
else
|
||||
{
|
||||
ui->dataTable->blockSignals(true);
|
||||
for(int col : selectedCols)
|
||||
for(size_t col : selectedCols)
|
||||
{
|
||||
ui->dataTable->setColumnWidth(col, new_size);
|
||||
if (m_settings[tableName].columnWidths[col] != new_size) {
|
||||
ui->dataTable->setColumnWidth(static_cast<int>(col), new_size);
|
||||
if (m_settings[tableName].columnWidths[static_cast<int>(col)] != new_size) {
|
||||
emit projectModified();
|
||||
m_settings[tableName].columnWidths[col] = new_size;
|
||||
m_settings[tableName].columnWidths[static_cast<int>(col)] = new_size;
|
||||
}
|
||||
}
|
||||
ui->dataTable->blockSignals(false);
|
||||
|
||||
@@ -28,7 +28,7 @@ struct BrowseDataTableSettings
|
||||
sqlb::Query query; // NOTE: We only store the sort order in here (for now)
|
||||
QMap<int, int> columnWidths;
|
||||
QMap<int, QString> filterValues;
|
||||
QMap<int, std::vector<CondFormat>> condFormats;
|
||||
QMap<size_t, std::vector<CondFormat>> condFormats;
|
||||
QMap<int, QString> displayFormats;
|
||||
bool showRowid;
|
||||
QString encoding;
|
||||
@@ -120,10 +120,10 @@ signals:
|
||||
|
||||
private slots:
|
||||
void clear();
|
||||
void updateFilter(int column, const QString& value);
|
||||
void addCondFormat(int column, const QString& value);
|
||||
void clearAllCondFormats(int column);
|
||||
void editCondFormats(int column);
|
||||
void updateFilter(size_t column, const QString& value);
|
||||
void addCondFormat(size_t column, const QString& value);
|
||||
void clearAllCondFormats(size_t column);
|
||||
void editCondFormats(size_t column);
|
||||
void applySettings(const BrowseDataTableSettings& storedData, bool skipFilters = false);
|
||||
void enableEditing(bool enable_edit);
|
||||
void showRowidColumn(bool show, bool skipFilters = false);
|
||||
@@ -176,7 +176,7 @@ private:
|
||||
|
||||
Palette m_condFormatPalette;
|
||||
|
||||
void modifyColumnFormat(std::unordered_set<int> columns, std::function<void(CondFormat&)> changeFunction);
|
||||
void modifyColumnFormat(std::unordered_set<size_t> columns, std::function<void(CondFormat&)> changeFunction);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -275,7 +275,7 @@ QVariant SqliteTableModel::headerData(int section, Qt::Orientation orientation,
|
||||
return QString("%1").arg(section + 1);
|
||||
}
|
||||
|
||||
QVariant SqliteTableModel::getMatchingCondFormat(int column, const QString& value, int role) const
|
||||
QVariant SqliteTableModel::getMatchingCondFormat(size_t column, const QString& value, int role) const
|
||||
{
|
||||
if (m_mCondFormats.find(column) == m_mCondFormats.end())
|
||||
return QVariant();
|
||||
@@ -364,7 +364,7 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
|
||||
QString value = cached_row->at(column);
|
||||
// Unlock before querying from DB
|
||||
lock.unlock();
|
||||
QVariant condFormatFont = getMatchingCondFormat(index.column(), value, role);
|
||||
QVariant condFormatFont = getMatchingCondFormat(column, value, role);
|
||||
if (condFormatFont.isValid())
|
||||
return condFormatFont;
|
||||
}
|
||||
@@ -376,11 +376,11 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
|
||||
return QColor(Settings::getValue("databrowser", "null_fg_colour").toString());
|
||||
else if (nosync_isBinary(index))
|
||||
return QColor(Settings::getValue("databrowser", "bin_fg_colour").toString());
|
||||
else if (m_mCondFormats.find(index.column()) != m_mCondFormats.end()) {
|
||||
else if (m_mCondFormats.find(column) != m_mCondFormats.end()) {
|
||||
QString value = cached_row->at(column);
|
||||
// Unlock before querying from DB
|
||||
lock.unlock();
|
||||
QVariant condFormatColor = getMatchingCondFormat(index.column(), value, role);
|
||||
QVariant condFormatColor = getMatchingCondFormat(column, value, role);
|
||||
if (condFormatColor.isValid())
|
||||
return condFormatColor;
|
||||
}
|
||||
@@ -393,18 +393,18 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
|
||||
return QColor(Settings::getValue("databrowser", "null_bg_colour").toString());
|
||||
else if (nosync_isBinary(index))
|
||||
return QColor(Settings::getValue("databrowser", "bin_bg_colour").toString());
|
||||
else if (m_mCondFormats.find(index.column()) != m_mCondFormats.end()) {
|
||||
else if (m_mCondFormats.find(column) != m_mCondFormats.end()) {
|
||||
QString value = cached_row->at(column);
|
||||
// Unlock before querying from DB
|
||||
lock.unlock();
|
||||
QVariant condFormatColor = getMatchingCondFormat(index.column(), value, role);
|
||||
QVariant condFormatColor = getMatchingCondFormat(column, value, role);
|
||||
if (condFormatColor.isValid())
|
||||
return condFormatColor;
|
||||
}
|
||||
// Regular case (not null, not binary and no matching conditional format)
|
||||
return QColor(Settings::getValue("databrowser", "reg_bg_colour").toString());
|
||||
} else if(role == Qt::ToolTipRole) {
|
||||
sqlb::ForeignKeyClause fk = getForeignKeyClause(index.column()-1);
|
||||
sqlb::ForeignKeyClause fk = getForeignKeyClause(column-1);
|
||||
if(fk.isSet())
|
||||
return tr("References %1(%2)\nHold %3Shift and click to jump there")
|
||||
.arg(QString::fromStdString(fk.table()))
|
||||
@@ -417,7 +417,7 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
|
||||
// Align vertically to the center, which displays better.
|
||||
QString value = cached_row->at(column);
|
||||
lock.unlock();
|
||||
QVariant condFormat = getMatchingCondFormat(index.column(), value, role);
|
||||
QVariant condFormat = getMatchingCondFormat(column, value, role);
|
||||
if (condFormat.isValid())
|
||||
return condFormat;
|
||||
bool isNumber;
|
||||
@@ -439,7 +439,7 @@ QVariant SqliteTableModel::data(const QModelIndex &index, int role) const
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
sqlb::ForeignKeyClause SqliteTableModel::getForeignKeyClause(int column) const
|
||||
sqlb::ForeignKeyClause SqliteTableModel::getForeignKeyClause(size_t column) const
|
||||
{
|
||||
static const sqlb::ForeignKeyClause empty_foreign_key_clause;
|
||||
|
||||
@@ -457,12 +457,12 @@ sqlb::ForeignKeyClause SqliteTableModel::getForeignKeyClause(int column) const
|
||||
|
||||
// Convert object to a table and check if the column number is in the valid range
|
||||
sqlb::TablePtr tbl = std::dynamic_pointer_cast<sqlb::Table>(obj);
|
||||
if(tbl && tbl->name().size() && (column >= 0 && column < static_cast<int>(tbl->fields.size())))
|
||||
if(tbl && tbl->name().size() && column < tbl->fields.size())
|
||||
{
|
||||
// Note that the rowid column has number -1 here, it can safely be excluded since there will never be a
|
||||
// foreign key on that column.
|
||||
|
||||
sqlb::ConstraintPtr ptr = tbl->constraint({tbl->fields.at(static_cast<size_t>(column)).name()}, sqlb::Constraint::ForeignKeyConstraintType);
|
||||
sqlb::ConstraintPtr ptr = tbl->constraint({tbl->fields.at(column).name()}, sqlb::Constraint::ForeignKeyConstraintType);
|
||||
if(ptr)
|
||||
return *(std::dynamic_pointer_cast<sqlb::ForeignKeyClause>(ptr));
|
||||
}
|
||||
@@ -833,7 +833,7 @@ std::vector<std::string> SqliteTableModel::getColumns(std::shared_ptr<sqlite3> p
|
||||
return listColumns;
|
||||
}
|
||||
|
||||
void SqliteTableModel::addCondFormat(int column, const CondFormat& condFormat)
|
||||
void SqliteTableModel::addCondFormat(size_t column, const CondFormat& condFormat)
|
||||
{
|
||||
// If the condition is already present in the vector, update that entry and respect the order, since two entries with the same
|
||||
// condition do not make sense.
|
||||
@@ -847,21 +847,21 @@ void SqliteTableModel::addCondFormat(int column, const CondFormat& condFormat)
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
void SqliteTableModel::setCondFormats(int column, const std::vector<CondFormat>& condFormats)
|
||||
void SqliteTableModel::setCondFormats(size_t column, const std::vector<CondFormat>& condFormats)
|
||||
{
|
||||
m_mCondFormats[column] = condFormats;
|
||||
emit layoutChanged();
|
||||
}
|
||||
|
||||
void SqliteTableModel::updateFilter(int column, const QString& value)
|
||||
void SqliteTableModel::updateFilter(size_t column, const QString& value)
|
||||
{
|
||||
QString whereClause = CondFormat::filterToSqlCondition(value, m_encoding);
|
||||
|
||||
// If the value was set to an empty string remove any filter for this column. Otherwise insert a new filter rule or replace the old one if there is already one
|
||||
if(whereClause.isEmpty())
|
||||
m_query.where().erase(static_cast<size_t>(column));
|
||||
m_query.where().erase(column);
|
||||
else
|
||||
m_query.where()[static_cast<size_t>(column)] = whereClause.toStdString();
|
||||
m_query.where()[column] = whereClause.toStdString();
|
||||
|
||||
// Build the new query
|
||||
buildQuery();
|
||||
|
||||
@@ -104,7 +104,7 @@ public:
|
||||
bool hasPseudoPk() const;
|
||||
std::vector<std::string> pseudoPk() const { return m_query.rowIdColumns(); }
|
||||
|
||||
sqlb::ForeignKeyClause getForeignKeyClause(int column) const;
|
||||
sqlb::ForeignKeyClause getForeignKeyClause(size_t column) const;
|
||||
|
||||
// This returns true if the model is set up for editing. The model is able to operate in more or less two different modes, table browsing
|
||||
// and query browsing. We only support editing data for the table browsing mode and not for the query mode. This function returns true if
|
||||
@@ -114,8 +114,8 @@ public:
|
||||
// Helper function for removing all comments from a SQL query
|
||||
static void removeCommentsFromQuery(QString& query);
|
||||
|
||||
void addCondFormat(int column, const CondFormat& condFormat);
|
||||
void setCondFormats(int column, const std::vector<CondFormat>& condFormats);
|
||||
void addCondFormat(size_t column, const CondFormat& condFormat);
|
||||
void setCondFormats(size_t column, const std::vector<CondFormat>& condFormats);
|
||||
|
||||
// Search for the specified expression in the given cells. This intended as a replacement for QAbstractItemModel::match() even though
|
||||
// it does not override it, which - because of the different parameters - is not possible.
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
DBBrowserDB& db() { return m_db; }
|
||||
|
||||
public slots:
|
||||
void updateFilter(int column, const QString& value);
|
||||
void updateFilter(size_t column, const QString& value);
|
||||
void updateGlobalFilter(const std::vector<QString>& values);
|
||||
|
||||
signals:
|
||||
@@ -165,7 +165,7 @@ private:
|
||||
|
||||
// Return matching conditional format color/font or invalid value, otherwise.
|
||||
// Only format roles are expected in role (Qt::ItemDataRole)
|
||||
QVariant getMatchingCondFormat(int column, const QString& value, int role) const;
|
||||
QVariant getMatchingCondFormat(size_t column, const QString& value, int role) const;
|
||||
|
||||
DBBrowserDB& m_db;
|
||||
|
||||
@@ -197,7 +197,7 @@ private:
|
||||
|
||||
QString m_sQuery;
|
||||
std::vector<int> m_vDataTypes;
|
||||
std::map<int, std::vector<CondFormat>> m_mCondFormats;
|
||||
std::map<size_t, std::vector<CondFormat>> m_mCondFormats;
|
||||
sqlb::Query m_query;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user