Fix Timer & Builds on Qt5

This commit is contained in:
Zach Halpern 2024-11-25 13:34:29 -05:00 committed by ZeldaZach
parent facb9a030f
commit cc4f8a4761
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -48,7 +48,11 @@ AllZonesCardAmountWidget::AllZonesCardAmountWidget(QWidget *parent,
setMouseTracking(true); setMouseTracking(true);
} }
void AllZonesCardAmountWidget::enterEvent(QEnterEvent *event) #if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
void AllZonesCardAmountWidget::enterEvent(QEnterEvent *event) override
#else
void AllZonesCardAmountWidget::enterEvent(QEvent *event) override
#endif
{ {
QWidget::enterEvent(event); QWidget::enterEvent(event);
update(); update();

View file

@ -105,6 +105,7 @@ void PrintingSelector::updateSortOrder()
void PrintingSelector::updateDisplay() void PrintingSelector::updateDisplay()
{ {
timer->stop(); timer->stop();
timer->deleteLater();
timer = new QTimer(this); timer = new QTimer(this);
flowWidget->clearLayout(); flowWidget->clearLayout();
if (selectedCard != nullptr) { if (selectedCard != nullptr) {
@ -316,7 +317,6 @@ void PrintingSelector::getAllSetsForCurrentCard()
// Stop timer when done // Stop timer when done
if (currentIndex >= prependedSets.size()) { if (currentIndex >= prependedSets.size()) {
timer->stop(); timer->stop();
timer->deleteLater();
} }
}); });
currentIndex = 0; currentIndex = 0;