diff --git a/src/database.cpp b/src/database.cpp index a5bc3310..37ac0a16 100644 --- a/src/database.cpp +++ b/src/database.cpp @@ -57,7 +57,7 @@ bool Database::migrate() bool Database::migrateTo1() { qDebug() << "Migrating database to version 1"; - TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Feeds (name TEXT, url TEXT, image TEXT, link TEXT, description TEXT, deleteAfterCount INTEGER, deleteAfterType INTEGER, subscribed INTEGER, lastUpdated INTEGER, autoUpdateCount INTEGER, autoUpdateType INTEGER, notify BOOL);"))); + TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Feeds (name TEXT, url TEXT, image TEXT, link TEXT, description TEXT, deleteAfterCount INTEGER, deleteAfterType INTEGER, subscribed INTEGER, lastUpdated INTEGER, notify BOOL);"))); TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Entries (feed TEXT, id TEXT UNIQUE, title TEXT, content TEXT, created INTEGER, updated INTEGER, link TEXT, read bool);"))); TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Authors (feed TEXT, id TEXT, name TEXT, uri TEXT, email TEXT);"))); TRUE_OR_RETURN(execute(QStringLiteral("CREATE TABLE IF NOT EXISTS Enclosures (feed TEXT, id TEXT, duration INTEGER, size INTEGER, title TEXT, type STRING, url STRING);"))); @@ -150,7 +150,7 @@ void Database::addFeed(QString url) QUrl urlFromInput = QUrl::fromUserInput(url); QSqlQuery query; - query.prepare(QStringLiteral("INSERT INTO Feeds VALUES (:name, :url, :image, :link, :description, :deleteAfterCount, :deleteAfterType, :subscribed, :lastUpdated, :autoUpdateCount, :autoUpdateType, :notify);")); + query.prepare(QStringLiteral("INSERT INTO Feeds VALUES (:name, :url, :image, :link, :description, :deleteAfterCount, :deleteAfterType, :subscribed, :lastUpdated, :notify);")); query.bindValue(QStringLiteral(":name"), urlFromInput.toString()); query.bindValue(QStringLiteral(":url"), urlFromInput.toString()); query.bindValue(QStringLiteral(":image"), QLatin1String("")); @@ -160,8 +160,6 @@ void Database::addFeed(QString url) query.bindValue(QStringLiteral(":deleteAfterType"), 0); query.bindValue(QStringLiteral(":subscribed"), QDateTime::currentDateTime().toSecsSinceEpoch()); query.bindValue(QStringLiteral(":lastUpdated"), 0); - query.bindValue(QStringLiteral(":autoUpdateCount"), 0); - query.bindValue(QStringLiteral(":autoUpdateType"), 0); query.bindValue(QStringLiteral(":notify"), false); execute(query); diff --git a/src/feed.cpp b/src/feed.cpp index 48d9e28e..9d6bd66c 100644 --- a/src/feed.cpp +++ b/src/feed.cpp @@ -54,8 +54,6 @@ Feed::Feed(int index) m_description = query.value(QStringLiteral("description")).toString(); m_deleteAfterCount = query.value(QStringLiteral("deleteAfterCount")).toInt(); m_deleteAfterType = query.value(QStringLiteral("deleteAfterType")).toInt(); - m_autoUpdateCount = query.value(QStringLiteral("autoUpdateCount")).toInt(); - m_autoUpdateType = query.value(QStringLiteral("autoUpdateType")).toInt(); m_notify = query.value(QStringLiteral("notify")).toBool(); m_errorId = 0; @@ -142,16 +140,6 @@ QDateTime Feed::lastUpdated() const return m_lastUpdated; } -int Feed::autoUpdateCount() const -{ - return m_autoUpdateCount; -} - -int Feed::autoUpdateType() const -{ - return m_autoUpdateType; -} - bool Feed::notify() const { return m_notify; @@ -242,18 +230,6 @@ void Feed::setLastUpdated(QDateTime lastUpdated) Q_EMIT lastUpdatedChanged(m_lastUpdated); } -void Feed::setAutoUpdateCount(int count) -{ - m_autoUpdateCount = count; - Q_EMIT autoUpdateCountChanged(m_autoUpdateCount); -} - -void Feed::setAutoUpdateType(int type) -{ - m_autoUpdateType = type; - Q_EMIT autoUpdateTypeChanged(m_autoUpdateType); -} - void Feed::setNotify(bool notify) { m_notify = notify; diff --git a/src/feed.h b/src/feed.h index d2953b93..3ed6e3f7 100644 --- a/src/feed.h +++ b/src/feed.h @@ -41,8 +41,6 @@ class Feed : public QObject Q_PROPERTY(int deleteAfterType READ deleteAfterType WRITE setDeleteAfterType NOTIFY deleteAfterTypeChanged) Q_PROPERTY(QDateTime subscribed READ subscribed CONSTANT) Q_PROPERTY(QDateTime lastUpdated READ lastUpdated WRITE setLastUpdated NOTIFY lastUpdatedChanged) - Q_PROPERTY(int autoUpdateCount READ autoUpdateCount WRITE setAutoUpdateCount NOTIFY autoUpdateCountChanged) - Q_PROPERTY(int autoUpdateType READ autoUpdateType WRITE setAutoUpdateType NOTIFY autoUpdateCountChanged) Q_PROPERTY(bool notify READ notify WRITE setNotify NOTIFY notifyChanged) Q_PROPERTY(int entryCount READ entryCount NOTIFY entryCountChanged) Q_PROPERTY(int unreadEntryCount READ unreadEntryCount NOTIFY unreadEntryCountChanged) @@ -64,8 +62,6 @@ public: int deleteAfterType() const; QDateTime subscribed() const; QDateTime lastUpdated() const; - int autoUpdateCount() const; - int autoUpdateType() const; bool notify() const; int entryCount() const; int unreadEntryCount() const; @@ -83,8 +79,6 @@ public: void setDeleteAfterCount(int count); void setDeleteAfterType(int type); void setLastUpdated(QDateTime lastUpdated); - void setAutoUpdateCount(int count); - void setAutoUpdateType(int type); void setNotify(bool notify); void setRefreshing(bool refreshing); void setErrorId(int errorId); @@ -102,8 +96,6 @@ Q_SIGNALS: void deleteAfterCountChanged(int count); void deleteAfterTypeChanged(int type); void lastUpdatedChanged(QDateTime lastUpdated); - void autoUpdateCountChanged(int count); - void autoUpdateTypeChanged(int type); void notifyChanged(bool notify); void entryCountChanged(); void unreadEntryCountChanged(); @@ -123,8 +115,6 @@ private: int m_deleteAfterType; QDateTime m_subscribed; QDateTime m_lastUpdated; - int m_autoUpdateCount; - int m_autoUpdateType; bool m_notify; int m_errorId; QString m_errorString;