summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2010-12-20 14:18:51 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2010-12-20 14:18:51 +0200
commit2e2df49912d53c781f8808e8478800596896ff37 (patch)
treec80d8a6e966f0bad9b4330b77c497edeb5ea92fd
parentb4a3b75915e8b2e4214c14b512a4cd7060c0dd00 (diff)
Minor syntactical fixes.
-rw-r--r--src/QGlib/connectimpl.h17
-rw-r--r--src/QGlib/emitimpl.h2
2 files changed, 10 insertions, 9 deletions
diff --git a/src/QGlib/connectimpl.h b/src/QGlib/connectimpl.h
index ebc7960..fac248f 100644
--- a/src/QGlib/connectimpl.h
+++ b/src/QGlib/connectimpl.h
@@ -71,7 +71,7 @@ protected:
ClosurePtr createCppClosure(ClosureDataBase *data); //implemented in signal.cpp
-template <typename Signature, typename Function>
+template <typename Function, typename Signature>
struct CppClosure {};
//END ******** Closure internals ********
@@ -185,7 +185,7 @@ inline void unpackAndInvoke(F && function, Value & result,
//BEGIN ******** CppClosure ********
template <typename F, typename R, typename... Args>
-struct CppClosure<R (Args...), F>
+struct CppClosure<F, R (Args...)>
{
class ClosureData : public ClosureDataBase
{
@@ -226,7 +226,7 @@ SignalHandler Signal::connect(void *instance, const char *detailedSignal,
typedef QGlib::Private::MemberFunction<T, R, Args...> F;
F && f = QGlib::Private::mem_fn(slot, receiver);
- ClosurePtr && closure = QGlib::Private::CppClosure<R (Args...), F>::create(f, flags & PassSender);
+ ClosurePtr && closure = QGlib::Private::CppClosure<F, R (Args...)>::create(f, flags & PassSender);
return connect(instance, detailedSignal, closure, flags);
}
@@ -325,9 +325,9 @@ struct QGLIB_SIGNAL_IMPL_CPPCLOSUREN
}
};
-//partial specialization of struct CppClosure to support the CppClosure<R (Args...), F> syntax
+//partial specialization of struct CppClosure to support the CppClosure<F, R (Args...)> syntax
template <typename F, typename R QGLIB_SIGNAL_IMPL_TRAILING_TEMPLATE_PARAMS>
-struct CppClosure<R (QGLIB_SIGNAL_IMPL_TEMPLATE_ARGS), F>
+struct CppClosure<F, R (QGLIB_SIGNAL_IMPL_TEMPLATE_ARGS)>
: public QGLIB_SIGNAL_IMPL_CPPCLOSUREN< F, R QGLIB_SIGNAL_IMPL_TRAILING_TEMPLATE_ARGS >
{
};
@@ -355,9 +355,10 @@ SignalHandler Signal::connect(void *instance, const char *detailedSignal,
= boost::bind(slot, receiver QGLIB_SIGNAL_IMPL_BIND_ARGS);
ClosurePtr closure = QGlib::Private::CppClosure<
- R (QGLIB_SIGNAL_IMPL_TEMPLATE_ARGS),
- boost::function<R (QGLIB_SIGNAL_IMPL_TEMPLATE_ARGS)>
- >::create(f, flags & PassSender);
+ boost::function<R (QGLIB_SIGNAL_IMPL_TEMPLATE_ARGS)>,
+ R (QGLIB_SIGNAL_IMPL_TEMPLATE_ARGS)
+ >::create(f, flags & PassSender);
+
return connect(instance, detailedSignal, closure, flags);
}
diff --git a/src/QGlib/emitimpl.h b/src/QGlib/emitimpl.h
index 6c5c088..97340c3 100644
--- a/src/QGlib/emitimpl.h
+++ b/src/QGlib/emitimpl.h
@@ -52,7 +52,7 @@ inline QList<Value> packArguments()
template <typename Arg1, typename... Args>
QList<Value> packArguments(const Arg1 & a1, const Args & ... args)
{
- QList<Value> result = packArguments(args...);
+ QList<Value> && result = packArguments(args...);
Value v;
v.init<Arg1>();
ValueImpl<Arg1>::set(v, a1);