~artmello/gallery-app/gallery-app-snap_u8

« back to all changes in this revision

Viewing changes to tests/unittests/stubs/database_stub.cpp

  • Committer: Bileto Bot
  • Author(s): Arthur Mello
  • Date: 2016-09-21 19:06:05 UTC
  • mfrom: (1325.2.9 gallery-app-fix_1445755)
  • Revision ID: ci-train-bot@canonical.com-20160921190605-mphrl781suc5g1d6
Add support to blacklist directories from scan process based on regexp (LP: #1445755)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "database.h"
22
22
#include "album-table.h"
23
23
#include "media-table.h"
 
24
#include "resource.h"
24
25
 
25
26
#include <QFile>
26
27
 
27
 
Database::Database(const QString &databaseDir, const QString &schemaDirectory,
28
 
                   QObject* parent) :
 
28
Database::Database(Resource *resource, QObject* parent) :
29
29
    QObject(parent),
30
 
    m_databaseDirectory(databaseDir),
31
 
    m_sqlSchemaDirectory(schemaDirectory),
 
30
    m_databaseDirectory(resource->databaseDirectory()),
 
31
    m_sqlSchemaDirectory(resource->getRcUrl("sql").path()),
32
32
    m_db(0)
33
33
{
34
34
    m_albumTable = new AlbumTable(this, this);
35
 
    m_mediaTable = new MediaTable(this, this);
 
35
    m_mediaTable = new MediaTable(this, resource, this);
36
36
}
37
37
 
38
38
Database::~Database()