From 67124a7d28ef2d3723cb01a21d3618c9df4cb446 Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Thu, 7 Feb 2013 13:17:35 +0100 Subject: Actually test for what the error messages states. Change-Id: Ia341e273ca10116cae1f33278d5a3807fdefa5f2 Reviewed-by: Karsten Heimrich --- src/libs/installer/setdemospathonqtoperation.cpp | 2 +- src/libs/installer/setexamplespathonqtoperation.cpp | 2 +- src/libs/installer/setimportspathonqtcoreoperation.cpp | 2 +- src/libs/installer/setpluginpathonqtcoreoperation.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/libs/installer/setdemospathonqtoperation.cpp b/src/libs/installer/setdemospathonqtoperation.cpp index 281910de6..f1878fdb5 100644 --- a/src/libs/installer/setdemospathonqtoperation.cpp +++ b/src/libs/installer/setdemospathonqtoperation.cpp @@ -94,7 +94,7 @@ bool SetDemosPathOnQtOperation::performOperation() qDebug() << "qpatch: warning: It was not able to get the old values from" << qmakePath; } - if (255 < newValue.size()) { + if (newValue.size() >= 255) { setError(UserDefinedError); setErrorString(tr("Qt patch error: new Qt demo path (%1)\nneeds to be less than 255 characters.") .arg(QString::fromLocal8Bit(newValue)) ); diff --git a/src/libs/installer/setexamplespathonqtoperation.cpp b/src/libs/installer/setexamplespathonqtoperation.cpp index f594eb50f..bebdf531f 100644 --- a/src/libs/installer/setexamplespathonqtoperation.cpp +++ b/src/libs/installer/setexamplespathonqtoperation.cpp @@ -94,7 +94,7 @@ bool SetExamplesPathOnQtOperation::performOperation() qDebug() << "qpatch: warning: It was not able to get the old values from" << qmakePath; } - if (255 < newValue.size()) { + if (newValue.size() >= 255) { setError(UserDefinedError); setErrorString(tr("Qt patch error: new Qt example path (%1)\nneeds to be less than 255 characters.") .arg(QString::fromLocal8Bit(newValue))); diff --git a/src/libs/installer/setimportspathonqtcoreoperation.cpp b/src/libs/installer/setimportspathonqtcoreoperation.cpp index 0bff43ecd..a937da9a9 100644 --- a/src/libs/installer/setimportspathonqtcoreoperation.cpp +++ b/src/libs/installer/setimportspathonqtcoreoperation.cpp @@ -115,7 +115,7 @@ bool SetImportsPathOnQtCoreOperation::performOperation() const QString qtCoreLibraryDir = args.at(0); const QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8(); - if (255 < newValue.size()) { + if (newValue.size() >= 255) { qDebug() << "qpatch: error: newQtDir needs to be less than 255 characters."; return false; } diff --git a/src/libs/installer/setpluginpathonqtcoreoperation.cpp b/src/libs/installer/setpluginpathonqtcoreoperation.cpp index 09a2ff281..eebf0f4ab 100644 --- a/src/libs/installer/setpluginpathonqtcoreoperation.cpp +++ b/src/libs/installer/setpluginpathonqtcoreoperation.cpp @@ -114,7 +114,7 @@ bool SetPluginPathOnQtCoreOperation::performOperation() const QString qtCoreLibraryDir = args.at(0); const QByteArray newValue = QDir::toNativeSeparators(args.at(1)).toUtf8(); - if (255 < newValue.size()) { + if (newValue.size() >= 255) { qDebug() << "qpatch: error: newQtDir needs to be less than 255 characters."; return false; } -- cgit v1.2.3