Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
cee00e2e
Commit
cee00e2e
authored
Dec 04, 2008
by
Oswald Buddenhagen
Browse files
Fix some error messages (re expected argument counts)
(merge aa87b75910a99a26e7ec581aa38f8982fe231ad0 from qt)
parent
daeb83cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
shared/proparser/profileevaluator.cpp
View file @
cee00e2e
...
...
@@ -1083,7 +1083,7 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
if
(
func_t
==
E_SECTION
)
{
if
(
args
.
count
()
!=
3
&&
args
.
count
()
!=
4
)
{
q
->
logMessage
(
format
(
"%1(var) section(var, sep, begin, end) "
"requires three arguments."
).
arg
(
func
));
"requires three
or four
arguments."
).
arg
(
func
));
}
else
{
var
=
args
[
0
];
sep
=
args
[
1
];
...
...
@@ -1116,7 +1116,7 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
}
case
E_JOIN
:
{
if
(
args
.
count
()
<
1
||
args
.
count
()
>
4
)
{
q
->
logMessage
(
format
(
"join(var, glue, before, after) requires four arguments."
));
q
->
logMessage
(
format
(
"join(var, glue, before, after) requires
one to
four arguments."
));
}
else
{
QString
glue
,
before
,
after
;
if
(
args
.
count
()
>=
2
)
...
...
@@ -1132,7 +1132,7 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
break
;
}
case
E_SPLIT
:
{
if
(
args
.
count
()
<
2
||
args
.
count
()
>
2
)
{
if
(
args
.
count
()
!=
2
)
{
q
->
logMessage
(
format
(
"split(var, sep) requires two arguments"
));
}
else
{
QString
sep
=
args
.
at
(
1
);
...
...
@@ -1144,7 +1144,7 @@ QStringList ProFileEvaluator::Private::evaluateExpandFunction(const QString &fun
}
case
E_MEMBER
:
{
if
(
args
.
count
()
<
1
||
args
.
count
()
>
3
)
{
q
->
logMessage
(
format
(
"member(var, start, end) requires three arguments."
));
q
->
logMessage
(
format
(
"member(var, start, end) requires
one to
three arguments."
));
}
else
{
bool
ok
=
true
;
const
QStringList
var
=
values
(
args
.
first
());
...
...
@@ -1301,7 +1301,7 @@ bool ProFileEvaluator::Private::evaluateConditionalFunction(const QString &funct
}
case
CF_CONTAINS
:
{
if
(
args
.
count
()
<
2
||
args
.
count
()
>
3
)
{
q
->
logMessage
(
format
(
"contains(var, val) requires
at least two
arguments."
));
q
->
logMessage
(
format
(
"contains(var, val) requires
two or three
arguments."
));
ok
=
false
;
break
;
}
...
...
@@ -1333,7 +1333,7 @@ bool ProFileEvaluator::Private::evaluateConditionalFunction(const QString &funct
}
case
CF_COUNT
:
{
if
(
args
.
count
()
!=
2
&&
args
.
count
()
!=
3
)
{
q
->
logMessage
(
format
(
"count(var, count) requires
at least two
arguments."
));
q
->
logMessage
(
format
(
"count(var, count) requires
two or three
arguments."
));
ok
=
false
;
break
;
}
...
...
@@ -1363,7 +1363,7 @@ bool ProFileEvaluator::Private::evaluateConditionalFunction(const QString &funct
if
(
args
.
count
()
==
2
)
{
parseInto
=
args
[
1
];
}
else
if
(
args
.
count
()
!=
1
)
{
q
->
logMessage
(
format
(
"include(file) requires one argument."
));
q
->
logMessage
(
format
(
"include(file) requires one
or two
argument
s
."
));
ok
=
false
;
break
;
}
...
...
@@ -1381,7 +1381,7 @@ bool ProFileEvaluator::Private::evaluateConditionalFunction(const QString &funct
QString
sarg
=
args
[
1
];
ignore_error
=
(
sarg
.
toLower
()
==
QLatin1String
(
"true"
)
||
sarg
.
toInt
());
}
else
if
(
args
.
count
()
!=
1
)
{
q
->
logMessage
(
format
(
"load(feature) requires one argument."
));
q
->
logMessage
(
format
(
"load(feature) requires one
or two
argument
s
."
));
ok
=
false
;
break
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment