• <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
            亚洲成色WWW久久网站| 四虎久久影院| 伊人久久免费视频| 国产免费福利体检区久久 | 久久久精品日本一区二区三区| 亚洲国产二区三区久久| 国产三级精品久久| 精品久久久噜噜噜久久久| 久久久精品国产亚洲成人满18免费网站| 亚洲国产一成久久精品国产成人综合| 一日本道伊人久久综合影| 久久精品国产亚洲沈樵| 99精品国产99久久久久久97| 国产精品久久久久一区二区三区 | 久久精品国产亚洲AV无码娇色| 国产L精品国产亚洲区久久| 久久久国产精品网站| 久久久久99精品成人片直播| 亚洲欧美伊人久久综合一区二区| 国产午夜福利精品久久| 国产福利电影一区二区三区,免费久久久久久久精 | 狠狠色婷婷久久一区二区| 中文字幕精品无码久久久久久3D日动漫| 久久精品中文无码资源站| www性久久久com| 久久夜色精品国产亚洲av| 亚洲精品WWW久久久久久| 久久久久久久久久免免费精品| 久久e热在这里只有国产中文精品99| 精品久久久久久亚洲精品| 国产69精品久久久久99| 久久这里只有精品视频99| 久久国产精品99国产精| 久久综合成人网| 99久久er这里只有精品18| 国产精品伦理久久久久久| 亚洲国产精品无码成人片久久| 久久久久久九九99精品| 久久婷婷五月综合成人D啪| 国产免费久久精品99久久| 97r久久精品国产99国产精|