bump min qt 5 version, save

This commit is contained in:
Martin Rotter 2022-03-08 07:42:46 +01:00
parent e0c3f6f19b
commit f9724ec5d2
4 changed files with 7 additions and 6 deletions

View File

@ -29,7 +29,8 @@
#
# Other information:
# - supports Windows, Linux, *BSD, macOS, OS/2, Android,
# - Qt 5.9.0 or newer is required,
# - Qt 5.10.0 or newer is required,
# - Qt 6.3.0 or newer is required,
# - cmake 3.9.0 or newer is required,
# - if you wish to make packages for Windows, then you must initialize all submodules
# within repository before compilation,
@ -111,7 +112,7 @@ option(REVISION_FROM_GIT "Get revision using `git rev-parse`" ON)
# Import Qt libraries.
set(QT6_MIN_VERSION 6.2.3)
set(QT5_MIN_VERSION 5.9.0)
set(QT5_MIN_VERSION 5.10.0)
set(QT_COMPONENTS
Core

View File

@ -1491,7 +1491,7 @@ bool DatabaseQueries::purgeMessagesFromBin(const QSqlDatabase& db, bool clear_on
return q.exec();
}
bool DatabaseQueries::deleteAccount(const QSqlDatabase& db, int account_id) {
bool DatabaseQueries::deleteAccount(const QSqlDatabase& db, ServiceRoot* account) {
QSqlQuery query(db);
query.setForwardOnly(true);
@ -1507,7 +1507,7 @@ bool DatabaseQueries::deleteAccount(const QSqlDatabase& db, int account_id) {
for (const QString& q : qAsConst(queries)) {
query.prepare(q);
query.bindValue(QSL(":account_id"), account_id);
query.bindValue(QSL(":account_id"), account->accountId());
if (!query.exec()) {
qCriticalNN << LOGSEC_DB

View File

@ -115,7 +115,7 @@ class DatabaseQueries {
// Returns counts of updated messages <unread, all>.
static QPair<int, int> updateMessages(QSqlDatabase db, QList<Message>& messages,
Feed* feed, bool force_update, bool* ok = nullptr);
static bool deleteAccount(const QSqlDatabase& db, int account_id);
static bool deleteAccount(const QSqlDatabase& db, ServiceRoot* account);
static bool deleteAccountData(const QSqlDatabase& db, int account_id, bool delete_messages_too, bool delete_labels_too);
static bool cleanLabelledMessages(const QSqlDatabase& db, bool clean_read_only, Label* label);
static bool cleanImportantMessages(const QSqlDatabase& db, bool clean_read_only, int account_id);

View File

@ -33,7 +33,7 @@ ServiceRoot::~ServiceRoot() = default;
bool ServiceRoot::deleteViaGui() {
QSqlDatabase database = qApp->database()->driver()->connection(metaObject()->className());
if (DatabaseQueries::deleteAccount(database, accountId())) {
if (DatabaseQueries::deleteAccount(database, this)) {
stop();
requestItemRemoval(this);
return true;