Skip to content

Commit a434ac6

Browse files
author
jef
committed
fix #1076
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9187 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent eb85728 commit a434ac6

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

src/app/qgsgraduatedsymboldialog.cpp

+12-18
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,22 @@
1616
***************************************************************************/
1717
/* $Id$ */
1818

19+
#include <algorithm>
20+
#include <cmath>
21+
1922
#include "qgsgraduatedsymboldialog.h"
2023
#include "qgsfield.h"
2124
#include "qgsgraduatedsymbolrenderer.h"
2225
#include "qgsludialog.h"
2326
#include "qgssymbol.h"
2427
#include "qgsvectordataprovider.h"
2528
#include "qgsvectorlayer.h"
26-
#include <algorithm>
27-
#include <cmath>
28-
29+
#include "qgslogger.h"
2930

3031
QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QDialog(), mVectorLayer( layer ), sydialog( layer )
3132
{
3233
setupUi( this );
33-
#ifdef QGISDEBUG
34-
qWarning( "constructor QgsGraduatedSymbolDialog" );
35-
#endif
34+
QgsDebugMsg( "entered." );
3635

3736
setOrientation( Qt::Vertical );
3837

@@ -57,7 +56,7 @@ QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QD
5756
}
5857
else
5958
{
60-
qWarning( "Warning, data provider is null in QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog(...)" );
59+
QgsDebugMsg( "Warning, data provider is null" );
6160
return;
6261
}
6362

@@ -120,16 +119,12 @@ QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog( QgsVectorLayer * layer ): QD
120119
QgsGraduatedSymbolDialog::QgsGraduatedSymbolDialog(): QDialog(), mVectorLayer( 0 ), sydialog( 0 )
121120
{
122121
setupUi( this );
123-
#ifdef QGISDEBUG
124-
qWarning( "constructor QgsGraduatedSymbolDialog" );
125-
#endif
122+
QgsDebugMsg( "entered." );
126123
}
127124

128125
QgsGraduatedSymbolDialog::~QgsGraduatedSymbolDialog()
129126
{
130-
#ifdef QGISDEBUG
131-
qWarning( "destructor QgsGraduatedSymbolDialog" );
132-
#endif
127+
QgsDebugMsg( "entered." );
133128
}
134129

135130
void QgsGraduatedSymbolDialog::adjustNumberOfClasses()
@@ -307,7 +302,7 @@ void QgsGraduatedSymbolDialog::adjustClassification()
307302
std::list<double>::const_iterator it;
308303
std::list<double>::const_iterator last_it = quantileBorders.end();
309304
std::list<QgsSymbol*>::const_iterator symbol_it = symbolList.begin();
310-
for ( it = quantileBorders.begin(); it != quantileBorders.end(); ++it )
305+
for ( it = quantileBorders.begin(); symbol_it != symbolList.end() && it != quantileBorders.end(); ++it )
311306
{
312307
if ( last_it != quantileBorders.end() )
313308
{
@@ -440,17 +435,16 @@ void QgsGraduatedSymbolDialog::deleteCurrentClass()
440435
int currentIndex = mClassListWidget->currentRow();
441436
mEntries.erase( classValue );
442437
delete( mClassListWidget->takeItem( currentIndex ) );
443-
qWarning( "numRows: " );
444-
qWarning( QString::number( mClassListWidget->count() ).toUtf8() );
438+
QgsDebugMsg( QString("numRows: %1").arg( mClassListWidget->count() ) );
445439
//
446440
if ( mClassListWidget->count() < ( currentIndex + 1 ) )
447441
{
448-
qWarning( "selecting numRows - 1" );
442+
QgsDebugMsg( "selecting numRows - 1" );
449443
mClassListWidget->setCurrentRow( mClassListWidget->count() - 1 );
450444
}
451445
else
452446
{
453-
qWarning( "selecting currentIndex" );
447+
QgsDebugMsg( "selecting currentIndex" );
454448
mClassListWidget->setCurrentRow( currentIndex );
455449
}
456450
}

0 commit comments

Comments
 (0)