Forum
Sign Up

VS2010 compile warnings

12 years 2 months ago #1 by Kevin Dibble
We are building QTitanRibbon as a static library in a VS2010 project. We receive two sets of warnings:

Warning Group 1
===============================================================
1>c:\qt\4.8.1\src\corelib\global\qglobal.h(2362): warning C4512: 'QForeachContainer<T>' : assignment operator could not be generated
1> with
1> [
1> T=QList<QComboBox *>
1> ]
1> qtnribbongroup.cpp(805) : see reference to class template instantiation 'QForeachContainer<T>' being compiled
1> with
1> [
1> T=QList<QComboBox *>
1> ]

This occurs for a number of classes, both standard Qt (such as QComboBox) and for titan ribbon classes (such as QtitanAnimation).


Warning Group 2
===============================================================
src\styles\qtnribbonstyle.cpp(768): warning C4063: case '-268435455' is not a valid value for switch of enum 'QStyle::ControlElement'
1> c:\qt\4.8.1\src\gui\styles\qstyle.h(217) : see declaration of 'QStyle::ControlElement'

This occurs for all enum elements above 0xF0000000 which is a special delimiter in the QTitanRibbon logic.


We are getting some heap corruption in the RibbonSystemButton::paintEvent() method, specifically on the destruction of the QList lSz (of icon sizes). We suspect this is due to the warnings regarding the QList templates above.

Do you have a VS2010 .vcxproj file that we can reference to validate our build environment?

Best Regards,
Jim

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #2 by Kevin Dibble
Quick followup:

The template assignment warnings are due to an issue in qglobal.h -- simply adding

private:
QForeachContainer& operator=( const QForeachContainer& );

to QForeachContainer resolves the warnings.


The crash on QList appears to be a mismatch between runtime libs used in the Qt DLL vs the runtime libs used in my application.

Please Log in or Create an account to join the conversation.

More
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.185 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )