mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-09 06:43:08 +01:00
Fix for auto qstringbuilder deduction
This commit is contained in:
parent
57a67760c4
commit
95892001f6
@ -16,13 +16,13 @@ QStringList DatabaseDriver::prepareScript(const QString& base_sql_folder,
|
||||
const QString& sql_file,
|
||||
const QString& database_name) {
|
||||
QStringList statements;
|
||||
auto next_file = base_sql_folder + QDir::separator() + sql_file;
|
||||
QString next_file = base_sql_folder + QDir::separator() + sql_file;
|
||||
QString sql_script = QString::fromUtf8(IOFactory::readFile(next_file));
|
||||
auto new_statements = sql_script.split(APP_DB_COMMENT_SPLIT,
|
||||
QStringList new_statements = sql_script.split(APP_DB_COMMENT_SPLIT,
|
||||
#if QT_VERSION >= 0x050F00 // Qt >= 5.15.0
|
||||
Qt::SplitBehaviorFlags::SkipEmptyParts);
|
||||
Qt::SplitBehaviorFlags::SkipEmptyParts);
|
||||
#else
|
||||
QString::SplitBehavior::SkipEmptyParts);
|
||||
QString::SplitBehavior::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < new_statements.size(); i++) {
|
||||
@ -30,13 +30,13 @@ QStringList DatabaseDriver::prepareScript(const QString& base_sql_folder,
|
||||
// We include another file.
|
||||
QString included_file_name = new_statements.at(i).mid(QSL(APP_DB_INCLUDE_PLACEHOLDER).size() + 1);
|
||||
|
||||
auto included_file = base_sql_folder + QDir::separator() + included_file_name;
|
||||
QString included_file = base_sql_folder + QDir::separator() + included_file_name;
|
||||
QString included_sql_script = QString::fromUtf8(IOFactory::readFile(included_file));
|
||||
auto included_statements = included_sql_script.split(APP_DB_COMMENT_SPLIT,
|
||||
QStringList included_statements = included_sql_script.split(APP_DB_COMMENT_SPLIT,
|
||||
#if QT_VERSION >= 0x050F00 // Qt >= 5.15.0
|
||||
Qt::SplitBehaviorFlags::SkipEmptyParts);
|
||||
Qt::SplitBehaviorFlags::SkipEmptyParts);
|
||||
#else
|
||||
QString::SplitBehavior::SkipEmptyParts);
|
||||
QString::SplitBehavior::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
statements << included_statements;
|
||||
|
Loading…
Reference in New Issue
Block a user