Hi,
I'd like to get this in before 5.9 FF.
The current state is:
- It works for member functions, function pointers and functors
- It soft breaks existing code that were passing null literals.
- The new functions do not accepts any arguments, users have to use lambda
- The new functions do ac
Le 21/01/2017 à 00:20, Thiago Macieira a écrit :
It's a shift of responsibility. If we had the BlockingAutoConnection (or
SynchronousConnection, which is what I wanted to call it during Qt 4.5 when I
first proposed it), the deadlock would be Qt's fault. Since it's you doing
that, the deadlock bec
On sexta-feira, 20 de janeiro de 2017 17:34:50 PST Grégoire Barbier wrote:
> > See the discussion in https://codereview.qt-project.org/83404/ for why
> > this is not a good idea.
> > In summary, BlockingQueuedConnection is dangerous as it can lead to
> > deadlock if the other thread is waiting on y
>
> I respect the fact that you rejected Qt::BlockingAutoConnection in 2014
> because of its potential danger, but I'm not sure that it's better to let
> people use the "QThread::currentThread() == this" pattern without being
> warned rather than implementing Qt::BlockingAutoConnection, with a
Le 20/01/2017 à 11:14, Olivier Goffart a écrit :
On Dienstag, 17. Januar 2017 11:21:56 CET Grégoire Barbier wrote:
Le 16/01/2017 à 10:34, Olivier Goffart a écrit :
> What's the use case for this function? For direct call you better of
> calling the function directly, and the equivalent of Queue
On Dienstag, 17. Januar 2017 11:21:56 CET Grégoire Barbier wrote:
> Le 16/01/2017 à 10:34, Olivier Goffart a écrit :
> > What's the use case for this function? For direct call you better of
> > calling the function directly, and the equivalent of QueuedConnection
> > can be achieved with QTimer::s
On Freitag, 20. Januar 2017 09:59:55 CET Benjamin TERRIER wrote:
> 2017-01-20 3:01 GMT+01:00 Thiago Macieira :
> > we also catch the even more dubious code:
> > char func[] = "deleteLater";
> > QMetaObject::invokeMethod(&obj, func);
I think we should still support that.
> >
> > T
2017-01-20 3:01 GMT+01:00 Thiago Macieira :
> Because it's a template, so the template when Func = char* matches better than
> the overload with const char*. I assume that using nullptr without casting
> also breaks, correct?
Correct.
> From what you explained, this will not affect the case when
On quinta-feira, 19 de janeiro de 2017 16:18:30 PST Grégoire Barbier wrote:
> > The return value is interesting still.
>
> With lambdas the return value itself can be replaced with a captured
> reference, isn't it ?
> Anyway it's still convenient to have it when calling plain old methods
> rather
On quinta-feira, 19 de janeiro de 2017 12:24:34 PST Benjamin TERRIER wrote:
> template
> static typename
> QtPrivate::QEnableIf::IsPointerToMemberFun
> ction && QtPrivate::FunctionPointer::ArgumentCount == -1
> && !std::is_same::value, bool>::Type
> invokeMethod(QObject *object, Func function)
Le 17/01/2017 à 18:11, Thiago Macieira a écrit :
Em terça-feira, 17 de janeiro de 2017, às 11:21:56 PST, Grégoire Barbier
escreveu:
And maybe lambdas too, if there was a way to choose the thread/eventloop
in which we want the lambda to be executed (but christmas was a few
weeks ago, I should not
Hi,
I've got an issue.
Adding
template
static typename
QtPrivate::QEnableIf::IsPointerToMemberFunction
&& QtPrivate::FunctionPointer::ArgumentCount == -1
&& !std::is_same::value, bool>::Type
invokeMethod(QObject *object, Func function)
to QMetaObject breaks existing code and the auto tes
Em terça-feira, 17 de janeiro de 2017, às 11:21:56 PST, Grégoire Barbier
escreveu:
> And maybe lambdas too, if there was a way to choose the thread/eventloop
> in which we want the lambda to be executed (but christmas was a few
> weeks ago, I should not dream ;-)).
If we do this, it should be pos
Grégoire Barbier:
> Kind of Qt::DirectOrBlockingQueuedConnection.
Blocking_DirectOrQueued_Connection, surely.
Eddy.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
Le 16/01/2017 à 10:34, Olivier Goffart a écrit :
What's the use case for this function? For direct call you better of calling
the function directly, and the equivalent of QueuedConnection can be achieved
with QTimer::singleShot.
Hi.
AFAIK there is no other way to call a method across threads
On segunda-feira, 16 de janeiro de 2017 19:23:07 PST Benjamin TERRIER wrote:
> The QTimer solution could work, but you cannot add parameters without using
> std::bind.
Use a lambda.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
__
2017-01-16 10:34 GMT+01:00 Olivier Goffart :
> On Samstag, 14. Januar 2017 17:28:01 CET Benjamin TERRIER wrote:
> > Hi everyone,
> >
> > I'm trying to contribute by making QMetaObject::invokeMethod() take
> function
> > pointers instead of function names.
> >
> > I've come up with something that w
On Montag, 16. Januar 2017 12:57:01 CET Konstantin Tokarev wrote:
> 16.01.2017, 12:34, "Olivier Goffart" :
> > On Samstag, 14. Januar 2017 17:28:01 CET Benjamin TERRIER wrote:
> >> Hi everyone,
> >>
> >> I'm trying to contribute by making QMetaObject::invokeMethod() take
> >> function pointers i
16.01.2017, 12:34, "Olivier Goffart" :
> On Samstag, 14. Januar 2017 17:28:01 CET Benjamin TERRIER wrote:
>> Hi everyone,
>>
>> I'm trying to contribute by making QMetaObject::invokeMethod() take function
>> pointers instead of function names.
>>
>> I've come up with something that works by l
On Samstag, 14. Januar 2017 17:28:01 CET Benjamin TERRIER wrote:
> Hi everyone,
>
> I'm trying to contribute by making QMetaObject::invokeMethod() take function
> pointers instead of function names.
>
> I've come up with something that works by looking at the code of
> QMetaObject::invokeMethod,
14.01.2017, 20:42, "Thiago Macieira" :
> On sábado, 14 de janeiro de 2017 17:28:01 PST Benjamin TERRIER wrote:
>> I've uploaded my change as a draft on gerrit:
>> https://codereview.qt-project.org/#/c/182339/
>
> No one can see it while it's a draft. You have to publish the change.
Correction:
2017-01-14 18:42 GMT+01:00 Thiago Macieira :
>
> No one can see it while it's a draft. You have to publish the change.
>
>
Ok, it's done.
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
On sábado, 14 de janeiro de 2017 17:28:01 PST Benjamin TERRIER wrote:
> I've uploaded my change as a draft on gerrit:
> https://codereview.qt-project.org/#/c/182339/
No one can see it while it's a draft. You have to publish the change.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Softwa
Hi everyone,
I'm trying to contribute by making QMetaObject::invokeMethod() take function
pointers instead of function names.
I've come up with something that works by looking at the code of
QMetaObject::invokeMethod, QObject::connect and QMetaObject::activate.
However it does not check for para
24 matches
Mail list logo