Public Member Functions | Private Attributes | List of all members
LayoutErrorHandler Class Reference
Inheritance diagram for LayoutErrorHandler:
QXmlErrorHandler

Public Member Functions

 LayoutErrorHandler (const char *fn)
 
bool warning (const QXmlParseException &exception)
 
bool error (const QXmlParseException &exception)
 
bool fatalError (const QXmlParseException &exception)
 
QString errorString ()
 
- Public Member Functions inherited from QXmlErrorHandler
virtual ~QXmlErrorHandler ()
 

Private Attributes

QString errorMsg
 
QString fileName
 

Detailed Description

Definition at line 1287 of file layout.cpp.

Constructor & Destructor Documentation

LayoutErrorHandler::LayoutErrorHandler ( const char *  fn)
inline

Definition at line 1290 of file layout.cpp.

1290 : fileName(fn) {}
QAsciiDict< Entry > fn

Member Function Documentation

bool LayoutErrorHandler::error ( const QXmlParseException exception)
inlinevirtual

A reader might use this function to report a recoverable error. A recoverable error corresponds to the definiton of "error" in section 1.2 of the XML 1.0 specification.

The reader must continue to provide normal parsing events after invoking this function.

If this function returns FALSE the reader will stop parsing and will report an error. The reader will use the function errorString() to get the error message that will be used for reporting the error.

Implements QXmlErrorHandler.

Definition at line 1298 of file layout.cpp.

1299  {
1300  err("at line %d column %d of %s: %s\n",
1301  exception.lineNumber(),exception.columnNumber(),fileName.data(),
1302  exception.message().data());
1303  return FALSE;
1304  }
const bool FALSE
Definition: qglobal.h:370
int columnNumber() const
Definition: qxml.cpp:231
QString message() const
Definition: qxml.cpp:224
const char * data() const
Definition: qstring.h:542
void err(const char *fmt,...)
Definition: message.cpp:226
int lineNumber() const
Definition: qxml.cpp:238
QString LayoutErrorHandler::errorString ( )
inlinevirtual

The reader calls this function to get an error string if any of the handler functions returns FALSE to him.

Implements QXmlErrorHandler.

Definition at line 1312 of file layout.cpp.

1312 { return ""; }
bool LayoutErrorHandler::fatalError ( const QXmlParseException exception)
inlinevirtual

A reader must use this function to report a non-recoverable error.

If this function returns TRUE the reader might try to go on parsing and reporting further errors; but no regular parsing events are reported.

Implements QXmlErrorHandler.

Definition at line 1305 of file layout.cpp.

1306  {
1307  err("fatal: at line %d column %d of %s: %s\n",
1308  exception.lineNumber(),exception.columnNumber(),fileName.data(),
1309  exception.message().data());
1310  return FALSE;
1311  }
const bool FALSE
Definition: qglobal.h:370
int columnNumber() const
Definition: qxml.cpp:231
QString message() const
Definition: qxml.cpp:224
const char * data() const
Definition: qstring.h:542
void err(const char *fmt,...)
Definition: message.cpp:226
int lineNumber() const
Definition: qxml.cpp:238
bool LayoutErrorHandler::warning ( const QXmlParseException exception)
inlinevirtual

A reader might use this function to report a warning. Warnings are conditions that are not errors or fatal errors as defined by the XML 1.0 specification.

If this function returns FALSE the reader will stop parsing and will report an error. The reader will use the function errorString() to get the error message that will be used for reporting the error.

Implements QXmlErrorHandler.

Definition at line 1291 of file layout.cpp.

1292  {
1293  warn_uncond("at line %d column %d of %s: %s\n",
1294  exception.lineNumber(),exception.columnNumber(),fileName.data(),
1295  exception.message().data());
1296  return FALSE;
1297  }
const bool FALSE
Definition: qglobal.h:370
int columnNumber() const
Definition: qxml.cpp:231
QString message() const
Definition: qxml.cpp:224
const char * data() const
Definition: qstring.h:542
int lineNumber() const
Definition: qxml.cpp:238
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218

Member Data Documentation

QString LayoutErrorHandler::errorMsg
private

Definition at line 1315 of file layout.cpp.

QString LayoutErrorHandler::fileName
private

Definition at line 1316 of file layout.cpp.


The documentation for this class was generated from the following file: