Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

Small fix related to Qt 4.7.2

Small fix related to Qt 4.7.2

Hello,

A small fix was needed to build with Qt version 4.7.2:

"""
sed -i 's/_listPoints\->setSizePolicy/\/\//' OMOptim/GUI/Widgets/widgetmoopointslist.cpp
"""

Aparently calling setSizePolicy directly is not allowed.

Runar

Re: Small fix related to Qt 4.7.2

I had OMOptim compile using:
Ubuntu 64-bit (GCC 4.4, Qt 4.7.0)
MacPorts 64-bit (GCC 4.2, Qt 4.7.2)

Since mine works, I tried GCC 4.6 (which I also happen to have installed).

Code:

../GUI/Widgets/WidgetMooPointsList.cpp:63:100: error: cannot call constructor 'QSizePolicy::QSizePolicy' directly [-fpermissive]

I wonder why GCC 4.4 accepts Class::Class for the constructor, and GCC 4.6 does not current/smile

Code:

-    _listPoints->setSizePolicy(QSizePolicy::QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Preferred));

+    _listPoints->setSizePolicy(QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Preferred));

Re: Small fix related to Qt 4.7.2

I am not sure if this is the right forum for these kind of small bugs. I try to
build from SVN head once a week and usually it is OK, but sometimes I
discover some small changes are needed to build on my platform.

Runar

There are 0 guests and 0 other users also viewing this topic
You are here: