Commit 0aaee035 authored by Jan Möbius's avatar Jan Möbius
Browse files

cppcheck fixes

parent 7ea1d21d
......@@ -400,7 +400,7 @@ void SelectionBasePlugin::loadIniFileOptionsLast(INIFile &_ini)
//============================================================================================
void SelectionBasePlugin::slotAddSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString& _handleName) {
void SelectionBasePlugin::slotAddSelectionEnvironment(QString _modeName, const QString& _description, const QString& _icon, QString& _handleName) {
/*
A new selection environment is to be added. We first test if the
......@@ -451,7 +451,7 @@ void SelectionBasePlugin::slotAddSelectionEnvironment(QString _modeName, QString
//============================================================================================
void SelectionBasePlugin::slotRegisterType(QString _handleName, DataType _type) {
void SelectionBasePlugin::slotRegisterType(const QString& _handleName, DataType _type) {
/*
Register new data type under the selection environment with
handle name _handleName.
......@@ -735,7 +735,7 @@ void SelectionBasePlugin::updateActivePrimitiveTypes(bool _checked) {
//============================================================================================
void SelectionBasePlugin::setSelectionMetaphor(QString _metaphor) {
void SelectionBasePlugin::setSelectionMetaphor(const QString &_metaphor) {
if (_metaphor == SB_TOGGLE)
toggleSelectionAction_->trigger();
else if (_metaphor == SB_LASSO)
......@@ -773,7 +773,7 @@ void SelectionBasePlugin::setSelectionMetaphor(QString _metaphor) {
//============================================================================================
void SelectionBasePlugin::setSelectionPrimitiveType(QString _primitive) {
void SelectionBasePlugin::setSelectionPrimitiveType(const QString& _primitive) {
QList<QAction*>::iterator a_it = primitivesBarGroup_->actions().begin();
for(; a_it != primitivesBarGroup_->actions().end(); ++a_it) {
if((*a_it)->text() == _primitive) {
......@@ -1053,7 +1053,7 @@ void SelectionBasePlugin::slotPickModeChanged (const std::string& _pickmode) {
//============================================================================================
void SelectionBasePlugin::showSelectionMode(QString _mode, QString _icon, QString _desc, QString _handleName,
void SelectionBasePlugin::showSelectionMode(const QString& _mode, const QString& _icon, const QString& _desc, const QString& _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes,
QString& _customIdentifier, bool _custom, DataType _objectTypeRestriction) {
......@@ -1126,7 +1126,7 @@ void SelectionBasePlugin::showSelectionMode(QString _mode, QString _icon, QStrin
//============================================================================================
void SelectionBasePlugin::slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
void SelectionBasePlugin::slotAddCustomSelectionMode(const QString& _handleName, const QString& _modeName, const QString& _description, const QString &_icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier) {
showSelectionMode(_modeName, _icon, _description, _handleName, true, _associatedTypes, _customIdentifier, true);
......@@ -1135,7 +1135,7 @@ void SelectionBasePlugin::slotAddCustomSelectionMode(QString _handleName, QStrin
//============================================================================================
void SelectionBasePlugin::slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
void SelectionBasePlugin::slotAddCustomSelectionMode(const QString& _handleName, const QString& _modeName, const QString& _description, const QString& _icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier,
DataType _objectTypeRestriction) {
......@@ -1145,7 +1145,7 @@ void SelectionBasePlugin::slotAddCustomSelectionMode(QString _handleName, QStrin
//============================================================================================
void SelectionBasePlugin::slotShowToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowToggleSelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1155,7 +1155,7 @@ void SelectionBasePlugin::slotShowToggleSelectionMode(QString _handleName, bool
//============================================================================================
void SelectionBasePlugin::slotShowLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowLassoSelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1165,7 +1165,7 @@ void SelectionBasePlugin::slotShowLassoSelectionMode(QString _handleName, bool _
//============================================================================================
void SelectionBasePlugin::slotShowVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowVolumeLassoSelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1175,7 +1175,7 @@ void SelectionBasePlugin::slotShowVolumeLassoSelectionMode(QString _handleName,
//============================================================================================
void SelectionBasePlugin::slotShowSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowSurfaceLassoSelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1185,7 +1185,7 @@ void SelectionBasePlugin::slotShowSurfaceLassoSelectionMode(QString _handleName,
//============================================================================================
void SelectionBasePlugin::slotShowSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowSphereSelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1195,7 +1195,7 @@ void SelectionBasePlugin::slotShowSphereSelectionMode(QString _handleName, bool
//============================================================================================
void SelectionBasePlugin::slotShowClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowClosestBoundarySelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1205,7 +1205,7 @@ void SelectionBasePlugin::slotShowClosestBoundarySelectionMode(QString _handleNa
//============================================================================================
void SelectionBasePlugin::slotShowFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowFloodFillSelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1215,7 +1215,7 @@ void SelectionBasePlugin::slotShowFloodFillSelectionMode(QString _handleName, bo
//============================================================================================
void SelectionBasePlugin::slotShowComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
void SelectionBasePlugin::slotShowComponentsSelectionMode(const QString& _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes) {
QString iconPath = OpenFlipper::Options::iconDirStr() + OpenFlipper::Options::dirSeparator();
QString dummy;
......@@ -1634,7 +1634,7 @@ void SelectionBasePlugin::slotTargetObjectsOnly(bool& _targetsOnly) {
//============================================================================================
QString SelectionBasePlugin::getUniqueIdentifierName(QString _name, int _num) {
QString SelectionBasePlugin::getUniqueIdentifierName(const QString& _name, int _num) {
/*
This makes sure that we always have unique pickmode names
in order to avoid double mappings.
......@@ -1670,7 +1670,7 @@ QString SelectionBasePlugin::getUniqueIdentifierName(QString _name, int _num) {
//============================================================================================
QString SelectionBasePlugin::getUniqueHandleName(QString _name, int _num) {
QString SelectionBasePlugin::getUniqueHandleName(const QString& _name, int _num) {
/*
This makes sure that we always have unique handle names
in order to avoid double mappings.
......
......@@ -161,26 +161,26 @@ Q_INTERFACES(SelectionInterface)
void slotMouseEvent(QMouseEvent* _event);
// SelectionInterface
void slotAddSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString& _handleName);
void slotRegisterType(QString _handleName, DataType _type);
void slotAddSelectionEnvironment(QString _modeName, const QString &_description, const QString &_icon, QString& _handleName);
void slotRegisterType(const QString &_handleName, DataType _type);
void slotAddPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType& _typeHandle);
void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
void slotAddCustomSelectionMode(const QString& _handleName, const QString& _modeName, const QString& _description, const QString& _icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier);
void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon,
void slotAddCustomSelectionMode(const QString &_handleName, const QString &_modeName, const QString &_description, const QString &_icon,
SelectionInterface::PrimitiveType _associatedTypes, QString& _customIdentifier,
DataType _objectTypeRestriction);
void slotAddSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type = 0u);
void slotAddSelectionParameters(QString _handleName, QWidget* _widget, QString _category, SelectionInterface::PrimitiveType _type = 0u);
void slotShowToggleSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowVolumeLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowSurfaceLassoSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowSphereSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowClosestBoundarySelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowFloodFillSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowComponentsSelectionMode(QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowToggleSelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowLassoSelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowVolumeLassoSelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowSurfaceLassoSelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowSphereSelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowClosestBoundarySelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowFloodFillSelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotShowComponentsSelectionMode(const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes);
void slotGetActiveDataTypes(SelectionInterface::TypeList& _types);
void slotGetActivePrimitiveType(SelectionInterface::PrimitiveType& _type);
......@@ -246,7 +246,7 @@ Q_INTERFACES(SelectionInterface)
*
* Note that furhter custom methaphors can be defined and used
*/
void setSelectionMetaphor(QString _metaphor);
void setSelectionMetaphor(const QString& _metaphor);
/** \brief Enables setting the selection primitive via scripting
* The default primitives for OpenMesh are:
......@@ -264,7 +264,7 @@ Q_INTERFACES(SelectionInterface)
*
* Note that further custom primitive types can be defined and used
*/
void setSelectionPrimitiveType(QString _primitive);
void setSelectionPrimitiveType(const QString &_primitive);
private:
......@@ -300,10 +300,10 @@ Q_INTERFACES(SelectionInterface)
};
/// Get a unique pickmode name
QString getUniqueIdentifierName(QString _name, int _num = 0);
QString getUniqueIdentifierName(const QString &_name, int _num = 0);
/// Get a unique handle name
QString getUniqueHandleName(QString _name, int _num = 0);
QString getUniqueHandleName(const QString &_name, int _num = 0);
/// Get a selectionEnvironment by a given name
bool getSelectionEnvironment(SelectionEnvironment*& env, const QString& _handleName);
......@@ -316,8 +316,8 @@ Q_INTERFACES(SelectionInterface)
/// Show standard selection mode
/// Use this method to show/hide standard selection actions (lasso, floodfill, sphere, etc.)
void showSelectionMode(QString _mode, QString _icon, QString _desc,
QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes,
void showSelectionMode(const QString &_mode, const QString &_icon, const QString &_desc,
const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes,
QString& _customIdentifier, bool _custom = false, DataType _objectTypeRestriction = DATA_ALL);
/// helper function for showSelectionMode
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment