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
045c7fd5
Commit
045c7fd5
authored
Dec 01, 2010
by
Rhys Weatherley
Browse files
Fix vec and mat type names in tooltips
parent
814c9cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/glsl/glsltypes.cpp
View file @
045c7fd5
...
...
@@ -141,16 +141,16 @@ bool DoubleType::isLessThan(const Type *other) const
QString
VectorType
::
toString
()
const
{
QC
har
prefix
;
const
c
har
*
prefix
=
""
;
if
(
elementType
()
->
asBoolType
()
!=
0
)
prefix
=
QLatin1Char
(
'b'
)
;
prefix
=
"b"
;
else
if
(
elementType
()
->
asIntType
()
!=
0
)
prefix
=
QLatin1Char
(
'
i'
)
;
prefix
=
"
i'
"
;
else
if
(
elementType
()
->
asUIntType
()
!=
0
)
prefix
=
QLatin1Char
(
'u'
)
;
prefix
=
"u"
;
else
if
(
elementType
()
->
asDoubleType
()
!=
0
)
prefix
=
QLatin1Char
(
'd'
)
;
return
QString
(
"%1vec%2"
).
arg
(
prefix
).
arg
(
_dimension
);
prefix
=
"d"
;
return
QString
(
"%1vec%2"
).
arg
(
QLatin1String
(
prefix
)
)
.
arg
(
_dimension
);
}
void
VectorType
::
add
(
Symbol
*
symbol
)
...
...
@@ -265,16 +265,16 @@ bool VectorType::isLessThan(const Type *other) const
QString
MatrixType
::
toString
()
const
{
QC
har
prefix
;
const
c
har
*
prefix
=
""
;
if
(
elementType
()
->
asBoolType
()
!=
0
)
prefix
=
QLatin1Char
(
'b'
)
;
prefix
=
"b"
;
else
if
(
elementType
()
->
asIntType
()
!=
0
)
prefix
=
QLatin1Char
(
'i'
)
;
prefix
=
"i"
;
else
if
(
elementType
()
->
asUIntType
()
!=
0
)
prefix
=
QLatin1Char
(
'u'
)
;
prefix
=
"u"
;
else
if
(
elementType
()
->
asDoubleType
()
!=
0
)
prefix
=
QLatin1Char
(
'd'
)
;
return
QString
(
"%1mat%2x%3"
).
arg
(
prefix
,
_columns
,
_rows
);
prefix
=
"d"
;
return
QString
(
"%1mat%2x%3"
).
arg
(
QLatin1String
(
prefix
)).
arg
(
_columns
).
arg
(
_rows
);
}
bool
MatrixType
::
isEqualTo
(
const
Type
*
other
)
const
...
...
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