Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
844ece10
Commit
844ece10
authored
15 years ago
by
Friedemann Kleint
Browse files
Options
Downloads
Patches
Plain Diff
NewClassWidget: Validate generate form check box correctly.
Introduce buddies & key accelerators. Task-number: QTCREATORBUG-712
parent
e6d9d9e3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/libs/utils/newclasswidget.cpp
+4
-1
4 additions, 1 deletion
src/libs/utils/newclasswidget.cpp
src/libs/utils/newclasswidget.ui
+33
-17
33 additions, 17 deletions
src/libs/utils/newclasswidget.ui
with
37 additions
and
18 deletions
src/libs/utils/newclasswidget.cpp
+
4
−
1
View file @
844ece10
...
...
@@ -103,6 +103,8 @@ NewClassWidget::NewClassWidget(QWidget *parent) :
this
,
SLOT
(
slotValidChanged
()));
connect
(
m_d
->
m_ui
.
pathChooser
,
SIGNAL
(
validChanged
()),
this
,
SLOT
(
slotValidChanged
()));
connect
(
m_d
->
m_ui
.
generateFormCheckBox
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
slotValidChanged
()));
connect
(
m_d
->
m_ui
.
classLineEdit
,
SIGNAL
(
validReturnPressed
()),
this
,
SLOT
(
slotActivated
()));
...
...
@@ -431,7 +433,8 @@ bool NewClassWidget::isValid(QString *error) const
return
false
;
}
if
(
isFormInputVisible
())
{
if
(
isFormInputVisible
()
&&
(
!
m_d
->
m_formInputCheckable
||
m_d
->
m_ui
.
generateFormCheckBox
->
isChecked
()))
{
if
(
!
m_d
->
m_ui
.
formFileLineEdit
->
isValid
())
{
if
(
error
)
*
error
=
tr
(
"Invalid form file name: '%1'"
).
arg
(
m_d
->
m_ui
.
formFileLineEdit
->
errorMessage
());
...
...
This diff is collapsed.
Click to expand it.
src/libs/utils/newclasswidget.ui
+
33
−
17
View file @
844ece10
...
...
@@ -2,14 +2,6 @@
<ui
version=
"4.0"
>
<class>
Utils::NewClassWidget
</class>
<widget
class=
"QWidget"
name=
"Utils::NewClassWidget"
>
<property
name=
"geometry"
>
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
431
</width>
<height>
291
</height>
</rect>
</property>
<layout
class=
"QFormLayout"
name=
"formLayout"
>
<property
name=
"fieldGrowthPolicy"
>
<enum>
QFormLayout::ExpandingFieldsGrow
</enum>
...
...
@@ -20,7 +12,10 @@
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"classNameLabel"
>
<property
name=
"text"
>
<string>
Class name:
</string>
<string>
&
Class name:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
classLineEdit
</cstring>
</property>
</widget>
</item>
...
...
@@ -30,7 +25,10 @@
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"baseClassLabel"
>
<property
name=
"text"
>
<string>
Base class:
</string>
<string>
&
Base class:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
baseClassComboBox
</cstring>
</property>
</widget>
</item>
...
...
@@ -47,7 +45,10 @@
<item
row=
"2"
column=
"0"
>
<widget
class=
"QLabel"
name=
"classTypeLabel"
>
<property
name=
"text"
>
<string>
Type information:
</string>
<string>
&
Type information:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
classTypeComboBox
</cstring>
</property>
</widget>
</item>
...
...
@@ -110,7 +111,10 @@
<item
row=
"4"
column=
"0"
>
<widget
class=
"QLabel"
name=
"headerLabel"
>
<property
name=
"text"
>
<string>
Header file:
</string>
<string>
&
Header file:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
headerFileLineEdit
</cstring>
</property>
</widget>
</item>
...
...
@@ -120,7 +124,10 @@
<item
row=
"5"
column=
"0"
>
<widget
class=
"QLabel"
name=
"sourceLabel"
>
<property
name=
"text"
>
<string>
Source file:
</string>
<string>
&
Source file:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
sourceFileLineEdit
</cstring>
</property>
</widget>
</item>
...
...
@@ -130,7 +137,10 @@
<item
row=
"6"
column=
"0"
>
<widget
class=
"QLabel"
name=
"generateFormLabel"
>
<property
name=
"text"
>
<string>
Generate form:
</string>
<string>
&
Generate form:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
generateFormCheckBox
</cstring>
</property>
</widget>
</item>
...
...
@@ -144,7 +154,10 @@
<item
row=
"7"
column=
"0"
>
<widget
class=
"QLabel"
name=
"formLabel"
>
<property
name=
"text"
>
<string>
Form file:
</string>
<string>
&
Form file:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
formFileLineEdit
</cstring>
</property>
</widget>
</item>
...
...
@@ -154,12 +167,15 @@
<item
row=
"8"
column=
"0"
>
<widget
class=
"QLabel"
name=
"pathLabel"
>
<property
name=
"text"
>
<string>
Path:
</string>
<string>
&
Path:
</string>
</property>
<property
name=
"buddy"
>
<cstring>
pathLabel
</cstring>
</property>
</widget>
</item>
<item
row=
"8"
column=
"1"
>
<widget
class=
"Utils::PathChooser"
name=
"pathChooser"
/>
<widget
class=
"Utils::PathChooser"
name=
"pathChooser"
native=
"true"
/>
</item>
</layout>
</widget>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment