Skip to content

Commit

Permalink
fix -Wunused-parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Sep 23, 2016
1 parent d1b3cbe commit c48a9bf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Gui/Application.cpp
Expand Up @@ -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
}
Expand Down
6 changes: 6 additions & 0 deletions src/Gui/Splashscreen.cpp
Expand Up @@ -102,18 +102,24 @@ class SplashObserver : public Base::ConsoleObserver
{
#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)
Expand Down
7 changes: 7 additions & 0 deletions src/Gui/WidgetFactory.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -260,6 +261,9 @@ void PythonWrapper::createChildrenNameAttributes(PyObject* root, QObject* object
}
createChildrenNameAttributes(root, child);
}
#else
Q_UNUSED(root);
Q_UNUSED(object);
#endif
}

Expand All @@ -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
}

Expand Down
4 changes: 2 additions & 2 deletions src/Tools/generateTemplates/templateClassPyExport.py
Expand Up @@ -1071,12 +1071,12 @@ class @self.export.Namespace@Export @self.export.Name@ : public @self.export.Fat
-
+ 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;
}
Expand Down

0 comments on commit c48a9bf

Please sign in to comment.