Re: [Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread BOUCARD Olivier
Yes this is pretty frustrating. 

Le Vendredi 18 mars 2016 11h07, Shantanu Tushar  a 
écrit :
 

 

On Fri, Mar 18, 2016 at 2:30 PM, BOUCARD Olivier  
wrote:

I did not knew it was existing.Thanks, I'll try this. 

Le Vendredi 18 mars 2016 10h54, Samuel Gaist  a 
écrit :
 

 On 18 mars 2016, at 08:57, BOUCARD Olivier  wrote:

> Hi,
> 
> Is it possible to manually select a mirror and to force the Maintenance Tool 
> to use it?
> Because I'm in Cyprus which for dumb reason is considered in Asia??? So I'm 
> connected to some mirror in China from where I get 5Kbps download speed.


Guess what, even people from India get that mirror and still get 5Kbps speed. I 
introduce people to Qt and have no answer when they ask "So this has been the 
case for all these years and no one cares to fix it?".
 

> Please also fix this issue, Linux distros are able to select a proper mirror 
> so you can do it too.
> I want to update to Qt 5.6 and latest QtCreator and I cannot because of this.
> 
> Thank you
> 
> PS: BTW I have the same issue on the qt.io website when I download but at 
> least here I have the possibility to manually select another mirror.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

You can use the QtSdkRepoChooser for the maintenance tool:

https://github.com/JKSH/QtSdkRepoChooser

Samuel



Tip: Every time there is a new Qt release, you need to generate the repo files 
again using QtSdkRepoChooser or you won't see the update
 




   
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest





-- 
Shantanu Tushar    (UTC +0530)
shantanu.io

  ___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?

2016-03-19 Thread Thiago Macieira
On quinta-feira, 17 de março de 2016 22:13:52 PDT René J. V. Bertin wrote:
> René J. V. Bertin wrote:
> 
> Actually, this turns out to be more about Freetype. I'm surprised to see
> that qcoretextfontdatabase.mm now does have support for Freetype. What I
> don't get is why the corresponding -I option isn't passed when compiling
> that file. I'm seeing it elsewhere so the information is obtained
> correctly.

See https://codereview.qt-project.org/124643.

That's supposed to fix the issue, but reviewers found problems with it. I don't 
know enough about OS X so the change was left in limbo.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Curtis Mitch


> -Original Message-
> From: Interest [mailto:interest-bounces+mitch.curtis=theqtcompany.com@qt-
> project.org] On Behalf Of Giuseppe D'Angelo
> Sent: Wednesday, 16 March 2016 3:51 PM
> To: interest@qt-project.org
> Subject: Re: [Interest] Are slots even needed these days?
> 
> Il 16/03/2016 15:24, Nikos Chantziaras ha scritto:
> > I can connect to Foo::bar either way. If I don't intend to ever use
> > the old-style connect syntax, is there a reason to have "public slots:"
> anymore?
> 
> It's still needed if you want to expose those methods to QML / scripting,
> use QMetaObject::invokeMethod, and possibly some other cases.

Perhaps threading, where queued connections are necessary?

> Cheers,
> --
> Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - The
> Qt Experts

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread André Pönitz
On Thu, Mar 17, 2016 at 08:23:48AM +0300, Constantin Makshin wrote:
> Another thing I personally don't like in the new connection syntax is
> that it forces signals to be public, making it possible to do all type
> of wonders by faking/simulating events on behalf of other objects.
> 
> For example:
> QLineEdit* edit = new QLineEdit("foo");
> // ...
> edit->textChanged("bar");

You can trigger that emission in Qt 4, too, e.g. using
QMetaObject::invokeMethod(edit, "textChanged", ...)

Andre'

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Till Oliver Knoll


> Am 16.03.2016 um 23:41 schrieb Bob Hood :
> 
>> On 3/16/2016 3:37 PM, André Pönitz wrote:
>>> On Wed, Mar 16, 2016 at 02:31:33PM +, Gian Maxera wrote:
 I can connect to Foo::bar either way. If I don't intend to ever use
 the old-style connect syntax, is there a reason to have "public
 slots:" anymore?
>>> One reason that for me it’s fundamental: Readability of your code !!!
>> It doesn't make the code more readable then a comment
>> 
>>// This is a slot !!!
>>void foo();
> 
> I would argument that it does when you have legions of people out there 
> already conditioned to this:
> 
>...
>public slots:
>void  bar();
>void  foo();
>   

This.

:)

Cheers,
  Oliver___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D : Invalid mvp matrix with orthographic camera

2016-03-19 Thread Xavier Bigand
Hi,

I have some issue when setting my camera in orthographic mode.

I saw with nsight that the mvp uniform that is passed to the vertex shader
have all values set to nan, it is the same for the eye uniform of the
fragment shader.

I am setting the orthographic projection like this :
lens()->setOrthographicProjection(-10.0f, 10.0f , -7.0f, 7.0f , 0.004f,
200.0f);

And set the transform with following code :
setPosition(QVector3D(0.0f, 100.0f, 0.0f));
setViewCenter(QVector3D(0.0f, 99.0f, 0.0f));


May I missed something or it is a bug?


PS: I am using Qt 5.6

-- 
Xavier
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Bob Hood

On 3/16/2016 3:37 PM, André Pönitz wrote:

On Wed, Mar 16, 2016 at 02:31:33PM +, Gian Maxera wrote:

I can connect to Foo::bar either way. If I don't intend to ever use
the old-style connect syntax, is there a reason to have "public
slots:" anymore?

One reason that for me it’s fundamental: Readability of your code !!!

It doesn't make the code more readable then a comment

// This is a slot !!!
void foo();


I would argument that it /does/when you have legions of people out there 
already conditioned to this:


   ...
   public slots:
   void  bar();
   void  foo();
   ...

instead of:

   ...
   // This is a slot!!!
   void foo();
   ...
   // Oh, hey, this is a slot too!!!
   void bar();
   ...

As a Qt developer, I find the former more elegant and self-documenting.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] bug with # in URL when using setUrl?

2016-03-19 Thread Thiago Macieira
On quinta-feira, 17 de março de 2016 14:28:34 PDT Larry Martell wrote:
> > If they are Macs, yes. You can also solve the problem by installing a
> > recent version of OpenSSL.
> 
> Rebuilt Qt with -securetransport and it did not fix the problem. 

Please check that QSslSocket::supportsSsl() returns true.

> In
> any case, that is not a good solution for us, as that option is not
> available on Windows. 

Indeed, this is only for OS X and other Apple OSes. For Windows, you need to 
ship OpenSSL alongside your binaries, in your installer. Any export control 
compliance issues arising from that are your responsibility too.

> We are building an app that will be sold and
> distributed as a dmg or setup.exe file. We cannot count on the users
> having any given packages, so what I have done is downloaded the
> static assets to our server and changed the html to load them to the
> client from our servers instead of from the internet.

That is usually good practice. Depending on someone else's server, which may 
go down or disappear without notice, is not good for business. A step further 
would be to keep files locally, so the functionality works even if no Internet 
access is possible or if it's misconfigured (for example, proxy).

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread André Pönitz
On Wed, Mar 16, 2016 at 02:31:33PM +, Gian Maxera wrote:
> > I can connect to Foo::bar either way. If I don't intend to ever use
> > the old-style connect syntax, is there a reason to have "public
> > slots:" anymore?
> 
> One reason that for me it’s fundamental: Readability of your code !!!

It doesn't make the code more readable then a comment

   // This is a slot !!!
   void foo();

and since it's not verifiable by the compiler it has
the same effect.

Andre'
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D : Crash after loading few mesh

2016-03-19 Thread Xavier Bigand
I tried to use a QPhongMaterial to test without using textures and I have
the same issue.

I think that I have to launch a memory debugguer because the output is
weird :

t

erminate called after throwing an instance of

'

std::bad_alloc'

what():

std::bad_alloc

Invalid parameter passed to C runtime function.

Invalid parameter passed to C runtime function.

terminate called recursively

Invalid parameter passed to C runtime function.

Invalid parameter passed to C runtime function.

terminate called recursively

Invalid parameter passed to C runtime function.

Invalid parameter passed to C runtime function.

QWaitCondition: Destroyed while threads are still waiting

QWaitCondition: Destroyed while threads are still waiting

QWaitCondition: Destroyed while threads are still waiting

QWaitCondition: Destroyed while threads are still waiting

QWaitCondition: Destroyed while threads are still waiting

QWaitCondition: Destroyed while threads are still waiting

QWaitCondition: Destroyed while threads are still waiting

QWaitCondition: Destroyed while threads are still waiting

2016-03-18 21:47 GMT+01:00 Xavier Bigand :

> Hi,
>
> I have successfully integrated a Qt3D view in our project. I can load few
> of our models with Qt3D but at a certain moment it make the application
> crash.
>
> When I use Nsight to try to understand the issue, my PC completely freeze
> and I need reboot, so I suspect a wrong OpenGL command from Qt3D that make
> the driver bug.
> I saw that Qt3D let all textures bind, I was around to 32 when the crash
> came.
>
> Is there a way to activate logs of Qt3D?
>
> For the moment I instantiate one QDiffuseMapMaterial per mesh with one
> texture (some can be shared).
>
>
> PS : I have a Nvidia 670 GTX with drivers version 364.51
>
> --
> Xavier
>
>


-- 
Xavier
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt 5.6.0 problems

2016-03-19 Thread Tony Rietwyk
Hi Everybody, 

Using qt-enterprise-windows-x86-msvc2013-5.6.0.exe package coming from
5.5.1: 

1) The qmake rule:

win32 {
# These aren't available in some Windows versions so delay loading
them until we can check they are available
LIBS += /DELAYLOAD:mfplat.dll
LIBS += /DELAYLOAD:mfreadwrite.dll
}

in the resulting VS 2013 project now gets a linker error  "cannot open input
file '\DELAYLOAD:mfplat.dll'"  so it seems qmake is replacing the slash with
backslash.  Is there a way that I can prevent that happening? 


2) A new header file gives warnings in VS 2013 for EACH file that is
compiled: 

1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(100): warning C4242:
'argument' : conversion from 'uint' to 'quint8', possible loss of data
(..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(121): warning C4242:
'return' : conversion from 'uint' to 'quint8', possible loss of data
(..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(122): warning C4242:
'return' : conversion from 'uint' to 'quint8', possible loss of data
(..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(123): warning C4242:
'return' : conversion from 'uint' to 'quint8', possible loss of data
(..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(124): warning C4242:
'return' : conversion from 'uint' to 'quint8', possible loss of data
(..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(137): warning C4242:
'initializing' : conversion from 'uint' to 'const quint16', possible loss of
data (..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(138): warning C4242:
'initializing' : conversion from 'uint' to 'const quint16', possible loss of
data (..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(139): warning C4242:
'initializing' : conversion from 'uint' to 'const quint16', possible loss of
data (..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(140): warning C4242:
'argument' : conversion from 'const quint32' to 'quint16', possible loss of
data (..\..\src\application\i18n_system.cpp)
1>C:\qt\Qt5.6.0\5.6\msvc2013\include\QtGui/qrgba64.h(177): warning C4242:
'argument' : conversion from 'const quint32' to 'quint16', possible loss of
data (..\..\src\application\i18n_system.cpp)

This makes finding compilation errors painful.  Would modifying the header
to add some static_casts cause problems in our binaries not matching the
pre-built DLLs?  

3) Some of the Qt sources do not match when debugging and stepping into
those routines.  Should I raise a bug for these?  Is this possibly due to
inconsistent line endings?  Are they cleaned for each target as part of the
package build process?  

Regards, 

Tony


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] load average building QtWebEngine

2016-03-19 Thread Allan Sandfeld Jensen
On Saturday 19 March 2016, René J.V. Bertin wrote:
> Hi,
> 
> This seems a bit silly to ask, but I'm seeing extremely high load averages:
> 60.74 53.07 41.45 building QtWebEngine (about 8100 files in). That's on a
> 2 core, 2 thread i7, with the build started with make -j4 . I'm indeed
> seeing more than 4 concurrent clang processes and nothing else that takes
> anywhere near the CPU load to drive me up to insane values like >40 over
> the last couple of minutes.
> 
> It looks like there's only a single ninja process being spawned from one of
> the Makefiles, so it's not like there are 4 of those that each decide to
> build using 4 or 5 parallel processes.
> 
> Curious. And probably not speeding up the build ...
> 
It only launches one ninja process, and ninja guesses the number threads 
itself by using cpuinfo (unless you control it with NINJAFLAGS), but that 
can't get load to 60. I would guess the load is not from CPU, but maybe memory 
load, if you start swapping other processes could end up waiting on swapped 
out memory, which could theoretically get the load to 60.

Regards
`Allan
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread Rutledge Shawn
Please write a bug about this if you haven’t yet.

On 18 Mar 2016, at 10:36, BOUCARD Olivier 
> wrote:

Yes this is pretty frustrating.


Le Vendredi 18 mars 2016 11h07, Shantanu Tushar 
> a écrit :




On Fri, Mar 18, 2016 at 2:30 PM, BOUCARD Olivier 
> wrote:
I did not knew it was existing.
Thanks, I'll try this.


Le Vendredi 18 mars 2016 10h54, Samuel Gaist 
> a écrit :


On 18 mars 2016, at 08:57, BOUCARD Olivier 
> wrote:

> Hi,
>
> Is it possible to manually select a mirror and to force the Maintenance Tool 
> to use it?
> Because I'm in Cyprus which for dumb reason is considered in Asia??? So I'm 
> connected to some mirror in China from where I get 5Kbps download speed.

Guess what, even people from India get that mirror and still get 5Kbps speed. I 
introduce people to Qt and have no answer when they ask "So this has been the 
case for all these years and no one cares to fix it?".

> Please also fix this issue, Linux distros are able to select a proper mirror 
> so you can do it too.
> I want to update to Qt 5.6 and latest QtCreator and I cannot because of this.
>
> Thank you
>
> PS: BTW I have the same issue on the qt.io website when I 
> download but at least here I have the possibility to manually select another 
> mirror.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


Hi,


You can use the QtSdkRepoChooser for the maintenance tool:

https://github.com/JKSH/QtSdkRepoChooser

Samuel


Tip: Every time there is a new Qt release, you need to generate the repo files 
again using QtSdkRepoChooser or you won't see the update






___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest





--
Shantanu Tushar(UTC +0530)
shantanu.io


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread René J . V . Bertin
Thiago Macieira wrote:


> Ok, I'll send the change to remove it. People will not be happy.

No, indeed, even I won't be now that I found a workaround that's easier than 
editing qmake.conf .


> That is an answer by itself. The fact that only the src/tools Makefiles are
> affected is a red herring: you only have those Makefiles to look into.

No, that's not true. AFAICR there were plenty of other Makefiles that did have 
the option.

R.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread André Pönitz
On Wed, Mar 16, 2016 at 11:02:17PM +, Scott Aron Bloom wrote:
> I prefer “slotFoo” and “slotBar” as well as “sigFoo” and “sigBar”
> 
> It really lets the methods stand out as slots and signals.. It also means, 
> don’t
> think “sender()” can ever valid if you are not in a “slotXYZ” function.

sender() is pretty much never needed needed with lambda connects, as the sender
can be passed explicitly in the connect() call. This also removes the typical 
need
to qobject_cast<> the sender, as the correct type is available directly.

Andre'
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread BOUCARD Olivier
I did not knew it was existing.Thanks, I'll try this. 

Le Vendredi 18 mars 2016 10h54, Samuel Gaist  a 
écrit :
 

 On 18 mars 2016, at 08:57, BOUCARD Olivier  wrote:

> Hi,
> 
> Is it possible to manually select a mirror and to force the Maintenance Tool 
> to use it?
> Because I'm in Cyprus which for dumb reason is considered in Asia??? So I'm 
> connected to some mirror in China from where I get 5Kbps download speed.
> Please also fix this issue, Linux distros are able to select a proper mirror 
> so you can do it too.
> I want to update to Qt 5.6 and latest QtCreator and I cannot because of this.
> 
> Thank you
> 
> PS: BTW I have the same issue on the qt.io website when I download but at 
> least here I have the possibility to manually select another mirror.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

You can use the QtSdkRepoChooser for the maintenance tool:

https://github.com/JKSH/QtSdkRepoChooser

Samuel


  ___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Thiago Macieira
On quinta-feira, 17 de março de 2016 08:23:48 PDT Constantin Makshin wrote:
> Another thing I personally don't like in the new connection syntax is
> that it forces signals to be public, making it possible to do all type
> of wonders by faking/simulating events on behalf of other objects.
> 
> For example:
> QLineEdit* edit = new QLineEdit("foo");
> // ...
> edit->textChanged("bar");

You could do it in a round-about way in Qt 4 by using 
QMetaObject::invokeMethod.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [OS X] next Qt 5.6.0 question : building with -fontconfig?

2016-03-19 Thread René J . V . Bertin
Hi,

I'm hitting the next hurdle, potentially another untested thing:

I've always configured with -fontconfig. I'm not convinced that option ever had 
an effect building for Cocoa, but it didn't cause issues either.

Now, I'm getting an include failure on ft2build.h compiling 
qcoretextfontdatabase.mm , most likely because the appropriate -I option is 
missing from the compile command.

Is there *any* point in activating -fontconfig on OS X when not building the 
xcb 
QPA? I'd love for there to be, but that's probably wishful thinking?

R.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Sze Howe Koh
On 17 March 2016 at 01:03, charleyb123 .  wrote:
> On Wed, Mar 16, 2016 at 10:57 AM, Giuseppe D'Angelo
>  wrote:
>>
>> Il 16/03/2016 17:24, charleyb123 . ha scritto:
>>>
>>> Current slot implementation bridges runtime-reflection capabilities
>>> (provided by QMetaObject), and provides the thread-safe event queue that
>>> bridges "slot-execution" to occur on the "target-thread" for which the
>>> "target-QObject" has "affinity".  Lambdas alone cannot do this -- some
>>> kid of "event-queue" would be required that is "thread-aware" (yes,
>>> could be provided through a library of some kind, that happens to be
>>> what Qt is doing).
>>
>>
>> This thread wasn't talking about lambdas, rather about the "old" connect
>> syntax (SIGNAL/SLOT based) vs the "new" one (PMF based).
>>
>> Anyhow, since you brought lambdas into discussion, you can pass an
>> affinity object for them as well:
>>
>>> https://doc.qt.io/qt-5/qobject.html#connect-5
>>
>>
>
> Ah, thanks:  I misunderstood the thread topic (sorry).  ;-)
>
> Agree that I don't have a use case for the "old" connect syntax anymore
> (fine with me to deprecate it).  I prefer catching errors at compile-time
> with the new syntax.
>
> I've "overheard" some discussions in other circles about ditching all of
> signal/slot in favor of lambdas, and apologies for dragging that into the
> discussion.  It's something I've been thinking about a lot ...   ;-)

There are two things that the new syntax doesn't support: (i) QML
connections, and (ii) default parameters. I haven't used (ii) myself,
but I definitely use (i).

See http://doc.qt.io/qt-5/signalsandslots-syntaxes.html for details.


Regards,
Sze-Howe
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread Thiago Macieira
On quinta-feira, 17 de março de 2016 11:38:58 PDT Thiago Macieira wrote:
> > - -stdlib=libc++ appear to be missing only from CXXFLAGS in the Makefiles
> > under qtbase/src/tools
> 
> Hmm... those are "bootstrapped" tools. But I can't find anything that
> overrides  QMAKE_CXXFLAGS.

Can you confirm that it *is* present in src/corelib/Makefile?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Bob Hood

On 3/16/2016 5:02 PM, Scott Aron Bloom wrote:
I find them both pretty bad L…  I have spent too much time, looking at other 
people’s code trying to figure out “why” it wont connect, only to realize 
someone had snuck in a “private:” second so moc didn’t generate the slot 
information.


I prefer “slotFoo” and “slotBar” as well as “sigFoo” and “sigBar”


It really lets the methods stand out as slots and signals.. It also means, 
don’t think “sender()” can ever valid if you are not in a “slotXYZ” function.





I actually prefix my slot method names with "slot_" and signals with "signal_" 
so they are also easily identifiable in the C++ module as I'm looking through 
the code.  More self-documentation.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread René J . V . Bertin
Hi,

I'm running into an issue building Qt 5.6.0 on OS X 10.9.5 :

gmake[3]: Entering directory 
'/.../qt5-kde-devel/work/build/qtbase/src/tools/bootstrap'
/usr/bin/clang++ -c -O3 -march=native -g -ffunction-sections -O2 -g -fPIC 
-std=c++11 -isysroot 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
 -mmacosx-version-min=10.7 -fno-exceptions -Wall -W -DQT_NO_MTDEV 
-DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_BOOTSTRAPPED 
-DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS -DQT_NO_DATASTREAM 
-DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -DQT_NO_THREAD 
-DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED 
-DQT_NO_TRANSLATION -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 -DQT_NO_CAST_FROM_ASCII 
-DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST_WARNINGS 
-DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS 
-DQT_DISABLE_DEPRECATED_BEFORE=0x05 -DQT_NO_EXCEPTIONS 
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/tools/bootstrap
 -I. -I/Users/bertin/work/s
 rc/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore
 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0
 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0/QtCore
 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml
 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml/5.6.0
 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml/5.6.0/QtXml
 -I../../../include -I../../../include/QtCore 
-I/.../qt5-kde-devel/work/build/qtbase/include/QtXml 
-I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/macx-clang
 -o .obj/qlatincodec.o 
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec.cpp
In file included from 
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec.cpp:34:
In file included from 
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec_p.h:48:
In file included from 
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qtextcodec.h:1:
In file included from 
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/codecs/qtextcodec.h:37:
In file included from 
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qstring.h:1:
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:756:55:
 error: no type named 'u16string' in namespace 'std'
static inline QString fromStdU16String(const std::u16string );
 ~^
/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:757:17:
 error: no type named 'u16string' in namespace 'std'
inline std::u16string toStdU16String() const;
   ~^

In file included from 
/Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qhashfunctions.h:39:
In file included from 
/Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qpair.h:1:
/Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qpair.h:62:44:
 error: no member named 'declval' in namespace 'std'
Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval() = p.first) && 
noexcept(std::declval() = p.second))
  ~^
/Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/global/qcompilerdetection.h:1036:43:
 note: expanded from macro 'Q_DECL_NOEXCEPT_EXPR'
# define Q_DECL_NOEXCEPT_EXPR(x) noexcept(x)
  ^



This does not appear to be a limitation in the Xcode compiler (Xcode 6.2, Apple 
Clang 600) because when I use clang 3.8 I get the exact same errors.

Configure command and summary are below (note the request for the 10.9 SDK 
which is ignored in the above compile command!).

Any ideas? The same code in qstring.h doesn't cause issues in Qt 5.5.1 .

%> configure -top-level -platform macx-clang -sdk macosx10.9 -prefix /opt/local 
-archdatadir /opt/local/libexec/qt5 -docdir /opt/local/share/doc/qt5 -headerdir 
/opt/local/include/qt5 -plugindir /opt/local/share/qt5/plugins -importdir 
/opt/local/share/qt5/imports -qmldir /opt/local/share/qt5/qml -datadir 
/opt/local/share/qt5 -libdir 

Re: [Interest] mediaplayer or soundeffect

2016-03-19 Thread Sina Dogru
What about to using loops

property?

2016-03-19 20:57 GMT+02:00 Kevin Mcintyre :

> added the following conditional MediaPlayer
> if ( mediaPlayer.availability == 0 && mediaPlayer.playbackState  == 0) {
> //only play here/
> }
>
> On Fri, Mar 18, 2016 at 4:54 PM, Kevin Mcintyre  wrote:
>
>> Hello - First time posting to QT mailing list so forgive me if this is
>> the wrong channel.
>>
>> I have a simple QML application listening on a websocket, and want to
>> play a chime on message.
>>
>> Initially I tried SoundEffect but my wav file didn't play correctly, so I
>> opted for MediaPlayer which works, but I'm looking for how to replay the
>> same source more than once.
>>
>> Been messing with MediaPlayer.availability and onPlaybackStateChanged
>> and seek but can't seem to get consistent behavior.
>>
>> Any pointers on mediaplayer replay would be very much appreciated.
>>
>> Qt Creator 5.5.
>>
>>
>>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Scott Aron Bloom


-Original Message-
From: André Pönitz [mailto:apoen...@t-online.de] 
Sent: Wednesday, March 16, 2016 4:22 PM
To: Scott Aron Bloom
Cc: Bob Hood; interest@qt-project.org
Subject: Re: [Interest] Are slots even needed these days?

On Wed, Mar 16, 2016 at 11:02:17PM +, Scott Aron Bloom wrote:
> I prefer “slotFoo” and “slotBar” as well as “sigFoo” and “sigBar”
> 
> It really lets the methods stand out as slots and signals.. It also 
> means, don’t think “sender()” can ever valid if you are not in a “slotXYZ” 
> function.

sender() is pretty much never needed needed with lambda connects, as the sender 
can be passed explicitly in the connect() call. This also removes the typical 
need to qobject_cast<> the sender, as the correct type is available directly.

Andre'
=
Ahh.. good point.. Truth is, I have too many side projects stuck using the old 
method.

However, I would still prefer the "slot" and "sig" prefix for clarity...
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QCharts feedback/issues

2016-03-19 Thread Scott Aron Bloom
Where is the best place to give QCharts feedback, or to discuss issues?


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] mediaplayer or soundeffect

2016-03-19 Thread Kevin Mcintyre
added the following conditional MediaPlayer
if ( mediaPlayer.availability == 0 && mediaPlayer.playbackState  == 0) {
//only play here/
}

On Fri, Mar 18, 2016 at 4:54 PM, Kevin Mcintyre  wrote:

> Hello - First time posting to QT mailing list so forgive me if this is the
> wrong channel.
>
> I have a simple QML application listening on a websocket, and want to play
> a chime on message.
>
> Initially I tried SoundEffect but my wav file didn't play correctly, so I
> opted for MediaPlayer which works, but I'm looking for how to replay the
> same source more than once.
>
> Been messing with MediaPlayer.availability and onPlaybackStateChanged and
> seek but can't seem to get consistent behavior.
>
> Any pointers on mediaplayer replay would be very much appreciated.
>
> Qt Creator 5.5.
>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] How to change compiler flags of Android compilations?

2016-03-19 Thread Nuno Santos
Hi,

I was trying to set new compiler flags for Android compilation but they don’t 
seem to be reflect during the compilation.

I added:

QMAKE_CXXFLAGS_RELEASE += -mfloat-abi=softfp -mfpu=neon -O3 -DHAVE_NEON=1

But during the compilation there was this:

arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp 
-mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector 
-fno-short-enums -DANDROID -Wa,--noexecstack -fno-builtin-memmove -std=c++11 -g 
-g -marm -O0 -fno-omit-frame-pointer -Wall -Wno-psabi -W -D_REENTRANT -fPIC

What am I missing?

Thanks,

Nuno___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] bug with # in URL when using setUrl?

2016-03-19 Thread Larry Martell
On Thu, Mar 17, 2016 at 11:39 AM, Thiago Macieira
 wrote:
> On quinta-feira, 17 de março de 2016 09:39:44 PDT Larry Martell wrote:
>> GET https://code.jquery.com/jquery-2.1.4.min.js SSL handshake failed
>>
>> A couple of days back Thiago said:
>> > Check if you have OpenSSL available. It might be that the requests fail
>> > because they are HTTPS and there's no SSL support.
>> >
>> > If you're compiling on Mac from source, you may try the -securetransport
>> > option, which uses the Mac API instead of OpenSSL.
>>
>> So I want to understand this - Is this error occurring because these
>> machines do not have OpenSSL installed?
>
> It's possible.
>
>> Would rebuilding Qt with that option fix this?
>
> If they are Macs, yes. You can also solve the problem by installing a recent
> version of OpenSSL.

Rebuilt Qt with -securetransport and it did not fix the problem. In
any case, that is not a good solution for us, as that option is not
available on Windows. We are building an app that will be sold and
distributed as a dmg or setup.exe file. We cannot count on the users
having any given packages, so what I have done is downloaded the
static assets to our server and changed the html to load them to the
client from our servers instead of from the internet.

I really want to thank Thiago and Konstantin for all the help you gave
me and for being so patient with my ignorance of Qt. I could never
have tracked down this issue without you 2.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] load average building QtWebEngine

2016-03-19 Thread René J . V . Bertin
Hi,

This seems a bit silly to ask, but I'm seeing extremely high load averages: 
60.74 53.07 41.45 building QtWebEngine (about 8100 files in).
That's on a 2 core, 2 thread i7, with the build started with make -j4 . I'm 
indeed seeing more than 4 concurrent clang processes and nothing else that 
takes anywhere near the CPU load to drive me up to insane values like >40 over 
the last couple of minutes.

It looks like there's only a single ninja process being spawned from one of the 
Makefiles, so it's not like there are 4 of those that each decide to build 
using 4 or 5 parallel processes.

Curious. And probably not speeding up the build ...

R.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML, Layouts and Dynamic Objects

2016-03-19 Thread Lorne Sturtevant
I am dynamically creating an object which is working fine. I set the
parent of the object to a GridLayout. That also works fine. I want to
set the Layout's attached properties of my object, but it's not working.
Here's a small sample

|var component; var button; component =
Qt.createComponent("CustomButton.qml"); button =
component.createObject(gridLayout); button.Layout.maximumWidth = 10;
button.Layout.maximumHeight = 10; |

I get the error "TypeError: Type error" when accessing
button.Layout.maximimWidth. The button is properly created and I can see
it and use it in the gui. If I comment out setting the maximum width and
height, everything works except the size is not what I want.

It looks like the button is not getting the Layout attached property
when I dynamically create it. When I create it statically in a qml file,
everything works fine.

Any help would be greatly appreciated.

-- 
Lorne Sturtevant
Sum Ergo Cogito

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Giuseppe D'Angelo

Il 16/03/2016 15:55, Curtis Mitch ha scritto:

Perhaps threading, where queued connections are necessary?


No, you can use the PMF syntax even with queued connections.

Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts



smime.p7s
Description: Firma crittografica S/MIME
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Michael Sué
Hi,

> is there a reason to have "public slots:" anymore?

If you build dialogs in Qt Designer, you will like the function 
"connectSlotsByName" - called in the generated ui code - to work properly i.e. 
connect correctly just by the names you give your objects and slots.

- Michael.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QML Image

2016-03-19 Thread Jani Tykka
Hi,

I'm using Qt 5.5.1. When quick2 window renders png-image defined in QML
Image element it seems that colors are not rendered exactly as defined in
source png-image. This seems to happen on images which have more
complicated color fills, like gradients. Is there anything that can be done
to achieve exact presentation from source image? Any explanation what is
causing the difference?

Thanks,
Jani

-- 


This email is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. If 
you are not the intended recipient and have received this email in error, 
please notify BroadSoft, Inc. immediately by replying to this message, and 
destroy all copies of this message, along with any attachment, prior to 
reading, distributing or copying it.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Alejandro Exojo
El Wednesday 16 March 2016, Alexander Görtz escribió:
> Yeah wanted to say the same here, the line to connect to a QSpinBox 
> valueChanged is really realy ugly. Mostly because of the ugly syntax of 
> pointers to member functions.

A helper function, qOverload, was added to mitigate this (in 5.7):

http://doc-snapshots.qt.io/qt5-5.7/qtglobal.html#qOverload

Anyway, you can make it decent enough if you organize a bit with an 
intermediate typedef:

using valueChangedSignal = void(QSpinBox::*)(int);
auto valueChangedPointer =
static_cast(::valueChanged);
connect(ui->cacheSize, valueChangedPointer,
this, ::changeCacheLimits);
connect(ui->cacheAge, valueChangedPointer,
this, ::changeCacheLimits);

If you really really need the overloads, and you use them in connections a 
lot, maybe you could even provide the typedef (and the pointer, if you don't 
think it's too much) in your own classes.

-- 
Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
http://barnacity.net/ | http://disperso.net
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread Thiago Macieira
On sexta-feira, 18 de março de 2016 11:27:38 PDT René J. V. Bertin wrote:
> > Autoconf-based configure scripts override the default settings.
> 
> Another thing I'll take your word on, with the caveat outlined above. I've
> a  whole collection of wrapper scripts that allow me to build
> configure/autoconf and cmake based projects using hand-picked optimisation
> options. I think I'd have noticed if those options replaced everything set
> by configure/cmake systematically (possibly including all -I options).
> That said, variables like CC, CXX etc. override instead of append,
> fortunately  (if respected at all.)

So you can just fix this by accepting the issue to be in your scripts. Just 
append "-stdlib=libc++" to your CXXFLAGS environment variable.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread BOUCARD Olivier
Hi,
Is it possible to manually select a mirror and to force the Maintenance Tool to 
use it?Because I'm in Cyprus which for dumb reason is considered in Asia??? So 
I'm connected to some mirror in China from where I get 5Kbps download 
speed.Please also fix this issue, Linux distros are able to select a proper 
mirror so you can do it too.
I want to update to Qt 5.6 and latest QtCreator and I cannot because of this.
Thank you
PS: BTW I have the same issue on the qt.io website when I download but at least 
here I have the possibility to manually select another mirror.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?

2016-03-19 Thread Till Oliver Knoll


Am 17.03.2016 um 23:21 schrieb René J. V. Bertin :

>> ...
> 
> So, does this mean that font rendering can use Freetype instead of CoreText 
> now, 
> and thus potentially benefit from the rendering quality provided by the 
> Infinality patches (as well as better support for less common font weights)?

According to

  https://wiki.qt.io/New_Features_in_Qt_5.6

"Optional support for using FreeType on Mac OS X" is now available.

Cheers,
  Oliver

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly delete qApp?

2016-03-19 Thread Nuno Santos
Nikos,

Thanks for your reply. 

The problems is that host application hangs forever if I don’t delete it and 
crashes if I delete it. I’m in a kind of dead end.

Any ideas?

Thanks

Nuno

> On 16 Mar 2016, at 14:07, Nikos Chantziaras  wrote:
> 
> On 16/03/16 14:01, Till Oliver Knoll wrote:
>> I don't think you're supposed to delete qApp
> 
> Actually you do need to delete it. Most people don't because after 
> qApp->exec() returns, the program ends anyway. But if you want to have 0 
> leaks, you need to delete your QApplication instance.
> 
> Usually you don't delete qApp directly, but just your instance, but that's 
> the same thing, really:
> 
>  int main(int argc, char** argv)
>  {
>  QApplication app = new QApplication(/* ... */);
>  app->exec();
>  delete app;
>  // or:
>  // delete qApp;
>  // which does the same thing.
>  }
> 
> In normal applications, like the above, deleting it is redundant. You're 
> exiting the process, so the environment is going to clean your memory anyway. 
> It's still a memory leak, if you're pedantic about it.
> 
> If you're using QApplication in a plugin, deleting qApp is actually 
> mandatory, otherwise you're leaking the qApp instance when the plugin 
> unloads; no one else is going to delete it for you.
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Till Oliver Knoll


> Am 16.03.2016 um 22:37 schrieb André Pönitz :
> 
> On Wed, Mar 16, 2016 at 02:31:33PM +, Gian Maxera wrote:
>>> I can connect to Foo::bar either way. If I don't intend to ever use
>>> the old-style connect syntax, is there a reason to have "public
>>> slots:" anymore?
>> 
>> One reason that for me it’s fundamental: Readability of your code !!!
> 
> It doesn't make the code more readable then a comment
> 
>   // This is a slot !!!
>   void foo();

Extend your example to a dozen or so slots and you'd quickly agree that

private slots:
  void foo();
  void bar();
  void baz();
  ...

is much more readable, as compared to, say, repeating your comment or writing 
something like "The following 12 methods are slots (but the 13th isn't! And I'm 
pretty sure that the next Joe Programmer will insert his/her 
"barFooWhichIsNotASlot()"-method randomly between the first 12 methods 
anyway... so whatever!)"

Off course you can try to emphasise your slots with nice ASCII art comments, 
start a fight with your colleagues about the style guide for comments...

Or just write

  private slots:

;)

Cheers,
  Oliver
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QCharts feedback/issues

2016-03-19 Thread Blasche Alexander


>Where is the best place to give QCharts feedback, or to discuss issues?


For bugs or suggestions please file them in Jira under the Charts component: 
https://bugreports.qt.io/browse/QTBUG/component/22022/?selectedTab=com.atlassian.jira.jira-projects-plugin:component-summary-panel


Other forms of feedback could go to developm...@qt-project.org


--

Alex
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Till Oliver Knoll


> Am 17.03.2016 um 07:39 schrieb André Somers :
> 
> ...
> I find that much more readable than having to look in some signals section to 
> find if there is a notification signal, and then in some slots section to see 
> if the setter is perhaps declared as a slot or not. 

That's an entire different view than what I've had so far (since so far I've 
never used those new "PFM"-style connections. What does it even mean? "Printing 
with Manual Formatting"? ;))

And I must say André's point makes very much sense, too :)

And if I'm not completely mistaken with the old style connections an explicit 
[private|protected|public] slots: section is always needed, in order for the 
moc to recognise the method to be a "slot", no?

Or is this also just syntactical sugar when it comes to /connecting/ a slot 
(ignoring the generated meta data for the moment)?

For instance I know that the private|public specifier has absolutely no 
influence on the "connectability" of a slot, that is you can connect a signal 
to a private slot from /outside/ the class...

Cheers,
  Oliver___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Alexander Görtz
> Nobody's mentioned the fact that an overridden virtual slot requires an
> absolutely horrid cast in order to use the new PMF syntax.
> 
> -John Weeks
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Am Mittwoch, 16. März 2016, 10:24:37 CET schrieb John Weeks:

Yeah wanted to say the same here, the line to connect to a QSpinBox 
valueChanged is really realy ugly. Mostly because of the ugly syntax of 
pointers to member functions.


signature.asc
Description: This is a digitally signed message part.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly delete qApp?

2016-03-19 Thread Jan Kundrát

On Wednesday, 16 March 2016 15:07:30 CET, Nikos Chantziaras wrote:

  QApplication app = new QApplication(/* ... */);
  app->exec();
  delete app;


There's no point to use heap allocation in this context. You can simply 
create a QApplication instance on stack in your main.


Cheers,
Jan

--
Trojitá, a fast Qt IMAP e-mail client -- http://trojita.flaska.net/
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] bug with # in URL when using setUrl?

2016-03-19 Thread Konstantin Tokarev


17.03.2016, 07:13, "Larry Martell" :
> On Wed, Mar 16, 2016 at 12:04 PM, Konstantin Tokarev  
> wrote:
>>  16.03.2016, 18:39, "Larry Martell" :
>>>   On Wed, Mar 16, 2016 at 6:29 AM, Konstantin Tokarev  
>>> wrote:
    16.03.2016, 02:15, "Larry Martell" :
>    -How can I debug the Angular code?

    QtWebKit has developer tools. You need to create QWebInspector, set 
 QWebPage to it,
    and enable QWebSettings::DeveloperExtrasEnabled

    You will get error console, JS debugger, and other goodies.
>>>
>>>   This sounds very promising but I can't quite figure out how to use it.
>>>
>>>   I have this JS code that's somehow downloaded (I assume by nginx). How
>>>   do I integrate QWebInspector and QWebPage into the Qt app so they can
>>>   access that code?
>>
>>  In the beginning you've mentioned that you have QWebView. That's enough, 
>> you can get QWebPage using page() method, you can create QWebInspector as a 
>> separate widget (see code example in docs), call its setPage() method and 
>> show it somewhere
>
> Thanks. This is what I was doing before:
>
> ui->webView->setUrl(url);
>
> And I commented that out and I have this now:
>
>   Dialog = new QDialog(this);
>   ui->webView->setPage(url);

It should be

ui->webView->setUrl(url);

>   QWebPage *page = ui->webView->page();
>   QWebInspector *inspector = new QWebInspector(Dialog);
>   inspector->setPage(page);
>   Dialog->show();
>
> Problem is that url is a QUrl and setPage wants a QWebPage *
>
> (If you couldn't tell I am brand new to Qt.)

-- 
Regards,
Konstantin
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly delete qApp?

2016-03-19 Thread Nikos Chantziaras

On 16/03/16 14:01, Till Oliver Knoll wrote:

I don't think you're supposed to delete qApp


Actually you do need to delete it. Most people don't because after 
qApp->exec() returns, the program ends anyway. But if you want to have 0 
leaks, you need to delete your QApplication instance.


Usually you don't delete qApp directly, but just your instance, but 
that's the same thing, really:


  int main(int argc, char** argv)
  {
  QApplication app = new QApplication(/* ... */);
  app->exec();
  delete app;
  // or:
  // delete qApp;
  // which does the same thing.
  }

In normal applications, like the above, deleting it is redundant. You're 
exiting the process, so the environment is going to clean your memory 
anyway. It's still a memory leak, if you're pedantic about it.


If you're using QApplication in a plugin, deleting qApp is actually 
mandatory, otherwise you're leaking the qApp instance when the plugin 
unloads; no one else is going to delete it for you.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Scott Aron Bloom


From: Interest [mailto:interest-bounces+scott=towel42@qt-project.org] On 
Behalf Of Bob Hood
Sent: Wednesday, March 16, 2016 3:42 PM
To: interest@qt-project.org
Subject: Re: [Interest] Are slots even needed these days?

On 3/16/2016 3:37 PM, André Pönitz wrote:


On Wed, Mar 16, 2016 at 02:31:33PM +, Gian Maxera wrote:

I can connect to Foo::bar either way. If I don't intend to ever use

the old-style connect syntax, is there a reason to have "public

slots:" anymore?



One reason that for me it’s fundamental: Readability of your code !!!



It doesn't make the code more readable then a comment



   // This is a slot !!!

   void foo();

I would argument that it does when you have legions of people out there already 
conditioned to this:

   ...
   public slots:
   void  bar();
   void  foo();
   ...

instead of:

   ...
   // This is a slot!!!
   void foo();
   ...
   // Oh, hey, this is a slot too!!!
   void bar();
   ...

As a Qt developer, I find the former more elegant and self-documenting.
I find them both pretty bad ☹ …  I have spent too much time, looking at other 
people’s code trying to figure out “why” it wont connect, only to realize 
someone had snuck in a “private:” second so moc didn’t generate the slot 
information.

I prefer “slotFoo” and “slotBar” as well as “sigFoo” and “sigBar”

It really lets the methods stand out as slots and signals.. It also means, 
don’t think “sender()” can ever valid if you are not in a “slotXYZ” function.

Scott



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Yves Bailly
A use case for "old-style" slots is when you have dynamic connections, 
established at runtime
from some config file: you get the names of the signals and the slots as 
strings.
With the old style, your code can be as simple as
QObject::connect(foo, signal_name_string, bar, slot_name_string);

With the new style, you would have to manually map the strings to the function 
pointers, hence modifying the connection code each time a new signal or slot is 
added.

--
Yves Bailly
Software developer

> -Original Message-
> From: Interest [mailto:interest-bounces+yves.bailly=verosoftware.com@qt-
> project.org] On Behalf Of Nikos Chantziaras
> Sent: Wednesday, March 16, 2016 3:25 PM
> To: interest@qt-project.org
> Subject: [Interest] Are slots even needed these days?
> 
> Since in modern Qt you connect signals to functions/lambdas, is there a
> reason to declare slots anymore?
> 
> In other words, is there any difference between:
> 
>class Foo: public QObject {
>Q_OBJECT
> 
>public slots:
>void bar();
>};
> 
> and:
> 
>class Foo: public QObject {
>Q_OBJECT
>public:
> 
>void bar();
>};
> 
> I can connect to Foo::bar either way. If I don't intend to ever use the
> old-style connect syntax, is there a reason to have "public slots:"
> anymore?
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread André Somers



Op 17/03/2016 om 00:46 schreef Bob Hood:

On 3/16/2016 5:02 PM, Scott Aron Bloom wrote:
I find them both pretty bad L…  I have spent too much time, looking 
at other people’s code trying to figure out “why” it wont connect, 
only to realize someone had snuck in a “private:” second so moc 
didn’t generate the slot information.


I prefer “slotFoo” and “slotBar” as well as “sigFoo” and “sigBar”


It really lets the methods stand out as slots and signals.. It also 
means, don’t think “sender()” can ever valid if you are not in a 
“slotXYZ” function.





I actually prefix my slot method names with "slot_" and signals with 
"signal_" so they are also easily identifiable in the C++ module as 
I'm looking through the code.  More self-documentation.


And I happen to think that these naming 'conventions' are pure nonsense. 
I really don't care much _how_ a method is called. What's the difference 
between having a method called due to a signal emit and having a method 
called directly? None. I want my methods to be called after what they 
_do_, and not how they are called. What if I I find I have a need to 
call the "slot_" method directly from some other code as well? Should I 
be allowed? Of course I should be! Be the name slot_* suggests issues 
there that don't exist, especially if you don't use sender() any more 
(which has been discouraged for many years already anyway).


And as for people being used to seeing blocks of methods behind a 
'public slots:' access specifyer: sure, but it doesn't add much 
information. It only serves to create some kind of artificial grouping 
of your methods in your declaration that is probably not even all that 
sensible. For instance, if I have a class with many properties on it, I 
think it makes sense to keep the methods related to each property 
together, so I have a quick overview over what methods are available for 
what property. You'd see me writing this:


Foo foo() const;
void setFoo(Foo foo);
Q_SIGNAL fooChanged(Foo foo);

Bar bar() const;
void setBar(Bar bar);
Q_SIGNAL barChanged(Bar bar);

I find that much more readable than having to look in some signals 
section to find if there is a notification signal, and then in some 
slots section to see if the setter is perhaps declared as a slot or not.


For me, Q_SLOT or slots: has little value any more, other than making 
the methods callable in dynamic contexts like QML.


André

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread René J . V . Bertin
Thiago Macieira wrote:

> The proper way of adding options is to modify the mkspec's qmake.conf file

qmake.conf or .qmake.conf?

>> Checking my build scripts, I can confirm that CFLAGS and CXXFLAGS are set
>> *through the environment*, not by any direct action of mine.
> 
> Yeah, not tested. This is the cause of your problem.

A bit easy, no? I'd say either you simply ignore settings from the environment, 
or else you do things correctly. And that would probably mean adding settings 
from the environment to whatever flags you set yourself as I think that's the 
accepted or at least usual way to do it (even CMake does).

Anyway, I see that I had been missing a qmodule.pri edit. For some reason Qt 
5.5.1 built fine with QMAKE_CXXFLAGS="-O3 -march=native -g". After replacing 
that with QMAKE_CXXFLAGS+=etc the build now appears to be happy.

Shouldn't be too hard to generate that file using += instead of a simple = ?

> On quinta-feira, 17 de março de 2016 11:38:58 PDT Thiago Macieira wrote:
>> > - -stdlib=libc++ appear to be missing only from CXXFLAGS in the Makefiles
>> > under qtbase/src/tools
>> 
>> Hmm... those are "bootstrapped" tools. But I can't find anything that
>> overrides  QMAKE_CXXFLAGS.
> 
> Can you confirm that it *is* present in src/corelib/Makefile?

When is that file supposed to be created? I don't have it immediately after 
running configure (and now of course it *will* contain the option that was 
missing).

R.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly delete qApp?

2016-03-19 Thread Till Oliver Knoll


> Am 16.03.2016 um 13:01 schrieb Till Oliver Knoll 
> :
> 
> 
> ...
> 
> Oh, and somewhat related: just make double-sure on OS X that your Qt plugin - 
> specifically all GUI and paint operations - happen in the /main/ thread of 
> the host application (if that's possible at all, i.e. you control/own the 
> host app, too). It won't work otherwise (unless you hack your own Cocoa event 
> queue for the host application, and even then you're in a mine field whenever 
> calling other Cocoa APIs... just google for "Qt event queue thread OS X" or 
> the like...)

Just to clarify: this is not a limitation of the Qt implementation on OS X 
(iOS), but really a limitation (by design) of the underlying Cocoa.

And yes, having a Qt event loop running in a thread other than the "main" 
thread /does/ work on Windows and Linux (possibly/likely other Unix) - just not 
on OS X/Cocoa.

Here's a link for starters:

  
http://stackoverflow.com/questions/22289423/how-to-avoid-qt-app-exec-blocking-main-thread

Cheers,
  Oliver___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly delete qApp?

2016-03-19 Thread Till Oliver Knoll


> Am 16.03.2016 um 11:51 schrieb Nuno Santos :
> 
> Hi,
> 
> My application is targeted to run as a software plugin inside another third 
> party application. When a instance of my plugin is instanciated I check if 
> qApp exists. If so, I will use that pointer, otherwise I will reuse the 
> pointer. I also increment a counter to know how many instances of my 
> plugin are active. When the plugin is deleted I check the counter. If it gets 
> to zero I will delete qApp.

I don't think you're supposed to delete qApp (btw which is just a convenience 
macro for QCoreApplication::instance, since Qt 5.x I think).

The way to end a Qt application is to tell it to QCoreApplication::exit which 
will then leave the (existing) Qt event loop with the given return code.

GUI applications usually QGuiApplicatiob::quitOnLastWindowClosed.

Once the Qt event queue is left Qt does all cleanup (or doesn't: there's quite 
a bit of discussions every then and when about memory leaks when Qt apps quit: 
but since they quit anyway those "global left-overs" are considered "to be 
dealt with by the OS - there are arguments for and against this practise...).

In any case, you shouldn't interfere with the Qt cleanup. Specifically the 
global Qt app instance "belongs to Qt".


Why do you query the state of qApp anyway? Do you have multiple instances of 
your Qt plugin (in a possibly non-Qt host application) and want to prevent the 
launch of the Qt event queue multiple times?

Oh, and somewhat related: just make double-sure on OS X that your Qt plugin - 
specifically all GUI and paint operations - happen in the /main/ thread of the 
host application (if that's possible at all, i.e. you control/own the host app, 
too). It won't work otherwise (unless you hack your own Cocoa event queue for 
the host application, and even then you're in a mine field whenever calling 
other Cocoa APIs... just google for "Qt event queue thread OS X" or the like...)

Cheers,
  Oliver

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread Samuel Gaist

On 17 mars 2016, at 16:36, René J.V. Bertin  wrote:

> Hi,
> 
> I'm running into an issue building Qt 5.6.0 on OS X 10.9.5 :
> 
> gmake[3]: Entering directory 
> '/.../qt5-kde-devel/work/build/qtbase/src/tools/bootstrap'
> /usr/bin/clang++ -c -O3 -march=native -g -ffunction-sections -O2 -g -fPIC 
> -std=c++11 -isysroot 
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk
>  -mmacosx-version-min=10.7 -fno-exceptions -Wall -W -DQT_NO_MTDEV 
> -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT 
> -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CODECS 
> -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE 
> -DQT_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE 
> -DQT_NO_DEPRECATED -DQT_NO_TRANSLATION -DQT_CRYPTOGRAPHICHASH_ONLY_SHA1 
> -DQT_NO_CAST_FROM_ASCII -DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT 
> -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER 
> -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x05 
> -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG 
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/tools/bootstrap
>  -I. -I/Users/bertin/work/s
> rc/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include 
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/5.6.0/QtCore
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml/5.6.0
>  
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtXml/5.6.0/QtXml
>  -I../../../include -I../../../include/QtCore 
> -I/.../qt5-kde-devel/work/build/qtbase/include/QtXml 
> -I/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/mkspecs/macx-clang
>  -o .obj/qlatincodec.o 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec.cpp
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec.cpp:34:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/src/corelib/codecs/qlatincodec_p.h:48:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qtextcodec.h:1:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/codecs/qtextcodec.h:37:
> In file included from 
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qstring.h:1:
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:756:55:
>  error: no type named 'u16string' in namespace 'std'
>static inline QString fromStdU16String(const std::u16string );
> ~^
> /Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qstring.h:757:17:
>  error: no type named 'u16string' in namespace 'std'
>inline std::u16string toStdU16String() const;
>   ~^
> 
> In file included from 
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qhashfunctions.h:39:
> In file included from 
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/qpair.h:1:
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/tools/qpair.h:62:44:
>  error: no member named 'declval' in namespace 'std'
>Q_DECL_NOEXCEPT_EXPR(noexcept(std::declval() = p.first) && 
> noexcept(std::declval() = p.second))
>  ~^
> /Volumes/Debian/Users/bertin/work/src/new/Qt/qt-everywhere-opensource-src-5.6.0/qtbase/include/QtCore/../../src/corelib/global/qcompilerdetection.h:1036:43:
>  note: expanded from macro 'Q_DECL_NOEXCEPT_EXPR'
> # define Q_DECL_NOEXCEPT_EXPR(x) noexcept(x)
>  ^
> 
> 
> 
> This does not appear to be a limitation in the Xcode compiler (Xcode 6.2, 
> Apple Clang 600) because when I use clang 3.8 I get the exact same errors.
> 
> Configure command and summary are below (note the request for the 10.9 SDK 
> which is ignored in the above compile command!).
> 
> Any ideas? The same code in qstring.h doesn't cause issues in Qt 5.5.1 .
> 
> %> configure -top-level -platform macx-clang -sdk macosx10.9 -prefix 
> /opt/local -archdatadir 

Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread René J . V . Bertin
Thiago Macieira wrote:

> The hint is in that "-O3 -march=native" in the command-line. The only place
> where "-march=native" shows up in the Qt sources is part of ANGLE [*], which
> is never compiled on OS X.
> 
> So I conclude that René has overwritten QMAKE_CXXFLAGS.

Couple observations:
- I am doing nothing different from what I'm doing while building Qt 5.5.1
- -stdlib=libc++ appear to be missing only from CXXFLAGS in the Makefiles under 
qtbase/src/tools
- it is the only option that's missing

While you may be right that my (intention of) adding compilation options is 
somehow involved, I don't think that's the "bug" (and I'd hope that it'd be 
supported).

Checking my build scripts, I can confirm that CFLAGS and CXXFLAGS are set 
*through the environment*, not by any direct action of mine.

What I do change though is a few lines in qmodule.pri, replacing "QMAKE_CFLAGS 
=", "QMAKE_CXXFLAGS =" and "QMAKE_LFLAGS =" with the corresponding 
"QMAKE_?FLAGS 
+=" . The accompanying comment explains that this change is made exactly to 
ensure that options specified through the environment come in addition to the 
standard options, instead of replacing them.

If those statements were moved to a different file, or qmodule.pri moved to a 
different location, the changes will no longer be made (but then I guess I'd 
not 
be seeing -stdlib=libc++ anywhere anymore ?!).

R.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Gettings signals to be emitted during keyPressEvent

2016-03-19 Thread Murphy, Sean
In my application, I've got a popup table that pops up when the user presses a 
key (in this case CTRL), and goes away when the user releases the key. While 
the table is visible, the user can click on rows to highlight a row. When the 
user highlights an item, a signal should be emitted from the table widget, and 
then another part of the application should mirror the highlighting action.

What I'm finding is that while the table is up, the signal to the parent class 
seems to just be getting queued, and the signal never propagates out UNTIL the 
key is released. So the action I'm looking for eventually occurs, but is 
delayed. Any ideas on how to get the signal acted on immediately? Relevant 
pseudocode below:

class MainWindow : public QMainWindow
{
public slots:
void slotDoOtherStuff(QString, bool);

protected:
virtual void keyPressEvent(QKeyEvent* event);
virtual void keyReleaseEvent(QKeyEvent* event);

private:
QTableView* dataTable;
myModel* dataTableModel;
}

void MainWindow:: MainWindow (QWidget *parent)
{
  dataTable = new QTableView(this);
  dataTableModel = new myModel(this);
  dataTable->setModel(dataTableModel);
  connect(dataTableModel, SIGNAL(sigItemClicked(QString,bool)),
this, SLOT(slotDoOtherStuff (QString,bool)));
}

void MainWindow::keyPressEvent(QKeyEvent *event)
{
QMainWindow::keyPressEvent(event);
if (event->key() == mPopupKey)
{
   //populate table here
  dataTable->show();
}

void MainWindow::keyReleaseEvent(QKeyEvent *event)
{
QMainWindow::keyPressEvent(event);
if (event->key() == mPopupKey)
{
dataTable ->hide();
}
}

void MainWindow:: slotDoOtherStuff(QString,bool) 
{
QMainWindow::keyPressEvent(event);
if (event->key() == mPopupKey)
{
   //populate table here
  dataTable->show();
}

So in the pseudocode above, while the table is shown (i.e. while the CTRL key 
is held down), slotDoOtherStuff() never gets called until after the popup key 
is released. Then however many sigItemClicked() signals that were queued up are 
finally acted upon. So it looks like while the key is pressed, that part of the 
event loop isn't spinning? But the user can interact with the popup table while 
the key is pressed, so some part of the event loop is still active...

Sean

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread René J . V . Bertin
Thiago Macieira wrote:


>> No, that's not true. AFAICR there were plenty of other Makefiles that did
>> have  the option.
> 
> Which ones?

The ones that scrolled off my history ;)
Seriously, to answer that question I'd have to restart a build without my fix, 
so 
are you truly interested to know?

> After this, lots of things can happen in parallel (QtGui and all non-GUI
> modules).

Yes, that's quite possible, the thought crossed my mind.

>> Shouldn't be too hard to generate that file using += instead of a simple = ?
> 
> It would just as equally break people's expectations.

I'll have to take your word on that. Myself I have come to expect that build 
systems set the required options, and that anything you want in addition 
(potentially acting as an override) you specify via the environment.

> Autoconf-based configure scripts override the default settings.

Another thing I'll take your word on, with the caveat outlined above. I've a 
whole collection of wrapper scripts that allow me to build configure/autoconf 
and 
cmake based projects using hand-picked optimisation options. I think I'd have 
noticed if those options replaced everything set by configure/cmake 
systematically (possibly including all -I options).
That said, variables like CC, CXX etc. override instead of append, fortunately 
;) (if respected at all.)

R.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] next Qt 5.6.0 question : Freetype (building with -fontconfig)?

2016-03-19 Thread René J . V . Bertin
> See https://codereview.qt-project.org/124643.
> 
> That's supposed to fix the issue, but reviewers found problems with it. I
> don't know enough about OS X so the change was left in limbo.

Thanks, I'll try to test it tomorrow. As I mentioned on the ticket it may be 
the 
fix wasn't helping because configure can't find either freetype2.pc or freetype-
config in the non-standard /opt/X11 .

So, does this mean that font rendering can use Freetype instead of CoreText 
now, 
and thus potentially benefit from the rendering quality provided by the 
Infinality patches (as well as better support for less common font weights)?

R.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D : Crash after loading few mesh

2016-03-19 Thread Xavier Bigand
Hi,

I have successfully integrated a Qt3D view in our project. I can load few
of our models with Qt3D but at a certain moment it make the application
crash.

When I use Nsight to try to understand the issue, my PC completely freeze
and I need reboot, so I suspect a wrong OpenGL command from Qt3D that make
the driver bug.
I saw that Qt3D let all textures bind, I was around to 32 when the crash
came.

Is there a way to activate logs of Qt3D?

For the moment I instantiate one QDiffuseMapMaterial per mesh with one
texture (some can be shared).


PS : I have a Nvidia 670 GTX with drivers version 364.51

-- 
Xavier
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML Image

2016-03-19 Thread Jani Tykka
Source size was already set as the original image size. When mipmap is set
colors seems to be even more distorted.

On Wed, Mar 16, 2016 at 10:45 PM, Jason H  wrote:

> Since you mention gradients, try setting source size or the mipmap
> properties. I wonder if you're getting some subsampling issue.
>
>
> *Sent:* Wednesday, March 16, 2016 at 8:26 AM
> *From:* "Jani Tykka" 
> *To:* "interest@qt-project.org Interest" 
> *Subject:* [Interest] QML Image
> Hi,
>
> I'm using Qt 5.5.1. When quick2 window renders png-image defined in QML
> Image element it seems that colors are not rendered exactly as defined in
> source png-image. This seems to happen on images which have more
> complicated color fills, like gradients. Is there anything that can be done
> to achieve exact presentation from source image? Any explanation what is
> causing the difference?
>
> Thanks,
> Jani
>
>
> This email is intended solely for the person or entity to which it is
> addressed and may contain confidential and/or privileged information. If
> you are not the intended recipient and have received this email in error,
> please notify BroadSoft, Inc. immediately by replying to this message, and
> destroy all copies of this message, along with any attachment, prior to
> reading, distributing or copying it.
> ___ Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>



-- 
*Jani Tykkä*
Development Manager | BroadSoft, Inc. | +358 44 596 0587 |
jty...@broadsoft.com

-- 


This email is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. If 
you are not the intended recipient and have received this email in error, 
please notify BroadSoft, Inc. immediately by replying to this message, and 
destroy all copies of this message, along with any attachment, prior to 
reading, distributing or copying it.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread Samuel Gaist
On 18 mars 2016, at 08:57, BOUCARD Olivier  wrote:

> Hi,
> 
> Is it possible to manually select a mirror and to force the Maintenance Tool 
> to use it?
> Because I'm in Cyprus which for dumb reason is considered in Asia??? So I'm 
> connected to some mirror in China from where I get 5Kbps download speed.
> Please also fix this issue, Linux distros are able to select a proper mirror 
> so you can do it too.
> I want to update to Qt 5.6 and latest QtCreator and I cannot because of this.
> 
> Thank you
> 
> PS: BTW I have the same issue on the qt.io website when I download but at 
> least here I have the possibility to manually select another mirror.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

You can use the QtSdkRepoChooser for the maintenance tool:

https://github.com/JKSH/QtSdkRepoChooser

Samuel



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread charleyb123 .
> Since in modern Qt you connect signals to functions/lambdas, is there a
reason to declare slots anymore?

Interesting question, I've thought about this also.

IMHO, deep consideration is important:

  "slot":  A "slot" is a non-coupling thread-safe execution bridge.

It's already been mentioned in this thread:

Current Qt slots provide (beyond lambdas):

(1) Queued connections
(2) Runtime-reflected connections
(3) Uncoupled connections

Current slot implementation bridges runtime-reflection capabilities
(provided by QMetaObject), and provides the thread-safe event queue that
bridges "slot-execution" to occur on the "target-thread" for which the
"target-QObject" has "affinity".  Lambdas alone cannot do this -- some kid
of "event-queue" would be required that is "thread-aware" (yes, could be
provided through a library of some kind, that happens to be what Qt is
doing).

Because Qt slots can rely upon runtime type-reflection (provided by
QMetaObject), we can also couple signal/slot across two objects where the
code does not include both headers.  This is sometimes important to enable
designs for an "uncoupled-bridge" across components that cannot be coupled.

However, I agree that for the "common-case" (perhaps 80% of the time for
"typical" designs?) that lambdas are just-plain-awesome.

--charley
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Giuseppe D'Angelo

Il 16/03/2016 15:24, Nikos Chantziaras ha scritto:

I can connect to Foo::bar either way. If I don't intend to ever use the
old-style connect syntax, is there a reason to have "public slots:" anymore?


It's still needed if you want to expose those methods to QML / 
scripting, use QMetaObject::invokeMethod, and possibly some other cases.


Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts



smime.p7s
Description: Firma crittografica S/MIME
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread André Pönitz
On Thu, Mar 17, 2016 at 08:35:39AM +0100, Till Oliver Knoll wrote:
> > Am 16.03.2016 um 22:37 schrieb André Pönitz :
> > 
> > On Wed, Mar 16, 2016 at 02:31:33PM +, Gian Maxera wrote:
> >>> I can connect to Foo::bar either way. If I don't intend to ever
> >>> use the old-style connect syntax, is there a reason to have
> >>> "public slots:" anymore?
> >> 
> >> One reason that for me it’s fundamental: Readability of your code
> >> !!!
> > 
> > It doesn't make the code more readable then a comment
> > 
> >   // This is a slot !!!  void foo();
> 
> Extend your example to a dozen or so slots and you'd quickly agree
> that
> 
> private slots: void foo(); void bar(); void baz(); ...
> 
> is much more readable, as compared to, say, repeating your comment

I thought the comment was silly enough to make clear that I don't
think it has any merits at all, pretty much as marking something
*unnecesarily* as 'slot:' hasn't.

I even copied all the exclamation marks !!!1eleven.

Andre'
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread John Weeks
Nobody's mentioned the fact that an overridden virtual slot requires an 
absolutely horrid cast in order to use the new PMF syntax.

-John Weeks

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] bug with # in URL when using setUrl?

2016-03-19 Thread Konstantin Tokarev


16.03.2016, 18:39, "Larry Martell" :
>  On Wed, Mar 16, 2016 at 6:29 AM, Konstantin Tokarev  
> wrote:
>>   16.03.2016, 02:15, "Larry Martell" :
>>>   -How can I debug the Angular code?
>>
>>   QtWebKit has developer tools. You need to create QWebInspector, set 
>> QWebPage to it,
>>   and enable QWebSettings::DeveloperExtrasEnabled
>>
>>   You will get error console, JS debugger, and other goodies.
>
>  This sounds very promising but I can't quite figure out how to use it.
>
>  I have this JS code that's somehow downloaded (I assume by nginx). How
>  do I integrate QWebInspector and QWebPage into the Qt app so they can
>  access that code?

In the beginning you've mentioned that you have QWebView. That's enough, you 
can get QWebPage using page() method, you can create QWebInspector as a 
separate widget (see code example in docs), call its setPage() method and show 
it somewhere


-- 
Regards,
Konstantin
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Gian Maxera

> On 16 Mar 2016, at 14:24, Nikos Chantziaras  wrote:
> 
> Since in modern Qt you connect signals to functions/lambdas, is there a 
> reason to declare slots anymore?
> 
> In other words, is there any difference between:
> 
>  class Foo: public QObject {
>  Q_OBJECT
> 
>  public slots:
>  void bar();
>  };
> 
> and:
> 
>  class Foo: public QObject {
>  Q_OBJECT
>  public:
> 
>  void bar();
>  };
> 
> I can connect to Foo::bar either way. If I don't intend to ever use the 
> old-style connect syntax, is there a reason to have "public slots:" anymore?

One reason that for me it’s fundamental: Readability of your code !!!

Even if it wouldn’t necessary to declare “public slots”, I really strong advice 
to use “slots” because it explicitly say what part of your interface are 
supposed to be attached to a signal and what part not.

It’s very common on my C++ code that only a subset of method are mean to be 
attached to a signal, so make this distinction clear help to understand the 
code and debug it more easily.

Then, I don’t know if there is a real difference on connecting to a function or 
to a explicitly declared slot. But for sure, you cannot use always lambdas. So 
methods acting as slot are necessary.

Ciao,
Gianluca.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly delete qApp?

2016-03-19 Thread Nikos Chantziaras
I doubt you can get out of this issue. QApplication wants to be in 
control of the main loop, and it wants to do so from the main thread.


Failing that, you'd need to integrate the host application's event loop 
into Qt's event loop, and still have a way to cal QApplication::exec() 
on the main thread. If your host application does not allow for those 
two things, I'd say there's nothing you can do.



On 16/03/16 17:42, Nuno Santos wrote:

Nikos,

Thanks for your reply.

The problems is that host application hangs forever if I don’t delete it
and crashes if I delete it. I’m in a kind of dead end.

Any ideas?

Thanks

Nuno


On 16 Mar 2016, at 14:07, Nikos Chantziaras > wrote:

On 16/03/16 14:01, Till Oliver Knoll wrote:

I don't think you're supposed to delete qApp


Actually you do need to delete it. Most people don't because after
qApp->exec() returns, the program ends anyway. But if you want to have
0 leaks, you need to delete your QApplication instance.

Usually you don't delete qApp directly, but just your instance, but
that's the same thing, really:

 int main(int argc, char** argv)
 {
 QApplication app = new QApplication(/* ... */);
 app->exec();
 delete app;
 // or:
 // delete qApp;
 // which does the same thing.
 }

In normal applications, like the above, deleting it is redundant.
You're exiting the process, so the environment is going to clean your
memory anyway. It's still a memory leak, if you're pedantic about it.

If you're using QApplication in a plugin, deleting qApp is actually
mandatory, otherwise you're leaking the qApp instance when the plugin
unloads; no one else is going to delete it for you.

___
Interest mailing list
Interest@qt-project.org 
http://lists.qt-project.org/mailman/listinfo/interest







___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Henry Skoglund

Hi, I thought I was the only one disliking the PMF syntax.
But there's hope, to aid my feeble brain I wrote some macros, so that 
the new syntax resembles the old, but still catching errors in compile time:


#define COMPOSEPMF(QOBJPTR,FUNC) \
::decay::type::FUNC

#define CONNECT(SENDER,FUNC1,RECEIVER,FUNC2) \
connect(SENDER,COMPOSEPMF(SENDER,FUNC1),RECEIVER,COMPOSEPMF(RECEIVER,FUNC2))


Those macros let you write code like this:
...
CONNECT(ui->pushButton,clicked,this,buttonClicked);
...


Less horrid (!) they use std::decay to retrieve the type and prefix it 
to the function, thus setting up correct PMF syntax in all its glory.


However, it wasn't long before I stumbled upon the casting problem, like 
in QCombobox and QSignalMapper. So I had to write 3 more macros:



#define COMPOSECASTPMF(QOBJPTR,ARGS,FUNC) \
static_cast::type::*)(ARGS)> \
(COMPOSEPMF(QOBJPTR,FUNC))

#define CONNECTSCAST(SENDER,ARGS,FUNC1,RECEIVER,FUNC2) \
connect(SENDER,COMPOSECASTPMF(SENDER,ARGS,FUNC1),RECEIVER,COMPOSEPMF(RECEIVER,FUNC2))

#define CONNECTRCAST(SENDER,FUNC1,RECEIVER,ARGS,FUNC2) \
connect(SENDER,COMPOSEPMF(SENDER,FUNC1),RECEIVER,COMPOSECASTPMF(RECEIVER,ARGS,FUNC2))


With those I can write code like so:
...
ui->comboBox->addItems({"Now","is","the","time"});
CONNECTSCAST(ui->comboBox,const QString &,
currentIndexChanged,this,indexChanged);
...
auto sm = new QSignalMapper(ui->pushButton);
CONNECTRCAST(ui->pushButton,clicked,sm,void,map);
...

So yeah, the cast wreaks a bit of a havoc, but you only have to specify 
the casting argument(s), std::decay takes care of prefixing the type.
Note: the macros only support either a sending or a receiving cast, 
hopefully a cast on both sides will never be needed...


Also, beginning now with 5.6 you don't even have to specify CONFIG += 
c++11 in your .pro file, the macros work right out of the box.


Rgrds Henry


On 2016-03-16 18:24, John Weeks wrote:

Nobody's mentioned the fact that an overridden virtual slot requires an

> absolutely horrid cast in order to use the new PMF syntax.



> John Weeks
>

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread Thiago Macieira
On quinta-feira, 17 de março de 2016 22:06:09 PDT René J. V. Bertin wrote:
> > That is an answer by itself. The fact that only the src/tools Makefiles
> > are
> > affected is a red herring: you only have those Makefiles to look into.
> 
> No, that's not true. AFAICR there were plenty of other Makefiles that did
> have  the option.

Which ones?

The build order for a non-cross-compilation build is:
qmake   (done during configure)
src/tools/bootstrap
src/tools/moc and src/tools/rcc (built in parallel)
src/corelib

This order cannot be broken. There's no sense in even creating a Makefile for 
anything else, since everything links to QtCore.

After this, lots of things can happen in parallel (QtGui and all non-GUI 
modules).
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Giuseppe D'Angelo

Il 17/03/2016 06:23, Constantin Makshin ha scritto:

Another thing I personally don't like in the new connection syntax is
that it forces signals to be public, making it possible to do all type
of wonders by faking/simulating events on behalf of other objects.

For example:
QLineEdit* edit = new QLineEdit("foo");
// ...
edit->textChanged("bar");


A good counterpart of this is that now a private "slot" is truly 
private, i.e. it's impossible to invoke it externally:


class Foo : public QObject {
Q_OBJECT

Foo() {
 connect(something, , this, ::doFoo);
}
private slots:
void doFoo(); // still reachable and invokable via QMetaObject

private:
void doFoo(); // unreachable from outside
};

Making the signals public is a tradeoff for ease of implementation and 
usage (you would not otherwise be allowed to simply take the address of 
a MF). A check about this could be added to clazy.


Cheers,
--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - The Qt Experts



smime.p7s
Description: Firma crittografica S/MIME
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] CFLAGS, CXXFLAGS etc. env. variables, qmake and building Qt

2016-03-19 Thread René J . V . Bertin
Continuing this discussion under a more appropriate topic so others may chime 
in.

>>> Shouldn't be too hard to generate that file using += instead of a simple = ?
>> 
>> It would just as equally break people's expectations.

>> Autoconf-based configure scripts override the default settings.
> 
> Another thing I'll take your word on, with the caveat outlined above. I've a
> whole collection of wrapper scripts that allow me to build configure/autoconf
> and cmake based projects using hand-picked optimisation options. I think I'd
> have noticed if those options replaced everything set by configure/cmake
> systematically (possibly including all -I options).

To summarise : I'm told that the "normal" way to build Qt with non-standard 
compiler options is to edit qmake.conf, or to "subclass" it. I found another 
workaround is a little bit easier : edit the qmodule.pri file after running 
configure so that QMAKE_*FLAGS= becomes QMAKE_*FLAGS+= .
The whole discussion got started about code that presumably is not built under 
qmake control, btw, but using Makefiles that are generated by configure 
directly.

I'm not going to make any more hard claims that this is indeed comparable to 
what autoconf/configure buildsystems do. CMake does do something similar, only 
it 
appends its own options to the user-supplied options rather than the other way 
round.

I do think that appending custom options to default options determined by the 
buildsystem makes sense. It allows you to fine-tune the default, e.g. by using -
O3 (or -Os) that'd override -O2, by adding -g or by using an option like -
march=native. IOW, you can override (=replace) certain options, add new ones, 
but crucial options won't be dropped unless you add one that cancels them 
explicitly.

There's another issue with handling custom compiler options through qmake.conf 
and/or qmodule.pri . Normally, if I configure,build,install a package using 
custom options specified through the environment, I do not by default expect 
those options to be forced upon any and all dependent software. Not if the 
options aren't set in the environment when dependents are built.

In other words, I'd love to see a way to provide additional custom compiler 
options to Qt's configure utility, that'd be used only for building Qt. And an 
equivalent option to tell qmake to take CXXFLAGS etc. as a source of additional 
compiler options, if that isn't already what happens. The latter is probably 
easier to implement than the former (and I'd be happy to take a shot at it if 
someone can give me some pointers where to start looking).

Cheers,
René

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread Shantanu Tushar
On Fri, Mar 18, 2016 at 2:30 PM, BOUCARD Olivier 
wrote:

> I did not knew it was existing.
> Thanks, I'll try this.
>
>
> Le Vendredi 18 mars 2016 10h54, Samuel Gaist  a
> écrit :
>
>
> On 18 mars 2016, at 08:57, BOUCARD Olivier 
> wrote:
>
> > Hi,
> >
> > Is it possible to manually select a mirror and to force the Maintenance
> Tool to use it?
> > Because I'm in Cyprus which for dumb reason is considered in Asia??? So
> I'm connected to some mirror in China from where I get 5Kbps download speed.
>

Guess what, even people from India get that mirror and still get 5Kbps
speed. I introduce people to Qt and have no answer when they ask "So this
has been the case for all these years and no one cares to fix it?".


> > Please also fix this issue, Linux distros are able to select a proper
> mirror so you can do it too.
> > I want to update to Qt 5.6 and latest QtCreator and I cannot because of
> this.
> >
> > Thank you
> >
> > PS: BTW I have the same issue on the qt.io website when I download but
> at least here I have the possibility to manually select another mirror.
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest
>
>
> Hi,
>
>
> You can use the QtSdkRepoChooser for the maintenance tool:
>
> https://github.com/JKSH/QtSdkRepoChooser
>
> Samuel
>
>
Tip: Every time there is a new Qt release, you need to generate the repo
files again using QtSdkRepoChooser or you won't see the update


>
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>


-- 
Shantanu Tushar(UTC +0530)
shantanu.io
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML Image

2016-03-19 Thread Jani Tykka
Attached original image + comparison.

On Thu, Mar 17, 2016 at 4:28 PM, Jason H  wrote:

> A picture would help
>
> *Sent:* Thursday, March 17, 2016 at 1:15 AM
> *From:* "Jani Tykka" 
> *To:* "Jason H" 
> *Cc:* "interest@qt-project.org Interest" 
> *Subject:* Re: [Interest] QML Image
> Source size was already set as the original image size. When mipmap is set
> colors seems to be even more distorted.
>
> On Wed, Mar 16, 2016 at 10:45 PM, Jason H  wrote:
>>
>> Since you mention gradients, try setting source size or the mipmap
>> properties. I wonder if you're getting some subsampling issue.
>>
>>
>> *Sent:* Wednesday, March 16, 2016 at 8:26 AM
>> *From:* "Jani Tykka" 
>> *To:* "interest@qt-project.org Interest" 
>> *Subject:* [Interest] QML Image
>> Hi,
>>
>> I'm using Qt 5.5.1. When quick2 window renders png-image defined in QML
>> Image element it seems that colors are not rendered exactly as defined in
>> source png-image. This seems to happen on images which have more
>> complicated color fills, like gradients. Is there anything that can be done
>> to achieve exact presentation from source image? Any explanation what is
>> causing the difference?
>>
>> Thanks,
>> Jani
>>
>> This email is intended solely for the person or entity to which it is
>> addressed and may contain confidential and/or privileged information. If
>> you are not the intended recipient and have received this email in error,
>> please notify BroadSoft, Inc. immediately by replying to this message, and
>> destroy all copies of this message, along with any attachment, prior to
>> reading, distributing or copying it.
>> ___ Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>
>
> --
> *Jani Tykkä*
> Development Manager | BroadSoft, Inc. | +358 44 596 0587 |
> jty...@broadsoft.com
>
>
> This email is intended solely for the person or entity to which it is
> addressed and may contain confidential and/or privileged information. If
> you are not the intended recipient and have received this email in error,
> please notify BroadSoft, Inc. immediately by replying to this message, and
> destroy all copies of this message, along with any attachment, prior to
> reading, distributing or copying it.
>



-- 
*Jani Tykkä*
Development Manager | BroadSoft, Inc. | +358 44 596 0587 |
jty...@broadsoft.com

-- 


This email is intended solely for the person or entity to which it is 
addressed and may contain confidential and/or privileged information. If 
you are not the intended recipient and have received this email in error, 
please notify BroadSoft, Inc. immediately by replying to this message, and 
destroy all copies of this message, along with any attachment, prior to 
reading, distributing or copying it.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] User Auth Confirmation on account.qt.io

2016-03-19 Thread Jason H
Just curious why this is always happening to me. I'm not seeing why I need to 
confirm it every time?

I do have multiple qt.io accounts, but I use incognito mode to maintain 
seperate logins when needed.
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML Image

2016-03-19 Thread Jason H
A picture would help
 

Sent: Thursday, March 17, 2016 at 1:15 AM
From: "Jani Tykka" 
To: "Jason H" 
Cc: "interest@qt-project.org Interest" 
Subject: Re: [Interest] QML Image


Source size was already set as the original image size. When mipmap is set colors seems to be even more distorted.

 
On Wed, Mar 16, 2016 at 10:45 PM, Jason H  wrote:





Since you mention gradients, try setting source size or the mipmap properties. I wonder if you're getting some subsampling issue.

 

 

Sent: Wednesday, March 16, 2016 at 8:26 AM
From: "Jani Tykka" 
To: "interest@qt-project.org Interest" 
Subject: [Interest] QML Image





Hi,

 
I'm using Qt 5.5.1. When quick2 window renders png-image defined in QML Image element it seems that colors are not rendered exactly as defined in source png-image. This seems to happen on images which have more complicated color fills, like gradients. Is there anything that can be done to achieve exact presentation from source image? Any explanation what is causing the difference?

 

Thanks,

Jani 






 

This email is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. If you are not the intended recipient and have received this email in error, please notify BroadSoft, Inc. immediately by replying to this message, and destroy all copies of this message, along with any attachment, prior to reading, distributing or copying it.
___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest







 

 
--


Jani Tykkä 
Development Manager | BroadSoft, Inc. | +358 44 596 0587 | jty...@broadsoft.com


 



 

This email is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. If you are not the intended recipient and have received this email in error, please notify BroadSoft, Inc. immediately by replying to this message, and destroy all copies of this message, along with any attachment, prior to reading, distributing or copying it.




___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread René J . V . Bertin
On Thursday March 17 2016 17:14:45 Samuel Gaist wrote:

> Hi,
> 
> Looks like it's not using
> 
> QMAKE_CXXFLAGS+= -stdlib=libc++
> QMAKE_LFLAGS  += -stdlib=libc++
> 
> However, why, I don't know.

Good eye, that's it! At least the compile command cited completes OK with that 
additional option.

Why ... maybe something/someone somewhere considered that the option should be 
redundant, and maybe it is on later OS X versions (as indeed it should).

I'll experiment some more (including with a bone stock qtbase) and see if I can 
trace this to a difference somewhere in the mkspecs files.

Thanks,
René
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly delete qApp?

2016-03-19 Thread Nikos Chantziaras

On 16/03/16 16:12, Jan Kundrát wrote:

On Wednesday, 16 March 2016 15:07:30 CET, Nikos Chantziaras wrote:

  QApplication app = new QApplication(/* ... */);
  app->exec();
  delete app;


There's no point to use heap allocation in this context. You can simply
create a QApplication instance on stack in your main.


Indeed. But I needed an example with a pointer. If you use a stack 
object, you'd obviously never have the problem of deleting it to begin 
with :-)


The point is, you *do* delete qApp *if* it's on the heap, but most 
people who do have qApp on the heap don't bother with delete, since the 
process exits anyway. Since in the OP's case the process doesn't exit, 
qApp should actually be deleted.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt Maintenance Tool mirror selection

2016-03-19 Thread BOUCARD Olivier
There is one here https://bugreports.qt.io/browse/QTIFW-441Existing for more 
than 2 years.
 

Le Vendredi 18 mars 2016 11h39, Rutledge Shawn 
 a écrit :
 

 Please write a bug about this if you haven’t yet.

On 18 Mar 2016, at 10:36, BOUCARD Olivier  wrote:
Yes this is pretty frustrating.

Le Vendredi 18 mars 2016 11h07, Shantanu Tushar  a écrit :




On Fri, Mar 18, 2016 at 2:30 PM, BOUCARD Olivier 
wrote:

I did not knew it was existing.Thanks, I'll try this.

Le Vendredi 18 mars 2016 10h54, Samuel Gaist  a écrit 
:


On 18 mars 2016, at 08:57, BOUCARD Olivier  wrote:

> Hi,
> 
> Is it possible to manually select a mirror and to force the Maintenance Tool 
> to use it?
> Because I'm in Cyprus which for dumb reason is considered in Asia??? So I'm 
> connected to some mirror in China from where I get 5Kbps download speed.


Guess what, even people from India get that mirror and still get 5Kbps speed. I 
introduce people to Qt and have no answer when they ask "So this has been the 
case for all these years and no one cares to fix it?".
 

> Please also fix this issue, Linux distros are able to select a proper mirror 
> so you can do it too.
> I want to update to Qt 5.6 and latest QtCreator and I cannot because of this.
> 
> Thank you
> 
> PS: BTW I have the same issue on the qt.io website when I download but at 
> least here I have the possibility to manually select another mirror.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

Hi,

You can use the QtSdkRepoChooser for the maintenance tool:

https://github.com/JKSH/QtSdkRepoChooser

Samuel



Tip: Every time there is a new Qt release, you need to generate the repo files 
again using QtSdkRepoChooser or you won't see the update
 





___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest





-- 
Shantanu Tushar    (UTC +0530)
shantanu.io

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest




  ___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QML Image

2016-03-19 Thread Jason H

Since you mention gradients, try setting source size or the mipmap properties. I wonder if you're getting some subsampling issue.

 

 

Sent: Wednesday, March 16, 2016 at 8:26 AM
From: "Jani Tykka" 
To: "interest@qt-project.org Interest" 
Subject: [Interest] QML Image



Hi,

 
I'm using Qt 5.5.1. When quick2 window renders png-image defined in QML Image element it seems that colors are not rendered exactly as defined in source png-image. This seems to happen on images which have more complicated color fills, like gradients. Is there anything that can be done to achieve exact presentation from source image? Any explanation what is causing the difference?

 

Thanks,

Jani 

 



 

This email is intended solely for the person or entity to which it is addressed and may contain confidential and/or privileged information. If you are not the intended recipient and have received this email in error, please notify BroadSoft, Inc. immediately by replying to this message, and destroy all copies of this message, along with any attachment, prior to reading, distributing or copying it.
___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Are slots even needed these days?

2016-03-19 Thread Nikos Chantziaras

On 16/03/16 16:24, Nikos Chantziaras wrote:

Since in modern Qt you connect signals to functions/lambdas, is there a
reason to declare slots anymore?  [...]


Good replies here. So, to sum it up, it seems that slot/signal 
declarations and old-style connect() syntax will continue to have a 
place in Qt due to:


 * QML signals/slots.
 * QObject runtime reflection (invokeMethod() as the most common use.)
 * Easy dynamic connections (signal/slot names unknown at compile time.)
 * Qt Designer automatic signal/slot connection generation.
 * Easy overload resolution (but Qt 5.7 fixes that with qOverload().)

There's also code documenting issues, but these are subjective.

So I'll be keeping the signal/slot declarations. I was considering to 
remove them for the next major version of one of my projects, but it 
would be rather unfortunate to then have to re-introduce some of them 
later on because I want to use QML or might need reflection capabilities.


So using PMF syntax but keeping the signal/slot declarations seems like 
the way to go for me.


Thanks everyone for the helpful feedback! :-)

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [OS X] Qt 5.6.0 minimal build configuration (error compiling qlatincodec.cpp)

2016-03-19 Thread Thiago Macieira
On quinta-feira, 17 de março de 2016 18:38:40 PDT René J. V. Bertin wrote:
> Couple observations:
> - I am doing nothing different from what I'm doing while building Qt 5.5.1
> - -stdlib=libc++ appear to be missing only from CXXFLAGS in the Makefiles
> under qtbase/src/tools

Hmm... those are "bootstrapped" tools. But I can't find anything that overrides 
QMAKE_CXXFLAGS.

> - it is the only option that's missing

But you've got things that you shouldn't have. Most likely, whatever added 
-march=native did so by overriding QMAKE_CXXFLAGS.

> While you may be right that my (intention of) adding compilation options is
> somehow involved, I don't think that's the "bug" (and I'd hope that it'd be
> supported).

The proper way of adding options is to modify the mkspec's qmake.conf file or 
to create a new one that include()s the standard one. Anything else is not 
tested.

> Checking my build scripts, I can confirm that CFLAGS and CXXFLAGS are set
> *through the environment*, not by any direct action of mine.

Yeah, not tested. This is the cause of your problem.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] bug with # in URL when using setUrl?

2016-03-19 Thread Larry Martell
On Wed, Mar 16, 2016 at 12:04 PM, Konstantin Tokarev  wrote:
>
>
> 16.03.2016, 18:39, "Larry Martell" :
>>  On Wed, Mar 16, 2016 at 6:29 AM, Konstantin Tokarev  
>> wrote:
>>>   16.03.2016, 02:15, "Larry Martell" :
   -How can I debug the Angular code?
>>>
>>>   QtWebKit has developer tools. You need to create QWebInspector, set 
>>> QWebPage to it,
>>>   and enable QWebSettings::DeveloperExtrasEnabled
>>>
>>>   You will get error console, JS debugger, and other goodies.
>>
>>  This sounds very promising but I can't quite figure out how to use it.
>>
>>  I have this JS code that's somehow downloaded (I assume by nginx). How
>>  do I integrate QWebInspector and QWebPage into the Qt app so they can
>>  access that code?
>
> In the beginning you've mentioned that you have QWebView. That's enough, you 
> can get QWebPage using page() method, you can create QWebInspector as a 
> separate widget (see code example in docs), call its setPage() method and 
> show it somewhere

Thanks. This is what I was doing before:

ui->webView->setUrl(url);

And I commented that out and I have this now:

  Dialog = new QDialog(this);
  ui->webView->setPage(url);
  QWebPage *page = ui->webView->page();
  QWebInspector *inspector = new QWebInspector(Dialog);
  inspector->setPage(page);
  Dialog->show();

Problem is that url is a QUrl and setPage wants a QWebPage *

(If you couldn't tell I am brand new to Qt.)
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest