Skip to content
Permalink
Browse files
Fix some Coverity uninitialized variable warnings
  • Loading branch information
nyalldawson committed May 15, 2016
1 parent c732c68 commit bf76049
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
@@ -1523,6 +1523,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
, mDeletePart( nullptr )
, mNodeTool( nullptr )
, mRotatePointSymbolsTool( nullptr )
, mOffsetPointSymbolTool( nullptr )
, mAnnotation( nullptr )
, mFormAnnotation( nullptr )
, mHtmlAnnotation( nullptr )
@@ -34,7 +34,8 @@
#include <QAbstractTableModel>


QgsBookmarks::QgsBookmarks( QWidget *parent ) : QDockWidget( parent )
QgsBookmarks::QgsBookmarks( QWidget *parent )
: QDockWidget( parent )
{
setupUi( this );
restorePosition();
@@ -490,10 +491,11 @@ bool QgsProjectBookmarksTableModel::removeRows( int row, int count, const QModel
return true;
}

QgsMergedBookmarksTableModel::QgsMergedBookmarksTableModel( QAbstractTableModel& qgisTableModel, QAbstractTableModel& projectTableModel, QTreeView* treeView ):
mQgisTableModel( qgisTableModel ),
mProjectTableModel( projectTableModel ),
mTreeView( treeView )
QgsMergedBookmarksTableModel::QgsMergedBookmarksTableModel( QAbstractTableModel& qgisTableModel, QAbstractTableModel& projectTableModel, QTreeView* treeView )
: mQgisTableModel( qgisTableModel )
, mProjectTableModel( projectTableModel )
, mTreeView( treeView )
, mProjectOpen( false )
{
connect(
QgisApp::instance(), SIGNAL( projectRead() ),
@@ -674,7 +676,12 @@ void QgsMergedBookmarksTableModel::moveBookmark( QAbstractTableModel& modelFrom,
query.bindValue( ":ymax", modelFrom.data( modelFrom.index( row, 6 ) ).toDouble() );
query.bindValue( ":projection_srid", modelFrom.data( modelFrom.index( row, 7 ) ).toInt() );

query.exec();
if ( !query.exec() )
{
QgsDebugMsg( QString( "Could not move bookmark: %1" )
.arg( query.lastError().text() ) );
return;
}
qgisModel->setSort( 0, Qt::AscendingOrder );
qgisModel->select();
}
@@ -69,6 +69,7 @@ QColor QgsColorDialog::getLiveColor( const QColor& initialColor, QObject* update
QgsColorDialogV2::QgsColorDialogV2( QWidget *parent, const Qt::WindowFlags& fl, const QColor& color )
: QDialog( parent, fl )
, mPreviousColor( color )
, mAllowAlpha( true )
{
setupUi( this );

@@ -24,7 +24,6 @@ class QgsVectorGradientColorRampV2;
class QwtPlot;
class QwtPlotCurve;
class QwtPlotMarker;
class QwtPlotPicker;
class QgsGradientPlotEventFilter;

class GUI_EXPORT QgsVectorGradientColorRampV2Dialog : public QDialog, private Ui::QgsVectorGradientColorRampV2DialogBase
@@ -69,7 +68,6 @@ class GUI_EXPORT QgsVectorGradientColorRampV2Dialog : public QDialog, private Ui
QwtPlotCurve* mHueCurve;
QwtPlotCurve* mAlphaCurve;
QList< QwtPlotMarker* > mMarkers;
QwtPlotPicker* mPicker;
QgsGradientPlotEventFilter* mPlotFilter;
int mCurrentPlotColorComponent;
int mCurrentPlotMarkerIndex;

0 comments on commit bf76049

Please sign in to comment.