save
This commit is contained in:
parent
12104c70a4
commit
b90402eced
17 changed files with 43 additions and 12 deletions
|
@ -4,6 +4,10 @@ DEFINES *= QT_USE_QSTRINGBUILDER QT_USE_FAST_CONCATENATION QT_USE_FAST_OPERATOR_
|
|||
VERSION = $$APP_VERSION
|
||||
QT *= core gui widgets sql network xml qml
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 5) {
|
||||
QT*= core5compat
|
||||
}
|
||||
|
||||
equals(USE_WEBENGINE, true) {
|
||||
message($$MSG_PREFIX: Application will be compiled WITH QtWebEngine module.)
|
||||
QT *= webenginewidgets
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright 2017-2019 Martin Rotter <rotter.martinos@gmail.com> -->
|
||||
<!-- Copyright 2017-2020 Martin Rotter <rotter.martinos@gmail.com> -->
|
||||
<component type="desktop-application">
|
||||
<id>com.github.rssguard.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
|
|
|
@ -805,7 +805,7 @@ namespace Mimesis {
|
|||
QLocale loc("C");
|
||||
QDateTime dat;
|
||||
|
||||
dat.fromTime_t(date.time_since_epoch().count());
|
||||
dat.setSecsSinceEpoch(date.time_since_epoch().count());
|
||||
|
||||
return loc.toString(dat, "ddd, MM MMM yyyy HH:mm:ss t").toStdString();
|
||||
|
||||
|
|
|
@ -12,7 +12,11 @@
|
|||
DynamicShortcutsWidget::DynamicShortcutsWidget(QWidget* parent) : QWidget(parent) {
|
||||
// Create layout for this control and set is as active.
|
||||
m_layout = new QGridLayout(this);
|
||||
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
m_layout->setMargin(0);
|
||||
#endif
|
||||
|
||||
setLayout(m_layout);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,11 @@ ShortcutCatcher::ShortcutCatcher(QWidget* parent)
|
|||
: QWidget(parent), m_isRecording(false), m_numKey(0), m_modifierKeys(0U) {
|
||||
// Setup layout of the control
|
||||
m_layout = new QHBoxLayout(this);
|
||||
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
m_layout->setMargin(0);
|
||||
#endif
|
||||
|
||||
m_layout->setSpacing(1);
|
||||
|
||||
// Create reset button.
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "miscellaneous/iconfactory.h"
|
||||
#include "services/standard/standardserviceentrypoint.h"
|
||||
|
||||
#include <QDesktopWidget>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QListWidget>
|
||||
#include <QSize>
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
#endif
|
||||
|
||||
#include <QCloseEvent>
|
||||
#include <QDesktopWidget>
|
||||
#include <QFileDialog>
|
||||
#include <QRect>
|
||||
#include <QScopedPointer>
|
||||
|
|
|
@ -259,11 +259,14 @@ void FeedMessageViewer::initializeViews() {
|
|||
auto* message_layout = new QVBoxLayout(m_messagesWidget);
|
||||
|
||||
// Set layout properties.
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
central_layout->setMargin(0);
|
||||
central_layout->setSpacing(0);
|
||||
feed_layout->setMargin(0);
|
||||
feed_layout->setSpacing(0);
|
||||
message_layout->setMargin(0);
|
||||
#endif
|
||||
|
||||
central_layout->setSpacing(0);
|
||||
feed_layout->setSpacing(0);
|
||||
message_layout->setSpacing(0);
|
||||
|
||||
// Set views.
|
||||
|
|
|
@ -568,7 +568,11 @@ void MessagesView::selectNextUnreadItem() {
|
|||
}
|
||||
|
||||
void MessagesView::searchMessages(const QString& pattern) {
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
m_proxyModel->setFilterRegExp(pattern);
|
||||
#else
|
||||
m_proxyModel->setFilterRegularExpression(pattern);
|
||||
#endif
|
||||
|
||||
if (selectionModel()->selectedRows().isEmpty()) {
|
||||
emit currentMessageRemoved();
|
||||
|
|
|
@ -4,7 +4,12 @@
|
|||
#define STYLEDITEMDELEGATEWITHOUTFOCUS_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
#include <QStyleOptionViewItemV4>
|
||||
#else
|
||||
#include <QStyleOptionViewItem>
|
||||
#endif
|
||||
|
||||
class StyledItemDelegateWithoutFocus : public QStyledItemDelegate {
|
||||
Q_OBJECT
|
||||
|
|
|
@ -19,7 +19,10 @@ WidgetWithStatus::WidgetWithStatus(QWidget* parent)
|
|||
m_iconOk = qApp->icons()->fromTheme(QSL("dialog-yes"));
|
||||
|
||||
// Set layout properties.
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
m_layout->setMargin(0);
|
||||
#endif
|
||||
|
||||
setLayout(m_layout);
|
||||
setStatus(StatusType::Information, QString());
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "definitions/definitions.h"
|
||||
|
||||
Mutex::Mutex(QMutex::RecursionMode mode, QObject* parent) : QObject(parent), m_mutex(new QMutex(mode)), m_isLocked(false) {}
|
||||
Mutex::Mutex(QObject* parent) : QObject(parent), m_mutex(new QMutex()), m_isLocked(false) {}
|
||||
|
||||
Mutex::~Mutex() {
|
||||
qDebugNN << LOGSEC_CORE << ("Destroying Mutex instance.");
|
||||
|
|
|
@ -10,9 +10,7 @@ class Mutex : public QObject {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
// Constructors.
|
||||
explicit Mutex(QMutex::RecursionMode mode = QMutex::NonRecursive, QObject* parent = 0);
|
||||
explicit Mutex(QObject* parent = nullptr);
|
||||
virtual ~Mutex();
|
||||
|
||||
// Main methods.
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <QCryptographicHash>
|
||||
#include <QDataStream>
|
||||
#include <QDateTime>
|
||||
#include <QIODevice>
|
||||
#include <QRandomGenerator>
|
||||
#include <QtDebug>
|
||||
#include <QtGlobal>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <QDir>
|
||||
#include <QSet>
|
||||
|
||||
CacheForServiceRoot::CacheForServiceRoot() : m_cacheSaveMutex(new QMutex(QMutex::NonRecursive)) {}
|
||||
CacheForServiceRoot::CacheForServiceRoot() : m_cacheSaveMutex(new QMutex()) {}
|
||||
|
||||
void CacheForServiceRoot::addLabelsAssignmentsToCache(const QList<Message>& ids_of_messages, Label* lbl, bool assign) {
|
||||
auto custom_ids = lbl->getParentServiceRoot()->customIDsOfMessages(ids_of_messages);
|
||||
|
|
|
@ -18,7 +18,11 @@ EmailRecipientControl::EmailRecipientControl(const QString& recipient, QWidget*
|
|||
lay->addWidget(m_cmbRecipientType = new QComboBox(this));
|
||||
lay->addWidget(m_txtRecipient = new QLineEdit(this), 1);
|
||||
lay->addWidget(m_btnCloseMe = new PlainToolButton(this));
|
||||
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
lay->setMargin(0);
|
||||
#endif
|
||||
|
||||
lay->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
m_cmbRecipientType->setFocusPolicy(Qt::FocusPolicy::NoFocus);
|
||||
|
|
|
@ -23,7 +23,10 @@ FormAddEditEmail::FormAddEditEmail(GmailServiceRoot* root, QWidget* parent)
|
|||
|
||||
GuiUtilities::applyDialogProperties(*this, qApp->icons()->fromTheme(QSL("mail-message-new")));
|
||||
|
||||
#if QT_VERSION_MAJOR <= 5
|
||||
m_ui.m_layoutAdder->setMargin(0);
|
||||
#endif
|
||||
|
||||
m_ui.m_layoutAdder->setContentsMargins(0, 0, 0, 0);
|
||||
|
||||
m_ui.m_btnAdder->setIcon(qApp->icons()->fromTheme(QSL("list-add")));
|
||||
|
|
Loading…
Add table
Reference in a new issue