Skip to content

Commit a273e3d

Browse files
author
borysiasty
committed
partial fix for #1743 : connection to proper QAction's triggered() signal in all core plugins
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@10967 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b406dd0 commit a273e3d

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

python/plugins/mapserver_export/mapserverexport.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def initGui(self):
5959
"MapServer Export", self.iface.mainWindow())
6060
#self.action.setWhatsThis("Configuration for Zoom To Point plugin")
6161
# connect the action to the run method
62-
QObject.connect(self.action, SIGNAL("activated()"), self.run)
62+
QObject.connect(self.action, SIGNAL("triggered()"), self.run)
6363
QObject.connect(self.iface, SIGNAL("currentThemeChanged ( QString )"), self.setCurrentTheme)
6464

6565
# Add toolbar button and menu item

python/plugins/plugin_installer/installer_plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def initGui(self):
6969
else: # old plugin API
7070
nextAction = self.mainWindow().menuBar().actions()[4].menu().actions()[1]
7171
self.mainWindow().menuBar().actions()[4].menu().insertAction(nextAction,self.action)
72-
QObject.connect(self.action, SIGNAL("activated()"), self.run)
72+
QObject.connect(self.action, SIGNAL("triggered()"), self.run)
7373
QObject.connect(self.iface, SIGNAL("currentThemeChanged ( QString )"), self.setCurrentTheme)
7474
self.statusLabel = None
7575

src/plugins/copyright_label/plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void QgsCopyrightLabelPlugin::initGui()
8080
setCurrentTheme( "" );
8181
myQActionPointer->setWhatsThis( tr( "Creates a copyright label that is displayed on the map canvas." ) );
8282
// Connect the action to the run
83-
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
83+
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
8484
// This calls the renderer everytime the cnavas has drawn itself
8585
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderLabel( QPainter * ) ) );
8686
//this resets this plugin up if a project is loaded

src/plugins/delimited_text/qgsdelimitedtextplugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void QgsDelimitedTextPlugin::initGui()
104104
"The file must have a header row containing the field names. "
105105
"X and Y fields are required and must contain coordinates in decimal units." ) );
106106
// Connect the action to the run
107-
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
107+
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
108108
// Add the icon to the toolbar
109109
qGisInterface->addToolBarIcon( myQActionPointer );
110110
qGisInterface->addPluginToMenu( tr( "&Delimited text" ), myQActionPointer );

src/plugins/dxf2shp_converter/dxf2shpconverter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void dxf2shpConverter::initGui()
7777
mQActionPointer->setWhatsThis( tr( "Converts DXF files in Shapefile format" ) );
7878

7979
// Connect the action to the run
80-
connect( mQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
80+
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
8181

8282
// Add the icon to the toolbar
8383
mQGisIface->addToolBarIcon( mQActionPointer );

src/plugins/gps_importer/qgsgpsplugin.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ void QgsGPSPlugin::initGui()
9393

9494
mQActionPointer->setWhatsThis( tr( "Creates a new GPX layer and displays it on the map canvas" ) );
9595
mCreateGPXAction->setWhatsThis( tr( "Creates a new GPX layer and displays it on the map canvas" ) );
96-
connect( mQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
97-
connect( mCreateGPXAction, SIGNAL( activated() ), this, SLOT( createGPX() ) );
96+
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
97+
connect( mCreateGPXAction, SIGNAL( triggered() ), this, SLOT( createGPX() ) );
9898

9999
mQGisInterface->fileToolBar()->addAction( mQActionPointer );
100100
mQGisInterface->addPluginToMenu( tr( "&Gps" ), mQActionPointer );

src/plugins/north_arrow/plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void QgsNorthArrowPlugin::initGui()
9696
setCurrentTheme( "" );
9797
myQActionPointer->setWhatsThis( tr( "Creates a north arrow that is displayed on the map canvas" ) );
9898
// Connect the action to the run
99-
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
99+
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
100100
//render the arrow each time the map is rendered
101101
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderNorthArrow( QPainter * ) ) );
102102
//this resets this plugin up if a project is loaded

src/plugins/quick_print/quickprintplugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void QuickPrintPlugin::initGui()
7878
// Set the what's this text
7979
mQActionPointer->setWhatsThis( tr( "Provides a way to quickly produce a map with minimal user input." ) );
8080
// Connect the action to the run
81-
connect( mQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
81+
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
8282
// Add the icon to the toolbar
8383
mQGisIface->addToolBarIcon( mQActionPointer );
8484
mQGisIface->addPluginToMenu( tr( "&Quick Print" ), mQActionPointer );

src/plugins/scale_bar/plugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void QgsScaleBarPlugin::initGui()
103103
setCurrentTheme( "" );
104104
myQActionPointer->setWhatsThis( tr( "Creates a scale bar that is displayed on the map canvas" ) );
105105
// Connect the action to the run
106-
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
106+
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
107107
//render the scale bar each time the map is rendered
108108
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderScaleBar( QPainter * ) ) );
109109
//this resets this plugin up if a project is loaded

0 commit comments

Comments
 (0)