Sha256: 03329d46a880df42afce95e63111d6e79cf72aab4e64f36a146b111f395ee23d

Contents?: true

Size: 999 Bytes

Versions: 24

Compression:

Stored size: 999 Bytes

Contents

#include "IgnoreDebugOutput.h"

#include <QtGlobal>
#include <QString>
#include <stdio.h>

void debugIgnoringMessageHandler(QtMsgType type, const char *msg);

#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
  void debugIgnoringMessageHandlerQt5(QtMsgType type, const QMessageLogContext &context, const QString &message);
#endif

void debugIgnoringMessageHandler(QtMsgType type, const char *msg) {
  switch (type) {
    case QtDebugMsg:
    case QtWarningMsg:
      break;
    default:
      fprintf(stderr, "%s\n", msg);
      break;
  }
}

#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
  void debugIgnoringMessageHandlerQt5(QtMsgType type, const QMessageLogContext &context, const QString &message) {
    Q_UNUSED(context);
    debugIgnoringMessageHandler(type, message.toLocal8Bit().data());
  }
#endif

void ignoreDebugOutput(void) {
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
  qInstallMessageHandler(debugIgnoringMessageHandlerQt5);
#else
  qInstallMsgHandler(debugIgnoringMessageHandler);
#endif
}

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
capybara-webkit-1.15.1 src/IgnoreDebugOutput.cpp
capybara-webkit-1.15.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.14.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.13.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.12.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.11.1 src/IgnoreDebugOutput.cpp
capybara-webkit-1.11.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.10.1 src/IgnoreDebugOutput.cpp
capybara-webkit-1.10.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.9.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.8.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.7.1 src/IgnoreDebugOutput.cpp
capybara-webkit-1.7.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.6.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.5.2 src/IgnoreDebugOutput.cpp
capybara-webkit-1.5.1 src/IgnoreDebugOutput.cpp
capybara-webkit-1.5.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.4.1 src/IgnoreDebugOutput.cpp
capybara-webkit-1.4.0 src/IgnoreDebugOutput.cpp
capybara-webkit-1.3.1 src/IgnoreDebugOutput.cpp