• <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 逛奔的蝸牛 閱讀(2867) 評論(0)  編輯 收藏 引用 所屬分類: Qt
            国产一区二区三区久久| 色8久久人人97超碰香蕉987| 久久久久久久尹人综合网亚洲| 97久久久精品综合88久久| 久久久不卡国产精品一区二区 | 亚洲AV无码1区2区久久| AV无码久久久久不卡网站下载 | 精品熟女少妇av免费久久| 99久久精品这里只有精品 | 久久精品中文字幕久久| 亚洲精品综合久久| 久久免费线看线看| 亚洲伊人久久大香线蕉综合图片| 色综合久久最新中文字幕| 国内精品综合久久久40p| 久久av免费天堂小草播放| 久久婷婷国产综合精品| 无码任你躁久久久久久| 九九热久久免费视频| 99久久久精品| 久久综合给合久久狠狠狠97色69 | 99re久久精品国产首页2020| 一本色道久久综合狠狠躁篇| 精品久久久久久无码人妻热| 久久久精品一区二区三区| 麻豆AV一区二区三区久久| 伊人色综合久久天天人手人婷| 久久久久久久国产免费看| 秋霞久久国产精品电影院| 97久久综合精品久久久综合| 久久精品国产亚洲AV香蕉| 午夜人妻久久久久久久久| 亚洲精品无码久久久久去q| 国产激情久久久久影院小草| 久久99精品国产麻豆| 999久久久免费精品国产| 97久久香蕉国产线看观看| 国产精品久久影院| 99久久国产主播综合精品| 国产免费久久久久久无码| 欧美日韩精品久久久免费观看|