Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Nov 5, 2012
1 parent 7b9aa99 commit abb924a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsaddtaborgroup.cpp
Expand Up @@ -77,5 +77,5 @@ void QgsAddTabOrGroup::on_mGroupButton_toggled( bool checked )

void QgsAddTabOrGroup::on_mTabButton_toggled( bool checked )
{
mTabList->setEnabled( not checked );
mTabList->setEnabled( !checked );
}
15 changes: 10 additions & 5 deletions src/app/qgsattributedialog.cpp
Expand Up @@ -65,9 +65,9 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat

QDialogButtonBox *buttonBox = NULL;

// UI-File defined layout
if ( !vl->editorLayout() == QgsVectorLayer::UiFileLayout && !vl->editForm().isEmpty() )
if ( vl->editorLayout() == QgsVectorLayer::UiFileLayout && !vl->editForm().isEmpty() )
{
// UI-File defined layout
QFile file( vl->editForm() );

if ( file.open( QFile::ReadOnly ) )
Expand All @@ -83,9 +83,9 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat
buttonBox = myWidget->findChild<QDialogButtonBox*>();
}
}
// Tab display
if ( vl->editorLayout() == QgsVectorLayer::TabLayout )
else if ( vl->editorLayout() == QgsVectorLayer::TabLayout )
{
// Tab display
mDialog = new QDialog( QgisApp::instance() );

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

//transfers layout ownership so no need to call delete
mFrame->setLayout( mypOuterLayout );

QScrollArea *mypScrollArea = new QScrollArea();
mypScrollArea->setFrameShape( QFrame::NoFrame );
mypScrollArea->setFrameShadow( QFrame::Plain );

//transfers scroll area ownership so no need to call delete
mypOuterLayout->addWidget( mypScrollArea );

QFrame *mypInnerFrame = new QFrame();
mypInnerFrame->setFrameShape( QFrame::NoFrame );
mypInnerFrame->setFrameShadow( QFrame::Plain );

//transfers frame ownership so no need to call delete
mypScrollArea->setWidget( mypInnerFrame );

mypScrollArea->setWidgetResizable( true );
QGridLayout *mypInnerLayout = new QGridLayout( mypInnerFrame );

Expand Down

0 comments on commit abb924a

Please sign in to comment.