本文整理汇总了C++中QXmlParseException::lineNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ QXmlParseException::lineNumber方法的具体用法?C++ QXmlParseException::lineNumber怎么用?C++ QXmlParseException::lineNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QXmlParseException
的用法示例。
在下文中一共展示了QXmlParseException::lineNumber方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: decodeException
void decodeException(QString & szMsg, bool bError, const QXmlParseException & exception)
{
if(bError)
szMsg = QString(__tr2qs_ctx("Error near line %1, column %2", "objects")).arg(exception.lineNumber()).arg(exception.columnNumber());
else
szMsg = QString(__tr2qs_ctx("Warning near line %1, column %2", "objects")).arg(exception.lineNumber()).arg(exception.columnNumber());
szMsg += ": ";
szMsg += exception.message();
}
示例2: fatalError
bool XMLHandler::fatalError( const QXmlParseException& exception )
{
errorProt += QString( "fatal parsing error: %1 in line %2, column %3\n" )
.arg( exception.message() )
.arg( exception.lineNumber() )
.arg( exception.columnNumber() );
errorLine = exception.lineNumber();
errorCol = exception.columnNumber();
return false;
}
示例3: error
bool TupXmlParserBase::error(const QXmlParseException & exception)
{
#ifdef K_DEBUG
#ifdef Q_OS_WIN32
QString msg1 = exception.lineNumber() + QString("x") + exception.columnNumber() + QString(": ") + exception.message();
qDebug() << msg1;
#else
tWarning() << exception.lineNumber() << "x" << exception.columnNumber() << ": " << exception.message();
tWarning() << __PRETTY_FUNCTION__ << " Document: " << k->document;
#endif
#else
Q_UNUSED(exception);
#endif
return true;
}
示例4: kError
bool KWord13Parser::fatalError(const QXmlParseException& exception)
{
kError(30520) << "XML parsing fatal error: line " << exception.lineNumber()
<< " col " << exception.columnNumber() << " message: " << exception.message();
// ### TODO: user message box
return false; // Stop parsing now, we do not need further errors.
}
示例5: kWarning
bool KWord13Parser::error(const QXmlParseException& exception)
{
// A XML error is recoverable, so it is only a KDE warning
kWarning(30520) << "XML parsing error: line " << exception.lineNumber()
<< " col " << exception.columnNumber() << " message: " << exception.message();
return true;
}
示例6: fatalError
// ------------------------------------------------------------------
bool XmlHandler::fatalError(const QXmlParseException& exception)
{
qDebug() << "Line:" << exception.lineNumber()
<< ", Column:" << exception.columnNumber()
<< ", Message:" << exception.message();
return false;
}
示例7: fatalError
bool AliceHandler::fatalError(const QXmlParseException &exception)
{
std::cerr << "Parse error at line " << exception.lineNumber()
<< ", " << "column " << exception.columnNumber() << ": "
<< qPrintable(exception.message()) << std::endl;
return false;
}
示例8: fatalError
bool fatalError( const QXmlParseException &exception )
{
debug(1,"Fatal error at line %d column %d: %s\n",
exception.lineNumber(),exception.columnNumber(),
exception.message().data());
return FALSE;
}
示例9: fatalError
bool UBRssHandler::fatalError(const QXmlParseException &exception)
{
qWarning() << "Fatal error at line " << exception.lineNumber()
<< ", column " << exception.columnNumber() << ": "
<< exception.message() << mError;
return false;
}
示例10: fatalError
bool RepositoryXMLHandler::fatalError(const QXmlParseException &exception)
{
this->error = QObject::tr("XML parsing error at line %1, column %2: %3").
arg(exception.lineNumber()).arg(exception.columnNumber()).
arg(exception.message());
return false;
}
示例11: fatalError
bool KThemeManager::fatalError(const QXmlParseException & exception)
{
kError() << "FATAL Error analizing theme: " << endl;
kError() << "Line: " << exception.lineNumber() << " Column: " << exception.columnNumber() << " " << exception.message() << endl;
return false;
}
示例12: fatalError
bool fatalError(const QXmlParseException & exception)
{
stream << "Fatal error: " << exception.message() << "\n";
stream << "Line: " << exception.lineNumber() << "\n";
stream << "Column: " << exception.columnNumber() << "\n";
return true;
}
示例13: fatalError
bool RssReader::fatalError(const QXmlParseException &e) {
QString fmt("<br /><b>Parse error</b> (line:%1 column:%2): %3");
m_output.append(
fmt.arg(e.lineNumber()).arg(e.columnNumber()).arg(e.message())
);
return QXmlDefaultHandler::fatalError(e);
}
示例14: fatalError
bool iTunesXmlHandler::fatalError(const QXmlParseException &exception) {
_errorStr = QObject::tr("Parse error at line %1, column %2:\n%3")
.arg(exception.lineNumber())
.arg(exception.columnNumber())
.arg(exception.message());
return false;
}
示例15: warning
bool warning(const QXmlParseException & exception)
{
stream << "Warning: " << exception.message() << "\n";
stream << "Line: " << exception.lineNumber() << "\n";
stream << "Column: " << exception.columnNumber() << "\n";
return true;
}