Commit 4c859a50d3663ac70e4460f0b021c7ab77360f85
1 parent
52188066
fied msvc warnings
Showing
1 changed file
with
6 additions
and
6 deletions
openbr/core/qtutils.cpp
| @@ -290,10 +290,10 @@ QPointF QtUtils::toPoint(const QString &string) | @@ -290,10 +290,10 @@ QPointF QtUtils::toPoint(const QString &string) | ||
| 290 | QStringList values = string.split(','); | 290 | QStringList values = string.split(','); |
| 291 | if (values.size() == 2) { | 291 | if (values.size() == 2) { |
| 292 | values[1].chop(1); | 292 | values[1].chop(1); |
| 293 | - QPointF point(values[0].mid(1).toFloat(), values[1].toFloat()); | ||
| 294 | - return point; | 293 | + return QPointF(values[0].mid(1).toFloat(), values[1].toFloat()); |
| 295 | } | 294 | } |
| 296 | - else qFatal("Failed to convert %s to QPoint format.", qPrintable(string)); | 295 | + else qFatal("Failed to convert %s to QPointF format.", qPrintable(string)); |
| 296 | + return QPointF(); | ||
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | QRectF QtUtils::toRect(const QString &string) | 299 | QRectF QtUtils::toRect(const QString &string) |
| @@ -301,10 +301,10 @@ QRectF QtUtils::toRect(const QString &string) | @@ -301,10 +301,10 @@ QRectF QtUtils::toRect(const QString &string) | ||
| 301 | QStringList values = string.split(','); | 301 | QStringList values = string.split(','); |
| 302 | if (values.size() == 4) { | 302 | if (values.size() == 4) { |
| 303 | values[3].chop(1); | 303 | values[3].chop(1); |
| 304 | - QRectF rect(values[0].mid(1).toFloat(), values[1].toFloat(), values[2].toFloat(), values[3].toFloat()); | ||
| 305 | - return rect; | 304 | + return QRectF(values[0].mid(1).toFloat(), values[1].toFloat(), values[2].toFloat(), values[3].toFloat()); |
| 306 | } | 305 | } |
| 307 | - else qFatal("Failed to convert %s to QRect format.", qPrintable(string)); | 306 | + else qFatal("Failed to convert %s to QRectF format.", qPrintable(string)); |
| 307 | + return QRectF(); | ||
| 308 | } | 308 | } |
| 309 | 309 | ||
| 310 | bool QtUtils::runRScript(const QString &file) | 310 | bool QtUtils::runRScript(const QString &file) |