Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- src/corelib/global/global.pri
- +++ src/corelib/global/global.pri
- @@ -44,6 +44,10 @@ if(linux*|hurd*):!cross_compile:!static:!*-armcc* {
- DEFINES += ELF_INTERPRETER=\\\"$$system(LC_ALL=C readelf -l /bin/ls | perl -n -e \'$$prog\')\\\"
- }
- +debug_buffer {
- + DEFINES += QT_USE_DEBUG_BUFFER
- +}
- +
- slog2 {
- LIBS_PRIVATE += -lslog2
- DEFINES += QT_USE_SLOG2
- --- src/corelib/global/qlogging.cpp
- +++ src/corelib/global/qlogging.cpp
- @@ -1499,7 +1499,7 @@ static void qDefaultMessageHandler(QtMsgType type, const QMessageLogContext &con
- return;
- if (!qt_logging_to_console()) {
- -#if defined(Q_OS_WIN)
- +#if defined(QT_USE_DEBUG_BUFFER)
- logMessage.append(QLatin1Char('\n'));
- OutputDebugString(reinterpret_cast<const wchar_t *>(logMessage.utf16()));
- return;
- --- tools/configure/configureapp.cpp
- +++ tools/configure/configureapp.cpp
- @@ -185,7 +185,8 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
- dictionary[ "QT_EVENTFD" ] = "auto";
- dictionary[ "QT_CUPS" ] = "auto";
- dictionary[ "CFG_GCC_SYSROOT" ] = "yes";
- - dictionary[ "SLOG2" ] = "no";
- + dictionary[ "LOGGING_BACKEND" ] = "debug buffer";
- + dictionary["OBSOLETE_LOGGING_BACKEND_ARG"] = "no";
- dictionary[ "QNX_IMF" ] = "no";
- dictionary[ "PPS" ] = "no";
- dictionary[ "LGMON" ] = "no";
- @@ -935,9 +936,11 @@ void Configure::parseCmdLine()
- } else if (configCmdLine.at(i) == "-plugin-manifests") {
- dictionary[ "PLUGIN_MANIFESTS" ] = "yes";
- } else if (configCmdLine.at(i) == "-no-slog2") {
- - dictionary[ "SLOG2" ] = "no";
- + dictionary[ "OBSOLETE_LOGGING_BACKEND_ARG" ] = "-no-slog2";
- + dictionary[ "LOGGING_BACKEND" ] = "stderr";
- } else if (configCmdLine.at(i) == "-slog2") {
- - dictionary[ "SLOG2" ] = "yes";
- + dictionary[ "OBSOLETE_LOGGING_BACKEND_ARG" ] = "slog2";
- + dictionary[ "LOGGING_BACKEND" ] = "slog2";
- } else if (configCmdLine.at(i) == "-no-imf") {
- dictionary[ "QNX_IMF" ] = "no";
- } else if (configCmdLine.at(i) == "-imf") {
- @@ -1385,6 +1388,13 @@ void Configure::parseCmdLine()
- dictionary[ "ANDROID_STYLE_ASSETS" ] = "yes";
- }
- + else if (configCmdLine.at(i) == "-logging-backend") {
- + i++;
- + if (i == argCount)
- + break;
- + dictionary[ "LOGGING_BACKEND" ] = configCmdLine.at(i);
- + }
- +
- else {
- dictionary[ "DONE" ] = "error";
- cout << "Unknown option " << configCmdLine.at(i) << endl;
- @@ -1734,8 +1744,8 @@ void Configure::applySpecSpecifics()
- dictionary["DECORATIONS"] = "default windows styled";
- } else if ((platform() == QNX) || (platform() == BLACKBERRY)) {
- + dictionary["LOGGING_BACKEND"] = "slog2";
- dictionary["STACK_PROTECTOR_STRONG"] = "auto";
- - dictionary["SLOG2"] = "auto";
- dictionary["QNX_IMF"] = "auto";
- dictionary["PPS"] = "auto";
- dictionary["LGMON"] = "auto";
- @@ -1976,9 +1986,12 @@ bool Configure::displayHelp()
- "by setting the QT_HARFBUZZ environment variable to \"old\".\n"
- "See http://www.harfbuzz.org\n");
- + desc( "-logging-backend <type>",
- + qPrintable(QStringLiteral("Send logging output to backend <type>.\n"
- + "Valid values are: debug buffer, slog2, stderr\n"
- + "(Default: %1)\n").arg(dictionary[ "LOGGING_BACKEND"])));
- +
- if ((platform() == QNX) || (platform() == BLACKBERRY)) {
- - desc("SLOG2", "yes", "-slog2", "Compile with slog2 support.");
- - desc("SLOG2", "no", "-no-slog2", "Do not compile with slog2 support.");
- desc("QNX_IMF", "yes", "-imf", "Compile with imf support.");
- desc("QNX_IMF", "no", "-no-imf", "Do not compile with imf support.");
- desc("PPS", "yes", "-pps", "Compile with PPS support.");
- @@ -2550,10 +2563,6 @@ void Configure::autoDetection()
- if (dictionary["STACK_PROTECTOR_STRONG"] == "auto")
- dictionary["STACK_PROTECTOR_STRONG"] = checkAvailability("STACK_PROTECTOR_STRONG") ? "yes" : "no";
- - if ((platform() == QNX || platform() == BLACKBERRY) && dictionary["SLOG2"] == "auto") {
- - dictionary["SLOG2"] = checkAvailability("SLOG2") ? "yes" : "no";
- - }
- -
- if ((platform() == QNX || platform() == BLACKBERRY) && dictionary["QNX_IMF"] == "auto") {
- dictionary["QNX_IMF"] = checkAvailability("QNX_IMF") ? "yes" : "no";
- }
- @@ -2706,6 +2715,13 @@ bool Configure::verifyConfiguration()
- }
- }
- + if (dictionary["LOGGING_BACKEND"] == "slog2") {
- + if (!checkAvailability("SLOG2")) {
- + cout << "ERROR: slog2 is not available." << endl;
- + dictionary[ "DONE" ] = "error";
- + }
- + }
- +
- if (prompt)
- promptKeyPress();
- @@ -3509,7 +3525,9 @@ void Configure::generateQConfigPri()
- if (dictionary["CROSS_COMPILE"] == "yes")
- configStream << " cross_compile";
- - if (dictionary[ "SLOG2" ] == "yes")
- + if (dictionary[ "LOGGING_BACKEND" ] == "debug buffer")
- + configStream << " debug_buffer";
- + else if (dictionary[ "LOGGING_BACKEND" ] == "slog2")
- configStream << " slog2";
- if (dictionary[ "QNX_IMF" ] == "yes")
- @@ -3872,6 +3890,7 @@ void Configure::displayConfig()
- sout << "QML debugging..............." << dictionary[ "QML_DEBUG" ] << endl;
- sout << "DirectWrite support........." << dictionary[ "DIRECTWRITE" ] << endl;
- sout << "Use system proxies.........." << dictionary[ "SYSTEM_PROXIES" ] << endl;
- + sout << "Logging backend............." << dictionary[ "LOGGING_BACKEND" ] << endl;
- sout << endl;
- sout << "QPA Backends:" << endl;
- @@ -3890,7 +3909,6 @@ void Configure::displayConfig()
- sout << " PCRE support............" << dictionary[ "PCRE" ] << endl;
- sout << " ICU support............." << dictionary[ "ICU" ] << endl;
- if ((platform() == QNX) || (platform() == BLACKBERRY)) {
- - sout << " SLOG2 support..........." << dictionary[ "SLOG2" ] << endl;
- sout << " IMF support............." << dictionary[ "QNX_IMF" ] << endl;
- sout << " PPS support............." << dictionary[ "PPS" ] << endl;
- sout << " LGMON support..........." << dictionary[ "LGMON" ] << endl;
- @@ -4005,6 +4023,11 @@ void Configure::displayConfig()
- << "will be the same unless you are cross-compiling)." << endl
- << endl;
- }
- + if (dictionary["OBSOLETE_LOGGING_BACKEND_ARG"] != "no") {
- + sout << endl
- + << "NOTE: The " << dictionary["OBSOLETE_LOGGING_BACKEND_ARG"] << " option is obsolete. Use -logging-backend." << endl
- + << endl;
- + }
- if (!dictionary["PREFIX_COMPLAINTS"].isEmpty()) {
- sout << endl
- << dictionary["PREFIX_COMPLAINTS"] << endl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement