Skip to content

Commit

Permalink
Avoid some unnecessary build warnings when WITH_BINDINGS is off
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 2, 2017
1 parent df71901 commit d22bfca
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -9227,6 +9229,9 @@ class QgsPythonRunnerImpl : public QgsPythonRunner
{
return mPythonUtils->runString( command, messageOnError, false );
}
#else
Q_UNUSED( command );
Q_UNUSED( messageOnError );
#endif
return false;
}
Expand All @@ -9238,6 +9243,9 @@ class QgsPythonRunnerImpl : public QgsPythonRunner
{
return mPythonUtils->evalString( command, result );
}
#else
Q_UNUSED( command );
Q_UNUSED( result );
#endif
return false;
}
Expand Down
8 changes: 8 additions & 0 deletions src/app/qgspluginregistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ bool QgsPluginRegistry::isPythonPlugin( const QString &key ) const
if ( mPythonUtils->isPluginLoaded( key ) )
return true;
}
#else
Q_UNUSED( key );
#endif
return false;
}
Expand Down Expand Up @@ -303,6 +305,8 @@ void QgsPluginRegistry::loadPythonPlugin( const QString &packageName )

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

Expand Down Expand Up @@ -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
}

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

return true;
#else
Q_UNUSED( packageName );
return false;
#endif
}
Expand All @@ -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
}
Expand Down

0 comments on commit d22bfca

Please sign in to comment.