• <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
            久久亚洲国产欧洲精品一| 精品久久久久久无码专区| 久久久久人妻一区精品 | 亚洲色婷婷综合久久| 久久久久成人精品无码中文字幕| 日本精品久久久久中文字幕8| 亚洲狠狠综合久久| 久久99精品久久久久久hb无码| 色综合久久精品中文字幕首页 | 久久人人爽人人澡人人高潮AV | 精品久久久久久国产| 久久99久久无码毛片一区二区| 九九精品99久久久香蕉| 久久夜色撩人精品国产| 久久精品无码专区免费青青| 久久国产成人午夜aⅴ影院| 亚洲中文字幕久久精品无码APP | 久久久精品国产Sm最大网站| 奇米综合四色77777久久| 久久婷婷人人澡人人爽人人爱| 久久精品免费观看| 青草影院天堂男人久久| 久久受www免费人成_看片中文| 亚洲国产高清精品线久久| 午夜福利91久久福利| 亚洲精品国精品久久99热| 伊人丁香狠狠色综合久久| 无码专区久久综合久中文字幕| 久久无码人妻一区二区三区| 婷婷久久综合九色综合绿巨人| 99久久国产免费福利| 国产精品久久久久久久久鸭| 伊人久久综在合线亚洲2019| 日日噜噜夜夜狠狠久久丁香五月| 国产成人精品三上悠亚久久| 久久香综合精品久久伊人| 久久婷婷五月综合97色| 777午夜精品久久av蜜臀| 久久国产色av免费看| 国产A三级久久精品| 蜜臀av性久久久久蜜臀aⅴ麻豆|