Re: [Interest] QMake contains and include

2020-05-20 Thread André Pönitz
On Wed, May 20, 2020 at 04:30:41PM +, Jérôme Godbout wrote:
>It kinda work, it’s really weird, but all the project get display, the
>.pri and the include/source no matter the condition, but they are grey
>out if the include condition is false, so it does scan the .pri no
>matter what but doesn’t really include them to be used only for
>display!?! So I got all the optional part display but not really used.
>The compile seem to work. This leave an horrible UX view for developer
>to see part that aren’t used but source is display and searchable for
>the project!
> 
> 
>I think I can live with it but this is an horrible UX to display those
>include no matter the condition that include them or not, here what it
>does (image in attachment) with:

I guess you also would prefer refactorings, searches for occurences of
symbols and translatable strings not to happen in branches of your
project that are currently not active.

That's not the case for everybody.

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


Re: [Interest] QMake contains and include

2020-05-20 Thread Thiago Macieira
On Wednesday, 20 May 2020 10:39:50 PDT Jérôme Godbout wrote:
> If I may, why I want that in QtCreator exactly? what is the use case for
> this? If my project doesn't use a part, why is it parsed at all? What will
> happen if that unused .pri make a failure for something missing? Will it
> failed to load the project and stop? let's say I have an option that
> require an interaction with another subrepos, one project might not need
> that part and not have it checkout, the .pri that interact with it would
> not be include, how would QtCreator react to this?

Are those two source files not part of your project? If they are, then they 
should be included in the file listing. I assume you sometimes edit them.

The Qt Creator ProParser code has some different error recovery mechanisms 
than qmake. Obviously it's going to be non-fatal to interact with a repository 
that is missing. It will also not run $$system() and do some other things that 
qmake would.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



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


Re: [Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
Sorry about that, yeah it's QtCreator, I figure out it was displaying the 
unused .pri along all the file inclusion of it. At first I was thinking it was 
including the .pri straight since I could see it, then I realized the source, 
headers and resources files was gray out, which seem to indicate it won't be 
used. The compiler seem to do the right thing. It was very confusing to see the 
non included .pri showing up along their content.

If I may, why I want that in QtCreator exactly? what is the use case for this? 
If my project doesn't use a part, why is it parsed at all? What will happen if 
that unused .pri make a failure for something missing? Will it failed to load 
the project and stop? let's say I have an option that require an interaction 
with another subrepos, one project might not need that part and not have it 
checkout, the .pri that interact with it would not be include, how would 
QtCreator react to this?

Thanks,

-Original Message-
From: Interest  On Behalf Of Thiago Macieira
Sent: May 20, 2020 1:23 PM
To: interest@qt-project.org
Subject: Re: [Interest] QMake contains and include

On Wednesday, 20 May 2020 09:30:41 PDT Jérôme Godbout wrote:
> It kinda work, it’s really weird, but all the project get display, the 
> .pri and the include/source no matter the condition, but they are grey 
> out if the include condition is false, so it does scan the .pri no 
> matter what but doesn’t really include them to be used only for 
> display!?! So I got all the optional part display but not really used. 
> The compile seem to work. This leave an horrible UX view for developer 
> to see part that aren’t used but source is display and searchable for the 
> project!

Are you talking about qmake or about Qt Creator's .pro file parsing?

Qt Creator evaluates all conditions, including false ones, so it can gather all 
dependencies and all possibilities. For example, if you had:

contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n): \
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
else: \
SOURCES += $$AMOTUS_Qt_PATH/no-i18n.cpp

Then Qt Creator should display both files in your file listing. You *want* that.

But qmake will follow only one code path when generating your Makefile.

So please be precise: are you talking about Qt Creator or are you talking about 
the actual build?
--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



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


Re: [Interest] Qt 5.12.x LTS

2020-05-20 Thread Thiago Macieira
On Wednesday, 20 May 2020 07:42:58 PDT Ramakanth Kesireddy wrote:
> Can you let me know if the mentioned security fixes are available in
> earlier LTS releases like Qt 5.6.3?

Please read the CVE announcement. It says which releases were affected and 
which ones would get the fix. It was explicit about 5.6.3.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



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


Re: [Interest] QMake contains and include

2020-05-20 Thread Thiago Macieira
On Wednesday, 20 May 2020 09:30:41 PDT Jérôme Godbout wrote:
> It kinda work, it’s really weird, but all the project get display, the .pri
> and the include/source no matter the condition, but they are grey out if
> the include condition is false, so it does scan the .pri no matter what but
> doesn’t really include them to be used only for display!?! So I got all the
> optional part display but not really used. The compile seem to work. This
> leave an horrible UX view for developer to see part that aren’t used but
> source is display and searchable for the project!

Are you talking about qmake or about Qt Creator's .pro file parsing?

Qt Creator evaluates all conditions, including false ones, so it can gather 
all dependencies and all possibilities. For example, if you had:

contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n): \
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
else: \
SOURCES += $$AMOTUS_Qt_PATH/no-i18n.cpp

Then Qt Creator should display both files in your file listing. You *want* 
that.

But qmake will follow only one code path when generating your Makefile.

So please be precise: are you talking about Qt Creator or are you talking 
about the actual build?
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products



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


Re: [Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
It kinda work, it’s really weird, but all the project get display, the .pri and 
the include/source no matter the condition, but they are grey out if the 
include condition is false, so it does scan the .pri no matter what but doesn’t 
really include them to be used only for display!?! So I got all the optional 
part display but not really used. The compile seem to work. This leave an 
horrible UX view for developer to see part that aren’t used but source is 
display and searchable for the project!

I think I can live with it but this is an horrible UX to display those include 
no matter the condition that include them or not, here what it does (image in 
attachment) with:
if(true) {
include(Amotus_Qt_GUI.pri)
}
if(false){
include(Amotus_Qt_Commands.pri)
}


From: gm...@ratijas.tk 
Sent: May 20, 2020 11:41 AM
To: Jérôme Godbout ; interest@qt-project.org
Subject: Re: [Interest] QMake contains and include

qmake is strange, it implements custom syntax and grammar. Don't search for any 
deep logic there. It will be superseded by CMake soon anyway.

About your issue, I looked it up on DuckDuckGo, and the first result is the 
discussion on StackOverflow which looks like it:
https://stackoverflow.com/questions/46078270/qmake-scope-syntax-with-contains-function

Hope that helps somehow~

20.05.2020, 18:29, "Jérôme Godbout" 
mailto:godbo...@amotus.ca>>:

Sorry for the noise, but I did found a way simpler example to test this:



if(false){

  message(“Pass here”)

  include(“myfile.pri”)

}



myfile.pri is always included no matter what, but the message is not printed! 
this is really counter intuitive. Any way to make a conditional include?!?





From: Interest 
mailto:interest-boun...@qt-project.org>> On 
Behalf Of Jérôme Godbout
Sent: May 20, 2020 11:17 AM
To: interest@qt-project.org
Subject: [Interest] QMake contains and include



Hi,

QMAKE question: anybody manage to use an include inside a contains(){} into 
QMake? the include is processed no matter what!?!

message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){
message("Using i18n...")
HEADERS += $$AMOTUS_Qt_PATH/i18n.h
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
include(i18n.pri)
}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){
message("Using Amotus_Qt_Network...")
include(Amotus_Qt_Network.pri)
}

If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18n
The message print:

Project MESSAGE: list: 'i18n'
Project MESSAGE: Using i18n...

The message is correct. But I get both the i18n.pri and the 
Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the 
variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =
I get the following:

Project MESSAGE: list: ''

The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the 
i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but 
not include!?! is include special or parsed without any consideration of the 
scope?! I did try to close QtCreator and reopen without luck (using QtCreator 
4.12.0 on Mac OS)


,

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


[Interest] Qt .clang-format style

2020-05-20 Thread Doogster
Here's my attempt at a .clang-format file that matches Qt Creator's
default, built-in "Qt" style. What do you think?

BasedOnStyle: WebKit
AllowShortIfStatementsOnASingleLine: Always
BraceWrapping:
  AfterCaseLabel:  true
  AfterClass:  true
  AfterControlStatement: true
  AfterEnum:   true
  AfterFunction:   true
  AfterNamespace:  true
  AfterObjCDeclaration: true
  AfterStruct: true
  AfterUnion:  true
  AfterExternBlock: true
  BeforeCatch: true
  BeforeElse:  true
  SplitEmptyFunction: false
  SplitEmptyRecord: false
  SplitEmptyNamespace: false
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakBeforeBraces: Custom
NamespaceIndentation: None
PointerAlignment: Right
SpaceInEmptyBlock: false
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread gmail
qmake is strange, it implements custom syntax and grammar. Don't search for any deep logic there. It will be superseded by CMake soon anyway. About your issue, I looked it up on DuckDuckGo, and the first result is the discussion on StackOverflow which looks like it:https://stackoverflow.com/questions/46078270/qmake-scope-syntax-with-contains-function Hope that helps somehow~ 20.05.2020, 18:29, "Jérôme Godbout" :Sorry for the noise, but I did found a way simpler example to test this: if(false){  message(“Pass here”)  include(“myfile.pri”)} myfile.pri is always included no matter what, but the message is not printed! this is really counter intuitive. Any way to make a conditional include?!?  From: Interest  On Behalf Of Jérôme GodboutSent: May 20, 2020 11:17 AMTo: interest@qt-project.orgSubject: [Interest] QMake contains and include Hi,QMAKE question: anybody manage to use an include inside a contains(){} into QMake? the include is processed no matter what!?!message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){    message("Using i18n...")    HEADERS += $$AMOTUS_Qt_PATH/i18n.h    SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp    include(i18n.pri)}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){    message("Using Amotus_Qt_Network...")    include(Amotus_Qt_Network.pri)}If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18nThe message print:Project MESSAGE: list: 'i18n'Project MESSAGE: Using i18n...The message is correct. But I get both the i18n.pri and the Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =I get the following:Project MESSAGE: list: '' The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but not include!?! is include special or parsed without any consideration of the scope?! I did try to close QtCreator and reopen without luck (using QtCreator 4.12.0 on Mac OS) ,___Interest mailing listInterest@qt-project.orghttps://lists.qt-project.org/listinfo/interest___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
Sorry for the noise, but I did found a way simpler example to test this:

if(false){
  message("Pass here")
  include("myfile.pri")
}

myfile.pri is always included no matter what, but the message is not printed! 
this is really counter intuitive. Any way to make a conditional include?!?


From: Interest  On Behalf Of Jérôme Godbout
Sent: May 20, 2020 11:17 AM
To: interest@qt-project.org
Subject: [Interest] QMake contains and include

Hi,
QMAKE question: anybody manage to use an include inside a contains(){} into 
QMake? the include is processed no matter what!?!
message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){
message("Using i18n...")
HEADERS += $$AMOTUS_Qt_PATH/i18n.h
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
include(i18n.pri)
}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){
message("Using Amotus_Qt_Network...")
include(Amotus_Qt_Network.pri)
}
If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18n
The message print:
Project MESSAGE: list: 'i18n'
Project MESSAGE: Using i18n...
The message is correct. But I get both the i18n.pri and the 
Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the 
variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =
I get the following:
Project MESSAGE: list: ''
The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the 
i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but 
not include!?! is include special or parsed without any consideration of the 
scope?! I did try to close QtCreator and reopen without luck (using QtCreator 
4.12.0 on Mac OS)

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


[Interest] QMake contains and include

2020-05-20 Thread Jérôme Godbout
Hi,
QMAKE question: anybody manage to use an include inside a contains(){} into 
QMake? the include is processed no matter what!?!
message("list: '$$AMOTUS_SUBREPOS_OPTIONAL_NAMES' ")
contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, i18n){
message("Using i18n...")
HEADERS += $$AMOTUS_Qt_PATH/i18n.h
SOURCES += $$AMOTUS_Qt_PATH/i18n.cpp
include(i18n.pri)
}contains(AMOTUS_SUBREPOS_OPTIONAL_NAMES, Amotus_Qt_Network){
message("Using Amotus_Qt_Network...")
include(Amotus_Qt_Network.pri)
}
If I put AMOTUS_SUBREPOS_OPTIONAL_NAMES = i18n
The message print:
Project MESSAGE: list: 'i18n'
Project MESSAGE: Using i18n...
The message is correct. But I get both the i18n.pri and the 
Amotus_Qt_Network.pri include anyway!? if I remove the i18n entry from the 
variable AMOTUS_SUBREPOS_OPTIONAL_NAMES =
I get the following:
Project MESSAGE: list: ''
The include for i18n.pri and Amotus_Qt_Network.pri are still included, but the 
i18n.h and i18n.cpp are grey out which seem to work for HEADERS and SOURCES but 
not include!?! is include special or parsed without any consideration of the 
scope?! I did try to close QtCreator and reopen without luck (using QtCreator 
4.12.0 on Mac OS)

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


Re: [Interest] Qt 5.12.x LTS

2020-05-20 Thread Ramakanth Kesireddy
Ok thanks for the update.

Can you let me know if the mentioned security fixes are available in
earlier LTS releases like Qt 5.6.3?

Best Regards,
Ramakanth

On Wed, 20 May, 2020, 06:42 Thiago Macieira, 
wrote:

> On Tuesday, 19 May 2020 00:08:53 PDT Ramakanth Kesireddy wrote:
> > Apart from CVE-2020-0569 and CVE-2020-0570, could you please let me know
> > other security fixes that donot have associated CVE or any other CVEs
> > backported to Qt 5.12.8?
>
> All known security issues that affected 5.12.7 are fixed in 5.12.8. Issues
> affecting 5.12.8 are in the 5.12 branch in Git and will be in 5.12.9, but
> there's nothing that required a Qt security announcement.
>
> There are security fixes for third-party content bundled inside Qt.
> Remember
> that you must take care of those yourself. Recommendation: always use the
> system libraries (-system-sqlite, for example) and update your system.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel System Software Products
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] is it ok to push audio on a background thread, not a timer?

2020-05-20 Thread Jérôme Godbout
If you are looking for some explanation of the QThread and how to use them 
properly, here a few other links:

  1.  https://www.kdab.com/multithreading-with-qt/
  2.  http://blog.debao.me/2013/08/how-to-use-qthread-in-the-right-way-part-1/
  3.  http://blog.debao.me/2013/08/how-to-use-qthread-in-the-right-way-part-2/

The problems with QThread was the doc was lagging behind for a while (it's now 
fixed thanks to the people who updated it btw). Many people where using the 
QThread in a way that they where shooting themselves in the foot with the 
Thread affinity and the emit directly into the QThread object.
Since QThread is a QObject and it create the thread,  it doesn't itself reside 
into the created thread but in the thread that created the QThread object.

From: Interest  On Behalf Of David M. Cotter
Sent: May 19, 2020 7:11 PM
To: interest@qt-project.org
Subject: Re: [Interest] is it ok to push audio on a background thread, not a 
timer?

is it possible i'm just using QThread wrong?  and it HAPPENS to work fine on 
mac but fails on windows?

is this blogger really revealing the ONE TRUE NATURE of QThread:
https://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/

?

-dave


On May 19, 2020, at 4:05 PM, David M. Cotter 
mailto:d...@kjams.com>> wrote:

anybody have any other ideas?


On May 18, 2020, at 9:12 PM, David M. Cotter 
mailto:d...@kjams.com>> wrote:

Note that you do initialise the i_auP pointer in your constructor's 
initialisation list
which is not a QObject, it's my own wrapper class
Irrelevant what it derives from
then i'm not understanding what your objection is.

i thought your objection was that objects derived from QObject, if they are 
used on a back thread then they must be either allocated there or "moved" there.

but since this i_auP is NOT a QObject, it's my own class, that i'm fine to 
allocate it in one thread (main) and then use it on another thread (audio pump 
thread) (provided and assuming i am careful to mutex any access from the main 
thread)


Are you saying that this calls a function that returned null?
sorry, what is "this" and what function are you referring to that returns null?

if you mean GetCUnit_Out() it returns an object of my own (not a QObject) that 
has already been allocated and is guaranteed to not be NULL


I repeat my request for a compileable example.
i hear you loud and clear but let's assume that's not happening for now and see 
how far we get




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