mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-29 16:49:34 +01:00
Some const/pointers.
This commit is contained in:
parent
f64d6d1694
commit
1489365d32
@ -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<ServiceRoot*> roots = entry_point->initializeSubtree();
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <QTextStream>
|
||||
|
||||
|
||||
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() {
|
||||
|
2
src/gui/dialogs/formabout.h
Normal file → Executable file
2
src/gui/dialogs/formabout.h
Normal file → Executable file
@ -41,7 +41,7 @@ class FormAbout : public QDialog {
|
||||
void loadLicenseAndInformation();
|
||||
void loadSettingsAndPaths();
|
||||
|
||||
Ui::FormAbout *m_ui;
|
||||
QScopedPointer<Ui::FormAbout> m_ui;
|
||||
};
|
||||
|
||||
#endif // FORMABOUT_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<ServiceRoot*> initializeSubtree() = 0;
|
||||
virtual QList<ServiceRoot*> initializeSubtree() const = 0;
|
||||
|
||||
// Can this service account be added just once?
|
||||
// NOTE: This is true particularly for "standard" service
|
||||
|
@ -85,7 +85,7 @@ ServiceRoot *StandardServiceEntryPoint::createNewRoot() {
|
||||
}
|
||||
}
|
||||
|
||||
QList<ServiceRoot*> StandardServiceEntryPoint::initializeSubtree() {
|
||||
QList<ServiceRoot*> StandardServiceEntryPoint::initializeSubtree() const {
|
||||
// Check DB if standard account is enabled.
|
||||
QSqlDatabase database = qApp->database()->connection(QSL("StandardServiceEntryPoint"), DatabaseFactory::FromSettings);
|
||||
QSqlQuery query(database);
|
||||
|
@ -35,7 +35,7 @@ class StandardServiceEntryPoint : public ServiceEntryPoint {
|
||||
QString code();
|
||||
|
||||
ServiceRoot *createNewRoot();
|
||||
QList<ServiceRoot*> initializeSubtree();
|
||||
QList<ServiceRoot*> initializeSubtree() const;
|
||||
};
|
||||
|
||||
#endif // STANDARDSERVICEENTRYPOINT_H
|
||||
|
@ -79,7 +79,7 @@ ServiceRoot *TtRssServiceEntryPoint::createNewRoot() {
|
||||
return new_root;
|
||||
}
|
||||
|
||||
QList<ServiceRoot*> TtRssServiceEntryPoint::initializeSubtree() {
|
||||
QList<ServiceRoot*> TtRssServiceEntryPoint::initializeSubtree() const {
|
||||
// Check DB if standard account is enabled.
|
||||
QSqlDatabase database = qApp->database()->connection(QSL("TtRssServiceEntryPoint"), DatabaseFactory::FromSettings);
|
||||
QSqlQuery query(database);
|
||||
|
@ -36,7 +36,7 @@ class TtRssServiceEntryPoint : public ServiceEntryPoint {
|
||||
QString code();
|
||||
|
||||
ServiceRoot *createNewRoot();
|
||||
QList<ServiceRoot*> initializeSubtree();
|
||||
QList<ServiceRoot*> initializeSubtree() const;
|
||||
};
|
||||
|
||||
#endif // TTRSSSERVICEENTRYPOINT_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user