Skip to content

Commit

Permalink
partial fix for #1743 : connection to proper QAction's triggered() si…
Browse files Browse the repository at this point in the history
…gnal in all core plugins

git-svn-id: http://svn.osgeo.org/qgis/trunk@10967 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
borysiasty committed Jun 23, 2009
1 parent 94f444b commit 6386084
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion python/plugins/mapserver_export/mapserverexport.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def initGui(self):
"MapServer Export", self.iface.mainWindow())
#self.action.setWhatsThis("Configuration for Zoom To Point plugin")
# connect the action to the run method
QObject.connect(self.action, SIGNAL("activated()"), self.run)
QObject.connect(self.action, SIGNAL("triggered()"), self.run)
QObject.connect(self.iface, SIGNAL("currentThemeChanged ( QString )"), self.setCurrentTheme)

# Add toolbar button and menu item
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/plugin_installer/installer_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def initGui(self):
else: # old plugin API
nextAction = self.mainWindow().menuBar().actions()[4].menu().actions()[1]
self.mainWindow().menuBar().actions()[4].menu().insertAction(nextAction,self.action)
QObject.connect(self.action, SIGNAL("activated()"), self.run)
QObject.connect(self.action, SIGNAL("triggered()"), self.run)
QObject.connect(self.iface, SIGNAL("currentThemeChanged ( QString )"), self.setCurrentTheme)
self.statusLabel = None

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/copyright_label/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void QgsCopyrightLabelPlugin::initGui()
setCurrentTheme( "" );
myQActionPointer->setWhatsThis( tr( "Creates a copyright label that is displayed on the map canvas." ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// This calls the renderer everytime the cnavas has drawn itself
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderLabel( QPainter * ) ) );
//this resets this plugin up if a project is loaded
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/delimited_text/qgsdelimitedtextplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void QgsDelimitedTextPlugin::initGui()
"The file must have a header row containing the field names. "
"X and Y fields are required and must contain coordinates in decimal units." ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// Add the icon to the toolbar
qGisInterface->addToolBarIcon( myQActionPointer );
qGisInterface->addPluginToMenu( tr( "&Delimited text" ), myQActionPointer );
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/dxf2shp_converter/dxf2shpconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void dxf2shpConverter::initGui()
mQActionPointer->setWhatsThis( tr( "Converts DXF files in Shapefile format" ) );

// 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 );
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/gps_importer/qgsgpsplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ void QgsGPSPlugin::initGui()

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

mQGisInterface->fileToolBar()->addAction( mQActionPointer );
mQGisInterface->addPluginToMenu( tr( "&Gps" ), mQActionPointer );
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/north_arrow/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void QgsNorthArrowPlugin::initGui()
setCurrentTheme( "" );
myQActionPointer->setWhatsThis( tr( "Creates a north arrow that is displayed on the map canvas" ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
//render the arrow each time the map is rendered
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderNorthArrow( QPainter * ) ) );
//this resets this plugin up if a project is loaded
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/quick_print/quickprintplugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void QuickPrintPlugin::initGui()
// Set the what's this text
mQActionPointer->setWhatsThis( tr( "Provides a way to quickly produce a map with minimal user input." ) );
// 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->addPluginToMenu( tr( "&Quick Print" ), mQActionPointer );
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/scale_bar/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void QgsScaleBarPlugin::initGui()
setCurrentTheme( "" );
myQActionPointer->setWhatsThis( tr( "Creates a scale bar that is displayed on the map canvas" ) );
// Connect the action to the run
connect( myQActionPointer, SIGNAL( activated() ), this, SLOT( run() ) );
connect( myQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
//render the scale bar each time the map is rendered
connect( qGisInterface->mapCanvas(), SIGNAL( renderComplete( QPainter * ) ), this, SLOT( renderScaleBar( QPainter * ) ) );
//this resets this plugin up if a project is loaded
Expand Down

0 comments on commit 6386084

Please sign in to comment.