11 changes: 8 additions & 3 deletions src/plugins/gps_importer/qgsgpsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ static const QString icon_ = ":/gps_importer.png";
* @param qgis Pointer to the QGIS main window
* @param _qI Pointer to the QGIS interface object
*/
QgsGPSPlugin::QgsGPSPlugin( QgisInterface * theQgisInterFace ):
QgisPlugin( name_, description_, category_, version_, type_ ),
mQGisInterface( theQgisInterFace )
QgsGPSPlugin::QgsGPSPlugin( QgisInterface * theQgisInterFace )
: QgisPlugin( name_, description_, category_, version_, type_ )
, mQGisInterface( theQgisInterFace )
, mQActionPointer( 0 )
, mCreateGPXAction( 0 )
{
setupBabel();
}
Expand All @@ -85,6 +87,9 @@ QgsGPSPlugin::~QgsGPSPlugin()
*/
void QgsGPSPlugin::initGui()
{
delete mQActionPointer;
delete mCreateGPXAction;

// add an action to the toolbar
mQActionPointer = new QAction( QIcon(), tr( "&GPS Tools" ), this );
mCreateGPXAction = new QAction( QIcon(), tr( "&Create new GPX layer" ), this );
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/grass/qtermwidget/CharacterColor.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ namespace Konsole
/**
* Sets the color, transparency and boldness of this color to those of @p rhs.
*/
void operator=( const ColorEntry& rhs )
ColorEntry &operator=( const ColorEntry& rhs )
{
color = rhs.color;
transparent = rhs.transparent;
bold = rhs.bold;
return *this;
}

/** The color value of this entry for display. */
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/grass/qtermwidget/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,14 @@ QString UrlFilter::HotSpot::tooltip() const
{
QString url = capturedTexts().first();

#if 0
const UrlType kind = urlType();

if ( kind == StandardUrl )
return QString();
else if ( kind == Email )
return QString();
else
#endif
return QString();
}
UrlFilter::HotSpot::UrlType UrlFilter::HotSpot::urlType() const
Expand Down
1 change: 0 additions & 1 deletion src/plugins/grass/qtermwidget/KeyboardTranslator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ void KeyboardTranslatorManager::findTranslators()
QStringList list = dir.entryList( filters ); //(".keytab"); // = KGlobal::dirs()->findAllResources("data",
// "konsole/*.keytab",
// KStandardDirs::NoDuplicates);
list = dir.entryList( filters );
// add the name of each translator to the list and associated
// the name with a null pointer to indicate that the translator
// has not yet been loaded from disk
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/grass/qtermwidget/TerminalDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,13 +1567,12 @@ void TerminalDisplay::mousePressEvent( QMouseEvent* ev )

emit isBusySelecting( true ); // Keep it steady...
// Drag only when the Control key is hold
bool selected = false;

// The receiver of the testIsSelected() signal will adjust
// 'selected' accordingly.
//emit testIsSelected(pos.x(), pos.y(), selected);

selected = _screenWindow->isSelected( pos.x(), pos.y() );
bool selected = _screenWindow->isSelected( pos.x(), pos.y() );

if (( !_ctrlDrag || ev->modifiers() & Qt::ControlModifier ) && selected )
{
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/heatmap/heatmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static const QString sPluginIcon = ":/heatmap/heatmap.png";
Heatmap::Heatmap( QgisInterface * theQgisInterface )
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
, mQGisIface( theQgisInterface )
, mQActionPointer( 0 )
{
}

Expand All @@ -82,6 +83,8 @@ Heatmap::~Heatmap()
*/
void Heatmap::initGui()
{
delete mQActionPointer;

// Create the action for tool
mQActionPointer = new QAction( QIcon( ":/heatmap/heatmap.png" ), tr( "Heatmap" ), this );
// Set the what's this text
Expand Down
10 changes: 6 additions & 4 deletions src/plugins/offline_editing/offline_editing_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ static const QString sPluginIcon = ":/offline_editing/offline_editing_copy.png";
QgsOfflineEditingPlugin::QgsOfflineEditingPlugin( QgisInterface* theQgisInterface )
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
, mQGisIface( theQgisInterface )
, mActionConvertProject( NULL )
, mActionSynchronize( NULL )
, mOfflineEditing( NULL )
, mProgressDialog( NULL )
, mActionConvertProject( 0 )
, mActionSynchronize( 0 )
, mOfflineEditing( 0 )
, mProgressDialog( 0 )
{
}

Expand All @@ -51,6 +51,8 @@ QgsOfflineEditingPlugin::~QgsOfflineEditingPlugin()

void QgsOfflineEditingPlugin::initGui()
{
delete mActionConvertProject;

// Create the action for tool
mActionConvertProject = new QAction( QIcon( ":/offline_editing/offline_editing_copy.png" ), tr( "Convert to offline project" ), this );
// Set the what's this text
Expand Down
2 changes: 2 additions & 0 deletions src/plugins/spatialquery/qgsspatialqueryplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ QgsSpatialQueryPlugin::~QgsSpatialQueryPlugin()
*/
void QgsSpatialQueryPlugin::initGui()
{
delete mSpatialQueryAction;

// Create the action for tool
mSpatialQueryAction = new QAction( QIcon(), tr( "&Spatial Query" ), this );

Expand Down
3 changes: 3 additions & 0 deletions src/plugins/spit/qgsspitplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ QgsSpitPlugin::QgsSpitPlugin( QgisInterface * _qI )
: QgisPlugin( name_, description_, category_, version_, type_ )
, qgisMainWindow( _qI->mainWindow() )
, qI( _qI )
, spitAction( 0 )
{
}

Expand All @@ -62,6 +63,8 @@ QgsSpitPlugin::~QgsSpitPlugin()
*/
void QgsSpitPlugin::initGui()
{
delete spitAction;

// Create the action for tool
spitAction = new QAction( QIcon(), tr( "&Import Shapefiles to PostgreSQL" ), this );
setCurrentTheme( "" );
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/sqlanywhere/sasourceselect.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class SaGeomColTypeThread : public QThread
{
Q_OBJECT
public:
SaGeomColTypeThread() {}

void setConnInfo( QString s, bool estMeta, bool otherSchemas );
void addGeometryColumn( QString schema, QString table, QString column, QString geomtype, QString sridstr, QString lineinterp );
Expand All @@ -218,7 +219,6 @@ class SaGeomColTypeThread : public QThread
public slots:
void stop();


private:
QString mConnInfo;
bool mEstimateMetadata;
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/sqlanywhere/sqlanywhere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ static const QString sIcon = ":/sqlanywhere/sqlanywhere.svg";
SqlAnywhere::SqlAnywhere( QgisInterface * theQgisInterface )
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
, mQGisIface( theQgisInterface )
, mActionAddSqlAnywhereLayer( 0 )
{
}

Expand All @@ -78,6 +79,8 @@ SqlAnywhere::~SqlAnywhere()
*/
void SqlAnywhere::initGui()
{
delete mActionAddSqlAnywhereLayer;

// Create the action for tool
mActionAddSqlAnywhereLayer = new QAction( QIcon( ":/sqlanywhere/sqlanywhere.svg" ), tr( "Add SQL Anywhere Layer..." ), this );
mActionAddSqlAnywhereLayer->setWhatsThis( tr( "Store vector layers within a SQL Anywhere database" ) );
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/topology/topol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ static const QString sPluginIcon = ":/topology/topol.png";
Topol::Topol( QgisInterface * theQgisInterface )
: QgisPlugin( sName, sDescription, sCategory, sPluginVersion, sPluginType )
, mQGisIface( theQgisInterface )
, mQActionPointer( 0 )
{
mDock = 0;
}
Expand All @@ -66,6 +67,8 @@ Topol::~Topol()
*/
void Topol::initGui()
{
delete mQActionPointer;

mQActionPointer = new QAction( QIcon( ":/topology/topol.png" ), tr( "TopologyChecker" ), this );
//mQActionPointer = new QAction( QIcon(), tr( "Topology Checker" ), this );
mQActionPointer->setCheckable( true );
Expand Down
6 changes: 5 additions & 1 deletion src/plugins/zonal_statistics/qgszonalstatisticsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ static const QString category_ = QObject::tr( "Raster" );
static const QString version_ = QObject::tr( "Version 0.1" );
static const QString pluginIcon_ = ":/zonal_statistics/raster-stats.png";

QgsZonalStatisticsPlugin::QgsZonalStatisticsPlugin( QgisInterface* iface ): mIface( iface ), mAction( 0 )
QgsZonalStatisticsPlugin::QgsZonalStatisticsPlugin( QgisInterface* iface )
: mIface( iface )
, mAction( 0 )
{
}

Expand All @@ -39,6 +41,8 @@ QgsZonalStatisticsPlugin::~QgsZonalStatisticsPlugin()

void QgsZonalStatisticsPlugin::initGui()
{
delete mAction;

mAction = new QAction( QIcon( ":/zonal_statistics/raster-stats.png" ), tr( "&Zonal statistics" ), 0 );
QObject::connect( mAction, SIGNAL( triggered() ), this, SLOT( run() ) );
mIface->addRasterToolBarIcon( mAction );
Expand Down
7 changes: 3 additions & 4 deletions src/providers/oracle/ocispatial/qsql_ocispatial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ struct QOCISpatialResultPrivate

void setCharset( dvoid* handle, ub4 type ) const
{
int r = OCI_SUCCESS;
int r;
Q_ASSERT( handle );

#ifdef OCI_ATTR_CHARSET_FORM
Expand Down Expand Up @@ -2132,7 +2132,7 @@ bool QOCISpatialCols::execBatch( QOCISpatialResultPrivate *d, QVector<QVariant>
}

case SQLT_FLT:
( *list )[r] = *reinterpret_cast<double*>( data + r * columns[i].maxLen );
memcpy( &(( *list )[r] ), data + r * columns[i].maxLen, sizeof( double ) );
break;

case SQLT_STR:
Expand Down Expand Up @@ -2976,8 +2976,7 @@ bool QOCISpatialResult::gotoNext( QSqlCachedResult::ValueCache &values, int inde
return false;

bool piecewise = false;
int r = OCI_SUCCESS;
r = OCIStmtFetch2( d->sql, d->err, 1, OCI_FETCH_NEXT, 0, OCI_DEFAULT );
int r = OCIStmtFetch2( d->sql, d->err, 1, OCI_FETCH_NEXT, 0, OCI_DEFAULT );

if ( index < 0 ) //not interested in values
return r == OCI_SUCCESS || r == OCI_SUCCESS_WITH_INFO;
Expand Down