summaryrefslogtreecommitdiff
path: root/src/atomitem.cpp
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2025-06-22 21:39:13 +0200
committerNikita Kostovsky <nikita@kostovsky.me>2025-06-22 21:39:13 +0200
commitc9fcceb74d861525b2defec8219374edb9c1455a (patch)
treefc10d7c2abcb08db76946e0bfd73f6b93a652422 /src/atomitem.cpp
parentf674e179d602d3ccb9818d28fe06f371059449dc (diff)
add User class
Diffstat (limited to 'src/atomitem.cpp')
-rw-r--r--src/atomitem.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/atomitem.cpp b/src/atomitem.cpp
index 5f099f6..191e04b 100644
--- a/src/atomitem.cpp
+++ b/src/atomitem.cpp
@@ -63,8 +63,8 @@ AtomItem::AtomItem(QXmlStreamReader *xmlReader)
int AtomItem::getDbId()
{
- if (dbId != rsshit::db::IdNotFound)
- return dbId;
+ if (id != rsshit::db::IdNotFound)
+ return id;
const auto db = rsshit::db::open();
@@ -76,7 +76,7 @@ int AtomItem::getDbId()
if (!selectQ.exec()) {
qWarning() << "cannot exec query" << selectQ.lastQuery() << ":"
- << selectQ.lastError().text() << ":" << selectQ.executedQuery();
+ << selectQ.lastError().text();
return rsshit::db::IdNotFound;
}
@@ -103,8 +103,8 @@ int AtomItem::getDbId()
int AtomItem::createInDb(const int feedId)
{
- if (dbId != rsshit::db::IdNotFound)
- return dbId;
+ if (id != rsshit::db::IdNotFound)
+ return id;
const auto db = rsshit::db::open();
@@ -124,7 +124,7 @@ int AtomItem::createInDb(const int feedId)
if (!insertQ.exec()) {
qWarning() << "cannot exec query" << insertQ.lastQuery() << ":"
- << insertQ.lastError().text() << ":" << insertQ.executedQuery();
+ << insertQ.lastError().text();
return rsshit::db::IdNotFound;
}