summaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-09-05 11:02:47 +0900
committerSlávek Banko <slavek.banko@axis.cz>2021-12-30 16:26:35 +0100
commit300c4d2bd2c289d32565a3c2c84b36565241b71e (patch)
treea0e4566353a92b17b3cdbe0b6c1d962474b5aa70 /src/tools
parente406862ceaa185c6f8e475b6985a539ffd9b9b35 (diff)
downloadqt3-300c4d2bd2c289d32565a3c2c84b36565241b71e.tar.gz
qt3-300c4d2bd2c289d32565a3c2c84b36565241b71e.zip
Added tqDebug/tqWarning/tqFatal functions that takes a QCString
argument. This fixes FTBFS of examples caused by previous ambiguous call and solves bug 3021. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/qglobal.cpp15
-rw-r--r--src/tools/qglobal.h6
2 files changed, 20 insertions, 1 deletions
diff --git a/src/tools/qglobal.cpp b/src/tools/qglobal.cpp
index 0720890..6d3d7e4 100644
--- a/src/tools/qglobal.cpp
+++ b/src/tools/qglobal.cpp
@@ -528,6 +528,11 @@ void qDebug( const char *msg, ... )
handle_buffer(buf, QtDebugMsg);
}
+void qDebug( const QCString &s )
+{
+ qDebug(s.data());
+}
+
void qWarning( const QString &msg )
{
char buf[QT_BUFFER_LENGTH];
@@ -558,6 +563,11 @@ void qWarning( const char *msg, ... )
handle_buffer(buf, QtWarningMsg);
}
+void qWarning( const QCString &s )
+{
+ qWarning(s.data());
+}
+
void qFatal( const QString &msg )
{
char buf[QT_BUFFER_LENGTH];
@@ -588,6 +598,11 @@ void qFatal( const char *msg, ... )
handle_buffer(buf, QtFatalMsg);
}
+void qFatal( const QCString &s )
+{
+ qWarning(s.data());
+}
+
/*!
\relates QApplication
diff --git a/src/tools/qglobal.h b/src/tools/qglobal.h
index 6046029..a0e75ab 100644
--- a/src/tools/qglobal.h
+++ b/src/tools/qglobal.h
@@ -741,6 +741,7 @@ typedef Q_UINT64 Q_ULLONG; // unsigned long long
// Data stream functions is provided by many classes (defined in qdatastream.h)
//
+class QCString;
class QDataStream;
class QString;
@@ -958,6 +959,7 @@ Q_EXPORT int qWinVersion();
Q_EXPORT void qDebug( const QString& ); // print debug message
+Q_EXPORT void qDebug( const QCString& ); // print debug message
Q_EXPORT void qDebug( const char *, ... ) // print debug message
#if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
@@ -965,13 +967,15 @@ Q_EXPORT void qDebug( const char *, ... ) // print debug message
;
Q_EXPORT void qWarning( const QString& ); // print warning message
+Q_EXPORT void qWarning( const QCString& ); // print warning message
Q_EXPORT void qWarning( const char *, ... ) // print warning message
#if defined(Q_CC_GNU) && !defined(__INSURE__)
__attribute__ ((format (printf, 1, 2)))
#endif
;
-Q_EXPORT void qFatal( const QString& ); // print fatal message and exit
+Q_EXPORT void qFatal( const QString& ); // print fatal message and exit
+Q_EXPORT void qFatal( const QCString& ); // print fatal message and exit
Q_EXPORT void qFatal( const char *, ... ) // print fatal message and exit
#if defined(Q_CC_GNU)
__attribute__ ((format (printf, 1, 2)))