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

use categorized logging instead of env vars or #define's to turn on qDebug/qWarning output

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P4: Low
    • None
    • None
    • Core: Other
    • None

    Description

      We still have a lot of these, e.g. in qtdeclarative

      $ git grep DEFINE_BOOL_CONFIG_OPTION
      src/particles/qquickparticlesystem.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlParticlesDebug, QML_PARTICLES_DEBUG)
      src/qml/animations/qabstractanimationjob.cpp:DEFINE_BOOL_CONFIG_OPTION(animationTickDump, QML_ANIMATION_TICK_DUMP);
      src/qml/jsruntime/qv4engine.cpp:DEFINE_BOOL_CONFIG_OPTION(disableDiskCache, QML_DISABLE_DISK_CACHE);
      src/qml/jsruntime/qv4engine.cpp:DEFINE_BOOL_CONFIG_OPTION(forceDiskCache, QML_FORCE_DISK_CACHE);
      src/qml/qml/qqmldatablob.cpp:DEFINE_BOOL_CONFIG_OPTION(dumpErrors, QML_DUMP_ERRORS);
      src/qml/qml/qqmlglobal_p.h:#define DEFINE_BOOL_CONFIG_OPTION(name, var) \
      src/qml/qml/qqmlimport.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE)
      src/qml/qml/qqmlimport.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
      src/qml/qml/qqmlproperty.cpp:DEFINE_BOOL_CONFIG_OPTION(compatResolveUrlsOnAssigment, QML_COMPAT_RESOLVE_URLS_ON_ASSIGNMENT);
      src/qml/qml/qqmlxmlhttprequest.cpp:DEFINE_BOOL_CONFIG_OPTION(xhrDump, QML_XHR_DUMP);
      src/qml/qml/qqmlxmlhttprequest.cpp:DEFINE_BOOL_CONFIG_OPTION(xhrFileWrite, QML_XHR_ALLOW_FILE_WRITE);
      src/qml/qml/qqmlxmlhttprequest.cpp:DEFINE_BOOL_CONFIG_OPTION(xhrFileRead, QML_XHR_ALLOW_FILE_READ);
      src/quick/items/qquickmousearea.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlVisualTouchDebugging, QML_VISUAL_TOUCH_DEBUGGING)
      src/quick/items/qquickmultipointtoucharea.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlVisualTouchDebugging, QML_VISUAL_TOUCH_DEBUGGING)
      src/quick/items/qquicktextinput.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
      src/quick/scenegraph/coreapi/qsgtexture.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlDebugLeakBacktrace, QML_DEBUG_LEAK_BACKTRACE)
      src/quick/scenegraph/qsgdefaultcontext.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
      src/quick/scenegraph/qsgrenderloop.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlNoThreadedRenderer, QML_BAD_GUI_RENDER_LOOP);
      src/quick/scenegraph/qsgrenderloop.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlForceThreadedRenderer, QML_FORCE_THREADED_RENDERER); // Might trigger graphics driver threading bugs, use at own risk
      src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlUseGlyphCacheWorkaround, QML_USE_GLYPHCACHE_WORKAROUND)
      src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp:DEFINE_BOOL_CONFIG_OPTION(qsgPreferFullSizeGlyphCacheTextures, QSG_PREFER_FULLSIZE_GLYPHCACHE_TEXTURES)
      src/quick/scenegraph/util/qsgrhiatlastexture.cpp:DEFINE_BOOL_CONFIG_OPTION(qsgEnableCompressedAtlas, QSG_ENABLE_COMPRESSED_ATLAS)
      tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlCheckTypes, QML_CHECK_TYPES)
      tests/auto/quick/qquicktext/tst_qquicktext.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
      tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
      tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp:DEFINE_BOOL_CONFIG_OPTION(qmlDisableDistanceField, QML_DISABLE_DISTANCEFIELD)
      

      It's still not very consistent, considering that we've had categorized logging for so many years already.

      Attachments

        Issue Links

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

          Activity

            People

              srutledg Shawn Rutledge
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes