refactoring qad widgets part 2
c++ cast, nullptr, forward declaration, agregate ui, connect to member functions, order and clear includes
This commit is contained in:
@@ -24,7 +24,7 @@ void QPIConfigNewDialog::changeEvent(QEvent * e) {
|
||||
|
||||
|
||||
void QPIConfigNewDialog::typeChanged() {
|
||||
foreach (QRadioButton * i, radios) {
|
||||
for (const QRadioButton * i : radios) {
|
||||
if (i->isChecked()) {
|
||||
ui->widgetValue->setType(i->property("type").toString());
|
||||
return;
|
||||
@@ -34,9 +34,11 @@ void QPIConfigNewDialog::typeChanged() {
|
||||
|
||||
|
||||
QString QPIConfigNewDialog::type() {
|
||||
foreach (QRadioButton * i, radios)
|
||||
if (i->isChecked())
|
||||
for (const QRadioButton * i : radios) {
|
||||
if (i->isChecked()) {
|
||||
return i->property("type").toString();
|
||||
}
|
||||
}
|
||||
return " ";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user