KDocTools
Go to the documentation of this file.
14 if (!checkFile.exists())
18 if (!checkFile.isFile())
22 if (!checkFile.isReadable())
31 const QString pwd_buffer = QDir::currentPath();
32 const QFileInfo file( checkFilename );
34 setenv(
"XML_CATALOG_FILES", catalogs.constData(), 1 );
35 if ( QFileInfo( exe ).isExecutable() ) {
36 QDir::setCurrent( file.absolutePath() );
38 cmd +=
" --valid --noout ";
39 cmd += file.fileName();
41 FILE *xmllint = popen( QFile::encodeName( cmd ).constData(),
"r" );
45 while ( ( n = fread(buf, 1,
sizeof( buf ) - 1, xmllint ) ) ) {
51 QDir::setCurrent( pwd_buffer );
62 if (output.indexOf(
"<FILENAME " ) == -1 || usingStdOut || usingOutput )
66 file.open( stdout, QIODevice::WriteOnly );
69 file.setFileName( outputOption );
71 file.setFileName(
"index.html" );
72 file.open(QIODevice::WriteOnly);
76 QByteArray data = output.toUtf8();
78 QByteArray data = output.toLocal8Bit();
80 file.write(data.data(), data.length());
85 index = output.indexOf(
"<FILENAME ", index);
88 int filename_index = index + strlen(
"<FILENAME filename=\"");
90 const QString filename = output.mid(filename_index,
91 output.indexOf(
"\"", filename_index) -
96 file.open(QIODevice::WriteOnly);
99 file.write(data.data(), data.length());
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Mon Jul 15 2013 13:08:09 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.