[QGIS Commit] r11647 - trunk/qgis/src/app/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Sep 13 01:53:59 EDT 2009


Author: mhugent
Date: 2009-09-13 01:53:58 -0400 (Sun, 13 Sep 2009)
New Revision: 11647

Modified:
   trunk/qgis/src/app/composer/qgscomposermapwidget.cpp
Log:
Fix small memory leak

Modified: trunk/qgis/src/app/composer/qgscomposermapwidget.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposermapwidget.cpp	2009-09-12 22:27:31 UTC (rev 11646)
+++ trunk/qgis/src/app/composer/qgscomposermapwidget.cpp	2009-09-13 05:53:58 UTC (rev 11647)
@@ -27,15 +27,16 @@
   //add widget for general composer item properties
   QgsComposerItemWidget* itemPropertiesWidget = new QgsComposerItemWidget( this, composerMap );
   gridLayout->addWidget( itemPropertiesWidget, 9, 0, 1, 5 );
+  QDoubleValidator v( 0 );
 
-  mWidthLineEdit->setValidator( new QDoubleValidator( 0 ) );
-  mHeightLineEdit->setValidator( new QDoubleValidator( 0 ) );
-  mScaleLineEdit->setValidator( new QDoubleValidator( 0 ) );
+  mWidthLineEdit->setValidator( &v );
+  mHeightLineEdit->setValidator( &v );
+  mScaleLineEdit->setValidator( &v );
 
-  mXMinLineEdit->setValidator( new QDoubleValidator( 0 ) );
-  mXMaxLineEdit->setValidator( new QDoubleValidator( 0 ) );
-  mYMinLineEdit->setValidator( new QDoubleValidator( 0 ) );
-  mYMaxLineEdit->setValidator( new QDoubleValidator( 0 ) );
+  mXMinLineEdit->setValidator( &v );
+  mXMaxLineEdit->setValidator( &v );
+  mYMinLineEdit->setValidator( &v );
+  mYMaxLineEdit->setValidator( &v );
 
   mPreviewModeComboBox->insertItem( 0, tr( "Cache" ) );
   mPreviewModeComboBox->insertItem( 1, tr( "Render" ) );



More information about the QGIS-commit mailing list