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
f7d46445
Commit
f7d46445
authored
Nov 30, 2010
by
Roberto Raggi
Browse files
Mark the current argument.
parent
38d642c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/libs/glsl/glsltypes.cpp
View file @
f7d46445
...
...
@@ -362,7 +362,13 @@ bool Struct::isLessThan(const Type *other) const
return
false
;
}
QString
Function
::
toString
()
const
{
return
prettyPrint
(
-
1
);
}
QString
Function
::
prettyPrint
(
int
currentArgument
)
const
{
QString
proto
;
proto
+=
_returnType
->
toString
();
...
...
@@ -372,10 +378,14 @@ QString Function::toString() const
for
(
int
i
=
0
;
i
<
_arguments
.
size
();
++
i
)
{
if
(
i
!=
0
)
proto
+=
QLatin1String
(
", "
);
if
(
currentArgument
==
i
)
proto
+=
QLatin1String
(
"<b>"
);
Argument
*
arg
=
_arguments
.
at
(
i
);
proto
+=
arg
->
type
()
->
toString
();
proto
+=
QLatin1Char
(
' '
);
proto
+=
arg
->
name
();
if
(
currentArgument
==
i
)
proto
+=
QLatin1String
(
"</b>"
);
}
proto
+=
QLatin1Char
(
')'
);
return
proto
;
...
...
src/libs/glsl/glsltypes.h
View file @
f7d46445
...
...
@@ -225,6 +225,7 @@ public:
Argument
*
argumentAt
(
int
index
)
const
;
// as Type
QString
prettyPrint
(
int
currentArgument
)
const
;
virtual
QString
toString
()
const
;
virtual
const
Function
*
asFunctionType
()
const
{
return
this
;
}
virtual
bool
isEqualTo
(
const
Type
*
other
)
const
;
...
...
src/plugins/glsleditor/glslcodecompletion.cpp
View file @
f7d46445
...
...
@@ -469,7 +469,7 @@ bool FunctionArgumentWidget::eventFilter(QObject *obj, QEvent *e)
void
FunctionArgumentWidget
::
updateHintText
()
{
setText
(
currentFunction
()
->
toString
(
));
setText
(
currentFunction
()
->
prettyPrint
(
m_currentarg
));
m_numberLabel
->
setText
(
tr
(
"%1 of %2"
).
arg
(
m_current
+
1
).
arg
(
m_items
.
size
()));
...
...
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