Change some types (uint -> int) in RSS subsystem

This commit is contained in:
FranciscoPombal
2020-10-07 13:01:34 +01:00
parent deffdbe881
commit 2c10b3936b
5 changed files with 10 additions and 10 deletions

View File

@@ -65,7 +65,7 @@ QPointer<Session> Session::m_instance = nullptr;
Session::Session()
: m_processingEnabled(SettingsStorage::instance()->loadValue(SettingsKey_ProcessingEnabled, false).toBool())
, m_workingThread(new QThread(this))
, m_refreshInterval(SettingsStorage::instance()->loadValue(SettingsKey_RefreshInterval, 30).toUInt())
, m_refreshInterval(SettingsStorage::instance()->loadValue(SettingsKey_RefreshInterval, 30).toInt())
, m_maxArticlesPerFeed(SettingsStorage::instance()->loadValue(SettingsKey_MaxArticlesPerFeed, 50).toInt())
{
Q_ASSERT(!m_instance); // only one instance is allowed
@@ -475,12 +475,12 @@ Feed *Session::feedByURL(const QString &url) const
return m_feedsByURL.value(url);
}
uint Session::refreshInterval() const
int Session::refreshInterval() const
{
return m_refreshInterval;
}
void Session::setRefreshInterval(const uint refreshInterval)
void Session::setRefreshInterval(const int refreshInterval)
{
if (m_refreshInterval != refreshInterval) {
SettingsStorage::instance()->storeValue(SettingsKey_RefreshInterval, refreshInterval);

View File

@@ -101,8 +101,8 @@ namespace RSS
int maxArticlesPerFeed() const;
void setMaxArticlesPerFeed(int n);
uint refreshInterval() const;
void setRefreshInterval(uint refreshInterval);
int refreshInterval() const;
void setRefreshInterval(int refreshInterval);
bool addFolder(const QString &path, QString *error = nullptr);
bool addFeed(const QString &url, const QString &path, QString *error = nullptr);
@@ -152,7 +152,7 @@ namespace RSS
AsyncFileStorage *m_confFileStorage;
AsyncFileStorage *m_dataFileStorage;
QTimer m_refreshTimer;
uint m_refreshInterval;
int m_refreshInterval;
int m_maxArticlesPerFeed;
QHash<QString, Item *> m_itemsByPath;
QHash<QUuid, Feed *> m_feedsByUID;