• <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小说| 亚洲午夜久久久影院伊人| 精品久久久久久成人AV| 久久久久18| 久久99精品国产麻豆宅宅 | 色欲综合久久躁天天躁| 久久精品国产乱子伦| 久久国产成人精品麻豆| 亚洲中文字幕无码久久2020 | 7国产欧美日韩综合天堂中文久久久久| 久久久99精品成人片中文字幕| 无码任你躁久久久久久老妇| 久久久久久九九99精品| 久久综合视频网站| 中文字幕亚洲综合久久| 久久久久99精品成人片试看 | 91精品国产乱码久久久久久| 人妻无码久久精品| 久久香蕉综合色一综合色88| 久久亚洲精品人成综合网| 亚洲欧洲精品成人久久奇米网 | 污污内射久久一区二区欧美日韩| 国产婷婷成人久久Av免费高清| 一本色综合网久久| 亚洲欧美日韩久久精品| 久久久亚洲精品蜜桃臀| 国产成人久久精品二区三区| 久久99国产精品99久久| 久久久噜噜噜久久熟女AA片| av色综合久久天堂av色综合在| 久久99精品久久久久久秒播| 精品久久久久久国产| 久久A级毛片免费观看| 久久综合精品国产二区无码| 精品久久久无码人妻中文字幕| 久久久www免费人成精品|