Merge pull request #4933 from Chocobozzz/qt5
[Qt5] Fix log messages (lines and classname)
This commit is contained in:
commit
fc2e2aa193
|
@ -267,21 +267,21 @@ void DumpStackTrace() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QDebug CreateLoggerFatal() { return qCreateLogger(Fatal); }
|
QDebug CreateLoggerFatal(int line, const char *class_name) { return qCreateLogger(line, class_name, Fatal); }
|
||||||
QDebug CreateLoggerError() { return qCreateLogger(Error); }
|
QDebug CreateLoggerError(int line, const char *class_name) { return qCreateLogger(line, class_name, Error); }
|
||||||
|
|
||||||
#ifdef QT_NO_WARNING_OUTPUT
|
#ifdef QT_NO_WARNING_OUTPUT
|
||||||
QNoDebug CreateLoggerWarning() { return QNoDebug(); }
|
QNoDebug CreateLoggerWarning(int, const char*) { return QNoDebug(); }
|
||||||
#else
|
#else
|
||||||
QDebug CreateLoggerWarning() { return qCreateLogger(Warning); }
|
QDebug CreateLoggerWarning(int line, const char *class_name) { return qCreateLogger(line, class_name, Warning); }
|
||||||
#endif // QT_NO_WARNING_OUTPUT
|
#endif // QT_NO_WARNING_OUTPUT
|
||||||
|
|
||||||
#ifdef QT_NO_DEBUG_OUTPUT
|
#ifdef QT_NO_DEBUG_OUTPUT
|
||||||
QNoDebug CreateLoggerInfo() { return QNoDebug(); }
|
QNoDebug CreateLoggerInfo(int, const char*) { return QNoDebug(); }
|
||||||
QNoDebug CreateLoggerDebug() { return QNoDebug(); }
|
QNoDebug CreateLoggerDebug(int, const char*) { return QNoDebug(); }
|
||||||
#else
|
#else
|
||||||
QDebug CreateLoggerInfo() { return qCreateLogger(Info); }
|
QDebug CreateLoggerInfo(int line, const char *class_name) { return qCreateLogger(line, class_name, Info); }
|
||||||
QDebug CreateLoggerDebug() { return qCreateLogger(Debug); }
|
QDebug CreateLoggerDebug(int line, const char *class_name) { return qCreateLogger(line, class_name, Debug); }
|
||||||
#endif // QT_NO_DEBUG_OUTPUT
|
#endif // QT_NO_DEBUG_OUTPUT
|
||||||
|
|
||||||
} // namespace logging
|
} // namespace logging
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define qLog(level) \
|
#define qLog(level) \
|
||||||
logging::CreateLogger##level()
|
logging::CreateLogger##level(__LINE__, __PRETTY_FUNCTION__)
|
||||||
|
|
||||||
#define qCreateLogger(level) \
|
#define qCreateLogger(line, class_name, level) \
|
||||||
logging::CreateLogger(logging::Level_##level, \
|
logging::CreateLogger(logging::Level_##level, \
|
||||||
logging::ParsePrettyFunction(__PRETTY_FUNCTION__), \
|
logging::ParsePrettyFunction(class_name), \
|
||||||
__LINE__)
|
line)
|
||||||
|
|
||||||
#endif // QT_NO_DEBUG_STREAM
|
#endif // QT_NO_DEBUG_STREAM
|
||||||
|
|
||||||
|
@ -61,21 +61,21 @@ void DumpStackTrace();
|
||||||
QString ParsePrettyFunction(const char* pretty_function);
|
QString ParsePrettyFunction(const char* pretty_function);
|
||||||
QDebug CreateLogger(Level level, const QString& class_name, int line);
|
QDebug CreateLogger(Level level, const QString& class_name, int line);
|
||||||
|
|
||||||
QDebug CreateLoggerFatal();
|
QDebug CreateLoggerFatal(int line, const char* class_name);
|
||||||
QDebug CreateLoggerError();
|
QDebug CreateLoggerError(int line, const char* class_name);
|
||||||
|
|
||||||
#ifdef QT_NO_WARNING_OUTPUT
|
#ifdef QT_NO_WARNING_OUTPUT
|
||||||
QNoDebug CreateLoggerWarning();
|
QNoDebug CreateLoggerWarning(int, const char*);
|
||||||
#else
|
#else
|
||||||
QDebug CreateLoggerWarning();
|
QDebug CreateLoggerWarning(int line, const char* class_name);
|
||||||
#endif // QT_NO_WARNING_OUTPUT
|
#endif // QT_NO_WARNING_OUTPUT
|
||||||
|
|
||||||
#ifdef QT_NO_DEBUG_OUTPUT
|
#ifdef QT_NO_DEBUG_OUTPUT
|
||||||
QNoDebug CreateLoggerInfo();
|
QNoDebug CreateLoggerInfo(int, const char*);
|
||||||
QNoDebug CreateLoggerDebug();
|
QNoDebug CreateLoggerDebug(int, const char*);
|
||||||
#else
|
#else
|
||||||
QDebug CreateLoggerInfo();
|
QDebug CreateLoggerInfo(int line, const char* class_name);
|
||||||
QDebug CreateLoggerDebug();
|
QDebug CreateLoggerDebug(int line, const char* class_name);
|
||||||
#endif // QT_NO_DEBUG_OUTPUT
|
#endif // QT_NO_DEBUG_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -363,7 +363,7 @@ void SearchTermWidget::Overlay::Grab() {
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
// Take a "screenshot" of the window
|
// Take a "screenshot" of the window
|
||||||
QPixmap pixmap = QPixmap::grabWidget(parent_);
|
QPixmap pixmap = parent_->grab();
|
||||||
QImage image = pixmap.toImage();
|
QImage image = pixmap.toImage();
|
||||||
|
|
||||||
// Blur it
|
// Blur it
|
||||||
|
|
Loading…
Reference in New Issue