Re: [Interest] Warning about QHash keys().toVector()

2021-06-13 Thread André Pönitz
On Sun, Jun 13, 2021 at 06:20:31PM +0200, Kevin André wrote: > Hi, > > I have the following piece of code: > > QVector CompatibilityInterfaceImpl::getActionIds() const > { > return _actions.keys().toVector(); // _actions is a QHash > } > > In Qt Creator this generates the

Re: [Interest] QNetwork classes for submitting google forms

2021-06-13 Thread Max Paperno
On 6/13/2021 1:08 PM, Thiago Macieira wrote: That was a toy example application. Most applications will post in event to something happening, so the event loop has already started. But we weren't discussing "most applications." The OP asked how to handle a network request and presented an

Re: [Interest] Warning about QHash keys().toVector()

2021-06-13 Thread Konstantin Shegunov
On Sun, Jun 13, 2021 at 7:22 PM Kevin André wrote: > How can I avoid the warning in this case? > return QVector<..>(_actions.keyBegin(), _actions.keyEnd()); Should work, I believe. ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Warning about QHash keys().toVector()

2021-06-13 Thread Thiago Macieira
On Sunday, 13 June 2021 09:20:31 PDT Kevin André wrote: > I have the following piece of code: > > QVector CompatibilityInterfaceImpl::getActionIds() const > { > return _actions.keys().toVector(); // _actions is a QHash > } > > In Qt Creator this generates the following

Re: [Interest] QNetwork classes for submitting google forms

2021-06-13 Thread Thiago Macieira
On Sunday, 13 June 2021 08:23:30 PDT Max Paperno wrote: > > Please do as I said: insert a return and let the event loop handle calling > > your slots. > > Did you even look at the (bad) code in question? There was no event loop > and nothing to return from except main(). That was a toy example

[Interest] Warning about QHash keys().toVector()

2021-06-13 Thread Kevin André
Hi, I have the following piece of code: QVector CompatibilityInterfaceImpl::getActionIds() const { return _actions.keys().toVector(); // _actions is a QHash } In Qt Creator this generates the following warning: allocating an unneeded temporary container

Re: [Interest] More on table problem

2021-06-13 Thread Volker Hilsheimer
> >>> On Fri, Jun 11, 2021 at 10:05 AM Volker Hilsheimer >>> wrote: >>> > On 11 Jun 2021, at 13:52, Turtle Creek Software >>> > wrote: >>> > >>> > Here's more info on the weird QTableWidget problem we're seeing. >>> > >>> > One of our data entry fields uses combination of widgets: a

Re: [Interest] QNetwork classes for submitting google forms

2021-06-13 Thread Max Paperno
On 6/13/2021 11:02 AM, Thiago Macieira wrote: On Friday, 11 June 2021 21:05:08 PDT Max Paperno wrote: Insert a "return" here and let your slot be called when the time is right. Right, too much Python lately... "should" have been `processEvents()` which is when I realized there were no events

Re: [Interest] QNetwork classes for submitting google forms

2021-06-13 Thread Thiago Macieira
On Friday, 11 June 2021 21:05:08 PDT Max Paperno wrote: > > Insert a "return" here and let your slot be called when the time is right. > > Right, too much Python lately... "should" have been `processEvents()` > which is when I realized there were no events to process w/out a Qt loop > in the