[Interest] Compile a debug build and link with release Qt

2017-01-10 Thread Etienne Sandré-Chardonnal
Hi,

What is the most simple way with QtCreator/qmake to set up a target for
debugging a project while linking with a release Qt ?

I have a project which takes forever to link in debug mode, and the
executable is 600MB large. Since 95% of the time I am debugging code which
is not interacting with the Qt API, I do not need to debug through Qt code.

The RELEASE qmake flag basically switches everything.

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


[Interest] Suppressing Q_ASSERT on release builds

2017-01-10 Thread Jani Tykka
Hi,

I'm trying to suppress Q_ASSERT to trigger assertion from qtwebengine
on release build.

It seems that QT_NO_DEBUG doesn't get defined when 3rd party libraries
are built. Which means that if any 3rd party component includes
qglobal.h will then end up defining Q_ASSERT in a way which is not
desired for release builds.

If I explicitly define precompiler macro during "configure" then that
will be seen by 3rd party components.

I think this is problem in Qt build system. QT_NO_DEBUG should end up
to all components being build. Any thoughts, ideas, experience on this
area? How to get this fixed? Of course I can define QT_NO_DEBUG in
configure, but then in case when I want to build with
--debug-and-release I'd need to make to separate builds to allow
assertions on with debug builds.

Thanks

-- 


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] Compile a debug build and link with release Qt

2017-01-10 Thread Jean-Michaël Celerier
On Tue, Jan 10, 2017 at 2:22 PM, Etienne Sandré-Chardonnal <
etienne.san...@m4x.org> wrote:

> and the executable is 600MB large


If you're on linux, you could try debug fission, it makes for a much better
experience : https://gcc.gnu.org/wiki/DebugFission
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Compile a debug build and link with release Qt

2017-01-10 Thread Thiago Macieira
Em terça-feira, 10 de janeiro de 2017, às 14:22:45 PST, Etienne Sandré-
Chardonnal escreveu:
> Hi,
> 
> What is the most simple way with QtCreator/qmake to set up a target for
> debugging a project while linking with a release Qt ?
> 
> I have a project which takes forever to link in debug mode, and the
> executable is 600MB large. Since 95% of the time I am debugging code which
> is not interacting with the Qt API, I do not need to debug through Qt code.
> 
> The RELEASE qmake flag basically switches everything.

I'm guessing you're talking about Windows, which has different and 
incompatible builds of debug and release libraries. Actually, that applies 
only to Visual Studio -- the MinGW DLLs are compatible with each other.

But your question does not make sense. The linking time applies only to your 
own code. If you're debugging, you need to build your own code in debug mode 
and since the linking time is proportional to the size of your own codebase, 
it'll be as slow as it needs to be.

-- 
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] Suppressing Q_ASSERT on release builds

2017-01-10 Thread Thiago Macieira
Em terça-feira, 10 de janeiro de 2017, às 15:23:32 PST, Jani Tykka escreveu:
> It seems that QT_NO_DEBUG doesn't get defined when 3rd party libraries
> are built. Which means that if any 3rd party component includes
> qglobal.h will then end up defining Q_ASSERT in a way which is not
> desired for release builds.

Are you talking about 3rdparty components that are used inside Qt? Which one 
is including qglobal.h?

> If I explicitly define precompiler macro during "configure" then that
> will be seen by 3rd party components.
> 
> I think this is problem in Qt build system. QT_NO_DEBUG should end up
> to all components being build. Any thoughts, ideas, experience on this
> area? How to get this fixed? Of course I can define QT_NO_DEBUG in
> configure, but then in case when I want to build with
> --debug-and-release I'd need to make to separate builds to allow
> assertions on with debug builds.

QT_NO_DEBUG is defined if you compile in release mode. It's right there in 
qt.prf:

CONFIG(release, debug|release):DEFINES += QT_NO_DEBUG

The macro wouldn't get defined if the .pro file does CONFIG -= qt. Can you 
point 
to which one(s) those are?


-- 
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] Compile a debug build and link with release Qt

2017-01-10 Thread Etienne Sandré-Chardonnal
Hi Thiago,

I am using MinGW, but I link Qt statically. This perfectly makes sense! But
I forgot to mention it...

2017-01-10 16:31 GMT+01:00 Thiago Macieira :

> Em terça-feira, 10 de janeiro de 2017, às 14:22:45 PST, Etienne Sandré-
> Chardonnal escreveu:
> > Hi,
> >
> > What is the most simple way with QtCreator/qmake to set up a target for
> > debugging a project while linking with a release Qt ?
> >
> > I have a project which takes forever to link in debug mode, and the
> > executable is 600MB large. Since 95% of the time I am debugging code
> which
> > is not interacting with the Qt API, I do not need to debug through Qt
> code.
> >
> > The RELEASE qmake flag basically switches everything.
>
> I'm guessing you're talking about Windows, which has different and
> incompatible builds of debug and release libraries. Actually, that applies
> only to Visual Studio -- the MinGW DLLs are compatible with each other.
>
> But your question does not make sense. The linking time applies only to
> your
> own code. If you're debugging, you need to build your own code in debug
> mode
> and since the linking time is proportional to the size of your own
> codebase,
> it'll be as slow as it needs to be.
>
> --
> 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 mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Compile a debug build and link with release Qt

2017-01-10 Thread Thiago Macieira
On terça-feira, 10 de janeiro de 2017 16:38:45 PST Etienne Sandré-Chardonnal 
wrote:
> Hi Thiago,
> 
> I am using MinGW, but I link Qt statically. This perfectly makes sense! But
> I forgot to mention it...

And your answer lies right there.

-- 
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] Compile a debug build and link with release Qt

2017-01-10 Thread Etienne Sandré-Chardonnal
I might be tired but I do not see...

I know that if I compile manually, I can use the "-g" flag for debugging,
and link with the release Qt library files.

But, if I qmake with CONFIG+=RELEASE, qt links with the release library,
sets -O2 and does not produce debugging info.

This means I would need to change the mkspec files, but I still want to
keep a true release mode

Is there a better way?

Etienne

2017-01-10 16:54 GMT+01:00 Thiago Macieira :

> On terça-feira, 10 de janeiro de 2017 16:38:45 PST Etienne
> Sandré-Chardonnal
> wrote:
> > Hi Thiago,
> >
> > I am using MinGW, but I link Qt statically. This perfectly makes sense!
> But
> > I forgot to mention it...
>
> And your answer lies right there.
>
> --
> 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 mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Needed working stop/start for animated SVG

2017-01-10 Thread Serge K via Interest
I created widget with animated SVG for my projects. It starts after loading if 
signal svg->repaintNeeded() is connected to update() of my widget. To stop and 
restart it I found a hack - disconnect this signal and reload SVG image. In 
Windows and Linux this stops animation. Stupid but working. But now I use this 
widget for project on Andriod (using QML is not the way, QML is too weak and 
lame for me). But I cannot stop SVG animation on Android. It runs always. It 
does not depend from any connections, framerate, reloading, so on. Of course I 
can use another hack - to stop animation I can load non-animated image and to 
start I can load animated again.

BUT... This looks too much "micro$oftish" and stupid. NOT A Qt WAY. And with 
this hack animation won't stop in it's "current" position - it will always 
start from beginning. I do not need this.

Of course I could patch Qt code and rewrite QSvgRenderer class. I could add 
start() and stop() functions to control internal d->timer - it emits ticks for 
animation frames. BUT WHY THIS WAS  NOT DONE BEFORE??? :-(((

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


Re: [Interest] Needed working stop/start for animated SVG

2017-01-10 Thread Konstantin Tokarev


10.01.2017, 20:37, "Serge K via Interest" :
> I created widget with animated SVG for my projects. It starts after loading 
> if signal svg->repaintNeeded() is connected to update() of my widget. To stop 
> and restart it I found a hack - disconnect this signal and reload SVG image. 
> In Windows and Linux this stops animation. Stupid but working. But now I use 
> this widget for project on Andriod (using QML is not the way, QML is too weak 
> and lame for me). But I cannot stop SVG animation on Android. It runs always. 
> It does not depend from any connections, framerate, reloading, so on. Of 
> course I can use another hack - to stop animation I can load non-animated 
> image and to start I can load animated again.
>
> BUT... This looks too much "micro$oftish" and stupid. NOT A Qt WAY. And with 
> this hack animation won't stop in it's "current" position - it will always 
> start from beginning. I do not need this.
>
> Of course I could patch Qt code and rewrite QSvgRenderer class. I could add 
> start() and stop() functions to control internal d->timer - it emits ticks 
> for animation frames. BUT WHY THIS WAS NOT DONE BEFORE??? :-(((

Because you haven't done it

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


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


Re: [Interest] Needed working stop/start for animated SVG

2017-01-10 Thread Serge K via Interest

SVG animation appeared first in Qt 4.1. I used it in Qt 5. 

Just needed stop and start timer with two methods. WHY THIS WAS NOT DONE 
BEFORE??? IN FIRST 4.1 RELEASE? :-(((

>Вторник, 10 января 2017, 20:41 +03:00 от Konstantin Tokarev 
>:
>
>
>
>10.01.2017, 20:37, "Serge K via Interest" < interest@qt-project.org >:
>> I created widget with animated SVG for my projects. It starts after loading 
>> if signal svg->repaintNeeded() is connected to update() of my widget. To 
>> stop and restart it I found a hack - disconnect this signal and reload SVG 
>> image. In Windows and Linux this stops animation. Stupid but working. But 
>> now I use this widget for project on Andriod (using QML is not the way, QML 
>> is too weak and lame for me). But I cannot stop SVG animation on Android. It 
>> runs always. It does not depend from any connections, framerate, reloading, 
>> so on. Of course I can use another hack - to stop animation I can load 
>> non-animated image and to start I can load animated again.
>>
>> BUT... This looks too much "micro$oftish" and stupid. NOT A Qt WAY. And with 
>> this hack animation won't stop in it's "current" position - it will always 
>> start from beginning. I do not need this.
>>
>> Of course I could patch Qt code and rewrite QSvgRenderer class. I could add 
>> start() and stop() functions to control internal d->timer - it emits ticks 
>> for animation frames. BUT WHY THIS WAS NOT DONE BEFORE??? :-(((
>
>Because you haven't done it
>
>>
>> --
>> Serge K ,
>>
>> ___
>> Interest mailing list
>>  Interest@qt-project.org
>>  http://lists.qt-project.org/mailman/listinfo/interest
>
>
>-- 
>Regards,
>Konstantin

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


Re: [Interest] Compile a debug build and link with release Qt

2017-01-10 Thread Thiago Macieira
Em terça-feira, 10 de janeiro de 2017, às 17:08:56 PST, Etienne Sandré-
Chardonnal escreveu:
> I might be tired but I do not see...

Don't do static linking while debugging.

> I know that if I compile manually, I can use the "-g" flag for debugging,
> and link with the release Qt library files.
> 
> But, if I qmake with CONFIG+=RELEASE, qt links with the release library,
> sets -O2 and does not produce debugging info.

Right.

> This means I would need to change the mkspec files, but I still want to
> keep a true release mode

Hack: delete the *d.a files and rename the release *.a over them.

-- 
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] Qt 5.7+ and Command+Shift shortcuts on Mac

2017-01-10 Thread René J . V . Bertin
On Sunday January 8 2017 23:47:26 Samuel Gaist wrote:

Hi,

>https://bugreports.qt.io/browse/QTBUG-57990 is about a similar problem for 
>Ubuntu.
>Coming from this https://forum.qt.io/topic/74872/ forum thread.
>
>5.7.0 works correctly for him but not 5.7.1

Thanks for this. I added my 2 cents to the bug report.

Sadly I skipped 5.7.0 so I don't know if my issue existed there. What I do know 
is that there are some reasons to believe that the Command+Shift shortcut issue 
is due to a regression in the Cocoa plugin, but that the only distinctive 
differences in that part of the code that are clearly related to shortcuts are 
apparently not to blame. (Easy to revert and that didn't solve anything for me.)

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


Re: [Interest] Needed working stop/start for animated SVG

2017-01-10 Thread Jason H
Well android wasn't around in 4.1 days... it seems the Android drawable system is running the animation, not Qt. 
 

Sent: Tuesday, January 10, 2017 at 12:55 PM
From: "Serge K via Interest" 
To: interest 
Subject: Re: [Interest] Needed working stop/start for animated SVG


SVG animation appeared first in Qt 4.1. I used it in Qt 5.

Just needed stop and start timer with two methods. WHY THIS WAS NOT DONE BEFORE??? IN FIRST 4.1 RELEASE? :-(((
 
Вторник, 10 января 2017, 20:41 +03:00 от Konstantin Tokarev :
 






10.01.2017, 20:37, "Serge K via Interest" :
> I created widget with animated SVG for my projects. It starts after loading if signal svg->repaintNeeded() is connected to update() of my widget. To stop and restart it I found a hack - disconnect this signal and reload SVG image. In Windows and Linux this stops animation. Stupid but working. But now I use this widget for project on Andriod (using QML is not the way, QML is too weak and lame for me). But I cannot stop SVG animation on Android. It runs always. It does not depend from any connections, framerate, reloading, so on. Of course I can use another hack - to stop animation I can load non-animated image and to start I can load animated again.
>
> BUT... This looks too much "micro$oftish" and stupid. NOT A Qt WAY. And with this hack animation won't stop in it's "current" position - it will always start from beginning. I do not need this.
>
> Of course I could patch Qt code and rewrite QSvgRenderer class. I could add start() and stop() functions to control internal d->timer - it emits ticks for animation frames. BUT WHY THIS WAS NOT DONE BEFORE??? :-(((

Because you haven't done it

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


--
Regards,
Konstantin





___ 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


[Interest] Fwd: Re[2]: Needed working stop/start for animated SVG

2017-01-10 Thread Serge K via Interest

May be - then this is a bug in Qt for Android. Right now I found another bug - 
QSound::play() in Android stops playing WAV after several times if playing fast.

>Вторник, 10 января 2017, 21:56 +03:00 от "Jason H" < jh...@gmx.com >:
>
>Well android wasn't around in 4.1 days... it seems the Android drawable system 
>is running the animation, not Qt. 
> 
>Sent:  Tuesday, January 10, 2017 at 12:55 PM
>From:  "Serge K via Interest" < interest@qt-project.org >
>To:  interest < interest@qt-project.org >
>Subject:  Re: [Interest] Needed working stop/start for animated SVG
>
>SVG animation appeared first in Qt 4.1. I used it in Qt 5.
>
>Just needed stop and start timer with two methods. WHY THIS WAS NOT DONE 
>BEFORE??? IN FIRST 4.1 RELEASE? :-(((
>  Вторник, 10 января 2017, 20:41 +03:00 от Konstantin Tokarev < 
>annu...@yandex.ru >:
>> 
>>
>>
>>10.01.2017, 20:37, "Serge K via Interest" < interest@qt-project.org >:
>>> I created widget with animated SVG for my projects. It starts after loading 
>>> if signal svg->repaintNeeded() is connected to update() of my widget. To 
>>> stop and restart it I found a hack - disconnect this signal and reload SVG 
>>> image. In Windows and Linux this stops animation. Stupid but working. But 
>>> now I use this widget for project on Andriod (using QML is not the way, QML 
>>> is too weak and lame for me). But I cannot stop SVG animation on Android. 
>>> It runs always. It does not depend from any connections, framerate, 
>>> reloading, so on. Of course I can use another hack - to stop animation I 
>>> can load non-animated image and to start I can load animated again.
>>>
>>> BUT... This looks too much "micro$oftish" and stupid. NOT A Qt WAY. And 
>>> with this hack animation won't stop in it's "current" position - it will 
>>> always start from beginning. I do not need this.
>>>
>>> Of course I could patch Qt code and rewrite QSvgRenderer class. I could add 
>>> start() and stop() functions to control internal d->timer - it emits ticks 
>>> for animation frames. BUT WHY THIS WAS NOT DONE BEFORE??? :-(((
>>
>>Because you haven't done it
>>
>>>
>>> --
>>> Serge K ,
>>>
>>> ___
>>> Interest mailing list
>>>  Interest@qt-project.org
>>>  http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>>--
>>Regards,
>>Konstantin
>___ 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] initialising a dictionary-type container instance with a static table?

2017-01-10 Thread Hamish Moffatt

On 03/01/17 09:25, René J. V. Bertin wrote:

Thiago Macieira wrote:


Qt 5.7 and up requires C++11, including initialiser lists.

FWIW: I understand that should be available even on OS X 10.7 when you install a
recent libc++ and clang compiler. Not for the faint of heart, and it won't
compensate for any missing ObjC features.



We use Qt 5.6 on OS X 10.11 with standard Xcode and C++11 support is 
fine, including runtime on OS X back to 10.7. No special library 
installation required.


Qt 5.7 requires at least OS X 10.8 to run though, according to 
https://wiki.qt.io/Qt-5.7.0-tools-and-versions . I'm not sure why.


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


Re: [Interest] initialising a dictionary-type container instance with a static table?

2017-01-10 Thread Thiago Macieira
On quarta-feira, 11 de janeiro de 2017 10:27:50 PST Hamish Moffatt wrote:
> Qt 5.7 requires at least OS X 10.8 to run though, according to
> https://wiki.qt.io/Qt-5.7.0-tools-and-versions . I'm not sure why.

Because we dropped support by removing deprecated function calls.

Qt 5.8 requires 10.9 and Qt 5.9 will require 10.10.

-- 
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] Qt 5.7+ and Command+Shift shortcuts on Mac

2017-01-10 Thread Andy Shaw
I have been doing some patches lately (i.e. yesterday and the day before) to 
fix shortcuts (these have been reported on JIRA already too) on Cocoa so I 
don’t know if this is addressed already in Qt 5.8.x as a result. But it might 
be worth keeping an eye on that to see if it is working there too.

Andy

Interest på vegne av René J.V. Bertin 
 skrev følgende den 10.01.2017, 19.55:

On Sunday January 8 2017 23:47:26 Samuel Gaist wrote:

Hi,

>https://bugreports.qt.io/browse/QTBUG-57990 is about a similar problem for 
Ubuntu.
>Coming from this https://forum.qt.io/topic/74872/ forum thread.
>
>5.7.0 works correctly for him but not 5.7.1

Thanks for this. I added my 2 cents to the bug report.

Sadly I skipped 5.7.0 so I don't know if my issue existed there. What I do 
know is that there are some reasons to believe that the Command+Shift shortcut 
issue is due to a regression in the Cocoa plugin, but that the only distinctive 
differences in that part of the code that are clearly related to shortcuts are 
apparently not to blame. (Easy to revert and that didn't solve anything for me.)

R.
___
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


[Interest] suppressing "modalSession has been exited prematurely - check for a reentrant call to endModalSession:"

2017-01-10 Thread Frank Rueter | OHUfx

Hi all,

happy 2017!

In my current GUI code I have a few simple QDialogs that are called via 
their exec_() methods.
Unfortunately with the version of QT that I have to use there is this 
bug  that spits out this 
warning under OSX when such modal dialogs are closed again:
"modalSession has been exited prematurely - check for a reentrant 
call to endModalSession"



I may re-write the code to use QDialog.open() instead and refactor 
everything so use QDialog's respective signals.
But before I do that I thought I'd check in to see of there is an easy 
way to suppress this warning as it is benign afaik?!


Cheers,
frank


--
ohufxLogo 50x50  	*vfx compositing 
 | *workflow customisation 
and consulting * *


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