Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
b17fc903
Commit
b17fc903
authored
Feb 18, 2010
by
Erik Verbruggen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made the warnings/errors translatable.
parent
7ee1bc52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
src/libs/qmljs/qmljscheck.cpp
src/libs/qmljs/qmljscheck.cpp
+9
-6
No files found.
src/libs/qmljs/qmljscheck.cpp
View file @
b17fc903
...
...
@@ -38,8 +38,10 @@
namespace
QmlJS
{
namespace
Messages
{
static
const
char
*
invalidPropertyName
=
QT_TRANSLATE_NOOP
(
"QmlJS::Check"
,
"'%1' is not a valid property name"
);
static
const
char
*
unknownType
=
QT_TRANSLATE_NOOP
(
"QmlJS::Check"
,
"unknown type"
);
static
const
char
*
invalid_property_name
=
QT_TRANSLATE_NOOP
(
"QmlJS::Check"
,
"'%1' is not a valid property name"
);
static
const
char
*
unknown_type
=
QT_TRANSLATE_NOOP
(
"QmlJS::Check"
,
"unknown type"
);
static
const
char
*
has_no_members
=
QT_TRANSLATE_NOOP
(
"QmlJS::Check"
,
"'%1' does not have members"
);
static
const
char
*
is_not_a_member
=
QT_TRANSLATE_NOOP
(
"QmlJS::Check"
,
"'%1' is not a member of '%2'"
);
}
// namespace Messages
static
inline
QString
tr
(
const
char
*
msg
)
...
...
@@ -109,7 +111,7 @@ void Check::visitQmlObject(Node *ast, UiQualifiedId *typeId,
const
bool
oldAllowAnyProperty
=
_allowAnyProperty
;
if
(
!
_context
.
lookupType
(
_doc
.
data
(),
typeId
))
{
warning
(
typeId
->
identifierToken
,
tr
(
Messages
::
unknown
T
ype
));
warning
(
typeId
->
identifierToken
,
tr
(
Messages
::
unknown
_t
ype
));
_allowAnyProperty
=
true
;
// suppress subsequent "unknown property" errors
}
...
...
@@ -217,7 +219,7 @@ void Check::checkScopeObjectMember(const UiQualifiedId *id)
value
=
_extraScope
->
lookupMember
(
propertyName
,
&
_context
);
if
(
!
value
)
{
error
(
id
->
identifierToken
,
tr
(
Messages
::
invalid
PropertyN
ame
).
arg
(
propertyName
));
tr
(
Messages
::
invalid
_property_n
ame
).
arg
(
propertyName
));
}
// can't look up members for attached properties
...
...
@@ -230,7 +232,7 @@ void Check::checkScopeObjectMember(const UiQualifiedId *id)
const
ObjectValue
*
objectValue
=
value_cast
<
const
ObjectValue
*>
(
value
);
if
(
!
objectValue
)
{
error
(
idPart
->
identifierToken
,
QString
(
"'%1' does not have members"
).
arg
(
propertyName
));
tr
(
Messages
::
has_no_members
).
arg
(
propertyName
));
return
;
}
...
...
@@ -240,7 +242,8 @@ void Check::checkScopeObjectMember(const UiQualifiedId *id)
value
=
objectValue
->
lookupMember
(
propertyName
,
&
_context
);
if
(
!
value
)
{
error
(
idPart
->
identifierToken
,
QString
(
"'%1' is not a member of '%2'"
).
arg
(
propertyName
,
objectValue
->
className
()));
tr
(
Messages
::
is_not_a_member
).
arg
(
propertyName
,
objectValue
->
className
()));
return
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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