Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-110030

qCDebug is falsely handled as an error

    XMLWordPrintable

Details

    • Android, macOS

    Description

      The bug happens when trying to build an Android app on MacOS. 

      Put the attached .ini file (The file is from customer. Actually only qt.qml.import.scanner.=true and qt.qml.import.scanner.files.=true are enough to reproduce the bug.) in either of the 2 following directories:

      1. QLibraryInfo::DataPath
      2. QStandardPaths::GenericConfigLocation

      then try to build any Android app. During the build process the following 'error' is going to occur:

      :-1: error: qt.qml.import.scanner.files: Parsing code and finding imports in "/Users/miketrahearn/Projects/untitled/main.qml" TS: XXXXXXXXXXX

      while it is actually not a real error - it is actually a qCDebug message generated by:

      qtdeclarative/tools/qmlimportscanner/main.cpp:528:
      qCDebug(lcImportScannerFiles) << "Parsing code and finding imports in" << filePath<< "TS:" <<QDateTime::currentMSecsSinceEpoch();

      One can safely choose to ignore everything that Qt Creator warns and still deploy the app to Android device, which further proves that the false error is not real. But the issues and popups are annoying.

      According to the following documentation:

      https://doc.qt.io/qt-5/qloggingcategory.html#logging-rules

      I also tried to use setFilterRules() and the other 2 macros instead of a .ini file. And the problem went away. It seems like that the problem only exist when the app is trying to fetch logging rules from .ini file. 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtandroidteam Qt Android Team
            luqiaochen Luqiao Chen
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes