diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-07-20 11:51:58 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-07-20 11:51:58 (GMT) |
commit | 1a632e1bc677fce4b8d5450ce4a971fdde3ed42f (patch) | |
tree | 222c48a9d90097b3ea61cb2839b6541eff185c3a /tools/xmlpatterns | |
parent | 9bd8df2b405ef517d2d1b209b8004aaaa4994242 (diff) | |
parent | 3d6381b47a6048d04dbfc7b6984cae81c02d4fe6 (diff) | |
download | Qt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.zip Qt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.tar.gz Qt-1a632e1bc677fce4b8d5450ce4a971fdde3ed42f.tar.bz2 |
Merge commit 'origin/4.5'
Conflicts:
src/3rdparty/webkit/VERSION
src/3rdparty/webkit/WebCore/ChangeLog
src/3rdparty/webkit/WebCore/generated/JSDOMWindow.cpp
src/3rdparty/webkit/WebCore/page/DOMWindow.idl
src/corelib/io/qdiriterator.cpp
src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
src/plugins/gfxdrivers/directfb/qdirectfbpixmap.h
tests/auto/qxmlquery/tst_qxmlquery.cpp
tools/linguist/lconvert/main.cpp
Diffstat (limited to 'tools/xmlpatterns')
-rw-r--r-- | tools/xmlpatterns/qcoloringmessagehandler.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/xmlpatterns/qcoloringmessagehandler.cpp b/tools/xmlpatterns/qcoloringmessagehandler.cpp index 9616097..0ddb246 100644 --- a/tools/xmlpatterns/qcoloringmessagehandler.cpp +++ b/tools/xmlpatterns/qcoloringmessagehandler.cpp @@ -100,12 +100,18 @@ void ColoringMessageHandler::handleMessage(QtMsgType type, } case QtFatalMsg: { - Q_ASSERT(!sourceLocation.isNull()); const QString errorCode(identifier.fragment()); Q_ASSERT(!errorCode.isEmpty()); QUrl uri(identifier); uri.setFragment(QString()); + QString location; + + if(sourceLocation.isNull()) + location = QXmlPatternistCLI::tr("Unknown location"); + else + location = QString::fromLatin1(sourceLocation.uri().toEncoded()); + QString errorId; /* If it's a standard error code, we don't want to output the * whole URI. */ @@ -117,7 +123,7 @@ void ColoringMessageHandler::handleMessage(QtMsgType type, if(hasLine) { writeUncolored(QXmlPatternistCLI::tr("Error %1 in %2, at line %3, column %4: %5").arg(colorify(errorId, ErrorCode), - colorify(QString::fromLatin1(sourceLocation.uri().toEncoded()), Location), + colorify(location, Location), colorify(QString::number(sourceLocation.line()), Location), colorify(QString::number(sourceLocation.column()), Location), colorifyDescription(description))); @@ -125,7 +131,7 @@ void ColoringMessageHandler::handleMessage(QtMsgType type, else { writeUncolored(QXmlPatternistCLI::tr("Error %1 in %2: %3").arg(colorify(errorId, ErrorCode), - colorify(QString::fromLatin1(sourceLocation.uri().toEncoded()), Location), + colorify(location, Location), colorifyDescription(description))); } break; |