diff --git a/src/librssguard/definitions/definitions.h b/src/librssguard/definitions/definitions.h index 40331ed0c..919486e6c 100755 --- a/src/librssguard/definitions/definitions.h +++ b/src/librssguard/definitions/definitions.h @@ -172,8 +172,8 @@ #define qInfoNN qInfo().noquote().nospace() #endif -#define QUOTE_W_SPACE_DOT(x) " '" << x << "'." -#define QUOTE_W_SPACE(x) " '" << x << "' " +#define QUOTE_W_SPACE_DOT(x) " '" << (x) << "'." +#define QUOTE_W_SPACE(x) " '" << (x) << "' " #ifndef QSL diff --git a/src/librssguard/librssguard.pro b/src/librssguard/librssguard.pro index be2bb6528..2978393b3 100644 --- a/src/librssguard/librssguard.pro +++ b/src/librssguard/librssguard.pro @@ -269,7 +269,6 @@ SOURCES += core/feeddownloader.cpp \ services/abstract/importantnode.cpp \ services/abstract/recyclebin.cpp \ services/abstract/rootitem.cpp \ - services/abstract/serviceentrypoint.cpp \ services/abstract/serviceroot.cpp \ services/gmail/gmailentrypoint.cpp \ services/gmail/gmailfeed.cpp \ diff --git a/src/librssguard/services/abstract/accountcheckmodel.cpp b/src/librssguard/services/abstract/accountcheckmodel.cpp index f84289e30..825964b21 100644 --- a/src/librssguard/services/abstract/accountcheckmodel.cpp +++ b/src/librssguard/services/abstract/accountcheckmodel.cpp @@ -9,8 +9,6 @@ AccountCheckModel::AccountCheckModel(QObject* parent) : QAbstractItemModel(parent), m_rootItem(nullptr), m_recursiveChange(false) {} -AccountCheckModel::~AccountCheckModel() = default; - RootItem* AccountCheckModel::itemForIndex(const QModelIndex& index) const { if (index.isValid() && index.model() == this) { return static_cast(index.internalPointer()); diff --git a/src/librssguard/services/abstract/accountcheckmodel.h b/src/librssguard/services/abstract/accountcheckmodel.h index 13bee3533..4a8fdaa15 100644 --- a/src/librssguard/services/abstract/accountcheckmodel.h +++ b/src/librssguard/services/abstract/accountcheckmodel.h @@ -14,7 +14,7 @@ class AccountCheckModel : public QAbstractItemModel { public: explicit AccountCheckModel(QObject* parent = nullptr); - virtual ~AccountCheckModel(); + virtual ~AccountCheckModel() = default; QModelIndex index(int row, int column, const QModelIndex& parent) const; QModelIndex parent(const QModelIndex& child) const; diff --git a/src/librssguard/services/abstract/feed.cpp b/src/librssguard/services/abstract/feed.cpp index d41e2c79c..7c8cd2497 100755 --- a/src/librssguard/services/abstract/feed.cpp +++ b/src/librssguard/services/abstract/feed.cpp @@ -39,7 +39,9 @@ Feed::Feed(const QSqlRecord& record) : Feed(nullptr) { setAutoUpdateType(static_cast(record.value(FDS_DB_UPDATE_TYPE_INDEX).toInt())); setAutoUpdateInitialInterval(record.value(FDS_DB_UPDATE_INTERVAL_INDEX).toInt()); - qDebug("Custom ID of feed when loading from DB is '%s'.", qPrintable(customId())); + qDebugNN << LOGSEC_CORE + << "Custom ID of feed when loading from DB is" + << QUOTE_W_SPACE_DOT(customId()); } Feed::Feed(const Feed& other) : RootItem(other) { @@ -188,13 +190,16 @@ int Feed::updateMessages(const QList& messages, bool error_during_obtai if (!error_during_obtaining) { bool is_main_thread = QThread::currentThread() == qApp->thread(); - qDebug("Updating messages in DB. Main thread: '%s'.", qPrintable(is_main_thread ? "true" : "false")); + qDebugNN << LOGSEC_CORE + << "Updating messages in DB. Main thread:" + << QUOTE_W_SPACE_DOT(is_main_thread ? "true" : "false"); bool anything_updated = false; bool ok = true; if (!messages.isEmpty()) { - qDebug("There are some messages to be updated/added to DB."); + qDebugNN << LOGSEC_CORE + << "There are some messages to be updated/added to DB."; QString custom_id = customId(); int account_id = getParentServiceRoot()->accountId(); @@ -205,7 +210,8 @@ int Feed::updateMessages(const QList& messages, bool error_during_obtai updated_messages = DatabaseQueries::updateMessages(database, messages, custom_id, account_id, url(), &anything_updated, &ok); } else { - qWarning("There are no messages for update."); + qDebugNN << LOGSEC_CORE + << "There are no messages for update."; } if (ok) { @@ -224,7 +230,8 @@ int Feed::updateMessages(const QList& messages, bool error_during_obtai } } else { - qCritical("There is indication that there was error during messages obtaining."); + qCriticalNN << LOGSEC_CORE + << "There is indication that there was error during messages obtaining."; } // Some messages were really added to DB, reload feed in model. diff --git a/src/librssguard/services/abstract/gui/formfeeddetails.cpp b/src/librssguard/services/abstract/gui/formfeeddetails.cpp index b55a6fb8e..8f43f8a55 100644 --- a/src/librssguard/services/abstract/gui/formfeeddetails.cpp +++ b/src/librssguard/services/abstract/gui/formfeeddetails.cpp @@ -39,8 +39,6 @@ FormFeedDetails::FormFeedDetails(ServiceRoot* service_root, QWidget* parent) onPasswordChanged(QString()); } -FormFeedDetails::~FormFeedDetails() = default; - int FormFeedDetails::addEditFeed(Feed* input_feed, RootItem* parent_to_select, const QString& url) { // Load categories. loadCategories(m_serviceRoot->getSubTreeCategories(), m_serviceRoot); @@ -188,8 +186,6 @@ void FormFeedDetails::onUseDefaultIcon() { m_ui->m_btnIcon->setIcon(QIcon()); } -void FormFeedDetails::apply() {} - void FormFeedDetails::guessFeed() { QPair result = StandardFeed::guessFeed(m_ui->m_txtUrl->lineEdit()->text(), m_ui->m_txtUsername->lineEdit()->text(), diff --git a/src/librssguard/services/abstract/gui/formfeeddetails.h b/src/librssguard/services/abstract/gui/formfeeddetails.h index c961c68fa..7f07c34a8 100644 --- a/src/librssguard/services/abstract/gui/formfeeddetails.h +++ b/src/librssguard/services/abstract/gui/formfeeddetails.h @@ -20,10 +20,8 @@ class FormFeedDetails : public QDialog { Q_OBJECT public: - - // Constructors and destructors. explicit FormFeedDetails(ServiceRoot* service_root, QWidget* parent = nullptr); - virtual ~FormFeedDetails(); + virtual ~FormFeedDetails() = default; public slots: diff --git a/src/librssguard/services/abstract/serviceentrypoint.cpp b/src/librssguard/services/abstract/serviceentrypoint.cpp deleted file mode 100644 index 43048a8cf..000000000 --- a/src/librssguard/services/abstract/serviceentrypoint.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// For license of this file, see /LICENSE.md. - -#include "services/abstract/serviceentrypoint.h" - -ServiceEntryPoint::~ServiceEntryPoint() = default; diff --git a/src/librssguard/services/abstract/serviceentrypoint.h b/src/librssguard/services/abstract/serviceentrypoint.h index eee5ce368..0003d5fea 100644 --- a/src/librssguard/services/abstract/serviceentrypoint.h +++ b/src/librssguard/services/abstract/serviceentrypoint.h @@ -13,7 +13,7 @@ class FeedsModel; // TOP LEVEL class which provides basic information about the "service" class ServiceEntryPoint { public: - virtual ~ServiceEntryPoint(); + virtual ~ServiceEntryPoint() = default; // Creates new service root item, which is ready to be added // into the model. This method can for example display diff --git a/src/librssguard/services/gmail/gui/formeditgmailaccount.cpp b/src/librssguard/services/gmail/gui/formeditgmailaccount.cpp index 62a9fa023..28937f14e 100644 --- a/src/librssguard/services/gmail/gui/formeditgmailaccount.cpp +++ b/src/librssguard/services/gmail/gui/formeditgmailaccount.cpp @@ -14,8 +14,8 @@ FormEditGmailAccount::FormEditGmailAccount(QWidget* parent) m_ui.setupUi(this); GuiUtilities::applyDialogProperties(*this, qApp->icons()->miscIcon(QSL("gmail"))); - GuiUtilities::setLabelAsNotice(*m_ui.m_lblInfo, true); + m_ui.m_lblInfo->setText(tr("Specified redirect URL must start with \"http://localhost\" and " "must be configured in your OAuth \"application\".")); @@ -104,12 +104,10 @@ void FormEditGmailAccount::onClickedCancel() { void FormEditGmailAccount::checkUsername(const QString& username) { if (username.isEmpty()) { - m_ui.m_txtUsername->setStatus(WidgetWithStatus::StatusType::Error, tr("No username entered. \ - ")); + m_ui.m_txtUsername->setStatus(WidgetWithStatus::StatusType::Error, tr("No username entered.")); } else { - m_ui.m_txtUsername->setStatus(WidgetWithStatus::StatusType::Ok, tr("Some username entered. \ - ")); + m_ui.m_txtUsername->setStatus(WidgetWithStatus::StatusType::Ok, tr("Some username entered.")); } }