Fix conversion of newlines in gmail plugin.

This commit is contained in:
Martin Rotter 2020-12-07 07:47:26 +01:00
parent f11824ea2b
commit ac4377c0ba
3 changed files with 17 additions and 11 deletions
src/librssguard
gui/dialogs
services/gmail/network

@ -379,6 +379,7 @@ void FormMain::updateAccountsMenu() {
void FormMain::onFeedUpdatesFinished(const FeedDownloadResults& results) {
Q_UNUSED(results)
statusBar()->clearProgressFeeds();
tabWidget()->feedMessageViewer()->messagesView()->reloadSelections();
}
@ -821,6 +822,18 @@ void FormMain::changeEvent(QEvent* event) {
QMainWindow::changeEvent(event);
}
void FormMain::closeEvent(QCloseEvent* event) {
QMainWindow::closeEvent(event);
qDebugNN << LOGSEC_GUI << "Main window's close event";
}
void FormMain::hideEvent(QHideEvent* event) {
QMainWindow::hideEvent(event);
qDebugNN << LOGSEC_GUI << "Main window's hide event";
}
void FormMain::showDocs() {
if (!qApp->web()->openUrlInExternalBrowser(APP_URL_DOCUMENTATION)) {
qApp->showGuiMessage(tr("Cannot open external browser"),

@ -17,8 +17,6 @@ class RSSGUARD_DLLSPEC FormMain : public QMainWindow {
friend class FeedsView;
public:
// Constructors and destructors.
explicit FormMain(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowType::Widget);
virtual ~FormMain();
@ -73,18 +71,14 @@ class RSSGUARD_DLLSPEC FormMain : public QMainWindow {
void reportABug();
void donate();
private:
// Event handler reimplementations.
protected:
virtual void changeEvent(QEvent* event);
virtual void closeEvent(QCloseEvent* event);
virtual void hideEvent(QHideEvent* event);
// Creates all needed menus and sets them up.
private:
void prepareMenus();
// Creates needed connections for this window.
void createConnections();
// Sets up proper icons for this widget.
void setupIcons();
QScopedPointer<Ui::FormMain> m_ui;

@ -432,7 +432,6 @@ bool GmailNetworkFactory::fillFullMessage(Message& msg, const QJsonObject& json,
msg.m_contents = backup_contents;
}
msg.m_contents.replace(QSL("\r\n"), QSL("\n")).replace(QL1C('\r'), QL1C('\n')).replace(QL1C('\n'), QSL("<br/>"));
return true;
}