diff --git a/sdk/openbr_plugin.cpp b/sdk/openbr_plugin.cpp index 7f84972..612ad95 100644 --- a/sdk/openbr_plugin.cpp +++ b/sdk/openbr_plugin.cpp @@ -256,11 +256,13 @@ void File::init(const QString &file) if (words[1][0] == '(') { QStringList values = words[1].split(','); if (values.size() == 2) /* QPointF */ { - QPointF point(values[0].remove('(').toFloat(), values[1].remove(')').toFloat()); + values[1].chop(1); + QPointF point(values[0].mid(1).toFloat(), values[1].remove(')').toFloat()); set(words[0], point); } else /* QRectF */ { - QRectF rect(values[0].remove('(').toFloat(), values[1].toFloat(), values[2].toFloat(), values[3].remove(')').toFloat()); + values[3].chop(1); + QRectF rect(values[0].mid(1).toFloat(), values[1].toFloat(), values[2].toFloat(), values[3].remove(')').toFloat()); set(words[0], rect); } } diff --git a/sdk/plugins/validate.cpp b/sdk/plugins/validate.cpp index e372858..3718ffa 100644 --- a/sdk/plugins/validate.cpp +++ b/sdk/plugins/validate.cpp @@ -105,7 +105,7 @@ class FilterDistance : public Distance foreach (const QString &key, Globals->filters.keys()) { bool keep = false; const QString metadata = a.file.get(key, ""); - if (metadata.isEmpty()) continue; + if (metadata.isEmpty() || Globals->filters[key].isEmpty()) continue; foreach (const QString &value, Globals->filters[key]) { if (metadata == value) { keep = true;