From 1457993f844931709b5843e095189971615c8951 Mon Sep 17 00:00:00 2001 From: Georgiy Komarov Date: Thu, 22 Jul 2021 20:55:23 +0300 Subject: [PATCH] gui: Set signed int type for the error lines (#3348) --- gui/erroritem.h | 2 +- gui/resultstree.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/erroritem.h b/gui/erroritem.h index 723a83e2b..8cb337bc4 100644 --- a/gui/erroritem.h +++ b/gui/erroritem.h @@ -110,7 +110,7 @@ Q_DECLARE_METATYPE(ErrorItem) class ErrorLine { public: QString file; - unsigned int line; + int line; QString file0; QString errorId; bool incomplete; diff --git a/gui/resultstree.cpp b/gui/resultstree.cpp index b3c0625e3..5ca374f04 100644 --- a/gui/resultstree.cpp +++ b/gui/resultstree.cpp @@ -138,7 +138,7 @@ QStandardItem *ResultsTree::createCheckboxItem(bool checked) QStandardItem *ResultsTree::createLineNumberItem(const QString &linenumber) { QStandardItem *item = new QStandardItem(); - item->setData(QVariant(linenumber.toULongLong()), Qt::DisplayRole); + item->setData(QVariant(linenumber.toInt()), Qt::DisplayRole); item->setToolTip(linenumber); item->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); item->setEditable(false); @@ -1318,7 +1318,7 @@ void ResultsTree::readErrorItem(const QStandardItem *error, ErrorItem *item) con QErrorPathItem e; e.file = stripPath(child_data[FILENAME].toString(), true); - e.line = child_data[LINE].toUInt(); + e.line = child_data[LINE].toInt(); e.info = child_data[MESSAGE].toString(); item->errorPath << e; }