diff --git a/resources/desktop/com.github.rssguard.appdata.xml b/resources/desktop/com.github.rssguard.appdata.xml
index 72916c17e..ed8455030 100644
--- a/resources/desktop/com.github.rssguard.appdata.xml
+++ b/resources/desktop/com.github.rssguard.appdata.xml
@@ -30,7 +30,7 @@
https://martinrotter.github.io/donate/
-
+
none
diff --git a/src/librssguard/definitions/definitions.h b/src/librssguard/definitions/definitions.h
index 07ebbfc96..0c41fe21f 100755
--- a/src/librssguard/definitions/definitions.h
+++ b/src/librssguard/definitions/definitions.h
@@ -73,7 +73,7 @@
#define TIMEZONE_OFFSET_LIMIT 6
#define CHANGE_EVENT_DELAY 250
#define FLAG_ICON_SUBFOLDER "flags"
-#define SEACRH_MESSAGES_ACTION_NAME "search"
+#define SEARCH_BOX_ACTION_NAME "search"
#define HIGHLIGHTER_ACTION_NAME "highlighter"
#define SPACER_ACTION_NAME "spacer"
#define SEPARATOR_ACTION_NAME "separator"
diff --git a/src/librssguard/gui/basetoolbar.h b/src/librssguard/gui/basetoolbar.h
index 2bc9771bd..d0e4aee19 100644
--- a/src/librssguard/gui/basetoolbar.h
+++ b/src/librssguard/gui/basetoolbar.h
@@ -11,7 +11,7 @@ class BaseBar {
// Returns all actions which can be added to the toolbar.
virtual QList availableActions() const = 0;
- // Returns all changeable actions which are currently included
+ // Returns all actions which are currently included
// in the toolbar.
virtual QList activatedActions() const = 0;
diff --git a/src/librssguard/gui/messagessearchlineedit.cpp b/src/librssguard/gui/messagessearchlineedit.cpp
deleted file mode 100644
index 2d90aa8a4..000000000
--- a/src/librssguard/gui/messagessearchlineedit.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// For license of this file, see /LICENSE.md.
-
-#include "gui/messagessearchlineedit.h"
-
-MessagesSearchLineEdit::MessagesSearchLineEdit(QWidget* parent) : BaseLineEdit(parent) {}
diff --git a/src/librssguard/gui/messagessearchlineedit.h b/src/librssguard/gui/messagessearchlineedit.h
deleted file mode 100644
index 178d3b6af..000000000
--- a/src/librssguard/gui/messagessearchlineedit.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// For license of this file, see /LICENSE.md.
-
-#ifndef MESSAGESEARCHLINEEDIT_H
-#define MESSAGESEARCHLINEEDIT_H
-
-#include "gui/baselineedit.h"
-
-class PlainToolButton;
-
-class MessagesSearchLineEdit : public BaseLineEdit {
- Q_OBJECT
-
- public:
- explicit MessagesSearchLineEdit(QWidget* parent = nullptr);
-};
-
-#endif // MESSAGESEARCHLINEEDIT_H
diff --git a/src/librssguard/gui/messagestoolbar.cpp b/src/librssguard/gui/messagestoolbar.cpp
index 127b05ec9..01156e758 100644
--- a/src/librssguard/gui/messagestoolbar.cpp
+++ b/src/librssguard/gui/messagestoolbar.cpp
@@ -4,7 +4,6 @@
#include "definitions/definitions.h"
#include "gui/baselineedit.h"
-#include "gui/messagessearchlineedit.h"
#include "miscellaneous/iconfactory.h"
#include "miscellaneous/settings.h"
@@ -59,7 +58,7 @@ QList MessagesToolBar::convertActions(const QStringList& actions) {
act->setSeparator(true);
spec_actions.append(act);
}
- else if (action_name == SEACRH_MESSAGES_ACTION_NAME) {
+ else if (action_name == SEARCH_BOX_ACTION_NAME) {
// Add search box.
spec_actions.append(m_actionSearchMessages);
}
@@ -102,7 +101,7 @@ void MessagesToolBar::handleMessageHighlighterChange(QAction* action) {
}
void MessagesToolBar::initializeSearchBox() {
- m_txtSearchMessages = new MessagesSearchLineEdit(this);
+ m_txtSearchMessages = new BaseLineEdit(this);
m_txtSearchMessages->setFixedWidth(FILTER_WIDTH);
m_txtSearchMessages->setPlaceholderText(tr("Search messages"));
@@ -110,9 +109,10 @@ void MessagesToolBar::initializeSearchBox() {
m_actionSearchMessages = new QWidgetAction(this);
m_actionSearchMessages->setDefaultWidget(m_txtSearchMessages);
m_actionSearchMessages->setIcon(qApp->icons()->fromTheme(QSL("system-search")));
- m_actionSearchMessages->setProperty("type", SEACRH_MESSAGES_ACTION_NAME);
+ m_actionSearchMessages->setProperty("type", SEARCH_BOX_ACTION_NAME);
m_actionSearchMessages->setProperty("name", tr("Message search box"));
- connect(m_txtSearchMessages, &MessagesSearchLineEdit::textChanged, this, &MessagesToolBar::messageSearchPatternChanged);
+
+ connect(m_txtSearchMessages, &BaseLineEdit::textChanged, this, &MessagesToolBar::messageSearchPatternChanged);
}
void MessagesToolBar::initializeHighlighter() {
diff --git a/src/librssguard/gui/messagestoolbar.h b/src/librssguard/gui/messagestoolbar.h
index b17c70bea..a8a52a0ae 100644
--- a/src/librssguard/gui/messagestoolbar.h
+++ b/src/librssguard/gui/messagestoolbar.h
@@ -7,12 +7,9 @@
#include "core/messagesmodel.h"
-class MessagesSearchLineEdit;
-
+class BaseLineEdit;
class QWidgetAction;
-
class QToolButton;
-
class QMenu;
class MessagesToolBar : public BaseToolBar {
@@ -21,34 +18,21 @@ class MessagesToolBar : public BaseToolBar {
public:
explicit MessagesToolBar(const QString& title, QWidget* parent = nullptr);
- // External access to search line edit.
- inline MessagesSearchLineEdit* searchLineEdit();
+ BaseLineEdit* searchLineEdit();
- // Implementation of BaseToolBar interface.
- QList availableActions() const;
-
- QList activatedActions() const;
- void saveAndSetActions(const QStringList& actions);
-
- // Loads actions as specified by external actions list.
- // NOTE: This is used primarily for reloading actions
- // when they are changed from settings.
- void loadSpecificActions(const QList& actions, bool initial_load = false);
-
- QList convertActions(const QStringList& actions);
-
- QStringList defaultActions() const;
- QStringList savedActions() const;
+ virtual QList availableActions() const;
+ virtual QList activatedActions() const;
+ virtual void saveAndSetActions(const QStringList& actions);
+ virtual void loadSpecificActions(const QList& actions, bool initial_load = false);
+ virtual QList convertActions(const QStringList& actions);
+ virtual QStringList defaultActions() const;
+ virtual QStringList savedActions() const;
signals:
void messageSearchPatternChanged(const QString& pattern);
-
- // Emitted if message filter is changed.
void messageFilterChanged(MessagesModel::MessageHighlighter filter);
private slots:
-
- // Called when highlighter gets changed.
void handleMessageHighlighterChange(QAction* action);
private:
@@ -60,10 +44,10 @@ class MessagesToolBar : public BaseToolBar {
QToolButton* m_btnMessageHighlighter;
QMenu* m_menuMessageHighlighter;
QWidgetAction* m_actionSearchMessages;
- MessagesSearchLineEdit* m_txtSearchMessages;
+ BaseLineEdit* m_txtSearchMessages;
};
-inline MessagesSearchLineEdit* MessagesToolBar::searchLineEdit() {
+inline BaseLineEdit* MessagesToolBar::searchLineEdit() {
return m_txtSearchMessages;
}
diff --git a/src/librssguard/librssguard.pro b/src/librssguard/librssguard.pro
index 7da9b96d8..bf79b75c1 100644
--- a/src/librssguard/librssguard.pro
+++ b/src/librssguard/librssguard.pro
@@ -85,7 +85,6 @@ HEADERS += core/feeddownloader.h \
gui/messagebox.h \
gui/messagecountspinbox.h \
gui/messagepreviewer.h \
- gui/messagessearchlineedit.h \
gui/messagestoolbar.h \
gui/messagesview.h \
gui/networkproxydetails.h \
@@ -264,7 +263,6 @@ SOURCES += core/feeddownloader.cpp \
gui/messagebox.cpp \
gui/messagecountspinbox.cpp \
gui/messagepreviewer.cpp \
- gui/messagessearchlineedit.cpp \
gui/messagestoolbar.cpp \
gui/messagesview.cpp \
gui/networkproxydetails.cpp \