Fix Linux Qt build: int64_t/qint64 type mismatch

On Linux, int64_t is long but qint64 is long long - different types
that can't bind to the same reference. Use int64_t locals to match
the GetAllBalances signature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-22 18:05:43 -07:00
parent 6e9dbb1aa9
commit ed87543153
+3 -2
View File
@@ -93,8 +93,9 @@ void WalletModel::pollBalanceChanged()
void WalletModel::checkBalanceChanged()
{
// Get all balances in a single lock acquisition + single pass
// instead of 4 separate lock+iterate cycles
qint64 newBalance = 0, newStake = 0, newUnconfirmedBalance = 0, newImmatureBalance = 0;
// instead of 4 separate lock+iterate cycles.
// Use int64_t locals to match GetAllBalances signature (qint64 differs on Linux).
int64_t newBalance = 0, newStake = 0, newUnconfirmedBalance = 0, newImmatureBalance = 0;
wallet->GetAllBalances(newBalance, newStake, newUnconfirmedBalance, newImmatureBalance);
if(cachedBalance != newBalance || cachedStake != newStake || cachedUnconfirmedBalance != newUnconfirmedBalance || cachedImmatureBalance != newImmatureBalance)