42 #include <QXmlStreamReader> 76 const QUrl &identifier,
79 const bool hasLine = sourceLocation.
line() != -1;
104 QUrl uri(identifier);
109 if(sourceLocation.
isNull())
110 location = QXmlPatternistCLI::tr(
"Unknown location");
117 if(uri.toString() ==
QLatin1String(
"http://www.w3.org/2005/xqt-errors"))
143 "message() is not supposed to receive QtCriticalMsg or QtDebugMsg.");
156 while(!reader.
atEnd())
194 "The output from Patternist must be well-formed.");
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString toString() const
Returns a copy of the string reference as a QString object.
qint64 line() const
Returns the current line number.
#define QT_END_NAMESPACE
This macro expands to.
virtual void handleMessage(QtMsgType type, const QString &description, const QUrl &identifier, const QSourceLocation &sourceLocation)
This function must be implemented by the sub-class.
void writeUncolored(const QString &message)
Writes message to stderr as if for instance QTextStream would have been used, and adds a line ending ...
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
QStringRef name() const
Returns the local name of a StartElement, EndElement, or an EntityReference.
bool atEnd() const
Returns true if the reader has read until the end of the XML document, or if an error() has occurred ...
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
The QObject class is the base class of all Qt objects.
QString colorifyDescription(const QString &in) const
QtMsgType
This enum describes the messages that can be sent to a message handler (QtMsgHandler).
QString fragment() const
Returns the fragment of the URL.
bool contains(const Key &key) const
Returns true if the hash contains an item with the key; otherwise returns false.
const T value(const Key &key) const
Returns the value associated with the key.
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
QStringRef value(const QString &namespaceUri, const QString &name) const
Returns the value of the attribute name in the namespace described with namespaceUri, or an empty string reference if the attribute is not defined.
QString colorify(const QString &message, int color=-1) const
Treats message and colorID identically to write(), but instead of writing message to stderr...
QUrl uri() const
Returns the resource that this QSourceLocation refers to.
bool isNull() const
Returns true if this QSourceLocation doesn't identify anything.
void reserve(int size)
Attempts to allocate memory for at least size characters.
TokenType tokenType() const
Returns the type of the current token.
#define QT_BEGIN_NAMESPACE
This macro expands to.
int size() const
Returns the number of characters in this string.
bool hasError() const
Returns true if an error has occurred, otherwise false.
The namespace for the internal API of QtXmlPatterns.
The QSourceLocation class identifies a location in a resource by URI, line, and column.
TokenType readNext()
Reads the next token and returns its type.
QByteArray toEncoded(FormattingOptions options=None) const
Returns the encoded representation of the URL if it's valid; otherwise an empty QByteArray is returne...
void insertMapping(int colorID, const ColorCode colorCode)
Adds a color mapping from colorID to colorCode, for this ColorOutput instance.
#define Q_ASSERT_X(cond, where, what)
QHash< QString, ColorType > m_classToColor
QString & append(QChar c)
The QAbstractMessageHandler class provides a callback interface for handling messages.
static QString fromLatin1(const char *, int size=-1)
Returns a QString initialized with the first size characters of the Latin-1 string str...
static QTestResult::TestLocation location
qint64 column() const
Returns the current column number.
The QXmlStreamReader class provides a fast parser for reading well-formed XML via a simple streaming ...
QStringRef text() const
Returns the text of Characters , Comment , DTD , or EntityReference.
QXmlStreamAttributes attributes() const
Returns the attributes of a StartElement.
ColoringMessageHandler(QObject *parent=0)