From 260f1d6b5765311930b884044d94670770f87d33 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Mon, 3 Aug 2020 04:02:27 +0300 Subject: [PATCH] remove unused qErrnoWarning() functions Signed-off-by: Ivailo Monev --- src/core/global/qglobal.cpp | 29 ----------------------------- src/core/global/qglobal.h | 3 --- 2 files changed, 32 deletions(-) diff --git a/src/core/global/qglobal.cpp b/src/core/global/qglobal.cpp index 13b88656e..c072bf01e 100644 --- a/src/core/global/qglobal.cpp +++ b/src/core/global/qglobal.cpp @@ -1587,35 +1587,6 @@ void qCritical(const char *msg, ...) va_end(ap); } - -void qErrnoWarning(const char *msg, ...) -{ - // qt_error_string() will allocate anyway, so we don't have - // to be careful here (like we do in plain qWarning()) - QString buf; - va_list ap; - va_start(ap, msg); - if (Q_LIKELY(msg)) - buf.vsprintf(msg, ap); - va_end(ap); - - qCritical("%s (%s)", buf.toLocal8Bit().constData(), qt_error_string(-1).toLocal8Bit().constData()); -} - -void qErrnoWarning(int code, const char *msg, ...) -{ - // qt_error_string() will allocate anyway, so we don't have - // to be careful here (like we do in plain qWarning()) - QString buf; - va_list ap; - va_start(ap, msg); - if (Q_LIKELY(msg)) - buf.vsprintf(msg, ap); - va_end(ap); - - qCritical("%s (%s)", buf.toLocal8Bit().constData(), qt_error_string(code).toLocal8Bit().constData()); -} - /*! \relates diff --git a/src/core/global/qglobal.h b/src/core/global/qglobal.h index 671a66203..43cccaa55 100644 --- a/src/core/global/qglobal.h +++ b/src/core/global/qglobal.h @@ -603,9 +603,6 @@ Q_CORE_EXPORT void qFatal(const char *, ...) /* print fatal message and exit */ #endif ; -Q_CORE_EXPORT void qErrnoWarning(int code, const char *msg, ...); -Q_CORE_EXPORT void qErrnoWarning(const char *msg, ...); - Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int line); Q_CORE_EXPORT void qt_assert_x(const char *where, const char *what, const char *file, int line);