make method private

This commit is contained in:
RickyRister 2025-12-30 22:43:12 -08:00
parent 27e3fd5a75
commit f2cd2c94fd
2 changed files with 9 additions and 9 deletions

View file

@ -478,7 +478,7 @@ bool DeckListModel::offsetCountAtIndex(const QModelIndex &idx, int offset)
return true; return true;
} }
int DeckListModel::findSortedInsertRow(InnerDecklistNode *parent, CardInfoPtr cardInfo) const int DeckListModel::findSortedInsertRow(const InnerDecklistNode *parent, const CardInfoPtr &cardInfo) const
{ {
if (!cardInfo) { if (!cardInfo) {
return parent->size(); // fallback: append at end return parent->size(); // fallback: append at end

View file

@ -308,14 +308,6 @@ public:
*/ */
bool offsetCountAtIndex(const QModelIndex &idx, int offset); bool offsetCountAtIndex(const QModelIndex &idx, int offset);
/**
* @brief Determines the sorted insertion row for a card.
* @param parent The parent node where the card will be inserted.
* @param cardInfo The card info to insert.
* @return Row index where the card should be inserted to maintain sort order.
*/
int findSortedInsertRow(InnerDecklistNode *parent, CardInfoPtr cardInfo) const;
/** /**
* @brief Removes all cards and resets the model. * @brief Removes all cards and resets the model.
*/ */
@ -370,6 +362,14 @@ private:
const QString &providerId = "", const QString &providerId = "",
const QString &cardNumber = "") const; const QString &cardNumber = "") const;
/**
* @brief Determines the sorted insertion row for a card.
* @param parent The parent node where the card will be inserted.
* @param cardInfo The card info to insert.
* @return Row index where the card should be inserted to maintain sort order.
*/
int findSortedInsertRow(const InnerDecklistNode *parent, const CardInfoPtr &cardInfo) const;
/** /**
* @brief Recursively emits the dataChanged signal with role as Qt::BackgroundRole for all indices that are children * @brief Recursively emits the dataChanged signal with role as Qt::BackgroundRole for all indices that are children
* of the given node. This is used to update the background color when changing formats. * of the given node. This is used to update the background color when changing formats.