Changeset 6759e32 in confclerk_git


Ignore:
Timestamp:
07/14/21 21:28:46 (10 months ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master
Children:
102d186
Parents:
ce60f42
git-author:
Philipp Spitzer <philipp@…> (07/14/21 21:28:02)
git-committer:
Philipp Spitzer <philipp@…> (07/14/21 21:28:46)
Message:

Replace QModelIndex::child() to avoid a deprecation warning.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mvc/delegate.cpp

    rce60f42 r6759e32  
    364364    int nrofFavs = 0;
    365365    for(int i=0; i<index.model()->rowCount(index); i++)
    366         if(static_cast<Event*>(index.child(i,0).internalPointer())->favourite() != Favourite_no)
     366        if(static_cast<Event*>(index.model()->index(i, 0, index).internalPointer())->favourite() != Favourite_no)
    367367            nrofFavs++;
    368368
     
    377377    int nrofAlarms = 0;
    378378    for(int i=0; i<index.model()->rowCount(index); i++)
    379         if(static_cast<Event*>(index.child(i,0).internalPointer())->hasAlarm())
     379        if(static_cast<Event*>(index.model()->index(i, 0, index).internalPointer())->hasAlarm())
    380380            nrofAlarms++;
    381381
Note: See TracChangeset for help on using the changeset viewer.