Skip to content

Commit

Permalink
Replace deprecated activated() calls to qaction with triggered() - re…
Browse files Browse the repository at this point in the history
…moves COMPAT warning on console

git-svn-id: http://svn.osgeo.org/qgis/trunk@8053 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 26, 2008
1 parent 080c5fc commit 592b3a2
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ ENDIF (GRASS_FOUND)
INSTALL(FILES qgisplugin.h qgsrendererplugin.h DESTINATION ${QGIS_INCLUDE_DIR})

SUBDIRS (quick_print)

4 changes: 2 additions & 2 deletions src/plugins/geoprocessing/qgspggeoprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ void QgsPgGeoprocessing::initGui()
bufferAction->setWhatsThis(tr("Create a buffer for a PostgreSQL layer. " +
tr("A new layer is created in the database with the buffered features.")));
// Connect the action to the buffer slot
connect(bufferAction, SIGNAL(activated()), this, SLOT(buffer()));
connect(bufferAction, SIGNAL(triggered()), this, SLOT(buffer()));

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

}

// Slot called when the buffer menu item is activated
// Slot called when the buffer menu item is triggered
void QgsPgGeoprocessing::buffer()
{
// need to get a pointer to the current layer
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/georeferencer/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void QgsGeorefPlugin::initGui()
mQActionPointer = new QAction(QIcon(":/icon.png"), tr("&Georeferencer"), this);

// Connect the action to the run
connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run()));
connect(mQActionPointer, SIGNAL(triggered()), this, SLOT(run()));

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

// Slot called when the buffer menu item is activated
// Slot called when the buffer menu item is triggered
void QgsGeorefPlugin::run()
{
QgsGeorefPluginGui *myPluginGui=new QgsGeorefPluginGui(mQGisIface, QgsGeorefPluginGui::findMainWindow());
Expand Down
22 changes: 11 additions & 11 deletions src/plugins/grass/qgsgrassplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,16 @@ void QgsGrassPlugin::initGui()
mEditAction->setWhatsThis(tr("Edit the currently selected GRASS vector layer."));

// Connect the action
connect(mAddVectorAction, SIGNAL(activated()), this, SLOT(addVector()));
connect(mAddRasterAction, SIGNAL(activated()), this, SLOT(addRaster()));
connect(mOpenToolsAction, SIGNAL(activated()), this, SLOT(openTools()));
connect(mEditAction, SIGNAL(activated()), this, SLOT(edit()));
connect(mNewVectorAction, SIGNAL(activated()), this, SLOT(newVector()));
connect(mAddVectorAction, SIGNAL(triggered()), this, SLOT(addVector()));
connect(mAddRasterAction, SIGNAL(triggered()), this, SLOT(addRaster()));
connect(mOpenToolsAction, SIGNAL(triggered()), this, SLOT(openTools()));
connect(mEditAction, SIGNAL(triggered()), this, SLOT(edit()));
connect(mNewVectorAction, SIGNAL(triggered()), this, SLOT(newVector()));
connect(mRegionAction, SIGNAL(toggled(bool)), this, SLOT(switchRegion(bool)));
connect(mEditRegionAction, SIGNAL(activated()), this, SLOT(changeRegion()));
connect(mOpenMapsetAction, SIGNAL(activated()), this, SLOT(openMapset()));
connect(mNewMapsetAction, SIGNAL(activated()), this, SLOT(newMapset()));
connect(mCloseMapsetAction, SIGNAL(activated()), this, SLOT(closeMapset()));
connect(mEditRegionAction, SIGNAL(triggered()), this, SLOT(changeRegion()));
connect(mOpenMapsetAction, SIGNAL(triggered()), this, SLOT(openMapset()));
connect(mNewMapsetAction, SIGNAL(triggered()), this, SLOT(newMapset()));
connect(mCloseMapsetAction, SIGNAL(triggered()), this, SLOT(closeMapset()));

// Add actions to a GRASS plugin menu
qGisInterface->addPluginMenu(tr("&GRASS"), mOpenMapsetAction);
Expand Down Expand Up @@ -293,7 +293,7 @@ void QgsGrassPlugin::saveMapset()
QgsGrass::getDefaultMapset() );
}

// Slot called when the "Add GRASS vector layer" menu item is activated
// Slot called when the "Add GRASS vector layer" menu item is triggered
void QgsGrassPlugin::addVector()
{
#ifdef QGISDEBUG
Expand Down Expand Up @@ -375,7 +375,7 @@ void QgsGrassPlugin::addVector()
}
}

// Slot called when the "Add GRASS raster layer" menu item is activated
// Slot called when the "Add GRASS raster layer" menu item is triggered
void QgsGrassPlugin::addRaster()
{
#ifdef QGISDEBUG
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/maplayer/maplayertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void MapLayerTest::initGui(){
menuId = menu->insertItem( "&PluginMenu", mapLayerPluginMenu );
//QAction *zoomPreviousAction = new QAction( "Zoom Previous",QIconSet(icon_matrix), "&Zoom Previous", CTRL+Key_S, qgisMainWindow, "zoomFull" );

// connect( zoomPreviousAction, SIGNAL( activated() ) , this, SLOT( zoomPrevious() ) );
// connect( zoomPreviousAction, SIGNAL( triggered() ) , this, SLOT( zoomPrevious() ) );

}
void MapLayerTest::unload(){
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/plugin_template/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void [pluginname]::initGui()
// Set the what's this text
mQActionPointer->setWhatsThis(tr("Replace this with a short description of the what the plugin does"));
// Connect the action to the run
connect(mQActionPointer, SIGNAL(activated()), this, SLOT(run()));
connect(mQActionPointer, SIGNAL(triggered()), this, SLOT(run()));
// Add the icon to the toolbar
mQGisIface->addToolBarIcon(mQActionPointer);
mQGisIface->addPluginMenu(tr("&[menuname]"), mQActionPointer);
Expand All @@ -86,7 +86,7 @@ void [pluginname]::help()
//implement me!
}

// Slot called when the menu item is activated
// Slot called when the menu item is triggered
// If you created more menu items / toolbar buttons in initiGui, you should
// create a separate handler for each action - this single run() method will
// not be enough
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/spit/qgsspitplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ void QgsSpitPlugin::initGui()
spitAction->setWhatsThis(tr("Import shapefiles into a PostGIS-enabled PostgreSQL database. "
"The schema and field names can be customized on import"));
// Connect the action to the spit slot
connect(spitAction, SIGNAL(activated()), this, SLOT(spit()));
connect(spitAction, SIGNAL(triggered()), this, SLOT(spit()));
// Add the icon to the toolbar and to the plugin menu
qI->addToolBarIcon(spitAction);
qI->addPluginMenu(tr("&Spit"), spitAction);

}

// Slot called when the shapefile to postgres menu item is activated
// Slot called when the shapefile to postgres menu item is triggered
void QgsSpitPlugin::spit()
{
QgsSpit *spitDlg = new QgsSpit(qgisMainWindow, Qt::Window);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/wfs/qgswfsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void QgsWFSPlugin::initGui()
if(mIface)
{
mWfsDialogAction = new QAction(QIcon(mIconAddWfsLayer), tr("&Add WFS layer"), 0);
QObject::connect(mWfsDialogAction, SIGNAL(activated()), this, SLOT(showSourceDialog()));
QObject::connect(mWfsDialogAction, SIGNAL(triggered()), this, SLOT(showSourceDialog()));
mIface->addToolBarIcon(mWfsDialogAction);
mIface->addPluginMenu(tr("&Add WFS layer"), mWfsDialogAction);
}
Expand Down

0 comments on commit 592b3a2

Please sign in to comment.