mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 19:11:39 -06:00
@@ -81,7 +81,7 @@ std::string Query::buildQuery(bool withRowid) const
|
||||
std::string order_by;
|
||||
for(const auto& sorted_column : m_sort)
|
||||
{
|
||||
if(sorted_column.column < m_column_names.size())
|
||||
if(sorted_column.column < static_cast<int>(m_column_names.size()))
|
||||
order_by += sqlb::escapeIdentifier(m_column_names.at(sorted_column.column)) + " "
|
||||
+ (sorted_column.direction == sqlb::Ascending ? "ASC" : "DESC") + ",";
|
||||
}
|
||||
|
||||
@@ -221,7 +221,8 @@ int SqliteTableModel::filterCount() const
|
||||
}
|
||||
|
||||
// Convert a number to string using the Unicode superscript characters
|
||||
static QString toSuperScript(int number)
|
||||
template<class T>
|
||||
static QString toSuperScript(T number)
|
||||
{
|
||||
QString superScript = QString::number(number);
|
||||
superScript.replace("0", "⁰");
|
||||
@@ -247,7 +248,7 @@ QVariant SqliteTableModel::headerData(int section, Qt::Orientation orientation,
|
||||
// if we have a VIRTUAL table the model will not be valid, with no header data
|
||||
if(section < m_headers.size()) {
|
||||
QString sortIndicator;
|
||||
for(int i = 0; i < m_query.orderBy().size(); i++) {
|
||||
for(size_t i = 0; i < m_query.orderBy().size(); i++) {
|
||||
const sqlb::SortedColumn sortedColumn = m_query.orderBy()[i];
|
||||
// Append sort indicator with direction and ordinal number in superscript style
|
||||
if (sortedColumn.column == section) {
|
||||
|
||||
Reference in New Issue
Block a user