mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
drop compile-time options to disable debug and warning output
such type of messages can still be filtered by installing message handler Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
523b62b6df
commit
3545b69f28
7 changed files with 56 additions and 108 deletions
|
@ -633,7 +633,6 @@ katie_generate_obsolete(QMutableStringListIterator QtCore qstringlist.h)
|
||||||
katie_generate_obsolete(QMutableVectorIterator QtCore qvector.h)
|
katie_generate_obsolete(QMutableVectorIterator QtCore qvector.h)
|
||||||
katie_generate_obsolete(QMutexLocker QtCore qmutex.h)
|
katie_generate_obsolete(QMutexLocker QtCore qmutex.h)
|
||||||
katie_generate_obsolete(QNetworkAddressEntry QtNetwork qnetworkinterface.h)
|
katie_generate_obsolete(QNetworkAddressEntry QtNetwork qnetworkinterface.h)
|
||||||
katie_generate_obsolete(QNoDebug QtCore qdebug.h)
|
|
||||||
katie_generate_obsolete(QObjectData QtCore qobject.h)
|
katie_generate_obsolete(QObjectData QtCore qobject.h)
|
||||||
katie_generate_obsolete(QObjectList QtCore qobject.h)
|
katie_generate_obsolete(QObjectList QtCore qobject.h)
|
||||||
katie_generate_obsolete(QPaintEngineState QtGui qpaintengine.h)
|
katie_generate_obsolete(QPaintEngineState QtGui qpaintengine.h)
|
||||||
|
|
|
@ -91,7 +91,6 @@ include/katie/QtCore/QMutableStringListIterator
|
||||||
include/katie/QtCore/QMutableVectorIterator
|
include/katie/QtCore/QMutableVectorIterator
|
||||||
include/katie/QtCore/QMutex
|
include/katie/QtCore/QMutex
|
||||||
include/katie/QtCore/QMutexLocker
|
include/katie/QtCore/QMutexLocker
|
||||||
include/katie/QtCore/QNoDebug
|
|
||||||
include/katie/QtCore/QObject
|
include/katie/QtCore/QObject
|
||||||
include/katie/QtCore/QObjectCleanupHandler
|
include/katie/QtCore/QObjectCleanupHandler
|
||||||
include/katie/QtCore/QObjectData
|
include/katie/QtCore/QObjectData
|
||||||
|
|
|
@ -54,7 +54,6 @@ incmap = {
|
||||||
'QMutableStringListIterator': 'qstringlist.h',
|
'QMutableStringListIterator': 'qstringlist.h',
|
||||||
'QMutableVectorIterator': 'qvector.h',
|
'QMutableVectorIterator': 'qvector.h',
|
||||||
'QMutexLocker': 'qmutex.h',
|
'QMutexLocker': 'qmutex.h',
|
||||||
'QNoDebug': 'qdebug.h',
|
|
||||||
'QObjectData': 'qobject.h',
|
'QObjectData': 'qobject.h',
|
||||||
'QObjectList': 'qobject.h',
|
'QObjectList': 'qobject.h',
|
||||||
'QPersistentModelIndex': 'qabstractitemmodel.h',
|
'QPersistentModelIndex': 'qabstractitemmodel.h',
|
||||||
|
|
|
@ -391,7 +391,6 @@ classlist = [
|
||||||
"QNetworkInterface",
|
"QNetworkInterface",
|
||||||
"QNetworkReply",
|
"QNetworkReply",
|
||||||
"QNetworkRequest",
|
"QNetworkRequest",
|
||||||
"QNoDebug",
|
|
||||||
"QObject",
|
"QObject",
|
||||||
"QObjectCleanupHandler",
|
"QObjectCleanupHandler",
|
||||||
"QObjectData",
|
"QObjectData",
|
||||||
|
|
|
@ -155,7 +155,6 @@
|
||||||
// #cmakedefine QT_NO_UNDOSTACK
|
// #cmakedefine QT_NO_UNDOSTACK
|
||||||
// #cmakedefine QT_NO_VALIDATOR
|
// #cmakedefine QT_NO_VALIDATOR
|
||||||
// #cmakedefine QT_NO_VECTOR4D
|
// #cmakedefine QT_NO_VECTOR4D
|
||||||
// #cmakedefine QT_NO_WARNING_OUTPUT
|
|
||||||
// #cmakedefine QT_NO_WIZARD
|
// #cmakedefine QT_NO_WIZARD
|
||||||
// #cmakedefine QT_NO_XMLSTREAM
|
// #cmakedefine QT_NO_XMLSTREAM
|
||||||
// #cmakedefine QT_NO_XMLSTREAMREADER
|
// #cmakedefine QT_NO_XMLSTREAMREADER
|
||||||
|
|
|
@ -80,7 +80,7 @@ QT_BEGIN_NAMESPACE
|
||||||
\ingroup tools
|
\ingroup tools
|
||||||
|
|
||||||
The QFlags<Enum> class is a template class, where Enum is an enum
|
The QFlags<Enum> class is a template class, where Enum is an enum
|
||||||
type. QFlags is used throughout Qt for storing combinations of
|
type. QFlags is used throughout Katie for storing combinations of
|
||||||
enum values.
|
enum values.
|
||||||
|
|
||||||
The traditional C++ approach for storing OR-combinations of enum
|
The traditional C++ approach for storing OR-combinations of enum
|
||||||
|
@ -89,7 +89,7 @@ QT_BEGIN_NAMESPACE
|
||||||
enum value can be OR'd with any other enum value and passed on to
|
enum value can be OR'd with any other enum value and passed on to
|
||||||
a function that takes an \c int or \c uint.
|
a function that takes an \c int or \c uint.
|
||||||
|
|
||||||
Qt uses QFlags to provide type safety. For example, the
|
Katie uses QFlags to provide type safety. For example, the
|
||||||
Qt::Alignment type is simply a typedef for
|
Qt::Alignment type is simply a typedef for
|
||||||
QFlags<Qt::AlignmentFlag>. QLabel::setAlignment() takes a
|
QFlags<Qt::AlignmentFlag>. QLabel::setAlignment() takes a
|
||||||
Qt::Alignment parameter, which means that any combination of
|
Qt::Alignment parameter, which means that any combination of
|
||||||
|
@ -115,7 +115,7 @@ QT_BEGIN_NAMESPACE
|
||||||
\section1 Flags and the Meta-Object System
|
\section1 Flags and the Meta-Object System
|
||||||
|
|
||||||
The Q_DECLARE_FLAGS() macro does not expose the flags to the meta-object
|
The Q_DECLARE_FLAGS() macro does not expose the flags to the meta-object
|
||||||
system, so they cannot be used by Qt Script or edited in Katie Designer.
|
system, so they cannot be used by Katie Script or edited in Katie Designer.
|
||||||
To make the flags available for these purposes, the Q_FLAGS() macro must
|
To make the flags available for these purposes, the Q_FLAGS() macro must
|
||||||
be used:
|
be used:
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ QT_BEGIN_NAMESPACE
|
||||||
to do), your compiler will thoughtfully create it for you. You must
|
to do), your compiler will thoughtfully create it for you. You must
|
||||||
do more.
|
do more.
|
||||||
|
|
||||||
The curious user will have seen that the Qt classes derived
|
The curious user will have seen that the Katie classes derived
|
||||||
from QObject typically include this macro in a private section:
|
from QObject typically include this macro in a private section:
|
||||||
|
|
||||||
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 43
|
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 43
|
||||||
|
@ -375,19 +375,19 @@ QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\headerfile <QtGlobal>
|
\headerfile <QtGlobal>
|
||||||
\title Global Qt Declarations
|
\title Global Katie Declarations
|
||||||
\ingroup funclists
|
\ingroup funclists
|
||||||
|
|
||||||
\brief The <QtGlobal> header file includes the fundamental global
|
\brief The <QtGlobal> header file includes the fundamental global
|
||||||
declarations. It is included by most other Qt header files.
|
declarations. It is included by most other Katie header files.
|
||||||
|
|
||||||
The global declarations include \l{types}, \l{functions} and
|
The global declarations include \l{types}, \l{functions} and
|
||||||
\l{macros}.
|
\l{macros}.
|
||||||
|
|
||||||
The type definitions are partly convenience definitions for basic
|
The type definitions are partly convenience definitions for basic
|
||||||
types (some of which guarantee certain bit-sizes on all platforms
|
types (some of which guarantee certain bit-sizes on all platforms
|
||||||
supported by Qt), partly types related to Qt message handling. The
|
supported by Katie), partly types related to Katie message handling. The
|
||||||
functions are related to generating messages, Qt version handling
|
functions are related to generating messages, Katie version handling
|
||||||
and comparing and adjusting object values. And finally, some of
|
and comparing and adjusting object values. And finally, some of
|
||||||
the declared macros enable programmers to add compiler or platform
|
the declared macros enable programmers to add compiler or platform
|
||||||
specific code to their applications, while others are convenience
|
specific code to their applications, while others are convenience
|
||||||
|
@ -396,11 +396,11 @@ QT_BEGIN_NAMESPACE
|
||||||
\section1 Types
|
\section1 Types
|
||||||
|
|
||||||
The header file declares several type definitions that guarantee a
|
The header file declares several type definitions that guarantee a
|
||||||
specified bit-size on all platforms supported by Qt for various
|
specified bit-size on all platforms supported by Katie for various
|
||||||
basic types, for example \l qint8 which is a signed char
|
basic types, for example \l qint8 which is a signed char
|
||||||
guaranteed to be 8-bit on all platforms supported by Qt. The
|
guaranteed to be 8-bit on all platforms supported by Katie. The
|
||||||
header file also declares the \l qlonglong type definition for \c
|
header file also declares the \l qlonglong type definition for \c
|
||||||
{long long int } (\c __int64 on Windows).
|
{long long int }.
|
||||||
|
|
||||||
Several convenience type definitions are declared: \l qreal for \c
|
Several convenience type definitions are declared: \l qreal for \c
|
||||||
double, \l uchar for \c unsigned char, \l uint for \c unsigned
|
double, \l uchar for \c unsigned char, \l uint for \c unsigned
|
||||||
|
@ -408,7 +408,7 @@ QT_BEGIN_NAMESPACE
|
||||||
short.
|
short.
|
||||||
|
|
||||||
Finally, the QtMsgType definition identifies the various messages
|
Finally, the QtMsgType definition identifies the various messages
|
||||||
that can be generated and sent to a Qt message handler;
|
that can be generated and sent to a Katie message handler;
|
||||||
QtMsgHandler is a type definition for a pointer to a function with
|
QtMsgHandler is a type definition for a pointer to a function with
|
||||||
the signature \c {void myMsgHandler(QtMsgType, const char *)}.
|
the signature \c {void myMsgHandler(QtMsgType, const char *)}.
|
||||||
|
|
||||||
|
@ -439,7 +439,7 @@ QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
qInstallMsgHandler() function which installs the given
|
qInstallMsgHandler() function which installs the given
|
||||||
QtMsgHandler, and the qVersion() function which returns the
|
QtMsgHandler, and the qVersion() function which returns the
|
||||||
version number of Qt at run-time as a string.
|
version number of Katie at run-time as a string.
|
||||||
|
|
||||||
\section1 Macros
|
\section1 Macros
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ QT_BEGIN_NAMESPACE
|
||||||
i.e. translation without changing the stored source text. The
|
i.e. translation without changing the stored source text. The
|
||||||
Q_ASSERT() and Q_ASSERT_X() enables warning messages of various
|
Q_ASSERT() and Q_ASSERT_X() enables warning messages of various
|
||||||
level of refinement. The Q_FOREACH() and foreach() macros
|
level of refinement. The Q_FOREACH() and foreach() macros
|
||||||
implement Qt's foreach loop.
|
implement Katie's foreach loop.
|
||||||
|
|
||||||
The Q_INT64_C() and Q_UINT64_C() macros wrap signed and unsigned
|
The Q_INT64_C() and Q_UINT64_C() macros wrap signed and unsigned
|
||||||
64-bit integer literals in a platform-independent way. The
|
64-bit integer literals in a platform-independent way. The
|
||||||
|
@ -472,7 +472,7 @@ QT_BEGIN_NAMESPACE
|
||||||
Finally, the QT_POINTER_SIZE macro expands to the size of a
|
Finally, the QT_POINTER_SIZE macro expands to the size of a
|
||||||
pointer in bytes, and the QT_VERSION and QT_VERSION_STR macros
|
pointer in bytes, and the QT_VERSION and QT_VERSION_STR macros
|
||||||
expand to a numeric value or a string, respectively, specifying
|
expand to a numeric value or a string, respectively, specifying
|
||||||
Qt's version number, i.e the version the application is compiled
|
Katie's version number, i.e the version the application is compiled
|
||||||
against.
|
against.
|
||||||
|
|
||||||
\sa <QtAlgorithms>
|
\sa <QtAlgorithms>
|
||||||
|
@ -516,7 +516,7 @@ QT_BEGIN_NAMESPACE
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Typedef for \c{signed char}. This type is guaranteed to be 8-bit
|
Typedef for \c{signed char}. This type is guaranteed to be 8-bit
|
||||||
on all platforms supported by Qt.
|
on all platforms supported by Katie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -524,14 +524,14 @@ QT_BEGIN_NAMESPACE
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Typedef for \c{unsigned char}. This type is guaranteed to
|
Typedef for \c{unsigned char}. This type is guaranteed to
|
||||||
be 8-bit on all platforms supported by Qt.
|
be 8-bit on all platforms supported by Katie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \typedef qint16
|
/*! \typedef qint16
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Typedef for \c{signed short}. This type is guaranteed to be
|
Typedef for \c{signed short}. This type is guaranteed to be
|
||||||
16-bit on all platforms supported by Qt.
|
16-bit on all platforms supported by Katie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -539,14 +539,14 @@ QT_BEGIN_NAMESPACE
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Typedef for \c{unsigned short}. This type is guaranteed to
|
Typedef for \c{unsigned short}. This type is guaranteed to
|
||||||
be 16-bit on all platforms supported by Qt.
|
be 16-bit on all platforms supported by Katie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \typedef qint32
|
/*! \typedef qint32
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Typedef for \c{signed int}. This type is guaranteed to be 32-bit
|
Typedef for \c{signed int}. This type is guaranteed to be 32-bit
|
||||||
on all platforms supported by Qt.
|
on all platforms supported by Katie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -554,14 +554,14 @@ QT_BEGIN_NAMESPACE
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Typedef for \c{unsigned int}. This type is guaranteed to
|
Typedef for \c{unsigned int}. This type is guaranteed to
|
||||||
be 32-bit on all platforms supported by Qt.
|
be 32-bit on all platforms supported by Katie.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \typedef qint64
|
/*! \typedef qint64
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Typedef for \c{long long int} (\c __int64 on Windows). This type
|
Typedef for \c{long long int}. This type is guaranteed to be
|
||||||
is guaranteed to be 64-bit on all platforms supported by Qt.
|
64-bit on all platforms supported by Katie.
|
||||||
|
|
||||||
Literals of this type can be created using the Q_INT64_C() macro:
|
Literals of this type can be created using the Q_INT64_C() macro:
|
||||||
|
|
||||||
|
@ -576,7 +576,7 @@ QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
Typedef for \c{unsigned long long int} (\c{unsigned __int64} on
|
Typedef for \c{unsigned long long int} (\c{unsigned __int64} on
|
||||||
Windows). This type is guaranteed to be 64-bit on all platforms
|
Windows). This type is guaranteed to be 64-bit on all platforms
|
||||||
supported by Qt.
|
supported by Katie.
|
||||||
|
|
||||||
Literals of this type can be created using the Q_UINT64_C()
|
Literals of this type can be created using the Q_UINT64_C()
|
||||||
macro:
|
macro:
|
||||||
|
@ -594,8 +594,8 @@ QT_BEGIN_NAMESPACE
|
||||||
etc.).
|
etc.).
|
||||||
|
|
||||||
Typedef for either quint32 or quint64. This type is guaranteed to
|
Typedef for either quint32 or quint64. This type is guaranteed to
|
||||||
be the same size as a pointer on all platforms supported by Qt. On
|
be the same size as a pointer on all platforms supported by Katie.
|
||||||
a system with 32-bit pointers, quintptr is a typedef for quint32;
|
On a system with 32-bit pointers, quintptr is a typedef for quint32;
|
||||||
on a system with 64-bit pointers, quintptr is a typedef for
|
on a system with 64-bit pointers, quintptr is a typedef for
|
||||||
quint64.
|
quint64.
|
||||||
|
|
||||||
|
@ -611,7 +611,7 @@ QT_BEGIN_NAMESPACE
|
||||||
Integral type for representing pointer differences.
|
Integral type for representing pointer differences.
|
||||||
|
|
||||||
Typedef for either qint32 or qint64. This type is guaranteed to be
|
Typedef for either qint32 or qint64. This type is guaranteed to be
|
||||||
the same size as a pointer on all platforms supported by Qt. On a
|
the same size as a pointer on all platforms supported by Katie. On a
|
||||||
system with 32-bit pointers, quintptr is a typedef for quint32; on
|
system with 32-bit pointers, quintptr is a typedef for quint32; on
|
||||||
a system with 64-bit pointers, quintptr is a typedef for quint64.
|
a system with 64-bit pointers, quintptr is a typedef for quint64.
|
||||||
|
|
||||||
|
@ -763,11 +763,11 @@ QT_BEGIN_NAMESPACE
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
This macro expands a numeric value of the form 0xMMNNPP (MM =
|
This macro expands a numeric value of the form 0xMMNNPP (MM =
|
||||||
major, NN = minor, PP = patch) that specifies Qt's version
|
major, NN = minor, PP = patch) that specifies Katie's version
|
||||||
number. For example, if you compile your application against Qt
|
number. For example, if you compile your application against Qt
|
||||||
4.1.2, the QT_VERSION macro will expand to 0x040102.
|
4.1.2, the QT_VERSION macro will expand to 0x040102.
|
||||||
|
|
||||||
You can use QT_VERSION to use the latest Qt features where
|
You can use QT_VERSION to use the latest Katie features where
|
||||||
available.
|
available.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
@ -781,7 +781,7 @@ QT_BEGIN_NAMESPACE
|
||||||
\macro QT_VERSION_STR
|
\macro QT_VERSION_STR
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
This macro expands to a string that specifies Qt's version number
|
This macro expands to a string that specifies Katie's version number
|
||||||
(for example, "4.1.2"). This is the version against which the
|
(for example, "4.1.2"). This is the version against which the
|
||||||
application is compiled.
|
application is compiled.
|
||||||
|
|
||||||
|
@ -791,7 +791,7 @@ QT_BEGIN_NAMESPACE
|
||||||
/*!
|
/*!
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Returns the version number of Qt at run-time as a string (for
|
Returns the version number of Katie at run-time as a string (for
|
||||||
example, "4.1.2"). This may be a different version than the
|
example, "4.1.2"). This may be a different version than the
|
||||||
version the application was compiled against.
|
version the application was compiled against.
|
||||||
|
|
||||||
|
@ -1111,22 +1111,18 @@ static QtMsgHandler handler = 0; // pointer to debug handler
|
||||||
\fn QtMsgHandler qInstallMsgHandler(QtMsgHandler handler)
|
\fn QtMsgHandler qInstallMsgHandler(QtMsgHandler handler)
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Installs a Qt message \a handler which has been defined
|
Installs a Katie message \a handler which has been defined
|
||||||
previously. Returns a pointer to the previous message handler
|
previously. Returns a pointer to the previous message handler
|
||||||
(which may be 0).
|
(which may be 0).
|
||||||
|
|
||||||
The message handler is a function that prints out debug messages,
|
The message handler is a function that prints out debug messages,
|
||||||
warnings, critical and fatal error messages. The Qt library (debug
|
warnings, critical and fatal error messages. The Katie library
|
||||||
mode) contains hundreds of warning messages that are printed
|
contains hundreds of warning messages that are printed when internal
|
||||||
when internal errors (usually invalid function arguments)
|
errors (usually invalid function arguments) occur. If you implement
|
||||||
occur. Qt built in release mode also contains such warnings unless
|
your own message handler, you get total control of these messages.
|
||||||
QT_NO_WARNING_OUTPUT and/or QT_NO_DEBUG_OUTPUT have been set during
|
|
||||||
compilation. If you implement your own message handler, you get total
|
|
||||||
control of these messages.
|
|
||||||
|
|
||||||
The default message handler prints the message to the standard
|
The default message handler prints the message to the standard
|
||||||
output under X11 or to the debugger under Windows. If it is a
|
output. If it is a fatal message, the application aborts immediately.
|
||||||
fatal message, the application aborts immediately.
|
|
||||||
|
|
||||||
Only one message handler can be defined, since this is usually
|
Only one message handler can be defined, since this is usually
|
||||||
done on an application-wide basis to control debug output.
|
done on an application-wide basis to control debug output.
|
||||||
|
@ -1180,16 +1176,12 @@ static void qt_message(QtMsgType msgType, const char *format, va_list ap)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef qDebug
|
|
||||||
/*!
|
/*!
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Calls the message handler with the debug message \a msg. If no
|
Calls the message handler with the debug message \a msg. If no
|
||||||
message handler has been installed, the message is printed to
|
message handler has been installed, the message is printed to
|
||||||
stderr. Under Windows, the message is sent to the console, if it is a
|
stderr.
|
||||||
console application; otherwise, it is sent to the debugger. This
|
|
||||||
function does nothing if \c QT_NO_DEBUG_OUTPUT was defined
|
|
||||||
during compilation.
|
|
||||||
|
|
||||||
If you pass the function a format string and a list of arguments,
|
If you pass the function a format string and a list of arguments,
|
||||||
it works in similar way to the C printf() function. The format
|
it works in similar way to the C printf() function. The format
|
||||||
|
@ -1207,7 +1199,7 @@ static void qt_message(QtMsgType msgType, const char *format, va_list ap)
|
||||||
With this syntax, the function returns a QDebug object that is
|
With this syntax, the function returns a QDebug object that is
|
||||||
configured to use the QtDebugMsg message type. It automatically
|
configured to use the QtDebugMsg message type. It automatically
|
||||||
puts a single space between each item, and outputs a newline at
|
puts a single space between each item, and outputs a newline at
|
||||||
the end. It supports many C++ and Qt types.
|
the end. It supports many C++ and Katie types.
|
||||||
|
|
||||||
To suppress the output at run-time, install your own message handler
|
To suppress the output at run-time, install your own message handler
|
||||||
with qInstallMsgHandler().
|
with qInstallMsgHandler().
|
||||||
|
@ -1223,16 +1215,13 @@ void qDebug(const char *msg, ...)
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef qWarning
|
|
||||||
/*!
|
/*!
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
Calls the message handler with the warning message \a msg. If no
|
Calls the message handler with the warning message \a msg. If no
|
||||||
message handler has been installed, the message is printed to
|
message handler has been installed, the message is printed to
|
||||||
stderr. Under Windows, the message is sent to the debugger. This
|
stderr. It exits if the environment variable \c QT_FATAL_WARNINGS
|
||||||
function does nothing if \c QT_NO_WARNING_OUTPUT was defined
|
is set.
|
||||||
during compilation; it exits if the environment variable \c
|
|
||||||
QT_FATAL_WARNINGS is defined.
|
|
||||||
|
|
||||||
This function takes a format string and a list of arguments,
|
This function takes a format string and a list of arguments,
|
||||||
similar to the C printf() function. The format should be a Latin-1
|
similar to the C printf() function. The format should be a Latin-1
|
||||||
|
@ -1268,7 +1257,7 @@ void qWarning(const char *msg, ...)
|
||||||
|
|
||||||
Calls the message handler with the critical message \a msg. If no
|
Calls the message handler with the critical message \a msg. If no
|
||||||
message handler has been installed, the message is printed to
|
message handler has been installed, the message is printed to
|
||||||
stderr. Under Windows, the message is sent to the debugger.
|
stderr.
|
||||||
|
|
||||||
This function takes a format string and a list of arguments,
|
This function takes a format string and a list of arguments,
|
||||||
similar to the C printf() function. The format should be a Latin-1
|
similar to the C printf() function. The format should be a Latin-1
|
||||||
|
@ -1304,12 +1293,10 @@ void qCritical(const char *msg, ...)
|
||||||
|
|
||||||
Calls the message handler with the fatal message \a msg. If no
|
Calls the message handler with the fatal message \a msg. If no
|
||||||
message handler has been installed, the message is printed to
|
message handler has been installed, the message is printed to
|
||||||
stderr. Under Windows, the message is sent to the debugger.
|
stderr.
|
||||||
|
|
||||||
If you are using the \bold{default message handler} this function will
|
If you are using the \bold{default message handler} this function will
|
||||||
abort on Unix systems to create a core dump. On Windows, for debug builds,
|
abort on Unix systems to create a core dump.
|
||||||
this function will report a _CRT_ERROR enabling you to connect a debugger
|
|
||||||
to the application.
|
|
||||||
|
|
||||||
This function takes a format string and a list of arguments,
|
This function takes a format string and a list of arguments,
|
||||||
similar to the C printf() function.
|
similar to the C printf() function.
|
||||||
|
@ -1464,9 +1451,9 @@ int qrand()
|
||||||
\macro foreach(variable, container)
|
\macro foreach(variable, container)
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
This macro is used to implement Qt's \c foreach loop. The \a
|
This macro is used to implement Katie's \c foreach loop. The \a
|
||||||
variable parameter is a variable name or variable definition; the
|
variable parameter is a variable name or variable definition; the
|
||||||
\a container parameter is a Qt container whose value type
|
\a container parameter is a container whose value type
|
||||||
corresponds to the type of the variable. See \l{The foreach
|
corresponds to the type of the variable. See \l{The foreach
|
||||||
Keyword} for details.
|
Keyword} for details.
|
||||||
|
|
||||||
|
@ -1510,7 +1497,7 @@ int qrand()
|
||||||
using these macros is not required if UTF-8 codec is used for
|
using these macros is not required if UTF-8 codec is used for
|
||||||
translations.
|
translations.
|
||||||
|
|
||||||
\sa QT_TRANSLATE_NOOP(), {Internationalization with Qt}
|
\sa QT_TRANSLATE_NOOP(), {Internationalization with Katie}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1528,7 +1515,7 @@ int qrand()
|
||||||
|
|
||||||
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 35
|
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 35
|
||||||
|
|
||||||
\sa QT_TR_NOOP(), {Internationalization with Qt}
|
\sa QT_TR_NOOP(), {Internationalization with Katie}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1598,7 +1585,7 @@ int qrand()
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
You can use this macro to specify information about a custom type
|
You can use this macro to specify information about a custom type
|
||||||
\a Type. With accurate type information, Qt's \l{Container Classes}
|
\a Type. With accurate type information, Katie's \l{Container Classes}
|
||||||
{generic containers} can choose appropriate storage methods and
|
{generic containers} can choose appropriate storage methods and
|
||||||
algorithms.
|
algorithms.
|
||||||
|
|
||||||
|
@ -1662,7 +1649,7 @@ bool QInternal::activateCallbacks(void **parameters)
|
||||||
|
|
||||||
This macro can be used to determine the byte order your system
|
This macro can be used to determine the byte order your system
|
||||||
uses for storing data in memory. i.e., whether your system is
|
uses for storing data in memory. i.e., whether your system is
|
||||||
little-endian or big-endian. It is set by Qt to one of the macros
|
little-endian or big-endian. It is set by Katie to one of the macros
|
||||||
Q_LITTLE_ENDIAN or Q_BIG_ENDIAN. You normally won't need to worry
|
Q_LITTLE_ENDIAN or Q_BIG_ENDIAN. You normally won't need to worry
|
||||||
about endian-ness, but you might, for example if you need to know
|
about endian-ness, but you might, for example if you need to know
|
||||||
which byte of an integer or UTF-16 character is stored in the
|
which byte of an integer or UTF-16 character is stored in the
|
||||||
|
@ -1732,7 +1719,7 @@ bool QInternal::activateCallbacks(void **parameters)
|
||||||
\macro QT_NAMESPACE
|
\macro QT_NAMESPACE
|
||||||
\internal
|
\internal
|
||||||
|
|
||||||
If this macro is defined to \c ns all Qt classes are put in a namespace
|
If this macro is defined to \c ns all Katie classes are put in a namespace
|
||||||
called \c ns. Also, moc will output code putting metaobjects etc.
|
called \c ns. Also, moc will output code putting metaobjects etc.
|
||||||
into namespace \c ns.
|
into namespace \c ns.
|
||||||
|
|
||||||
|
@ -1781,10 +1768,9 @@ bool QInternal::activateCallbacks(void **parameters)
|
||||||
declarations are wildly mixed, wrap the \c{#include} lines in
|
declarations are wildly mixed, wrap the \c{#include} lines in
|
||||||
\c QT_END_NAMESPACE and \c QT_BEGIN_NAMESPACE.
|
\c QT_END_NAMESPACE and \c QT_BEGIN_NAMESPACE.
|
||||||
|
|
||||||
When using the \c QT_NAMESPACE feature in user code
|
When using the \c QT_NAMESPACE feature in user code where
|
||||||
(e.g., when building plugins statically linked to Qt) where
|
|
||||||
the user code is not intended to go into the \c QT_NAMESPACE
|
the user code is not intended to go into the \c QT_NAMESPACE
|
||||||
namespace, all forward declarations of Qt classes need to
|
namespace, all forward declarations of Katie classes need to
|
||||||
be wrapped in \c QT_BEGIN_NAMESPACE and \c QT_END_NAMESPACE.
|
be wrapped in \c QT_BEGIN_NAMESPACE and \c QT_END_NAMESPACE.
|
||||||
After that, a \c QT_USE_NAMESPACE should follow.
|
After that, a \c QT_USE_NAMESPACE should follow.
|
||||||
No further changes should be needed.
|
No further changes should be needed.
|
||||||
|
@ -1845,13 +1831,13 @@ bool QInternal::activateCallbacks(void **parameters)
|
||||||
\relates <QtGlobal>
|
\relates <QtGlobal>
|
||||||
|
|
||||||
This macro can be used to ensure that the application is run
|
This macro can be used to ensure that the application is run
|
||||||
against a recent enough version of Qt. This is especially useful
|
against a recent enough version of Katie. This is especially useful
|
||||||
if your application depends on a specific bug fix introduced in a
|
if your application depends on a specific bug fix introduced in a
|
||||||
bug-fix release (e.g., 4.0.2).
|
bug-fix release (e.g., 4.0.2).
|
||||||
|
|
||||||
The \a argc and \a argv parameters are the \c main() function's
|
The \a argc and \a argv parameters are the \c main() function's
|
||||||
\c argc and \c argv parameters. The \a version parameter is a
|
\c argc and \c argv parameters. The \a version parameter is a
|
||||||
string literal that specifies which version of Qt the application
|
string literal that specifies which version of Katie the application
|
||||||
requires (e.g., "4.0.2").
|
requires (e.g., "4.0.2").
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
|
@ -90,26 +90,6 @@ public:
|
||||||
{ stream->ts << m; return *this; }
|
{ stream->ts << m; return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class QNoDebug
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
inline QNoDebug(){}
|
|
||||||
inline QNoDebug(const QDebug &){}
|
|
||||||
inline ~QNoDebug(){}
|
|
||||||
#if !defined(QT_NO_TEXTSTREAM)
|
|
||||||
inline QNoDebug &operator<<(QTextStreamFunction) { return *this; }
|
|
||||||
inline QNoDebug &operator<<(QTextStreamManipulator) { return *this; }
|
|
||||||
#endif
|
|
||||||
inline QNoDebug &space() { return *this; }
|
|
||||||
inline QNoDebug &nospace() { return *this; }
|
|
||||||
inline QNoDebug &maybeSpace() { return *this; }
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
inline QNoDebug &operator<<(const T &) { return *this; }
|
|
||||||
};
|
|
||||||
|
|
||||||
Q_CORE_EXPORT_INLINE QDebug qCritical() { return QDebug(QtCriticalMsg); }
|
|
||||||
|
|
||||||
inline QDebug &QDebug::operator=(const QDebug &other)
|
inline QDebug &QDebug::operator=(const QDebug &other)
|
||||||
{
|
{
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
|
@ -194,22 +174,9 @@ inline QDebug operator<<(QDebug debug, const QFlags<T> &flags)
|
||||||
return debug.space();
|
return debug.space();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(QT_NO_DEBUG_OUTPUT)
|
|
||||||
Q_CORE_EXPORT_INLINE QDebug qDebug() { return QDebug(QtDebugMsg); }
|
Q_CORE_EXPORT_INLINE QDebug qDebug() { return QDebug(QtDebugMsg); }
|
||||||
#else
|
|
||||||
#undef qDebug
|
|
||||||
inline QNoDebug qDebug() { return QNoDebug(); }
|
|
||||||
#define qDebug QNoDebug
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(QT_NO_WARNING_OUTPUT)
|
|
||||||
Q_CORE_EXPORT_INLINE QDebug qWarning() { return QDebug(QtWarningMsg); }
|
Q_CORE_EXPORT_INLINE QDebug qWarning() { return QDebug(QtWarningMsg); }
|
||||||
#else
|
Q_CORE_EXPORT_INLINE QDebug qCritical() { return QDebug(QtCriticalMsg); }
|
||||||
#undef qWarning
|
|
||||||
inline QNoDebug qWarning() { return QNoDebug(); }
|
|
||||||
#define qWarning QNoDebug
|
|
||||||
#endif
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue