• <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 逛奔的蝸牛 閱讀(2894) 評論(0)  編輯 收藏 引用 所屬分類: Qt
            亚洲人成网亚洲欧洲无码久久| 国产精品18久久久久久vr| 久久人人爽人人爽AV片| 国内精品伊人久久久久妇| 久久大香香蕉国产| 久久久久人妻一区精品| 久久精品一本到99热免费| 久久婷婷五月综合色99啪ak| 国产精品久久久久9999| 久久狠狠爱亚洲综合影院| 国产精品一区二区久久精品无码| 久久精品国产色蜜蜜麻豆| 精品久久久久久无码中文野结衣| 久久亚洲国产成人精品性色| 久久亚洲精品国产亚洲老地址| 国产精品欧美久久久久无广告| 久久夜色精品国产噜噜麻豆| 久久无码AV中文出轨人妻| 久久久久国产视频电影| 久久美女人爽女人爽| 久久精品国产亚洲av高清漫画 | 欧美精品丝袜久久久中文字幕| 精品蜜臀久久久久99网站| 亚洲国产精品久久电影欧美| 亚洲人成无码www久久久| 精品久久久久久99人妻| 亚洲国产精品人久久| 好久久免费视频高清| 国产精品久久网| 麻豆精品久久久一区二区| 久久精品国产秦先生| 久久美女网站免费| 国产99久久久国产精免费| 久久久久久久综合日本亚洲| 久久久青草久久久青草| 99久久婷婷国产综合精品草原 | 无码人妻久久一区二区三区免费| 亚洲欧洲久久久精品| 国产成人久久精品一区二区三区| 午夜精品久久久久久99热| 精品国产乱码久久久久久郑州公司|