Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to disable messages from QDebug object while build for release
Forum Updated to NodeBB v4.3 + New Features

How to disable messages from QDebug object while build for release

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 246 Views
  • 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.
  • A Offline
    A Offline
    anphetamina
    wrote on last edited by
    #1
    set(CMAKE_BUILD_TYPE RELEASE)
    

    Will disable all messages printed using

    qDebug() << "msg";
    

    But messages printed like this

    QDebug dbg(QtDebugMsg);
    ...
            dbg << "[" << index[i] << "]";
    ...
                dbg << symbols[i][j].getC();
    ...
    ...
    

    are not disabled

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      Install a custom message handler and / or use the second version. do not use the second version

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • A Offline
        A Offline
        anphetamina
        wrote on last edited by
        #3

        what "second version"?

        Christian EhrlicherC 1 Reply Last reply
        0
        • A anphetamina

          what "second version"?

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @anphetamina I meant 'do not use the second version', sorry

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1

          • Login

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