Author: mir3x Date: Sat Oct 15 00:34:21 2016 New Revision: 34127 URL: http://svn.gna.org/viewcvs/freeciv?rev=34127&view=rev Log: Qt client - Fixed "QColor::setAlpha: invalid value" warnings
Reported by Louis Moureaux <louis94> See bug #25169 Modified: trunk/client/gui-qt/hudwidget.cpp Modified: trunk/client/gui-qt/hudwidget.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/hudwidget.cpp?rev=34127&r1=34126&r2=34127&view=diff ============================================================================== --- trunk/client/gui-qt/hudwidget.cpp (original) +++ trunk/client/gui-qt/hudwidget.cpp Sat Oct 15 00:34:21 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