Skip to content

Commit 81dc34d

Browse files
author
g_j_m
committedJun 24, 2006
Remove some unnecessary calls to connect(). They have been causing
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@5542 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 69f024e commit 81dc34d

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed
 

‎src/gui/qgisapp.cpp

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,11 +1690,6 @@ bool QgisApp::addLayer(QFileInfo const & vectorFile)
16901690
SIGNAL(keyPressed(QKeyEvent *)),
16911691
layer,
16921692
SLOT(keyPressed(QKeyEvent* )));
1693-
//add hooks for letting layer know canvas needs to recalc the layer extents
1694-
QObject::connect(layer,
1695-
SIGNAL(recalculateExtents()),
1696-
mMapCanvas,
1697-
SLOT(recalculateExtents()));
16981693

16991694
}
17001695
else
@@ -1811,12 +1806,6 @@ bool QgisApp::addLayer(QStringList const &theLayerQStringList, const QString& en
18111806
SIGNAL(keyPressed(QKeyEvent *)),
18121807
layer,
18131808
SLOT(keyPressed(QKeyEvent* )));
1814-
//add hooks for letting layer know canvas needs to recalc the layer extents
1815-
QObject::connect(layer,
1816-
SIGNAL(recalculateExtents()),
1817-
mMapCanvas,
1818-
SLOT(recalculateExtents()));
1819-
18201809
}
18211810
else
18221811
{
@@ -1924,12 +1913,6 @@ void QgisApp::addDatabaseLayer()
19241913
SIGNAL(keyPressed(QKeyEvent *)),
19251914
layer,
19261915
SLOT(keyPressed(QKeyEvent* )));
1927-
//add hooks for letting layer know canvas needs to recalc the layer extents
1928-
QObject::connect(layer,
1929-
SIGNAL(recalculateExtents()),
1930-
mMapCanvas,
1931-
SLOT(recalculateExtents()));
1932-
19331916
}
19341917
else
19351918
{
@@ -2589,13 +2572,6 @@ void QgisApp::fileOpen()
25892572
SIGNAL(keyPressed(QKeyEvent *)),
25902573
myMapLayer,
25912574
SLOT(keyPressed(QKeyEvent* )));
2592-
2593-
//add hooks for letting layer know canvas needs to recalc the layer extents
2594-
QObject::connect(myMapLayer,
2595-
SIGNAL(recalculateExtents()),
2596-
mMapCanvas,
2597-
SLOT(recalculateExtents()));
2598-
25992575
}
26002576

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

4225-
4226-
//add hooks for letting layer know canvas needs to recalc the layer extents
4227-
QObject::connect(layer,
4228-
SIGNAL(recalculateExtents()),
4229-
mMapCanvas,
4230-
SLOT(recalculateExtents()));
4231-
42324201
QgsProject::instance()->dirty(false); // XXX this might be redundant
42334202

42344203
statusBar()->message(mMapCanvas->extent().stringRep(2));
@@ -4894,11 +4863,6 @@ bool QgisApp::addRasterLayer(QgsRasterLayer * theRasterLayer, bool theForceRedra
48944863
SIGNAL(keyPressed(QKeyEvent * )),
48954864
theRasterLayer,
48964865
SLOT(keyPressed(QKeyEvent* )));
4897-
//add hooks for letting layer know canvas needs to recalc the layer extents
4898-
QObject::connect(theRasterLayer,
4899-
SIGNAL(recalculateExtents()),
4900-
mMapCanvas,
4901-
SLOT(recalculateExtents()));
49024866

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

5053-
5054-
//add hooks for letting layer know canvas needs to recalc the layer extents
5055-
QObject::connect(layer,
5056-
SIGNAL(recalculateExtents()),
5057-
mMapCanvas,
5058-
SLOT(recalculateExtents()));
5059-
50605017
QgsProject::instance()->dirty(false); // XXX this might be redundant
50615018

50625019
statusBar()->message(mMapCanvas->extent().stringRep(2));

‎src/gui/qgsvectorlayer.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2141,12 +2141,6 @@ bool QgsVectorLayer::setDataProvider( QString const & provider )
21412141
this, SLOT( updateExtents() )
21422142
);
21432143

2144-
// Connect the repaintRequested chain from the data provider to this map layer
2145-
// in the hope that the map canvas will notice
2146-
connect(dataProvider, SIGNAL( repaintRequested() ),
2147-
this, SLOT( triggerRepaint() )
2148-
);
2149-
21502144
// get the extent
21512145
QgsRect *mbr = dataProvider->extent();
21522146

0 commit comments

Comments
 (0)
Please sign in to comment.