Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QT Creator 4, Is it possible to switch off deprecation warnings in system headers?
Forum Updated to NodeBB v4.3 + New Features

QT Creator 4, Is it possible to switch off deprecation warnings in system headers?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
creator 4
1 Posts 1 Posters 802 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thosrtanner
    wrote on last edited by thosrtanner
    #1

    QT Creator 4 doesn't seem to like Q_DECLARE_OPERATORS_FOR_FLAGS very much.

    I have a class that declares some flags, like this

    class Executable
    //...
      enum Flag {
        CustomExecutable = 1 << 0,
        ShowInToolbar = 1 << 1,
        UseApplicationIcon = 1 << 2,
        CanLaunchGame = 1 << 3,
    
        AllFlags = 0xff //I know, I know
      };
    
      Q_DECLARE_FLAGS(Flags, Flag)
    
    //...
    
    };
    
    Q_DECLARE_OPERATORS_FOR_FLAGS(Executable::Flags)
    

    QT creator highlights the Q_DECLARE_OPERATORS_FOR_FLAGS line with a yellow triangle on the left, a lightbulb on the right and a very thin almost invisible reddish line beneath.

    If I click on the lightbulb, if I am lucky, it tells me to use noexcept instead. Otherwise it does nothing.

    If a hold the mouse over the triangle, nothing happens. If I hold the mouse over the Q_DECLARE_OPERATORS_FOR_FLAGS, after a pause, creator comes up with a box containing multiple messages about deprecation warnings (with -Wdeprecated). I'd copy them here, but the box is non copyable.

    Where does the -Wdeprecated come from? I see that QtCretor is running a clang child processs which may be related but I don't remember asking it to do that for me, and telling me something in a system header file is deprecated isn't helpful because there's not a fat lot I can do about it.

    Is there anything I can do to switch this off? (I'm using QT5.5 at the moment)

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved