Hi,

I have a class:
Code:
class Model : public QGalleryQueryModel
{
    Q_OBJECT
public:
    explicit Model(QAbstractGallery* gallery,  QObject *parent = 0);
    virtual ~Model ();
};
And a constructor:
Code:
Model::Model(QAbstractGallery* gallery, QObject *parent):QGalleryQueryModel(gallery,parent)
{
    setRootType(QDocumentGallery::File);

    QHash<int, QByteArray> properties;
    properties.insert(Qt::UserRole + 1, "url");
    properties.insert(Qt::UserRole + 2, "fileName");
    setRoleNames(properties);

    QHash<int, QString> columns;
    columns.insert(Qt::UserRole + 1, "url");
    columns.insert(Qt::UserRole + 2, "fileName");
    addColumn(columns);

    execute();
}
which works fine, in my E7 (Belle) it lists lots of files. I am using the model in QML. But when I add filters to it:

Code:
Model::Model(QAbstractGallery* gallery, QObject *parent):QGalleryQueryModel(gallery,parent)
{
    setRootType(QDocumentGallery::File);

    QHash<int, QByteArray> properties;
    properties.insert(Qt::UserRole + 1, "url");
    properties.insert(Qt::UserRole + 2, "fileName");
    setRoleNames(properties);

    QHash<int, QString> columns;
    columns.insert(Qt::UserRole + 1, "url");
    columns.insert(Qt::UserRole + 2, "fileName");
    addColumn(columns);

    ufilterP_=new QGalleryUnionFilter();
    m1filterP_=new QGalleryMetaDataFilter("fileName", "wav", QGalleryFilter::Contains);
    m2filterP_=new QGalleryMetaDataFilter("url", "mp4", QGalleryFilter::EndsWith);
    m3filterP_=new QGalleryMetaDataFilter("url", "*.mp3", QGalleryFilter::Wildcard);
    ufilterP_->append(*m1filterP_);
    ufilterP_->append(*m2filterP_);
    ufilterP_->append(*m3filterP_);
    filterP_=new QGalleryFilter(*ufilterP_);
    setFilter(*filterP_);

    execute();
}
not a single file is found. I have tried the code with one filter only and as you can see, with different comparators and both properties.

Any idea what could be wrong? Earlier I saw someone mentioning on some filters not working properly in Symbian but can not find the web page now. Is there a bug in the filters? Or am I using it somehow wrong? Any workaround? I had similar problem with filters when implementing also the model in QML.