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

void MediaIndexer::removeInfo ( const QList< MediaItem > &  mediaList  ) 

Remove media information from the Nepomuk datastore corresponding specified medialist.

mediaList List of MediaItems whose information should be removed from the datastore.

Definition at line 93 of file mediaindexer.cpp.

References finished(), percentComplete(), and started().

Referenced by removeInfo().

    if (m_nepomukInited && (mediaList.count() > 0)) {
        QString filename = QString("bangarang/%1.jb")
        QString path = KStandardDirs::locateLocal("data", filename, true);
        QFile file(path);
        if (!file.open(QIODevice::WriteOnly)) {
        QTextStream out(&file);
        out << "#Count = " << mediaList.count() << "\n";
        for (int i = 0; i < mediaList.count(); i++) {
            writeRemoveInfo(mediaList.at(i), out);
            out << "\n";
        out << "\n" <<"\n";
        KProcess * writer = new KProcess();
        writer->setProgram("bangarangnepomukwriter", QStringList(path));
        writer->setWorkingDirectory(KStandardDirs::locateLocal("data", "bangarang/", true));
        connect(writer, SIGNAL(readyReadStandardOutput()), this, SLOT(processWriterOutput()));
        connect(writer, SIGNAL(started()), this, SIGNAL(started()));
        connect(writer, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(finished(int, QProcess::ExitStatus)));
        connect(writer, SIGNAL(error(QProcess::ProcessError)), this, SLOT(error(QProcess::ProcessError)));
        m_state = Running;
        emit percentComplete(0);

Generated by  Doxygen 1.6.0   Back to index