Skip to content

Commit

Permalink
Fixed|Client: Compiling with Qt 5.3 or older
Browse files Browse the repository at this point in the history
The QTimer singleshot functor is available from Qt 5.4 onward.
  • Loading branch information
skyjake committed Mar 28, 2016
1 parent 77094aa commit c123ed3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doomsday/apps/client/src/ui/home/gamecolumnwidget.cpp
Expand Up @@ -420,12 +420,17 @@ DENG_GUI_PIMPL(GameColumnWidget)
new CallbackAction([this, button, profileItem, popup] ()
{
popup->detachAnchor();
#ifdef DENG2_QT_5_4_OR_NEWER
// Animate the widget to fade it away.
TimeDelta const SPAN = 0.2;
button->setOpacity(0, SPAN);
QTimer::singleShot(SPAN.asMilliSeconds(), [profileItem] () {
delete profileItem->profile;
});
#else
// Oh well.
delete profileItem->profile;
#endif
}))
<< new ui::ActionItem(tr("Cancel"), new Action);

Expand Down

0 comments on commit c123ed3

Please sign in to comment.