Skip to content
Permalink
Browse files

Avoid some unnecessary build warnings when WITH_BINDINGS is off

  • Loading branch information
nyalldawson committed Oct 2, 2017
1 parent df71901 commit d22bfca939882028e1e681ae45c2fc2b712bfa1a
Showing with 16 additions and 0 deletions.
  1. +8 −0 src/app/qgisapp.cpp
  2. +8 −0 src/app/qgspluginregistry.cpp
@@ -5551,6 +5551,8 @@ void QgisApp::runScript( const QString &filePath )
"from qgis.utils import iface\n"
"exec(open(\"%1\".replace(\"\\\\\", \"/\").encode(sys.getfilesystemencoding())).read())\n" ).arg( filePath )
, tr( "Failed to run Python script:" ), false );
#else
Q_UNUSED( filePath );
#endif
}

@@ -9227,6 +9229,9 @@ class QgsPythonRunnerImpl : public QgsPythonRunner
{
return mPythonUtils->runString( command, messageOnError, false );
}
#else
Q_UNUSED( command );
Q_UNUSED( messageOnError );
#endif
return false;
}
@@ -9238,6 +9243,9 @@ class QgsPythonRunnerImpl : public QgsPythonRunner
{
return mPythonUtils->evalString( command, result );
}
#else
Q_UNUSED( command );
Q_UNUSED( result );
#endif
return false;
}
@@ -116,6 +116,8 @@ bool QgsPluginRegistry::isPythonPlugin( const QString &key ) const
if ( mPythonUtils->isPluginLoaded( key ) )
return true;
}
#else
Q_UNUSED( key );
#endif
return false;
}
@@ -303,6 +305,8 @@ void QgsPluginRegistry::loadPythonPlugin( const QString &packageName )

settings.remove( "/PythonPlugins/watchDog/" + packageName );
}
#else
Q_UNUSED( packageName );
#endif
}

@@ -428,6 +432,8 @@ void QgsPluginRegistry::unloadPythonPlugin( const QString &packageName )
// disable the plugin no matter if successfully loaded or not
QgsSettings settings;
settings.setValue( "/PythonPlugins/" + packageName, false );
#else
Q_UNUSED( packageName );
#endif
}

@@ -613,6 +619,7 @@ bool QgsPluginRegistry::checkPythonPlugin( const QString &packageName )

return true;
#else
Q_UNUSED( packageName );
return false;
#endif
}
@@ -625,6 +632,7 @@ bool QgsPluginRegistry::isPythonPluginCompatible( const QString &packageName ) c
QString maxVersion = mPythonUtils->getPluginMetadata( packageName, QStringLiteral( "qgisMaximumVersion" ) );
return minVersion != QLatin1String( "__error__" ) && checkQgisVersion( minVersion, maxVersion );
#else
Q_UNUSED( packageName );
return false;
#endif
}

0 comments on commit d22bfca

Please sign in to comment.
You can’t perform that action at this time.