void ShareBrowserSearch::findMatches(FileBrowserItem *item){
    if (!item)
        return;
    
    QModelIndex index = model->createIndexForItem(item);
    
    if (model->canFetchMore(index))  
        model->fetchMore(index);
    
    QString fname = "";

    for (const auto &i : item->childItems){
        if (i->dir){
            findMatches(i);

            DirectoryListing::File::List *files = &i->dir->files;
            DirectoryListing::File::Iter it_file;

            for (it_file = files->begin(); it_file != files->end(); ++it_file){
                fname = _q((*it_file)->getName());
                
                if (fname.indexOf(lineEdit_SEARCHSTR->text(), 0, Qt::CaseInsensitive) >= 0 || fname.indexOf(regexp) >= 0 || regexp.exactMatch(fname))
                    emit gotItem(_q((*it_file)->getName()), i);
            }
        }
    }
}
void PlaylistQueryManager::onItemReceived(QString objectId, GHashTable *metadata, uint index, gpointer op)
{
    if (op != getItemsOp) return;

    emit gotItem(objectId, metadata, index);
}
 void stopIter()
 {
     disconnect(this, SIGNAL(gotItem(QString, QString)), 0, 0);
     disconnect(this, SIGNAL(finished()), 0, 0);
     m_shouldQuit = true;
 }