Skip to content

Commit 592b3a2

Browse files
author
timlinux
committed
Replace deprecated activated() calls to qaction with triggered() - removes COMPAT warning on console
git-svn-id: http://svn.osgeo.org/qgis/trunk@8053 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 080c5fc commit 592b3a2

File tree

8 files changed

+22
-21
lines changed

8 files changed

+22
-21
lines changed

src/plugins/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ ENDIF (GRASS_FOUND)
1919
INSTALL(FILES qgisplugin.h qgsrendererplugin.h DESTINATION ${QGIS_INCLUDE_DIR})
2020

2121
SUBDIRS (quick_print)
22+

src/plugins/geoprocessing/qgspggeoprocessing.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ void QgsPgGeoprocessing::initGui()
7979
bufferAction->setWhatsThis(tr("Create a buffer for a PostgreSQL layer. " +
8080
tr("A new layer is created in the database with the buffered features.")));
8181
// Connect the action to the buffer slot
82-
connect(bufferAction, SIGNAL(activated()), this, SLOT(buffer()));
82+
connect(bufferAction, SIGNAL(triggered()), this, SLOT(buffer()));
8383

8484
// Add the icon to the toolbar
8585
qI->addToolBarIcon(bufferAction);
8686
qI->addPluginMenu(tr("&Geoprocessing"), bufferAction);
8787

8888
}
8989

90-
// Slot called when the buffer menu item is activated
90+
// Slot called when the buffer menu item is triggered
9191
void QgsPgGeoprocessing::buffer()
9292
{
9393
// need to get a pointer to the current layer

src/plugins/georeferencer/plugin.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void QgsGeorefPlugin::initGui()
9191
mQActionPointer = new QAction(QIcon(":/icon.png"), tr("&Georeferencer"), this);
9292

9393
// Connect the action to the run
94-
connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run()));
94+
connect(mQActionPointer, SIGNAL(triggered()), this, SLOT(run()));
9595

9696
// Add to the toolbar & menu
9797
mQGisIface->addToolBarIcon(mQActionPointer);
@@ -104,7 +104,7 @@ void QgsGeorefPlugin::help()
104104
//implement me!
105105
}
106106

107-
// Slot called when the buffer menu item is activated
107+
// Slot called when the buffer menu item is triggered
108108
void QgsGeorefPlugin::run()
109109
{
110110
QgsGeorefPluginGui *myPluginGui=new QgsGeorefPluginGui(mQGisIface, QgsGeorefPluginGui::findMainWindow());

src/plugins/grass/qgsgrassplugin.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -184,16 +184,16 @@ void QgsGrassPlugin::initGui()
184184
mEditAction->setWhatsThis(tr("Edit the currently selected GRASS vector layer."));
185185

186186
// Connect the action
187-
connect(mAddVectorAction, SIGNAL(activated()), this, SLOT(addVector()));
188-
connect(mAddRasterAction, SIGNAL(activated()), this, SLOT(addRaster()));
189-
connect(mOpenToolsAction, SIGNAL(activated()), this, SLOT(openTools()));
190-
connect(mEditAction, SIGNAL(activated()), this, SLOT(edit()));
191-
connect(mNewVectorAction, SIGNAL(activated()), this, SLOT(newVector()));
187+
connect(mAddVectorAction, SIGNAL(triggered()), this, SLOT(addVector()));
188+
connect(mAddRasterAction, SIGNAL(triggered()), this, SLOT(addRaster()));
189+
connect(mOpenToolsAction, SIGNAL(triggered()), this, SLOT(openTools()));
190+
connect(mEditAction, SIGNAL(triggered()), this, SLOT(edit()));
191+
connect(mNewVectorAction, SIGNAL(triggered()), this, SLOT(newVector()));
192192
connect(mRegionAction, SIGNAL(toggled(bool)), this, SLOT(switchRegion(bool)));
193-
connect(mEditRegionAction, SIGNAL(activated()), this, SLOT(changeRegion()));
194-
connect(mOpenMapsetAction, SIGNAL(activated()), this, SLOT(openMapset()));
195-
connect(mNewMapsetAction, SIGNAL(activated()), this, SLOT(newMapset()));
196-
connect(mCloseMapsetAction, SIGNAL(activated()), this, SLOT(closeMapset()));
193+
connect(mEditRegionAction, SIGNAL(triggered()), this, SLOT(changeRegion()));
194+
connect(mOpenMapsetAction, SIGNAL(triggered()), this, SLOT(openMapset()));
195+
connect(mNewMapsetAction, SIGNAL(triggered()), this, SLOT(newMapset()));
196+
connect(mCloseMapsetAction, SIGNAL(triggered()), this, SLOT(closeMapset()));
197197

198198
// Add actions to a GRASS plugin menu
199199
qGisInterface->addPluginMenu(tr("&GRASS"), mOpenMapsetAction);
@@ -293,7 +293,7 @@ void QgsGrassPlugin::saveMapset()
293293
QgsGrass::getDefaultMapset() );
294294
}
295295

296-
// Slot called when the "Add GRASS vector layer" menu item is activated
296+
// Slot called when the "Add GRASS vector layer" menu item is triggered
297297
void QgsGrassPlugin::addVector()
298298
{
299299
#ifdef QGISDEBUG
@@ -375,7 +375,7 @@ void QgsGrassPlugin::addVector()
375375
}
376376
}
377377

378-
// Slot called when the "Add GRASS raster layer" menu item is activated
378+
// Slot called when the "Add GRASS raster layer" menu item is triggered
379379
void QgsGrassPlugin::addRaster()
380380
{
381381
#ifdef QGISDEBUG

src/plugins/maplayer/maplayertest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ void MapLayerTest::initGui(){
3939
menuId = menu->insertItem( "&PluginMenu", mapLayerPluginMenu );
4040
//QAction *zoomPreviousAction = new QAction( "Zoom Previous",QIconSet(icon_matrix), "&Zoom Previous", CTRL+Key_S, qgisMainWindow, "zoomFull" );
4141

42-
// connect( zoomPreviousAction, SIGNAL( activated() ) , this, SLOT( zoomPrevious() ) );
42+
// connect( zoomPreviousAction, SIGNAL( triggered() ) , this, SLOT( zoomPrevious() ) );
4343

4444
}
4545
void MapLayerTest::unload(){

src/plugins/plugin_template/plugin.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void [pluginname]::initGui()
7474
// Set the what's this text
7575
mQActionPointer->setWhatsThis(tr("Replace this with a short description of the what the plugin does"));
7676
// Connect the action to the run
77-
connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run()));
77+
connect(mQActionPointer, SIGNAL(triggered()), this, SLOT(run()));
7878
// Add the icon to the toolbar
7979
mQGisIface->addToolBarIcon(mQActionPointer);
8080
mQGisIface->addPluginMenu(tr("&[menuname]"), mQActionPointer);
@@ -86,7 +86,7 @@ void [pluginname]::help()
8686
//implement me!
8787
}
8888

89-
// Slot called when the menu item is activated
89+
// Slot called when the menu item is triggered
9090
// If you created more menu items / toolbar buttons in initiGui, you should
9191
// create a separate handler for each action - this single run() method will
9292
// not be enough

src/plugins/spit/qgsspitplugin.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ void QgsSpitPlugin::initGui()
6969
spitAction->setWhatsThis(tr("Import shapefiles into a PostGIS-enabled PostgreSQL database. "
7070
"The schema and field names can be customized on import"));
7171
// Connect the action to the spit slot
72-
connect(spitAction, SIGNAL(activated()), this, SLOT(spit()));
72+
connect(spitAction, SIGNAL(triggered()), this, SLOT(spit()));
7373
// Add the icon to the toolbar and to the plugin menu
7474
qI->addToolBarIcon(spitAction);
7575
qI->addPluginMenu(tr("&Spit"), spitAction);
7676

7777
}
7878

79-
// Slot called when the shapefile to postgres menu item is activated
79+
// Slot called when the shapefile to postgres menu item is triggered
8080
void QgsSpitPlugin::spit()
8181
{
8282
QgsSpit *spitDlg = new QgsSpit(qgisMainWindow, Qt::Window);

src/plugins/wfs/qgswfsplugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void QgsWFSPlugin::initGui()
4646
if(mIface)
4747
{
4848
mWfsDialogAction = new QAction(QIcon(mIconAddWfsLayer), tr("&Add WFS layer"), 0);
49-
QObject::connect(mWfsDialogAction, SIGNAL(activated()), this, SLOT(showSourceDialog()));
49+
QObject::connect(mWfsDialogAction, SIGNAL(triggered()), this, SLOT(showSourceDialog()));
5050
mIface->addToolBarIcon(mWfsDialogAction);
5151
mIface->addPluginMenu(tr("&Add WFS layer"), mWfsDialogAction);
5252
}

0 commit comments

Comments
 (0)