pelican/examples/tutorial/src/OutputStreamExample.cpp
// Adds a file to the output stream and opens it for writing.
Adds a file to the output stream and opens it for writing.
Adds a file to the output stream and opens it for writing .
void OutputStreamExample::addFile(const QString& filename)
{
    verbose(QString("Creating file %1").arg(filename));
    QFile* file = new QFile(filename);
    if (file->open(QIODevice::WriteOnly)) {
        _devices.append(file);
    }
    else {
        std::cerr << "Cannot open file for writing: "
                << filename.toStdString() << std::endl;
        delete file;
    }
}
void OutputStreamExample :: addFile ( const QString & filename ) { verbose ( QString ( " " ) . arg ( filename ) ) ; QFile * file = new QFile ( filename ) ; if ( file -> open ( QIODevice :: WriteOnly ) ) { _devices . append ( file ) ; } else { std :: cerr << " " << filename . toStdString ( ) << std :: endl ; delete file ; } }
Adds a file to the output stream and opens it for writing.
Adds a file to the output stream and opens it for writing .