Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Friedrich W. H. Kossebau
kdevelop
Commits
0df73628
Commit
0df73628
authored
Sep 29, 2019
by
Juraj Oravec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filetemplates: load and show tooltip for custom options
Signed-off-by:
Juraj Oravec
<
sgd.orava@gmail.com
>
parent
fe516fa3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
kdevplatform/language/codegen/sourcefiletemplate.cpp
kdevplatform/language/codegen/sourcefiletemplate.cpp
+10
-2
plugins/filetemplates/templateoptionspage.cpp
plugins/filetemplates/templateoptionspage.cpp
+4
-0
No files found.
kdevplatform/language/codegen/sourcefiletemplate.cpp
View file @
0df73628
...
@@ -63,9 +63,17 @@ ConfigOption SourceFileTemplatePrivate::readEntry(const QDomElement& element,
...
@@ -63,9 +63,17 @@ ConfigOption SourceFileTemplatePrivate::readEntry(const QDomElement& element,
if
(
tag
==
QLatin1String
(
"label"
))
{
if
(
tag
==
QLatin1String
(
"label"
))
{
entry
.
label
=
e
.
text
();
entry
.
label
=
e
.
text
();
}
else
if
(
tag
==
QLatin1String
(
"tooltip"
))
{
}
else
if
(
tag
==
QLatin1String
(
"tooltip"
))
{
entry
.
label
=
e
.
text
();
if
(
entry
.
label
.
isEmpty
())
{
entry
.
label
=
e
.
text
();
}
entry
.
context
=
e
.
text
();
}
else
if
(
tag
==
QLatin1String
(
"whatsthis"
))
{
}
else
if
(
tag
==
QLatin1String
(
"whatsthis"
))
{
entry
.
label
=
e
.
text
();
if
(
entry
.
label
.
isEmpty
())
{
entry
.
label
=
e
.
text
();
}
if
(
entry
.
context
.
isEmpty
())
{
entry
.
context
=
e
.
text
();
}
}
else
if
(
tag
==
QLatin1String
(
"min"
))
{
}
else
if
(
tag
==
QLatin1String
(
"min"
))
{
entry
.
minValue
=
e
.
text
();
entry
.
minValue
=
e
.
text
();
}
else
if
(
tag
==
QLatin1String
(
"max"
))
{
}
else
if
(
tag
==
QLatin1String
(
"max"
))
{
...
...
plugins/filetemplates/templateoptionspage.cpp
View file @
0df73628
...
@@ -136,6 +136,10 @@ void TemplateOptionsPage::load(const SourceFileTemplate& fileTemplate, TemplateR
...
@@ -136,6 +136,10 @@ void TemplateOptionsPage::load(const SourceFileTemplate& fileTemplate, TemplateR
{
{
const
QString
entryLabelText
=
i18n
(
"%1:"
,
entry
.
label
);
const
QString
entryLabelText
=
i18n
(
"%1:"
,
entry
.
label
);
QLabel
*
label
=
new
QLabel
(
entryLabelText
,
box
);
QLabel
*
label
=
new
QLabel
(
entryLabelText
,
box
);
if
(
!
entry
.
context
.
isEmpty
())
{
label
->
setToolTip
(
entry
.
context
);
control
->
setToolTip
(
entry
.
context
);
}
formLayout
->
addRow
(
label
,
control
);
formLayout
->
addRow
(
label
,
control
);
d
->
controls
.
insert
(
entry
.
name
,
control
);
d
->
controls
.
insert
(
entry
.
name
,
control
);
if
(
d
->
firstEditWidget
==
nullptr
)
{
if
(
d
->
firstEditWidget
==
nullptr
)
{
...
...
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