summaryrefslogtreecommitdiffstats
path: root/src/layout.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2011-08-14 13:56:38 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2011-08-14 13:56:38 (GMT)
commit9be758009e1a4c616377dc33ccf1e55dd8b04d9b (patch)
tree3138a0d18d53a00498b4cad59f934a4e64762cf8 /src/layout.cpp
parent64f0c97c3adaa28edf6f1da3264621a18c1d1adb (diff)
downloadDoxygen-9be758009e1a4c616377dc33ccf1e55dd8b04d9b.zip
Doxygen-9be758009e1a4c616377dc33ccf1e55dd8b04d9b.tar.gz
Doxygen-9be758009e1a4c616377dc33ccf1e55dd8b04d9b.tar.bz2
Release-1.7.5
Diffstat (limited to 'src/layout.cpp')
-rw-r--r--src/layout.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/layout.cpp b/src/layout.cpp
index c212907..0209036 100644
--- a/src/layout.cpp
+++ b/src/layout.cpp
@@ -1123,24 +1123,25 @@ class LayoutParser : public QXmlDefaultHandler
class LayoutErrorHandler : public QXmlErrorHandler
{
public:
+ LayoutErrorHandler(const char *fn) : fileName(fn) {}
bool warning( const QXmlParseException &exception )
{
- err("error: at line %d column %d: %s\n",
- exception.lineNumber(),exception.columnNumber(),
+ err("warning: at line %d column %d of %s: %s\n",
+ exception.lineNumber(),exception.columnNumber(),fileName.data(),
exception.message().data());
return FALSE;
}
bool error( const QXmlParseException &exception )
{
- err("error: at line %d column %d: %s\n",
- exception.lineNumber(),exception.columnNumber(),
+ err("error: at line %d column %d of %s: %s\n",
+ exception.lineNumber(),exception.columnNumber(),fileName.data(),
exception.message().data());
return FALSE;
}
bool fatalError( const QXmlParseException &exception )
{
- err("error: at line %d column %d: %s\n",
- exception.lineNumber(),exception.columnNumber(),
+ err("fatal error: at line %d column %d of %s: %s\n",
+ exception.lineNumber(),exception.columnNumber(),fileName.data(),
exception.message().data());
return FALSE;
}
@@ -1148,6 +1149,7 @@ class LayoutErrorHandler : public QXmlErrorHandler
private:
QString errorMsg;
+ QString fileName;
};
//---------------------------------------------------------------------------------
@@ -1175,7 +1177,7 @@ LayoutDocManager::LayoutDocManager()
void LayoutDocManager::init()
{
// parse the default layout
- LayoutErrorHandler errorHandler;
+ LayoutErrorHandler errorHandler( "layout_default.xml" );
QXmlInputSource source;
source.setData( layout_default );
QXmlSimpleReader reader;
@@ -1216,9 +1218,9 @@ void LayoutDocManager::clear(LayoutDocManager::LayoutPart p)
d->docEntries[(int)p].clear();
}
-void LayoutDocManager::parse(QTextStream &t)
+void LayoutDocManager::parse(QTextStream &t,const char *fileName)
{
- LayoutErrorHandler errorHandler;
+ LayoutErrorHandler errorHandler(fileName);
QXmlInputSource source( t );
QXmlSimpleReader reader;
reader.setContentHandler( &LayoutParser::instance() );