mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-11-26 15:20:29 +01:00
2021-01-15 Fred Gleason <fredg@paravelsystems.com>
* Modified the 'RDLibraryModel::addCart()' to return 'QModelIndex' rather than 'int'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -334,7 +334,7 @@ QString RDLibraryModel::cartOwnedBy(const QModelIndex &index)
|
||||
}
|
||||
|
||||
|
||||
int RDLibraryModel::addCart(unsigned cartnum)
|
||||
QModelIndex RDLibraryModel::addCart(unsigned cartnum)
|
||||
{
|
||||
//
|
||||
// Find the insertion offset
|
||||
@@ -372,7 +372,7 @@ int RDLibraryModel::addCart(unsigned cartnum)
|
||||
endInsertRows();
|
||||
emit rowCountChanged(d_texts.size());
|
||||
|
||||
return offset;
|
||||
return createIndex(offset,0,0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class RDLibraryModel : public QAbstractItemModel
|
||||
RDCart::Type cartType(const QModelIndex &index) const;
|
||||
QString cutName(const QModelIndex &index) const;
|
||||
QString cartOwnedBy(const QModelIndex &index);
|
||||
int addCart(unsigned cartnum);
|
||||
QModelIndex addCart(unsigned cartnum);
|
||||
void removeCart(unsigned cartnum);
|
||||
void refreshRow(const QModelIndex &index);
|
||||
void refreshCart(unsigned cartnum);
|
||||
|
||||
Reference in New Issue
Block a user