fix -Wunused-parameter

This commit is contained in:
wmayer 2016-09-23 16:37:12 +02:00
parent d1b3cbed75
commit c48a9bfead
4 changed files with 16 additions and 2 deletions

View File

@ -1392,6 +1392,7 @@ void messageHandler(QtMsgType type, const char *msg)
#endif
#else
// do not stress user with Qt internals but write to log file if enabled
Q_UNUSED(type);
Base::Console().Log("%s\n", msg);
#endif
}

View File

@ -102,18 +102,24 @@ public:
{
#ifdef FC_DEBUG
Log(s);
#else
Q_UNUSED(s);
#endif
}
void Message(const char * s)
{
#ifdef FC_DEBUG
Log(s);
#else
Q_UNUSED(s);
#endif
}
void Error (const char * s)
{
#ifdef FC_DEBUG
Log(s);
#else
Q_UNUSED(s);
#endif
}
void Log (const char * s)

View File

@ -206,6 +206,7 @@ Py::Object PythonWrapper::fromQWidget(QWidget* widget, const char* className)
}
throw Py::RuntimeError("Failed to wrap widget");
#else
Q_UNUSED(className);
Py::Module sipmod(PyImport_AddModule((char*)"sip"));
Py::Callable func = sipmod.getDict().getItem("wrapinstance");
Py::Tuple arguments(2);
@ -260,6 +261,9 @@ void PythonWrapper::createChildrenNameAttributes(PyObject* root, QObject* object
}
createChildrenNameAttributes(root, child);
}
#else
Q_UNUSED(root);
Q_UNUSED(object);
#endif
}
@ -270,6 +274,9 @@ void PythonWrapper::setParent(PyObject* pyWdg, QObject* parent)
Shiboken::AutoDecRef pyParent(Shiboken::Conversions::pointerToPython((SbkObjectType*)SbkPySide_QtGuiTypes[SBK_QWIDGET_IDX], parent));
Shiboken::Object::setParent(pyParent, pyWdg);
}
#else
Q_UNUSED(pyWdg);
Q_UNUSED(parent);
#endif
}

View File

@ -1071,12 +1071,12 @@ void @self.export.Name@::set@i.Name@(Py::@i.Parameter.Type@ arg)
-
+ if(self.export.CustomAttributes != None):
PyObject *@self.export.Name@::getCustomAttributes(const char* attr) const
PyObject *@self.export.Name@::getCustomAttributes(const char* /*attr*/) const
{
return 0;
}
int @self.export.Name@::setCustomAttributes(const char* attr, PyObject *obj)
int @self.export.Name@::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
{
return 0;
}