• <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
            久久综合亚洲欧美成人| 久久精品国产一区二区电影| 久久无码专区国产精品发布| 久久精品人妻中文系列| 欧美777精品久久久久网| 久久播电影网| 成人国内精品久久久久影院| 国产精品99久久精品爆乳| 亚洲Av无码国产情品久久| 国内精品久久久久| 亚洲综合久久久| 国内精品免费久久影院| 性欧美丰满熟妇XXXX性久久久| 久久99精品综合国产首页| 少妇久久久久久久久久| 欧美粉嫩小泬久久久久久久| 69久久夜色精品国产69| 亚洲精品国产自在久久| 91精品观看91久久久久久| 国产成人精品白浆久久69| 免费精品国产日韩热久久| Xx性欧美肥妇精品久久久久久| 久久综合综合久久综合| 久久亚洲精品成人无码网站| 韩国三级中文字幕hd久久精品| 97精品依人久久久大香线蕉97| 思思久久99热免费精品6| 国产亚洲精久久久久久无码AV| 久久99精品久久久久婷婷| 一本久久a久久精品亚洲| 中文成人久久久久影院免费观看| 欧美精品福利视频一区二区三区久久久精品| 国内精品伊人久久久久av一坑 | 久久久久亚洲AV无码麻豆| 欧美色综合久久久久久| 久久天天日天天操综合伊人av| 久久国产精品波多野结衣AV| 精品久久久久久无码人妻蜜桃| 久久青青草原国产精品免费| 亚洲国产精品久久久久| 亚洲国产小视频精品久久久三级 |