SqliteSearch: Use correct column for file size

This commit is contained in:
Albert S. 2019-04-22 23:16:29 +02:00
parent 2d6994b1f5
commit a26382b697

View File

@ -111,8 +111,7 @@ QString SqliteSearch::createSql(const SqliteSearch::Token &token)
return " content.id IN (SELECT content_fts.ROWID FROM content_fts WHERE content_fts.content MATCH '" + value + return " content.id IN (SELECT content_fts.ROWID FROM content_fts WHERE content_fts.content MATCH '" + value +
"' )"; "' )";
} }
throw QSSGeneralException("Unknown token: " + key);
throw QSSGeneralException("Unknown filter: " + key);
} }
QString SqliteSearch::makeSql(const QVector<SqliteSearch::Token> &tokens) QString SqliteSearch::makeSql(const QVector<SqliteSearch::Token> &tokens)
@ -158,7 +157,7 @@ QVector<SearchResult> SqliteSearch::search(const QString &query)
SearchResult result; SearchResult result;
result.fileData.absPath = dbquery.value("path").toString(); result.fileData.absPath = dbquery.value("path").toString();
result.fileData.mtime = dbquery.value("mtime").toUInt(); result.fileData.mtime = dbquery.value("mtime").toUInt();
result.fileData.size = dbquery.value("filesize").toUInt(); result.fileData.size = dbquery.value("size").toUInt();
result.fileData.filetype = dbquery.value("filetype").toChar(); result.fileData.filetype = dbquery.value("filetype").toChar();
result.page = dbquery.value("page").toUInt(); result.page = dbquery.value("page").toUInt();
results.append(result); results.append(result);