diff --git a/src/feed.cpp b/src/feed.cpp index 41b5a2d0..fd2868e8 100644 --- a/src/feed.cpp +++ b/src/feed.cpp @@ -47,8 +47,3 @@ QString Feed::name() const { return m_name; } - -void Feed::setName(QString name) -{ - m_name = name; -} diff --git a/src/feed.h b/src/feed.h index 8d8b98e1..1daeead8 100644 --- a/src/feed.h +++ b/src/feed.h @@ -23,9 +23,8 @@ #include #include -class Feed : public QObject +class Feed { - Q_OBJECT public: Feed(const QString url); Feed(const Feed &other); @@ -34,11 +33,6 @@ public: QString name() const; QString url() const; - void setName(QString name); - -Q_SIGNALS: - void nameChanged(const QString &name); - private: QString m_url; QString m_name; diff --git a/src/fetcher.cpp b/src/fetcher.cpp index dfe012f1..d0879f4d 100644 --- a/src/fetcher.cpp +++ b/src/fetcher.cpp @@ -63,6 +63,10 @@ void Fetcher::fetch(QUrl url) query.bindValue(QStringLiteral(":email"), author->email()); query.exec(); } + query.prepare(QStringLiteral("UPDATE Feeds SET name=:name WHERE url=:url;")); + query.bindValue(QStringLiteral(":name"), feed->title()); + query.bindValue(QStringLiteral(":url"), url.toString()); + query.exec(); } delete reply; emit finished();