Recently I've noticed when I extract a large network the percentage goes negative at some point. It doesn't cause an error but I think it's just an overflow during the percentage calculation:
int percentComplete {expectedIndex*100/analytic()->size()};
With the network I just extracted, the analytic size was roughly 33,000,000. So when expectedIndex reaches around 20,000,000 it is multiplied by 100 here which leads to overflow.
The quick and dirty fix here would be to cast this operation to qint64. A more laborious option would be to change analytic()->size() to be qint64. Since this issue isn't urgent, I would probably implement the latter.
Recently I've noticed when I extract a large network the percentage goes negative at some point. It doesn't cause an error but I think it's just an overflow during the percentage calculation:
With the network I just extracted, the analytic size was roughly 33,000,000. So when
expectedIndex
reaches around 20,000,000 it is multiplied by 100 here which leads to overflow.The quick and dirty fix here would be to cast this operation to qint64. A more laborious option would be to change
analytic()->size()
to be qint64. Since this issue isn't urgent, I would probably implement the latter.