Mercurial > hg > forks > UniversalIndentGUI
changeset 785:de02d5ea9770
Avoid some unused parameter and unused variable warnings.
git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@1062 59b1889a-e5ac-428c-b0c7-476e01d41282
author | thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282> |
---|---|
date | Thu, 29 Dec 2011 10:45:49 +0000 |
parents | 139f68bf6695 |
children | 4aa9130f4e9f |
files | src/IndentHandler.cpp src/UiGuiSettings.cpp |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/IndentHandler.cpp Thu Dec 29 10:44:46 2011 +0000 +++ b/src/IndentHandler.cpp Thu Dec 29 10:45:49 2011 +0000 @@ -56,6 +56,10 @@ #include <Windows.h> #endif +// Avoid unused parameter warnings by this template +template<typename T> +inline void UNUSED_PARAMETER_WARNING_AVOID(T){} + //! \defgroup grp_Indenter All concerning handling of the indenter. /*! @@ -1721,6 +1725,7 @@ } void IndentHandler::wheelEvent( QWheelEvent *event ) { + UNUSED_PARAMETER_WARNING_AVOID(event); #ifdef UNIVERSALINDENTGUI_NPP_EXPORTS QWidget::wheelEvent( event ); updateDrawing();
--- a/src/UiGuiSettings.cpp Thu Dec 29 10:44:46 2011 +0000 +++ b/src/UiGuiSettings.cpp Thu Dec 29 10:45:49 2011 +0000 @@ -425,8 +425,8 @@ int indexOfMethod = metaObject->indexOfMethod( qPrintable(normalizedSlotName) ); if ( connectSuccess && indexOfMethod > -1 ) { QMetaMethod mMethod = metaObject->method(indexOfMethod); - QMetaMethod::Access access = mMethod.access(); - QMetaMethod::MethodType methType = mMethod.methodType(); + //QMetaMethod::Access access = mMethod.access(); + //QMetaMethod::MethodType methType = mMethod.methodType(); // Since the method can at maximum be invoked with the setting value as argument, // only methods taking max one argument are allowed. @@ -454,7 +454,7 @@ If only \a obj is given, all to this object registered slot-setting connections are unregistered. */ void UiGuiSettings::unregisterObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) { - const QMetaObject *metaObject = obj->metaObject(); + //const QMetaObject *metaObject = obj->metaObject(); QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) ); QMutableMapIterator<QObject*, QStringList> it(_registeredObjectSlots); while (it.hasNext()) { @@ -523,8 +523,8 @@ int indexOfMethod = metaObject->indexOfMethod( qPrintable(slotName) ); if ( indexOfMethod > -1 ) { QMetaMethod mMethod = metaObject->method(indexOfMethod); - QMetaMethod::Access access = mMethod.access(); - QMetaMethod::MethodType methType = mMethod.methodType(); + //QMetaMethod::Access access = mMethod.access(); + //QMetaMethod::MethodType methType = mMethod.methodType(); bool success = false;