Skip to content

Commit d96ece9

Browse files
author
g_j_m
committed
Fix the 'Object::connect: No such signal QgsRasterLayer::drawingProgress()'
warnings. The raster and vector layer code were using a different signal name for drawing progress git-svn-id: http://svn.osgeo.org/qgis/trunk@6265 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 21b42c7 commit d96ece9

File tree

6 files changed

+19
-22
lines changed

6 files changed

+19
-22
lines changed

src/gui/qgisapp.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,7 @@ void QgisApp::setupConnections()
10611061
//signal when mouse moved over window (coords display in status bar)
10621062
connect(mMapCanvas, SIGNAL(xyCoordinates(QgsPoint &)), this, SLOT(showMouseCoordinate(QgsPoint &)));
10631063
//signal when mouse in capturePoint mode and mouse clicked on canvas
1064-
connect(mMapCanvas->mapRender(), SIGNAL(setProgress(int,int)), this, SLOT(showProgress(int,int)));
1064+
connect(mMapCanvas->mapRender(), SIGNAL(drawingProgress(int,int)), this, SLOT(showProgress(int,int)));
10651065
connect(mMapCanvas, SIGNAL(extentsChanged(QgsRect )),this,SLOT(showExtents(QgsRect )));
10661066
connect(mMapCanvas, SIGNAL(scaleChanged(QString)), this, SLOT(showScale(QString)));
10671067
connect(mMapCanvas, SIGNAL(scaleChanged(QString)), this, SLOT(updateMouseCoordinatePrecision()));
@@ -4552,7 +4552,7 @@ void QgisApp::projectionsEnabled(bool theFlag)
45524552
void QgisApp::showProgress(int theProgress, int theTotalSteps)
45534553
{
45544554
#ifdef QGISDEBUG
4555-
std::cout << "setProgress called with " << theProgress << "/" << theTotalSteps << std::endl;
4555+
std::cout << "showProgress called with " << theProgress << "/" << theTotalSteps << std::endl;
45564556
#endif
45574557

45584558
if (theProgress==theTotalSteps)
@@ -4952,7 +4952,7 @@ bool QgisApp::addRasterLayer(QgsRasterLayer * theRasterLayer, bool theForceRedra
49524952

49534953
// connect up any request the raster may make to update the app progress
49544954
QObject::connect(theRasterLayer,
4955-
SIGNAL(setProgress(int,int)),
4955+
SIGNAL(drawingProgress(int,int)),
49564956
this,
49574957
SLOT(showProgress(int,int)));
49584958
// connect up any request the raster may make to update the statusbar message
@@ -5109,7 +5109,7 @@ void QgisApp::addRasterLayer(QString const & rasterLayerPath,
51095109

51105110
// connect up any request the raster may make to update the app progress
51115111
QObject::connect(layer,
5112-
SIGNAL(setProgress(int,int)),
5112+
SIGNAL(drawingProgress(int,int)),
51135113
this,
51145114
SLOT(showProgress(int,int)));
51155115
// connect up any request the raster may make to update the statusbar message

src/gui/qgsmaplayer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ public slots:
378378
void visibilityChanged(void);
379379

380380
/** \brief emit a signal to notify of a progress event */
381-
void setProgress(int theProgress, int theTotalSteps);
381+
void drawingProgress(int theProgress, int theTotalSteps);
382382

383383
/** \brief emit a signal to be caught by gisapp and display a msg on status bar */
384384
void setStatus(QString theStatusQString);

src/gui/qgsmaprender.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ void QgsMapRender::render(QPainter* painter)
217217
// added these comments and debug statement to help others...
218218
QgsDebugMsg("If there is a QPaintEngine error here, it is caused by an emit call");
219219

220-
//emit setProgress(myRenderCounter++,layers.size());
220+
//emit drawingProgress(myRenderCounter++,layers.size());
221221
QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer(*li);
222222

223223
if (!ml)
@@ -289,7 +289,7 @@ visibility scale range");
289289
li = layers.begin();
290290
while (li != layers.end())
291291
{
292-
// TODO: emit setProgress((myRenderCounter++),zOrder.size());
292+
// TODO: emit drawingProgress((myRenderCounter++),zOrder.size());
293293
QgsMapLayer *ml = QgsMapLayerRegistry::instance()->mapLayer(*li);
294294

295295
if (ml && ml->visible() && (ml->type() != QgsMapLayer::RASTER))
@@ -312,7 +312,7 @@ visibility scale range");
312312
} // if (!mOverview)
313313

314314
// make sure progress bar arrives at 100%!
315-
emit setProgress(1,1);
315+
emit drawingProgress(1,1);
316316

317317
#ifdef QGISDEBUG
318318
QgsDebugMsg("Rendering done in " + QString("%1").arg(renderTime.elapsed() / 1000.0) + " seconds");

src/gui/qgsmaprender.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class QgsMapRender : public QObject
7575

7676
signals:
7777

78-
void setProgress(int current, int total);
78+
void drawingProgress(int current, int total);
7979

8080
void updateMap();
8181

src/gui/qgsvectorlayer.h

-3
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ class QgsVectorLayer : public QgsMapLayer
183183
/** This signal is emited when selection was changed */
184184
void selectionChanged();
185185

186-
/** This signal is emitted when drawing features to tell current progress */
187-
void drawingProgress(int current, int total);
188-
189186
public slots:
190187

191188
/** \brief Mutator for transparency level. Should be between 0 and 255 */

src/raster/qgsrasterlayer.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -2732,7 +2732,7 @@ const QgsRasterBandStats QgsRasterLayer::getRasterBandStats(int theBandNoInt)
27322732

27332733
emit setStatus(QString("Calculating stats for ")+name());
27342734
//reset the main app progress bar
2735-
emit setProgress(0,0);
2735+
emit drawingProgress(0,0);
27362736

27372737
// let the user know we're going to possibly be taking a while
27382738
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
@@ -2802,7 +2802,7 @@ const QgsRasterBandStats QgsRasterLayer::getRasterBandStats(int theBandNoInt)
28022802

28032803
for( int iYBlock = 0; iYBlock < myNYBlocks; iYBlock++ )
28042804
{
2805-
emit setProgress ( iYBlock, myNYBlocks * 2 );
2805+
emit drawingProgress ( iYBlock, myNYBlocks * 2 );
28062806

28072807
for( int iXBlock = 0; iXBlock < myNXBlocks; iXBlock++ )
28082808
{
@@ -2874,7 +2874,7 @@ const QgsRasterBandStats QgsRasterLayer::getRasterBandStats(int theBandNoInt)
28742874
//for the second pass we will get the sum of the squares / mean
28752875
for( int iYBlock = 0; iYBlock < myNYBlocks; iYBlock++ )
28762876
{
2877-
emit setProgress ( iYBlock+myNYBlocks, myNYBlocks * 2 );
2877+
emit drawingProgress ( iYBlock+myNYBlocks, myNYBlocks * 2 );
28782878

28792879
for( int iXBlock = 0; iXBlock < myNXBlocks; iXBlock++ )
28802880
{
@@ -2960,7 +2960,7 @@ const QgsRasterBandStats QgsRasterLayer::getRasterBandStats(int theBandNoInt)
29602960
QgsDebugMsg("adding stats to stats collection at position " + QString::number(theBandNoInt - 1));
29612961
//add this band to the class stats map
29622962
rasterStatsVector[theBandNoInt - 1] = myRasterBandStats;
2963-
emit setProgress(rasterYDimInt, rasterYDimInt); //reset progress
2963+
emit drawingProgress(rasterYDimInt, rasterYDimInt); //reset progress
29642964
QApplication::restoreOverrideCursor(); //restore the cursor
29652965
QgsDebugMsg("Stats collection completed returning");
29662966
return myRasterBandStats;
@@ -3687,7 +3687,7 @@ void QgsRasterLayer::initContextMenu_(QgisApp * theApp)
36873687
void QgsRasterLayer::updateProgress(int theProgress, int theMax)
36883688
{
36893689
//simply propogate it on!
3690-
emit setProgress (theProgress,theMax);
3690+
emit drawingProgress (theProgress,theMax);
36913691
}
36923692

36933693
void QgsRasterLayer::popupTransparencySliderMoved(int theInt)
@@ -4125,7 +4125,7 @@ QString QgsRasterLayer::getMetadata()
41254125
void QgsRasterLayer::buildPyramids(RasterPyramidList const & theRasterPyramidList,
41264126
QString const & theResamplingMethod)
41274127
{
4128-
emit setProgress(0,0);
4128+
emit drawingProgress(0,0);
41294129
//first test if the file is writeable
41304130
QFileInfo myQFile(dataSource);
41314131

@@ -4151,7 +4151,7 @@ void QgsRasterLayer::buildPyramids(RasterPyramidList const & theRasterPyramidLis
41514151

41524152
// if the dataset couldn't be opened in read / write mode, tell the user
41534153
if (!gdalDataset) {
4154-
emit setProgress(0,0);
4154+
emit drawingProgress(0,0);
41554155
QApplication::restoreOverrideCursor();
41564156
QMessageBox myMessageBox( tr("Building pyramids failed."),
41574157
tr("The file was not writeable. Some formats can not be written to, only read. You can also try to check the permissions and then try again."),
@@ -4185,7 +4185,7 @@ void QgsRasterLayer::buildPyramids(RasterPyramidList const & theRasterPyramidLis
41854185
if ((*myRasterPyramidIterator).existsFlag)
41864186
{
41874187
QgsDebugMsg("Building.....");
4188-
emit setProgress(myCountInt,myTotalInt);
4188+
emit drawingProgress(myCountInt,myTotalInt);
41894189
int myOverviewLevelsIntArray[1] = {(*myRasterPyramidIterator).levelInt };
41904190
/* From : http://remotesensing.org/gdal/classGDALDataset.html#a23
41914191
* pszResampling : one of "NEAREST", "AVERAGE" or "MODE" controlling the downsampling method applied.
@@ -4231,7 +4231,7 @@ void QgsRasterLayer::buildPyramids(RasterPyramidList const & theRasterPyramidLis
42314231
myMessageBox.exec();
42324232
delete gdalDataset;
42334233
gdalDataset = (GDALDataset *) GDALOpen(QFile::encodeName(dataSource).constData(), GA_ReadOnly);
4234-
emit setProgress(0,0);
4234+
emit drawingProgress(0,0);
42354235
return;
42364236
}
42374237
myCountInt++;
@@ -4248,7 +4248,7 @@ void QgsRasterLayer::buildPyramids(RasterPyramidList const & theRasterPyramidLis
42484248
//close the gdal dataset and reopen it in read only mode
42494249
delete gdalDataset;
42504250
gdalDataset = (GDALDataset *) GDALOpen(QFile::encodeName(dataSource).constData(), GA_ReadOnly);
4251-
emit setProgress(0,0);
4251+
emit drawingProgress(0,0);
42524252
QApplication::restoreOverrideCursor();
42534253
}
42544254

0 commit comments

Comments
 (0)