Example #1
0
void Authors::initialize() {
    QFile file(":/authors.xml");
    if (!file.open(QIODevice::ReadOnly))
        throw Exception("Cannot fint embedded file 'authors.xml");
    reader->setDevice(&file);

    nextToken();
    if (!reader->isStartElement() && elementNameEquals("authors"))
        throw Exception(message("Expected <authors> element'"));

    nextToken();
    while (!reader->hasError() && reader->isStartElement()) {
        if (elementNameEquals("author")) {
            readAuthor();
        } else {
            throw Exception(message("Unexpected element: '" + elementName() + "'"));
        }
        if(!reader->isEndElement())
            throw Exception(message("Expected end element </author>"));
        nextToken();
    }

    //nextToken();
    if(!reader->isEndElement())
        throw Exception(message("Expected end element </authors>"));
}
Example #2
0
void qt4encodeWnd::demarrerA( )
{
	cbKeep->setChecked( true );
	cbKeep->show();
	pbClose->show();
	setWindowTitle( "Authoring " );
	setModal( true );
	teAuthor->clear();
	connect( procEncode, SIGNAL(readyReadStderr()),
						this, SLOT(readAuthor()));
	connect( procEncode, SIGNAL(processExited()),
						this, SLOT(endAuthor()));
	exec();
}
Example #3
0
void ModXReader::readAuthorGroup()
{
    while (!atEnd())
    {
        readNext();

        if (isEndElement())
        {
            break;
        }

        if (isStartElement())
        {
            if (name() == "author")
            {
                m_data->authorGroup << readAuthor();
            }
            else
            {
                readUnknownElement();
            }
        }
    }
}