mirror of
https://github.com/KDE/kasts.git
synced 2025-01-24 22:28:31 +01:00
Fix bools in database
This commit is contained in:
parent
b412325219
commit
86621fe7d6
@ -145,7 +145,7 @@ int Feed::entryCount() const
|
||||
int Feed::unreadEntryCount() const
|
||||
{
|
||||
QSqlQuery query;
|
||||
query.prepare(QStringLiteral("SELECT COUNT (id) FROM Entries where feed=:feed AND read=false;"));
|
||||
query.prepare(QStringLiteral("SELECT COUNT (id) FROM Entries where feed=:feed AND read=0;"));
|
||||
query.bindValue(QStringLiteral(":feed"), m_url);
|
||||
Database::instance().execute(query);
|
||||
if (!query.next())
|
||||
|
@ -108,7 +108,7 @@ void Fetcher::processEntry(Syndication::ItemPtr entry, QString url)
|
||||
if (query.value(0).toInt() != 0)
|
||||
return;
|
||||
|
||||
query.prepare(QStringLiteral("INSERT INTO Entries VALUES (:feed, :id, :title, :content, :created, :updated, :link, false);"));
|
||||
query.prepare(QStringLiteral("INSERT INTO Entries VALUES (:feed, :id, :title, :content, :created, :updated, :link, 0);"));
|
||||
query.bindValue(QStringLiteral(":feed"), url);
|
||||
query.bindValue(QStringLiteral(":id"), entry->id());
|
||||
query.bindValue(QStringLiteral(":title"), QTextDocumentFragment::fromHtml(entry->title()).toPlainText());
|
||||
|
Loading…
Reference in New Issue
Block a user