Skip to content
Permalink
Browse files

fix warnings

  • Loading branch information
jef-n committed Nov 5, 2012
1 parent 7b9aa99 commit abb924affbb432199433c981166cf9b39fe1a062
Showing with 11 additions and 6 deletions.
  1. +1 −1 src/app/qgsaddtaborgroup.cpp
  2. +10 −5 src/app/qgsattributedialog.cpp
@@ -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 );
}
@@ -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 ) )
@@ -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;
@@ -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 );

0 comments on commit abb924a

Please sign in to comment.
You can’t perform that action at this time.