• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            逛奔的蝸牛

            我不聰明,但我會很努力

               ::  :: 新隨筆 ::  ::  :: 管理 ::


            void testMessagePattern() {
                QString QT_MESSAGE_PATTERN=
                        "[%{if-debug}D%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}]"
                        ": %{file}:%{line} - %{message}";
                qSetMessagePattern(QT_MESSAGE_PATTERN);
            
            
                qDebug() << "Hello Pattern";
                qDebug() << QString("黃彪").toUtf8().toHex();
            }

            [D]: /Users/Biao/Dropbox/workspace/Qt/Test/main.cpp:26 - Hello Pattern

            [D]: /Users/Biao/Dropbox/workspace/Qt/Test/main.cpp:28 - "e9bb84e5bdaa"


            void qSetMessagePattern(const QString & pattern)

            Changes the output of the default message handler.

            Allows to tweak the output of qDebug(), qWarning(), qCritical() and qFatal().

            Following placeholders are supported:

            PlaceholderDescription
            %{appname} QCoreApplication::applicationName()
            %{file} Path to source file
            %{function} Function
            %{line} Line in source file
            %{message} The actual message
            %{pid} QCoreApplication::applicationPid()
            %{threadid} ID of current thread
            %{type} "debug", "warning", "critical" or "fatal"

            You can also use conditionals on the type of the message using %{if-debug}%{if-warning}%{if-critical} or %{if-fatal} followed by an %{endif}. What is inside the%{if-*} and %{endif} will only be printed if the type matches.

            Example:

            QT_MESSAGE_PATTERN="[%{if-debug}D%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{file}:%{line} - %{message}"

            The default pattern is "%{message}".

            The pattern can also be changed at runtime by setting the QT_MESSAGE_PATTERN environment variable; if both qSetMessagePattern() is called and QT_MESSAGE_PATTERN is set, the environment variable takes precedence.

            qSetMessagePattern() has no effect if a custom message handler is installed.

            This function was introduced in QtCore 5.0.

            See also qInstallMessageHandler() and Debugging Techniques.


            posted on 2013-09-02 17:48 逛奔的蝸牛 閱讀(2867) 評論(0)  編輯 收藏 引用 所屬分類: Qt
            久久久无码精品亚洲日韩按摩| 伊人久久大香线蕉av不变影院| 国产69精品久久久久777| 久久国产精品无码网站| 久久香蕉超碰97国产精品| 久久午夜免费视频| 久久九色综合九色99伊人| 2021国产精品久久精品| 亚洲午夜无码久久久久小说| 午夜不卡888久久| 久久久久久久人妻无码中文字幕爆 | 一本大道久久a久久精品综合| 日日狠狠久久偷偷色综合0| 国产精品九九久久精品女同亚洲欧美日韩综合区 | 国产精品99久久精品| 色综合久久夜色精品国产| 国产精品女同一区二区久久| 久久久久久久综合狠狠综合| 国产高潮久久免费观看| 狠狠色丁香婷综合久久| 久久se精品一区二区| 午夜久久久久久禁播电影| 亚洲精品无码久久久影院相关影片| 国产 亚洲 欧美 另类 久久| 无码专区久久综合久中文字幕| 日本高清无卡码一区二区久久 | 香蕉久久夜色精品国产2020| 国产91久久综合| 91精品无码久久久久久五月天| 1000部精品久久久久久久久| 奇米影视7777久久精品| 亚洲色大成网站www久久九| 日本久久中文字幕| 久久精品国产欧美日韩99热| 天天综合久久一二三区| 日韩久久久久中文字幕人妻| 亚洲精品无码久久毛片| 伊人久久大香线蕉无码麻豆| 久久久久久久精品妇女99| 伊人久久大香线蕉精品| 色综合久久中文综合网|