1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Revert "Require Minimal SQLite version 3.24.0"

This reverts commit a09e49df13.
This commit is contained in:
Juraj Oravec 2024-06-01 17:29:42 +02:00
parent a06c0871ff
commit 9c348406a3
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B
4 changed files with 0 additions and 34 deletions

View File

@ -14,8 +14,6 @@ set(KF_MAJOR_VERSION "6")
set(QT_MIN_VERSION "6.4.0")
set(KF_MIN_VERSION "5.240.0")
set(FALKON_SQLITE_MIN_VERSION "3.24.0")
# Find ECM, with nice error handling in case of failure
include(FeatureSummary)
find_package(ECM ${KF_MIN_VERSION} CONFIG)

View File

@ -4,9 +4,6 @@
#cmakedefine FALKON_PLUGIN_PATH "${FALKON_PLUGIN_PATH}"
#cmakedefine FALKON_GIT_REVISION "${FALKON_GIT_REVISION}"
/* Minimal required version of SQLite */
#define FALKON_SQLITE_MIN_VERSION "${FALKON_SQLITE_MIN_VERSION}"
/* Enable portable build */
#cmakedefine PORTABLE_BUILD

View File

@ -21,7 +21,6 @@
#include "updater.h"
#include "qztools.h"
#include "sqldatabase.h"
#include "../config.h"
#include "sitesettingsmanager.h"
#include "settings.h"
@ -32,7 +31,6 @@
#include <QMessageBox>
#include <QSettings>
#include <QStandardPaths>
#include <QVersionNumber>
#include <QWebEnginePage>
#include <iostream>
@ -301,11 +299,6 @@ void ProfileManager::connectDatabase()
return;
}
if (!checkSQLiteVersion(db)) {
qFatal() << "Minimal required version of SQLite is:" << FALKON_SQLITE_MIN_VERSION;
return;
}
if (db.tables().isEmpty()) {
const QStringList statements = QzTools::readAllFileContents(QSL(":/data/browsedata.sql")).split(QL1C(';'));
for (const QString &statement : statements) {
@ -495,22 +488,3 @@ void ProfileManager::updateDatabase()
}
}
}
bool ProfileManager::checkSQLiteVersion(const QSqlDatabase& db)
{
QSqlQuery query_version{db};
query_version.exec(QSL("select sqlite_version();"));
if (!query_version.next()) {
qCritical() << "Unable to fetch the SQLite version.";
return false;
}
QString versionString = query_version.value(QSL("sqlite_version()")).toString();
query_version.finish();
auto currentVersion = QVersionNumber::fromString(versionString);
auto minimalVersion = QVersionNumber::fromString(QSL(FALKON_SQLITE_MIN_VERSION));
return (currentVersion >= minimalVersion);
}

View File

@ -22,8 +22,6 @@
#include "qzcommon.h"
class QSqlDatabase;
class ProfileManager
{
public:
@ -57,7 +55,6 @@ private:
void updateDatabase();
void connectDatabase();
bool checkSQLiteVersion(const QSqlDatabase &db);
QString profileVersion;
};