Skip to content
Permalink
Browse files
Merge branch 'master' of github.com:qgis/Quantum-GIS
  • Loading branch information
timlinux committed Dec 9, 2011
2 parents 6fbad32 + a6746f1 commit 1197959
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 6 deletions.
@@ -5286,6 +5286,10 @@ void QgisApp::removePluginDatabaseMenu( QString name, QAction* action )
{
QMenu* menu = getDatabaseMenu( name );
menu->removeAction( action );
if ( menu->actions().count() == 0 )
{
mDatabaseMenu->removeAction( menu->menuAction() );
}

// remove the Database menu from the menuBar if there are no more actions
if ( mDatabaseMenu->actions().count() > 0 )
@@ -1776,6 +1776,12 @@ bool QgsWMSServer::testFilterStringSafety( const QString& filter ) const

//numeric strings need to be quoted once either with single or with double quotes

//empty strings are ok
if ( *tokenIt == "''" )
{
continue;
}

//single quote
if ( tokenIt->size() > 2
&& ( *tokenIt )[0] == QChar( '\'' )
@@ -115,9 +115,9 @@ void QgsOfflineEditingPlugin::unload()
disconnect( QgsProject::instance(), SIGNAL( writeProject( QDomDocument & ) ), this, SLOT( updateActions() ) );

// remove the GUI
mQGisIface->removePluginDatabaseMenu( "&Offline Editing", mActionConvertProject );
mQGisIface->removePluginDatabaseMenu( tr( "&Offline Editing" ), mActionConvertProject );
mQGisIface->removeToolBarIcon( mActionConvertProject );
mQGisIface->removePluginDatabaseMenu( "&Offline Editing", mActionSynchronize );
mQGisIface->removePluginDatabaseMenu( tr( "&Offline Editing" ), mActionSynchronize );
mQGisIface->removeToolBarIcon( mActionSynchronize );
delete mActionConvertProject;
delete mActionSynchronize;
@@ -58,7 +58,7 @@ void QgsOraclePlugin::initGui()
// Connect the action to the run
connect( mQActionPointer, SIGNAL( triggered() ), this, SLOT( run() ) );
// Add the icon to the toolbar
mQGisIface->addToolBarIcon( mQActionPointer );
mQGisIface->layerToolBar()->addAction( mQActionPointer );
mQGisIface->insertAddLayerAction( mQActionPointer );

}
@@ -87,7 +87,7 @@ void QgsOraclePlugin::run()
void QgsOraclePlugin::unload()
{
// remove the GUI
mQGisIface->removeToolBarIcon( mQActionPointer );
mQGisIface->layerToolBar()->removeAction( mQActionPointer );
mQGisIface->removeAddLayerAction( mQActionPointer );
delete mQActionPointer;
}
@@ -19,6 +19,7 @@
// Qt Includes
#include <QObject>
#include <QAction>
#include <QToolBar>

// QGIS Includes
#include <qgisplugin.h>
@@ -70,7 +70,7 @@ void QgsSpitPlugin::initGui()
connect( spitAction, SIGNAL( triggered() ), this, SLOT( spit() ) );
// Add the icon to the toolbar and to the plugin menu
qI->addToolBarIcon( spitAction );
qI->addPluginToMenu( tr( "&Spit" ), spitAction );
qI->addPluginToDatabaseMenu( tr( "&Spit" ), spitAction );

// this is called when the icon theme is changed
connect( qI, SIGNAL( currentThemeChanged( QString ) ), this, SLOT( setCurrentTheme( QString ) ) );
@@ -90,7 +90,7 @@ void QgsSpitPlugin::unload()
{
// remove the GUI
qI->removeToolBarIcon( spitAction );
qI->removePluginMenu( tr( "&Spit" ), spitAction );
qI->removePluginDatabaseMenu( tr( "&Spit" ), spitAction );
delete spitAction;
}

0 comments on commit 1197959

Please sign in to comment.