gmail: fix crash and make labels changing work online
This commit is contained in:
parent
b597e76baf
commit
bd89f2c247
|
@ -66,7 +66,7 @@ set(APP_AUTHOR "Martin Rotter")
|
|||
set(APP_COPYRIGHT "\\251 2011-${YEAR} ${APP_AUTHOR}")
|
||||
set(APP_REVERSE_NAME "io.github.martinrotter.rssguard")
|
||||
set(APP_DONATE_URL "https://github.com/sponsors/martinrotter")
|
||||
set(APP_VERSION "4.4.0")
|
||||
set(APP_VERSION "4.4.1")
|
||||
|
||||
set(APP_URL "https://github.com/martinrotter/rssguard")
|
||||
set(APP_URL_DOCUMENTATION "https://github.com/martinrotter/rssguard/blob/${APP_VERSION}/resources/docs/Documentation.md")
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "core/feedsmodel.h"
|
||||
#include "database/databasequeries.h"
|
||||
#include "definitions/definitions.h"
|
||||
#include "definitions/globals.h"
|
||||
#include "gui/feedsview.h"
|
||||
#include "miscellaneous/application.h"
|
||||
#include "miscellaneous/regexfactory.h"
|
||||
|
@ -72,8 +73,8 @@ QModelIndexList FeedsProxyModel::match(const QModelIndex& start,
|
|||
QModelIndexList result;
|
||||
const int match_type = flags & 0x0F;
|
||||
const Qt::CaseSensitivity cs = Qt::CaseSensitivity::CaseInsensitive;
|
||||
const bool recurse = (flags & Qt::MatchFlag::MatchRecursive) > 0;
|
||||
const bool wrap = (flags & Qt::MatchFlag::MatchWrap) > 0;
|
||||
const bool recurse = Globals::hasFlag(flags, Qt::MatchFlag::MatchRecursive);
|
||||
const bool wrap = Globals::hasFlag(flags, Qt::MatchFlag::MatchWrap);
|
||||
const bool all_hits = (hits == -1);
|
||||
QString entered_text;
|
||||
const QModelIndex p = parent(start);
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
class Globals {
|
||||
public:
|
||||
template <typename T> static bool hasFlag(T lhs, T rhs);
|
||||
template <typename T, typename U> static bool hasFlag(T lhs, U rhs);
|
||||
|
||||
private:
|
||||
Globals();
|
||||
};
|
||||
|
||||
template <typename T> inline bool Globals::hasFlag(T lhs, T rhs) {
|
||||
template <typename T, typename U> inline bool Globals::hasFlag(T lhs, U rhs) {
|
||||
return (int(lhs) & int(rhs)) == int(rhs);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,9 +72,14 @@ void EmailPreviewer::loadMessage(const Message& msg, RootItem* selected_item) {
|
|||
}
|
||||
|
||||
void EmailPreviewer::loadExtraMessageData() {
|
||||
m_ui.m_tbTo->setText(m_account->network()->getMessageMetadata(m_message.m_customId,
|
||||
{QSL("TO")},
|
||||
m_account->networkProxy())["To"]);
|
||||
try {
|
||||
m_ui.m_tbTo->setText(m_account->network()->getMessageMetadata(m_message.m_customId,
|
||||
{QSL("TO")},
|
||||
m_account->networkProxy())["To"]);
|
||||
}
|
||||
catch (const ApplicationException& ex) {
|
||||
qWarningNN << LOGSEC_GMAIL << "Cannot load extra article metadata:" << QUOTE_W_SPACE_DOT(ex.message());
|
||||
}
|
||||
}
|
||||
|
||||
void EmailPreviewer::replyToEmail() {
|
||||
|
|
Loading…
Reference in New Issue