• <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 逛奔的蝸牛 閱讀(2889) 評論(0)  編輯 收藏 引用 所屬分類: Qt
            久久亚洲精品中文字幕三区| 久久久久久国产精品无码下载| 久久精品男人影院| 国产偷久久久精品专区| 国产叼嘿久久精品久久| 午夜不卡888久久| 国产亚洲欧美精品久久久| 欧洲精品久久久av无码电影 | 久久精品成人一区二区三区| 国产欧美一区二区久久| 国产午夜免费高清久久影院| 国产精品免费看久久久| 久久发布国产伦子伦精品| 99国产欧美精品久久久蜜芽 | 99久久国产综合精品麻豆| 国产精品一区二区久久| 91久久国产视频| 老司机午夜网站国内精品久久久久久久久| 久久99国产精品成人欧美| 久久99久久无码毛片一区二区 | 精品久久久久中文字幕日本| 婷婷伊人久久大香线蕉AV | 无码人妻久久一区二区三区蜜桃 | 国内精品久久久久久99蜜桃| 亚洲国产成人久久综合碰碰动漫3d| 久久久一本精品99久久精品88| 国产精品久久久久久久久免费| 99热成人精品免费久久| 亚洲精品高清一二区久久| 色偷偷偷久久伊人大杳蕉| 精品久久久久久久久中文字幕| 久久精品国产99久久丝袜| 亚洲精品无码久久久影院相关影片| 99久久免费国产精品热| 久久亚洲2019中文字幕| 性做久久久久久久| 久久嫩草影院免费看夜色| 性色欲网站人妻丰满中文久久不卡| 99国产精品久久久久久久成人热| 久久久国产精华液| 久久av无码专区亚洲av桃花岛|