X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodels%2Ffilepathmodel.cpp;h=5e3fae0aee556903e8fbfe331918c1f27619b7a7;hb=c1c9dfb43ad18e54de9a3a130d181211cf0d03c4;hp=4bbb3e140f2493441afa00a16426ee6eb4ef4aa0;hpb=3dd0b39a8258e7d68b1371aab2878aec131f96dd;p=emufront diff --git a/src/models/filepathmodel.cpp b/src/models/filepathmodel.cpp index 4bbb3e1..5e3fae0 100644 --- a/src/models/filepathmodel.cpp +++ b/src/models/filepathmodel.cpp @@ -34,8 +34,19 @@ void FilePathModel::refresh() QString FilePathModel::constructSelect(QString where) const { - // TODO - return QString(); + return QString("SELECT " + "filepath.id AS FilePathId, " + "filepath.name AS Name, " + "datetime(filepath.lastscanned, 'unixepoch') AS LastScanned, " + "setup.id AS SetupId, " + "platform.name || ' ' || mediatype.name AS SetupName, " + "filepath.filetypeid " + "FROM filepath " + "INNER JOIN setup ON filepath.setupid=setup.id " + "INNER JOIN platform ON setup.platformid=platform.id " + "INNER JOIN mediatype ON setup.mediatypeid=mediatype.id " + "%1 " + "ORDER BY SetupName").arg(where); } Qt::ItemFlags FilePathModel::flags(const QModelIndex &index) const