Fix build for Qt versions < 5.10

This commit is contained in:
Martin Kleusberg
2019-11-06 20:59:24 +01:00
parent 1d6214b769
commit dd6de9479a
2 changed files with 5 additions and 5 deletions

View File

@@ -99,11 +99,11 @@ std::string CondFormat::filterToSqlCondition(const QString& value, const QString
op = value.left(2);
val = value.mid(2);
}
} else if(value.front() == ">" || value.front() == "<") {
} else if(value.at(0) == ">" || value.at(0) == "<") {
value.midRef(1).toFloat(&numeric);
op = value.front();
op = value.at(0);
val = value.mid(1);
} else if(value.front() == "=") {
} else if(value.at(0) == "=") {
val = value.mid(1);
// Check if value to compare with is 'NULL'
@@ -117,7 +117,7 @@ std::string CondFormat::filterToSqlCondition(const QString& value, const QString
op = "IS";
numeric = true;
}
} else if(value.front() == "/" && value.back() == "/" && value.size() > 2) {
} else if(value.at(0) == "/" && value.back() == "/" && value.size() > 2) {
val = value.mid(1, value.length() - 2);
op = "REGEXP";
numeric = false;

View File

@@ -339,7 +339,7 @@ void PreferencesDialog::saveSettings()
void PreferencesDialog::showColourDialog(QTreeWidgetItem* item, int column)
{
if(item->text(column).front() != "#")
if(item->text(column).at(0) != "#")
return;
QColor colour = QColorDialog::getColor(QColor(item->text(column)), this);