Author: mir3x Date: Sat Oct 15 00:34:10 2016 New Revision: 34126 URL: http://svn.gna.org/viewcvs/freeciv?rev=34126&view=rev Log: Qt client - Fixed "QColor::setAlpha: invalid value" warnings
Reported by Louis Moureaux <louis94> See bug #25169 Modified: branches/S2_6/client/gui-qt/hudwidget.cpp Modified: branches/S2_6/client/gui-qt/hudwidget.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/client/gui-qt/hudwidget.cpp?rev=34126&r1=34125&r2=34126&view=diff ============================================================================== --- branches/S2_6/client/gui-qt/hudwidget.cpp (original) +++ branches/S2_6/client/gui-qt/hudwidget.cpp Sat Oct 15 00:34:10 2016 @@ -129,7 +129,6 @@ QColor c2; int step; - step = m_animate_step % 300; if (step > 150) { step = step - 150; @@ -143,6 +142,8 @@ c1 = QColor(palette().color(QPalette::Highlight)); c2 = QColor(palette().color(QPalette::AlternateBase)); + step = qMax(0, step); + step = qMin(255, step); c1.setAlpha(step); c2.setAlpha(step); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits