• <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
            久久久久久精品无码人妻| 99精品国产99久久久久久97 | 精品无码久久久久久国产| 久久国产精品99久久久久久老狼| 秋霞久久国产精品电影院| 一本大道久久东京热无码AV| 久久久久久国产精品美女| 国产美女久久久| 漂亮人妻被中出中文字幕久久| 99久久99久久久精品齐齐| 久久久中文字幕日本| 国产成年无码久久久久毛片| 久久99精品免费一区二区| 漂亮人妻被黑人久久精品| 欧美精品福利视频一区二区三区久久久精品 | 久久精品视频免费| 亚洲αv久久久噜噜噜噜噜| 久久精品成人| 欧美亚洲另类久久综合| 人妻无码αv中文字幕久久| 午夜精品久久久久久久无码| 国产高潮国产高潮久久久91| AV无码久久久久不卡蜜桃| 日韩人妻无码精品久久免费一 | 91久久香蕉国产熟女线看| 久久天堂AV综合合色蜜桃网| 最新久久免费视频| 久久伊人精品青青草原日本| 99久久国产免费福利| 久久最近最新中文字幕大全| 韩国无遮挡三级久久| 国产精品久久久久影院色| 久久发布国产伦子伦精品| 欧美丰满熟妇BBB久久久| 97久久国产综合精品女不卡| 99蜜桃臀久久久欧美精品网站| 亚洲国产精品成人久久蜜臀 | 中文字幕精品无码久久久久久3D日动漫| 久久99毛片免费观看不卡| 狠狠色丁香久久婷婷综| 国产精品久久久久久久午夜片|