mirror of
https://github.com/KDE/kasts.git
synced 2025-02-04 03:07:44 +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
|
int Feed::unreadEntryCount() const
|
||||||
{
|
{
|
||||||
QSqlQuery query;
|
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);
|
query.bindValue(QStringLiteral(":feed"), m_url);
|
||||||
Database::instance().execute(query);
|
Database::instance().execute(query);
|
||||||
if (!query.next())
|
if (!query.next())
|
||||||
|
@ -108,7 +108,7 @@ void Fetcher::processEntry(Syndication::ItemPtr entry, QString url)
|
|||||||
if (query.value(0).toInt() != 0)
|
if (query.value(0).toInt() != 0)
|
||||||
return;
|
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(":feed"), url);
|
||||||
query.bindValue(QStringLiteral(":id"), entry->id());
|
query.bindValue(QStringLiteral(":id"), entry->id());
|
||||||
query.bindValue(QStringLiteral(":title"), QTextDocumentFragment::fromHtml(entry->title()).toPlainText());
|
query.bindValue(QStringLiteral(":title"), QTextDocumentFragment::fromHtml(entry->title()).toPlainText());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user