Skip to content

Commit abb924a

Browse files
committed
fix warnings
1 parent 7b9aa99 commit abb924a

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/app/qgsaddtaborgroup.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,5 @@ void QgsAddTabOrGroup::on_mGroupButton_toggled( bool checked )
7777

7878
void QgsAddTabOrGroup::on_mTabButton_toggled( bool checked )
7979
{
80-
mTabList->setEnabled( not checked );
80+
mTabList->setEnabled( !checked );
8181
}

src/app/qgsattributedialog.cpp

+10-5
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
6565

6666
QDialogButtonBox *buttonBox = NULL;
6767

68-
// UI-File defined layout
69-
if ( !vl->editorLayout() == QgsVectorLayer::UiFileLayout && !vl->editForm().isEmpty() )
68+
if ( vl->editorLayout() == QgsVectorLayer::UiFileLayout && !vl->editForm().isEmpty() )
7069
{
70+
// UI-File defined layout
7171
QFile file( vl->editForm() );
7272

7373
if ( file.open( QFile::ReadOnly ) )
@@ -83,9 +83,9 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
8383
buttonBox = myWidget->findChild<QDialogButtonBox*>();
8484
}
8585
}
86-
// Tab display
87-
if ( vl->editorLayout() == QgsVectorLayer::TabLayout )
86+
else if ( vl->editorLayout() == QgsVectorLayer::TabLayout )
8887
{
88+
// Tab display
8989
mDialog = new QDialog( QgisApp::instance() );
9090

9191
QGridLayout *gridLayout;
@@ -149,19 +149,24 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
149149
//
150150
QVBoxLayout *mypOuterLayout = new QVBoxLayout();
151151
mypOuterLayout->setContentsMargins( 0, 0, 0, 0 );
152-
//transfers layout ownership so no need to call delete
153152

153+
//transfers layout ownership so no need to call delete
154154
mFrame->setLayout( mypOuterLayout );
155+
155156
QScrollArea *mypScrollArea = new QScrollArea();
156157
mypScrollArea->setFrameShape( QFrame::NoFrame );
157158
mypScrollArea->setFrameShadow( QFrame::Plain );
159+
158160
//transfers scroll area ownership so no need to call delete
159161
mypOuterLayout->addWidget( mypScrollArea );
162+
160163
QFrame *mypInnerFrame = new QFrame();
161164
mypInnerFrame->setFrameShape( QFrame::NoFrame );
162165
mypInnerFrame->setFrameShadow( QFrame::Plain );
166+
163167
//transfers frame ownership so no need to call delete
164168
mypScrollArea->setWidget( mypInnerFrame );
169+
165170
mypScrollArea->setWidgetResizable( true );
166171
QGridLayout *mypInnerLayout = new QGridLayout( mypInnerFrame );
167172

0 commit comments

Comments
 (0)