• <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
            亚洲一区二区三区日本久久九| 国内精品综合久久久40p| 久久AV高清无码| 久久天堂电影网| 久久91精品国产91久| 99久久无色码中文字幕人妻| 精品久久久久久无码中文字幕一区| 国产精品99久久精品| 性做久久久久久久久| 精品国际久久久久999波多野| 精品久久久无码中文字幕天天| 中文成人久久久久影院免费观看| 午夜精品久久久久久中宇| 91久久香蕉国产熟女线看| 大香伊人久久精品一区二区| 青青青青久久精品国产| 久久久久99精品成人片直播| 无码人妻少妇久久中文字幕| 国产精品天天影视久久综合网| 久久亚洲AV成人无码软件| 成人精品一区二区久久久| 久久久久亚洲AV无码专区体验 | 国色天香久久久久久久小说| 伊人丁香狠狠色综合久久| 亚洲中文字幕无码久久综合网| 久久久久黑人强伦姧人妻| 亚洲天堂久久精品| 精品久久无码中文字幕| 久久99国产乱子伦精品免费| 久久精品久久久久观看99水蜜桃| 国产免费福利体检区久久| 久久国产精品成人免费| 久久久久AV综合网成人| 久久久久人妻一区精品性色av| 久久婷婷五月综合国产尤物app| 日韩AV毛片精品久久久| 久久精品国产精品亚洲下载| 久久AⅤ人妻少妇嫩草影院| 成人a毛片久久免费播放| 久久精品国产国产精品四凭| 久久国产精品免费|