Re: [Interest] qt 5.13.0 SSL requirements

2019-07-29 Thread Thiago Macieira
On Monday, 29 July 2019 09:33:41 PDT maitai wrote:
> Hi all,
> 
> I have some Windows 10/64 bits users reporting "TLS initialization
> failed" when running our app, built with Qt 5.13.0 MSVC 2017/64 bits
> 
> I have found this page:
> 
> https://doc.qt.io/qt-5/windows-requirements.html
> 
> But the interesting part is missing, i.e. what variable should I set to
> indicate where opensll libs are ?

None. The libraries are searched next to your executable. That's where you 
should put them.

Just make sure they are the OpenSSL 1.1 libraries. Not 1.0. They're called:
libssl-1_1-x64.dll
libcrypto-1_1-x64.dll

-- 
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] Is it safe to call qRegisterMetaType() before main()?

2019-07-29 Thread Thiago Macieira
On Monday, 29 July 2019 13:28:04 PDT Nikos Chantziaras wrote:
> > This is only required when referring to it by name, such as in old-style
> > signal-slot connection, QML, D-Bus, etc.
> 
> They're new-style connections, but are sometimes of QueuedConnection
> type since some connections are used for inter-thread communication. If
> I don't use Q_ENUM or Q_REGISTER_METATYPE (and thus also don't call
> qRegisterMetatype(),) the connections won't work and you get this at
> runtime:
> 
>QObject::connect: Cannot queue arguments of type 'MyClass::MyEnum'

The queuing is actually "old style" since it goes back to the meta object 
string format to get the parameter types.

Olivier, didn't you have at some point a patch that made the meta object 
register all parameters as metatypes on request? That would solve Nikos's 
problem.

-- 
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] Is it safe to call qRegisterMetaType() before main()?

2019-07-29 Thread Thiago Macieira
On Monday, 29 July 2019 09:25:04 PDT Tomasz Olszak wrote:
> What's is the cons of putting something like that in anonymous namespace
> instead of constructor?

It's run on program load, before main(), even if the type is never used.

-- 
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] Is it safe to call qRegisterMetaType() before main()?

2019-07-29 Thread Tomas Konir
po 29. 7. 2019 v 21:00 odesílatel Nikos Chantziaras 
napsal:

> The linker might remove it from the executable when linking statically,
> because 'registerHelper' is not referenced anywhere.
>
>
> On 29/07/2019 19:25, Tomasz Olszak wrote:
> > What's is the cons of putting something like that in anonymous namespace
> > instead of constructor?
> >
> > namespace {
> > struct RegisterHelper
> > {
> >  RegisterHelper()
> >  {
> >  qRegisterMetaType();
> >  qRegisterMetaType();
> >  qRegisterMetaTypeStreamOperators();
> >  }
> > };
> > static RegisterHelper registerHelper;
> > }
>

Hi,

I'm using C constructor attribute with no problems.
Code like below at each class cpp file.

static void constructor() __attribute__((constructor));




static void constructor(){




   qmlRegisterType("ClassName", 1, 0, "ClassName");




}

Maybe it helps.

Tom

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


Re: [Interest] Is it safe to call qRegisterMetaType() before main()?

2019-07-29 Thread Nikos Chantziaras

On 28/07/2019 07:15, Thiago Macieira wrote:

On Friday, 26 July 2019 17:35:03 PDT Nikos Chantziaras wrote:

I didn't (although I use Q_ENUM, but it does the same job.) But there's
no constructor to put qRegisterMetaType() in. It's an enum. There's no
constructor. Some enums are in a namespace, some are in a class, but
even with an enum that is in a class, users of can just use the enum in
their own signals/slots prior to instantiating the class that declares
the enum. It will stay unregistered until the first instance of the
class is created.



I meant in the class it's most likely to be used in.


Well, putting it in the class it's most likely to be used in is not good 
enough, because this results in "it most likely has been registered, but 
maybe not." To be sure it's registered, you'd have to register it in 
*every* class it's used in. What if you forget? It doesn't scale. Too 
error prone. It's much (much!) better to be in a situation where only 
two cases are possible: it's either *always* registered, or it's *never* 
registered. There should be no middle-ground.


In case of enums, if the enum is in "globals.h", then "globals.cpp" 
should be responsible for registering it. Since global initializers can 
be removed by the linker as they're not referenced in the executable, 
then I'll just have to provide initialization functions and call them in 
main(). That way the qRegisterMetatype() calls stay within the source 
file of the "owner" of the type, and forgetting to register newly added 
types is less likely.




This is only required when referring to it by name, such as in old-style
signal-slot connection, QML, D-Bus, etc.


They're new-style connections, but are sometimes of QueuedConnection 
type since some connections are used for inter-thread communication. If 
I don't use Q_ENUM or Q_REGISTER_METATYPE (and thus also don't call 
qRegisterMetatype(),) the connections won't work and you get this at 
runtime:


  QObject::connect: Cannot queue arguments of type 'MyClass::MyEnum'



Loading it into a QVariant automatically registers, as QVariant calls
qMetaTypeId() to get the metatype ID.


Not sure what you mean here. I'm not using a QVariant anywhere, at least 
not explicitly.

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


Re: [Interest] Is it safe to call qRegisterMetaType() before main()?

2019-07-29 Thread Nikos Chantziaras
The linker might remove it from the executable when linking statically, 
because 'registerHelper' is not referenced anywhere.



On 29/07/2019 19:25, Tomasz Olszak wrote:
What's is the cons of putting something like that in anonymous namespace 
instead of constructor?


namespace {
struct RegisterHelper
{
     RegisterHelper()
     {
         qRegisterMetaType();
         qRegisterMetaType();
         qRegisterMetaTypeStreamOperators();
     }
};
static RegisterHelper registerHelper;
}


niedz., 28 lip 2019 o 06:22 Thiago Macieira > napisał(a):


On Friday, 26 July 2019 17:35:03 PDT Nikos Chantziaras wrote:
 > I didn't (although I use Q_ENUM, but it does the same job.) But
there's
 > no constructor to put qRegisterMetaType() in. It's an enum.
There's no
 > constructor. Some enums are in a namespace, some are in a class, but
 > even with an enum that is in a class, users of can just use the
enum in
 > their own signals/slots prior to instantiating the class that
declares
 > the enum. It will stay unregistered until the first instance of the
 > class is created.
 > 

I meant in the class it's most likely to be used in.

This is only required when referring to it by name, such as in
old-style
signal-slot connection, QML, D-Bus, etc.

Loading it into a QVariant automatically registers, as QVariant calls
qMetaTypeId() to get the metatype ID.

-- 
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




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


Re: [Interest] qt 5.13.0 SSL requirements

2019-07-29 Thread René Hansen
Ah, my mistake, I misunderstood.

According to this comment, on Windows, PATH is traversed when looking for
shared libs: https://stackoverflow.com/a/7148123/57290

Might be worth checking out.


/René



On Mon, 29 Jul 2019 at 19:59, maitai  wrote:

> Thanks René,
>
> I may be wrong but these variables look like build variables in case you
> want to build Qt.
>
> I am looking for a runtime variable to indicate where the libs are, and I
> hope to be able to set it from inside main with qputenv, otherwise it's
> back to 5.12.3
>
> Philippe.
>
>
>
> Le 29-07-2019 19:42, René Hansen a écrit :
>
> This archived 5.11 page might be what you're looking for:
>
> https://doc.qt.io/archives/qt-5.11/ssl.html
>
> I don't know if pkg-config is available to Windows users, but in case it
> is, this would do as well:
>
>   QT_CONFIG -= no-pkg-config
>   CONFIG += link_pkgconfig
>   PKGCONFIG += /path/to/openssl/lib/pkgconfig/openssl.pc \
> /path/to/openssl/lib/pkgconfig/libssl.pc
>
>
> /René
>
>
>
> On Mon, 29 Jul 2019 at 19:15, David M. Cotter  wrote:
>
>> seconded
>>
>> On Jul 29, 2019, at 9:33 AM, maitai  wrote:
>>
>> Hi all,
>>
>> I have some Windows 10/64 bits users reporting "TLS initialization
>> failed" when running our app, built with Qt 5.13.0 MSVC 2017/64 bits
>>
>> I have found this page:
>>
>> https://doc.qt.io/qt-5/windows-requirements.html
>>
>> But the interesting part is missing, i.e. what variable should I set to
>> indicate where opensll libs are ?
>>
>> Thanks
>> Philippe.
>> ___
>> 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
>
>
>
> --
> Never fear, Linux is here.
>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>


-- 
Never fear, Linux is here.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qt 5.13.0 SSL requirements

2019-07-29 Thread maitai
Thanks René, 

I may be wrong but these variables look like build variables in case you
want to build Qt. 

I am looking for a runtime variable to indicate where the libs are, and
I hope to be able to set it from inside main with qputenv, otherwise
it's back to 5.12.3 

Philippe.

Le 29-07-2019 19:42, René Hansen a écrit :

> This archived 5.11 page might be what you're looking for: 
> 
> https://doc.qt.io/archives/qt-5.11/ssl.html
> 
> I don't know if pkg-config is available to Windows users, but in case it is, 
> this would do as well:
> 
> QT_CONFIG -= no-pkg-config
> CONFIG += link_pkgconfig
> PKGCONFIG += /path/to/openssl/lib/pkgconfig/openssl.pc \
> /path/to/openssl/lib/pkgconfig/libssl.pc
> 
> /René
> 
> On Mon, 29 Jul 2019 at 19:15, David M. Cotter  wrote: 
> seconded
> 
> On Jul 29, 2019, at 9:33 AM, maitai  wrote: 
> 
> Hi all,
> 
> I have some Windows 10/64 bits users reporting "TLS initialization failed" 
> when running our app, built with Qt 5.13.0 MSVC 2017/64 bits
> 
> I have found this page:
> 
> https://doc.qt.io/qt-5/windows-requirements.html 
> 
> But the interesting part is missing, i.e. what variable should I set to 
> indicate where opensll libs are ? 
> 
> Thanks 
> Philippe. ___
> 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

  -- 
Never fear, Linux is here.___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qt 5.13.0 SSL requirements

2019-07-29 Thread René Hansen
This archived 5.11 page might be what you're looking for:

https://doc.qt.io/archives/qt-5.11/ssl.html

I don't know if pkg-config is available to Windows users, but in case it
is, this would do as well:

  QT_CONFIG -= no-pkg-config
  CONFIG += link_pkgconfig
  PKGCONFIG += /path/to/openssl/lib/pkgconfig/openssl.pc \
/path/to/openssl/lib/pkgconfig/libssl.pc


/René



On Mon, 29 Jul 2019 at 19:15, David M. Cotter  wrote:

> seconded
>
> On Jul 29, 2019, at 9:33 AM, maitai  wrote:
>
> Hi all,
>
> I have some Windows 10/64 bits users reporting "TLS initialization failed"
> when running our app, built with Qt 5.13.0 MSVC 2017/64 bits
>
> I have found this page:
>
> https://doc.qt.io/qt-5/windows-requirements.html
>
> But the interesting part is missing, i.e. what variable should I set to
> indicate where opensll libs are ?
>
> Thanks
> Philippe.
> ___
> 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
>


-- 
Never fear, Linux is here.
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] qt 5.13.0 SSL requirements

2019-07-29 Thread David M. Cotter
seconded

> On Jul 29, 2019, at 9:33 AM, maitai  wrote:
> 
> Hi all,
> 
> I have some Windows 10/64 bits users reporting "TLS initialization failed" 
> when running our app, built with Qt 5.13.0 MSVC 2017/64 bits
> 
> I have found this page:
> 
> https://doc.qt.io/qt-5/windows-requirements.html 
> 
>  
> But the interesting part is missing, i.e. what variable should I set to 
> indicate where opensll libs are ?
>  
> Thanks
> Philippe.
> ___
> 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 5.13.0 SSL requirements

2019-07-29 Thread maitai
Hi all,

I have some Windows 10/64 bits users reporting "TLS initialization
failed" when running our app, built with Qt 5.13.0 MSVC 2017/64 bits

I have found this page:

https://doc.qt.io/qt-5/windows-requirements.html 

But the interesting part is missing, i.e. what variable should I set to
indicate where opensll libs are ? 

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


Re: [Interest] Is it safe to call qRegisterMetaType() before main()?

2019-07-29 Thread Tomasz Olszak
What's is the cons of putting something like that in anonymous namespace
instead of constructor?

namespace {
struct RegisterHelper
{
RegisterHelper()
{
qRegisterMetaType();
qRegisterMetaType();
qRegisterMetaTypeStreamOperators();
}
};
static RegisterHelper registerHelper;
}


niedz., 28 lip 2019 o 06:22 Thiago Macieira 
napisał(a):

> On Friday, 26 July 2019 17:35:03 PDT Nikos Chantziaras wrote:
> > I didn't (although I use Q_ENUM, but it does the same job.) But there's
> > no constructor to put qRegisterMetaType() in. It's an enum. There's no
> > constructor. Some enums are in a namespace, some are in a class, but
> > even with an enum that is in a class, users of can just use the enum in
> > their own signals/slots prior to instantiating the class that declares
> > the enum. It will stay unregistered until the first instance of the
> > class is created.
> > 
>
> I meant in the class it's most likely to be used in.
>
> This is only required when referring to it by name, such as in old-style
> signal-slot connection, QML, D-Bus, etc.
>
> Loading it into a QVariant automatically registers, as QVariant calls
> qMetaTypeId() to get the metatype ID.
>
> --
> 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] Suitable Qt version

2019-07-29 Thread Christian Gagneraud
On Mon, 29 Jul 2019 at 20:36, praveen kumar  wrote:
>
> Hi team,
>
> please suggest a suitable/ customized Qt version for my low end hardware 
> configuration.
>
> Please find below my hardware configuration details:
>
> RAM - 32MB/64MB
> FLASH - 64 MB XIP
> Processor - ARM CORTEX A9 @ 400MHz
> Display resolution: 3 variants(1280×800, 800×480, 480×272)

Which OS/Kernel? Which SoC exactly? Is it a single core A9? Do you
have an MMU? ...
The XIP (eXecute In Place) property of Flash is related to the SW
you're running on. It has nothing to do with HW specs.
How does that relates to Qt?

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


[Interest] Suitable Qt version

2019-07-29 Thread praveen kumar
Hi team,

please suggest a suitable/ customized Qt version for my low end hardware
configuration.

Please find below my hardware configuration details:

RAM - 32MB/64MB
FLASH - 64 MB XIP
Processor - ARM CORTEX A9 @ 400MHz
Display resolution: 3 variants(1280×800, 800×480, 480×272)


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