Skip to content

Commit

Permalink
Remove some unnecessary calls to connect(). They have been causing
Browse files Browse the repository at this point in the history
warnings from Qt during runtime, and don't seem to affect the
operation of qgis when removed.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5542 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Jun 24, 2006
1 parent 8d1452b commit 7e3491e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 49 deletions.
43 changes: 0 additions & 43 deletions src/gui/qgisapp.cpp
Expand Up @@ -1690,11 +1690,6 @@ bool QgisApp::addLayer(QFileInfo const & vectorFile)
SIGNAL(keyPressed(QKeyEvent *)),
layer,
SLOT(keyPressed(QKeyEvent* )));
//add hooks for letting layer know canvas needs to recalc the layer extents
QObject::connect(layer,
SIGNAL(recalculateExtents()),
mMapCanvas,
SLOT(recalculateExtents()));

}
else
Expand Down Expand Up @@ -1811,12 +1806,6 @@ bool QgisApp::addLayer(QStringList const &theLayerQStringList, const QString& en
SIGNAL(keyPressed(QKeyEvent *)),
layer,
SLOT(keyPressed(QKeyEvent* )));
//add hooks for letting layer know canvas needs to recalc the layer extents
QObject::connect(layer,
SIGNAL(recalculateExtents()),
mMapCanvas,
SLOT(recalculateExtents()));

}
else
{
Expand Down Expand Up @@ -1924,12 +1913,6 @@ void QgisApp::addDatabaseLayer()
SIGNAL(keyPressed(QKeyEvent *)),
layer,
SLOT(keyPressed(QKeyEvent* )));
//add hooks for letting layer know canvas needs to recalc the layer extents
QObject::connect(layer,
SIGNAL(recalculateExtents()),
mMapCanvas,
SLOT(recalculateExtents()));

}
else
{
Expand Down Expand Up @@ -2589,13 +2572,6 @@ void QgisApp::fileOpen()
SIGNAL(keyPressed(QKeyEvent *)),
myMapLayer,
SLOT(keyPressed(QKeyEvent* )));

//add hooks for letting layer know canvas needs to recalc the layer extents
QObject::connect(myMapLayer,
SIGNAL(recalculateExtents()),
mMapCanvas,
SLOT(recalculateExtents()));

}

//set the projections enabled icon in the status bar
Expand Down Expand Up @@ -4222,13 +4198,6 @@ void QgisApp::addVectorLayer(QString vectorLayerPath, QString baseName, QString
layer,
SLOT(keyPressed(QKeyEvent* )));


//add hooks for letting layer know canvas needs to recalc the layer extents
QObject::connect(layer,
SIGNAL(recalculateExtents()),
mMapCanvas,
SLOT(recalculateExtents()));

QgsProject::instance()->dirty(false); // XXX this might be redundant

statusBar()->message(mMapCanvas->extent().stringRep(2));
Expand Down Expand Up @@ -4894,11 +4863,6 @@ bool QgisApp::addRasterLayer(QgsRasterLayer * theRasterLayer, bool theForceRedra
SIGNAL(keyPressed(QKeyEvent * )),
theRasterLayer,
SLOT(keyPressed(QKeyEvent* )));
//add hooks for letting layer know canvas needs to recalc the layer extents
QObject::connect(theRasterLayer,
SIGNAL(recalculateExtents()),
mMapCanvas,
SLOT(recalculateExtents()));

// init the context menu so it can connect to slots in main app
// XXX now taken care of in legend theRasterLayer->initContextMenu(this);
Expand Down Expand Up @@ -5050,13 +5014,6 @@ void QgisApp::addRasterLayer(QString const & rasterLayerPath,
layer,
SLOT(keyPressed(QKeyEvent* )));


//add hooks for letting layer know canvas needs to recalc the layer extents
QObject::connect(layer,
SIGNAL(recalculateExtents()),
mMapCanvas,
SLOT(recalculateExtents()));

QgsProject::instance()->dirty(false); // XXX this might be redundant

statusBar()->message(mMapCanvas->extent().stringRep(2));
Expand Down
6 changes: 0 additions & 6 deletions src/gui/qgsvectorlayer.cpp
Expand Up @@ -2141,12 +2141,6 @@ bool QgsVectorLayer::setDataProvider( QString const & provider )
this, SLOT( updateExtents() )
);

// Connect the repaintRequested chain from the data provider to this map layer
// in the hope that the map canvas will notice
connect(dataProvider, SIGNAL( repaintRequested() ),
this, SLOT( triggerRepaint() )
);

// get the extent
QgsRect *mbr = dataProvider->extent();

Expand Down

0 comments on commit 7e3491e

Please sign in to comment.