Skip to content

Commit

Permalink
Restrict eat-my grandma workaround to Visual Studio compiles
Browse files Browse the repository at this point in the history
  • Loading branch information
bagong committed Feb 16, 2016
1 parent 0418264 commit 39a766a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions QtCollider/primitives/prim_misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,14 @@ QC_LANG_PRIMITIVE( Qt_SetGlobalPalette, 1, PyrSlot *r, PyrSlot *a, VMGlobals *g
{
if( !QcApplication::compareThread() ) return QtCollider::wrongThreadError();

// QPalette p = QtCollider::get( a );
// The line below is a workaround. Above term causes Error C2440 in VS
// https://msdn.microsoft.com/en-us/library/sy5tsf8z.aspx
QPalette p = (QPalette&&) QtCollider::get(a);
// Tim1
// static_cast<QPalette>( QtCollider::get( a ) );
// The line below is a workaround. The non-win term causes Error C2440 in VS
// https://msdn.microsoft.com/en-us/library/sy5tsf8z.aspx
#if defined(_MSC_VER)
QPalette p = (QPalette&&) QtCollider::get(a);
#else
QPalette p = QtCollider::get( a );
#endif

QApplication::setPalette( p );

return errNone;
Expand Down

0 comments on commit 39a766a

Please sign in to comment.