Version upgrade 4.00 #45
3 changed files with 22 additions and 21 deletions
|
@ -2,7 +2,8 @@
|
|||
#include "global_configs.h"
|
||||
|
||||
|
||||
namespace GlobalConfigs {
|
||||
namespace GlobalConfigs
|
||||
{
|
||||
|
||||
WindowTheme window_theme = WindowTheme::Native;
|
||||
IconsTheme icons_theme = IconsTheme::Auto;
|
||||
|
@ -10,4 +11,4 @@ ChartsTheme charts_theme = ChartsTheme::Light;
|
|||
|
||||
QString icons_set = "light_native";
|
||||
|
||||
}
|
||||
} // namespace GlobalConfigs
|
||||
|
|
|
@ -32,7 +32,8 @@ enum class ChartsTheme : themes_t {
|
|||
/*!
|
||||
Globally shared configurations
|
||||
*/
|
||||
namespace GlobalConfigs {
|
||||
namespace GlobalConfigs
|
||||
{
|
||||
|
||||
extern WindowTheme window_theme;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include "utilities/strings.h"
|
||||
|
||||
#include <QRegularExpression>
|
||||
#include <QStringList>
|
||||
|
||||
|
||||
namespace FilterOps
|
||||
|
@ -57,28 +56,28 @@ std::optional<QString> parseNumericFilter( const QString& filter_str ) noexcept
|
|||
return {aux};
|
||||
|
||||
} else if ( StringOps::isNumeric( aux ) ) {
|
||||
aux.prepend( QChar('=') );
|
||||
aux.prepend( QLatin1Char('=') );
|
||||
|
||||
} else if ( aux.at(0) == QChar('!') && aux.at(1) != QChar('=') ) {
|
||||
aux.insert(1, QChar('='));
|
||||
} else if ( aux.at(0) == QLatin1Char('!') && aux.at(1) != QLatin1Char('=') ) {
|
||||
aux.insert(1, QLatin1Char('='));
|
||||
|
||||
} else if ( aux.startsWith(QLatin1String("EQ")) ) {
|
||||
aux.replace(0, 2, QChar('='));
|
||||
aux.replace(0, 2, QLatin1Char('='));
|
||||
|
||||
} else if ( aux.startsWith(QLatin1String("NE")) ) {
|
||||
aux.replace(0, 2, QChar('=')).prepend(QChar('!'));
|
||||
aux.replace(0, 2, QLatin1Char('=')).prepend(QLatin1Char('!'));
|
||||
|
||||
} else if ( aux.startsWith(QLatin1String("LT")) ) {
|
||||
aux.replace(0, 2, QChar('<'));
|
||||
aux.replace(0, 2, QLatin1Char('<'));
|
||||
|
||||
} else if ( aux.startsWith(QLatin1String("LE")) ) {
|
||||
aux.replace(0, 2, QChar('=')).prepend(QChar('<'));
|
||||
aux.replace(0, 2, QLatin1Char('=')).prepend(QLatin1Char('<'));
|
||||
|
||||
} else if ( aux.startsWith(QLatin1String("GT")) ) {
|
||||
aux.replace(0, 2, QChar('>'));
|
||||
aux.replace(0, 2, QLatin1Char('>'));
|
||||
|
||||
} else if ( aux.startsWith(QLatin1String("GE")) ) {
|
||||
aux.replace(0, 2, QChar('=')).prepend(QChar('>'));
|
||||
aux.replace(0, 2, QLatin1Char('=')).prepend(QLatin1Char('>'));
|
||||
}
|
||||
|
||||
// final check
|
||||
|
@ -112,13 +111,13 @@ std::optional<QString> parseTextualFilter( const QString& filter_str ) noexcept
|
|||
result.emplace(QStringLiteral(" IS NOT NULL"));
|
||||
|
||||
} else {
|
||||
if ( aux.startsWith(QChar('!')) ) {
|
||||
result.emplace( QStringLiteral(" NOT LIKE '%1'").arg( aux.removeFirst().trimmed().replace(QChar('\''),QLatin1String("''")) ) );
|
||||
if ( aux.startsWith(QLatin1Char('!')) ) {
|
||||
result.emplace( QStringLiteral(" NOT LIKE '%1'").arg( aux.removeFirst().trimmed().replace(QLatin1Char('\''),QLatin1String("''")) ) );
|
||||
} else {
|
||||
if ( aux.startsWith(QChar('\\')) ) {
|
||||
if ( aux.startsWith(QLatin1Char('\\')) ) {
|
||||
aux.removeFirst();
|
||||
}
|
||||
result.emplace( QStringLiteral(" LIKE '%1'").arg( aux.replace(QChar('\''),QLatin1String("''")) ) );
|
||||
result.emplace( QStringLiteral(" LIKE '%1'").arg( aux.replace(QLatin1Char('\''),QLatin1String("''")) ) );
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue