Fixed narrowing warning qsizetype -> int

This commit is contained in:
Magnus Hellströmer
2024-09-09 01:18:13 +02:00
parent e8f8304b60
commit 3c4a0ed2b4
2 changed files with 2 additions and 2 deletions

View File

@@ -639,7 +639,7 @@ bool TerminalStrip::isBridgeable(const QVector<QSharedPointer<RealTerminal>> &re
// Get the physical terminal and pos // Get the physical terminal and pos
auto first_physical_terminal = first_real_terminal->physicalTerminal(); auto first_physical_terminal = first_real_terminal->physicalTerminal();
QVector<shared_physical_terminal> physical_vector{first_physical_terminal}; QVector<shared_physical_terminal> physical_vector{first_physical_terminal};
QVector<int> pos_vector{m_physical_terminals.indexOf(first_physical_terminal)}; QVector<qsizetype> pos_vector{m_physical_terminals.indexOf(first_physical_terminal)};
auto bridge_ = isBridged(first_real_terminal); auto bridge_ = isBridged(first_real_terminal);
//bool to know at the end of this function if at least one terminal is not bridged //bool to know at the end of this function if at least one terminal is not bridged

View File

@@ -746,7 +746,7 @@ void ElementScene::addItems(QVector<QGraphicsItem *> items)
*/ */
void ElementScene::removeItems(QVector<QGraphicsItem *> items) void ElementScene::removeItems(QVector<QGraphicsItem *> items)
{ {
const int previous_selected_count{selectedItems().size()}; const qsizetype previous_selected_count{selectedItems().size()};
//block signal to avoid multiple emit of selection changed, //block signal to avoid multiple emit of selection changed,
//we emit this signal only once at the end of this function. //we emit this signal only once at the end of this function.