Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
kdevelop
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
Incidents
Environments
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
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,
if
(
tag
==
QLatin1String
(
"label"
))
{
entry
.
label
=
e
.
text
();
}
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"
))
{
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"
))
{
entry
.
minValue
=
e
.
text
();
}
else
if
(
tag
==
QLatin1String
(
"max"
))
{
...
...
plugins/filetemplates/templateoptionspage.cpp
View file @
0df73628
...
...
@@ -136,6 +136,10 @@ void TemplateOptionsPage::load(const SourceFileTemplate& fileTemplate, TemplateR
{
const
QString
entryLabelText
=
i18n
(
"%1:"
,
entry
.
label
);
QLabel
*
label
=
new
QLabel
(
entryLabelText
,
box
);
if
(
!
entry
.
context
.
isEmpty
())
{
label
->
setToolTip
(
entry
.
context
);
control
->
setToolTip
(
entry
.
context
);
}
formLayout
->
addRow
(
label
,
control
);
d
->
controls
.
insert
(
entry
.
name
,
control
);
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