diff --git a/src/core/feedsmodel.cpp b/src/core/feedsmodel.cpp index e495f63d2..e888831ce 100755 --- a/src/core/feedsmodel.cpp +++ b/src/core/feedsmodel.cpp @@ -726,7 +726,7 @@ bool FeedsModel::emptyAllBins() { void FeedsModel::loadActivatedServiceAccounts() { // Iterate all globally available feed "service plugins". - foreach (ServiceEntryPoint *entry_point, qApp->feedServices()) { + foreach (const ServiceEntryPoint *entry_point, qApp->feedServices()) { // Load all stored root nodes from the entry point and add those to the model. QList roots = entry_point->initializeSubtree(); diff --git a/src/gui/dialogs/formabout.cpp b/src/gui/dialogs/formabout.cpp index a9fcd4b31..a075c3e08 100755 --- a/src/gui/dialogs/formabout.cpp +++ b/src/gui/dialogs/formabout.cpp @@ -29,7 +29,7 @@ #include -FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout) { +FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout()) { m_ui->setupUi(this); // Set flags and attributes. @@ -54,7 +54,6 @@ FormAbout::FormAbout(QWidget *parent) : QDialog(parent), m_ui(new Ui::FormAbout) FormAbout::~FormAbout() { qDebug("Destroying FormAbout instance."); - delete m_ui; } void FormAbout::loadSettingsAndPaths() { diff --git a/src/gui/dialogs/formabout.h b/src/gui/dialogs/formabout.h old mode 100644 new mode 100755 index fcd41a1e2..493c47863 --- a/src/gui/dialogs/formabout.h +++ b/src/gui/dialogs/formabout.h @@ -41,7 +41,7 @@ class FormAbout : public QDialog { void loadLicenseAndInformation(); void loadSettingsAndPaths(); - Ui::FormAbout *m_ui; + QScopedPointer m_ui; }; #endif // FORMABOUT_H diff --git a/src/services/abstract/serviceentrypoint.h b/src/services/abstract/serviceentrypoint.h index b5974f446..3502fdb3e 100755 --- a/src/services/abstract/serviceentrypoint.h +++ b/src/services/abstract/serviceentrypoint.h @@ -47,7 +47,7 @@ class ServiceEntryPoint { // point from persistent DB. // Returns list of root nodes which will be afterwards added // to the global feed model. - virtual QList initializeSubtree() = 0; + virtual QList initializeSubtree() const = 0; // Can this service account be added just once? // NOTE: This is true particularly for "standard" service diff --git a/src/services/standard/standardserviceentrypoint.cpp b/src/services/standard/standardserviceentrypoint.cpp index 75deae2d7..7a9485013 100755 --- a/src/services/standard/standardserviceentrypoint.cpp +++ b/src/services/standard/standardserviceentrypoint.cpp @@ -85,7 +85,7 @@ ServiceRoot *StandardServiceEntryPoint::createNewRoot() { } } -QList StandardServiceEntryPoint::initializeSubtree() { +QList StandardServiceEntryPoint::initializeSubtree() const { // Check DB if standard account is enabled. QSqlDatabase database = qApp->database()->connection(QSL("StandardServiceEntryPoint"), DatabaseFactory::FromSettings); QSqlQuery query(database); diff --git a/src/services/standard/standardserviceentrypoint.h b/src/services/standard/standardserviceentrypoint.h index b99de25a8..665ab21d6 100755 --- a/src/services/standard/standardserviceentrypoint.h +++ b/src/services/standard/standardserviceentrypoint.h @@ -35,7 +35,7 @@ class StandardServiceEntryPoint : public ServiceEntryPoint { QString code(); ServiceRoot *createNewRoot(); - QList initializeSubtree(); + QList initializeSubtree() const; }; #endif // STANDARDSERVICEENTRYPOINT_H diff --git a/src/services/tt-rss/ttrssserviceentrypoint.cpp b/src/services/tt-rss/ttrssserviceentrypoint.cpp index 379f87cfd..f36e027a7 100755 --- a/src/services/tt-rss/ttrssserviceentrypoint.cpp +++ b/src/services/tt-rss/ttrssserviceentrypoint.cpp @@ -79,7 +79,7 @@ ServiceRoot *TtRssServiceEntryPoint::createNewRoot() { return new_root; } -QList TtRssServiceEntryPoint::initializeSubtree() { +QList TtRssServiceEntryPoint::initializeSubtree() const { // Check DB if standard account is enabled. QSqlDatabase database = qApp->database()->connection(QSL("TtRssServiceEntryPoint"), DatabaseFactory::FromSettings); QSqlQuery query(database); diff --git a/src/services/tt-rss/ttrssserviceentrypoint.h b/src/services/tt-rss/ttrssserviceentrypoint.h index dcd99616b..fddf9628a 100755 --- a/src/services/tt-rss/ttrssserviceentrypoint.h +++ b/src/services/tt-rss/ttrssserviceentrypoint.h @@ -36,7 +36,7 @@ class TtRssServiceEntryPoint : public ServiceEntryPoint { QString code(); ServiceRoot *createNewRoot(); - QList initializeSubtree(); + QList initializeSubtree() const; }; #endif // TTRSSSERVICEENTRYPOINT_H