Results 1 to 4 of 4

Thread: Compiler Warnings from Qt

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2009
    Posts
    483
    Thanked 97 Times in 94 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Compiler Warnings from Qt

    I suppose that the lines generating these warnings are within inline methods of the classes you mention.

    Some compilers, such as GCC (and possibly MinGW), let you temporarily disable certain warnings. You could wrap the lines #including the offending files in a section disabling specific warnings, as in:
    Qt Code:
    1. #pragma GCC diagnostic push
    2. #pragma GCC diagnostic ignored "-Wfloat-equal"
    3. // ...
    4. #include <QRect>
    5. // ...
    6. #pragma GCC diagnostic pop
    To copy to clipboard, switch view to plain text mode 

    Not the most portable solution, I'm afraid, but unless Qt fixes their code (for instance by doing exactly this trick inside their code) I fear you are out of luck.

  2. The following user says thank you to yeye_olive for this useful post:

    sedi (25th November 2015)

Similar Threads

  1. Replies: 2
    Last Post: 11th March 2014, 12:02
  2. msvc Compiler or mingw compiler
    By Ashutosh2k1 in forum Qt Programming
    Replies: 3
    Last Post: 14th February 2011, 08:33
  3. Replies: 2
    Last Post: 18th November 2010, 08:01
  4. Strange compiler behaviour (compiler passes wrong argument)
    By SasaVilic in forum General Programming
    Replies: 2
    Last Post: 2nd November 2010, 11:36
  5. Where are my compiler warnings?
    By drhex in forum General Programming
    Replies: 5
    Last Post: 18th February 2009, 21:28

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.