summaryrefslogtreecommitdiffstats
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:56:37 +0100
commit0e9efe6bf138bde6c512d65524c6a03df5efd3eb (patch)
treedbd038617e79a7da4e233aadfb721622966d69cb
parent1b74fac43d050443edfda2d2f9ef257855355ae0 (diff)
downloadqt3-0e9efe6bf138bde6c512d65524c6a03df5efd3eb.tar.gz
qt3-0e9efe6bf138bde6c512d65524c6a03df5efd3eb.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> (cherry picked from commit 300c4d2bd2c289d32565a3c2c84b36565241b71e)
-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 6fbbb94..d43e8d7 100644
--- a/src/tools/qglobal.cpp
+++ b/src/tools/qglobal.cpp
@@ -582,6 +582,11 @@ void warning( 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];
@@ -612,6 +617,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];
@@ -677,6 +687,11 @@ void fatal( 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 7d89a2e..47d3791 100644
--- a/src/tools/qglobal.h
+++ b/src/tools/qglobal.h
@@ -751,6 +751,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;
@@ -974,6 +975,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)))
@@ -981,13 +983,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)))