diff --git a/src/CondFormat.cpp b/src/CondFormat.cpp index b9fd0398..aa1924d7 100644 --- a/src/CondFormat.cpp +++ b/src/CondFormat.cpp @@ -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; diff --git a/src/PreferencesDialog.cpp b/src/PreferencesDialog.cpp index da5a0963..9f1bea15 100644 --- a/src/PreferencesDialog.cpp +++ b/src/PreferencesDialog.cpp @@ -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);