Logo Search packages:      
Sourcecode: qapt version File versions  Download package

QStringList QApt::Package::installedFilesList (  )  const

Member function that returns the file list of the package

Returns:
The file list of the package as a QStringList

Definition at line 330 of file package.cpp.

References name().

{
    QStringList installedFilesList;
    QFile infoFile("/var/lib/dpkg/info/" % name() % ".list");

    if (infoFile.open(QFile::ReadOnly)) {
        QTextStream stream(&infoFile);
        QString line;

        do {
            line = stream.readLine();
            installedFilesList << line;
        } while (!line.isNull());

        // The first item won't be a file
        installedFilesList.removeFirst();

        for (int i = 0; i < installedFilesList.size() - 1; ++i) {
            if (installedFilesList.at(i+1).contains(installedFilesList.at(i))) {
                installedFilesList[i] = ' ';
            }
        }

        installedFilesList.removeAll(QChar(' '));
    }

    return installedFilesList;
}


Generated by  Doxygen 1.6.0   Back to index