Re: [Interest] How to properly translate an application?

2018-06-11 Thread EXT Artem Sidyakin
> For the Qml part I have all my qsTr(“My str to tr") + I18n.r where I18n is a 
> singleton and  "r" is a property upon which I call the changed when I load a 
> new language

There is no need for that since Qt 5.10 (QTBUG-15602). Although, OP asked about 
Qt 5.9, and there you still have to use this trick.

Speaking about translating QML applications, I would also recommend this 
article: https://retifrav.github.io/blog/2017/01/04/translating-qml-app/

---
Artem Sidyakin

> On 7 Jun 2018, at 18:36, Jérôme Godbout  wrote:
> 
> I for one, use the .qm into my qrc file and then load it with QTranslator() 
> from my resource. The  I add/remove it to the 
> QCoreApplication::instance()->installTranslator() or removeTranslator().
> 
> This might not be the best way to do it, but I can change my language at 
> runtime with it. I list the availbale language from my resource folder, then 
> user can select any, I load it and remove the previous one. For the Qml part 
> I have all my qsTr("My str to tr") + I18n.r where I18n is a singleton and  
> "r" is a property upon which I call the changed when I load a new language. I 
> work well. I did not made C++ translation with it, since my views are pure 
> Qml and my C++ keep models and controller only.
> 
> Not sure it might help, but might give some idea.
> 
> From: Interest  on behalf 
> of Mark Gaiser 
> Sent: June 7, 2018 11:26 AM
> To: rainer_wiesenfa...@trimble.com
> Cc: Qt Interest
> Subject: Re: [Interest] How to properly translate an application?
>  
> On Thu, Jun 7, 2018 at 3:09 PM Rainer Wiesenfarth 
>  wrote:
> 
> On Thu, Jun 7, 2018 at 2:22 PM, Mark Gaiser  wrote:
> I have a windows desktop application (Qt 5.9 LTS) here that has Dutch and 
> English translations files (in .ts format) created with Qt Linguist. Any 
> strings in that file show up in the Qt UI just fine in the chosen language.
> 
> But if i set the language to Dutch (operating system language is English) 
> then Qt's default buttons are still in English. Sure, they can be translated 
> on a case-by-case basis but i don't think that 
> should be needed.
> 
> I don't think there is a problem with the .ts files as anything in there just 
> works in the UI.
> But perhaps i missed a step?
> 
> For a couple of languages, there are .qm files for Qt (search e.g. for 
> qt_de.qm). These contain the translations of Qt itself. Unfortunately, Dutch 
> seems to be not included here...
> 
> The page http://wiki.qt.io/Qt_Localization may be useful for further 
> investigations.
> 
> That seems like a good point to investigate further.
> Thank you for the link!
>  
> 
> Cheers, Rainer
> 
> -- 
> Software Engineer | Trimble Imaging Division
> Rotebühlstraße 81 | 70178 Stuttgart | Germany
> Office +49 711 22881 0 | Fax +49 711 22881 11
> http://www.trimble.com/imaging/ | http://www.inpho.de/
> 
> Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
> Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
> Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
> ___
> 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 mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly translate an application?

2018-06-11 Thread Jérôme Godbout
Note: For 5.10, you have to call 
QQmlEngine::retranslate() to 
make this work. Not sure this is needed for 5.11 as I haven't move on to 5.11 
because of borken Qml MouseGesture, will have to try it out. But good to known 
this is now fixed.



From: EXT Artem Sidyakin 
Sent: June 11, 2018 4:48 AM
To: Jérôme Godbout; mark...@gmail.com
Cc: Qt Interest
Subject: Re: [Interest] How to properly translate an application?

> For the Qml part I have all my qsTr(“My str to tr") + I18n.r where I18n is a 
> singleton and  "r" is a property upon which I call the changed when I load a 
> new language

There is no need for that since Qt 5.10 (QTBUG-15602). Although, OP asked about 
Qt 5.9, and there you still have to use this trick.

Speaking about translating QML applications, I would also recommend this 
article: https://retifrav.github.io/blog/2017/01/04/translating-qml-app/

---
Artem Sidyakin

> On 7 Jun 2018, at 18:36, Jérôme Godbout  wrote:
>
> I for one, use the .qm into my qrc file and then load it with QTranslator() 
> from my resource. The  I add/remove it to the 
> QCoreApplication::instance()->installTranslator() or removeTranslator().
>
> This might not be the best way to do it, but I can change my language at 
> runtime with it. I list the availbale language from my resource folder, then 
> user can select any, I load it and remove the previous one. For the Qml part 
> I have all my qsTr("My str to tr") + I18n.r where I18n is a singleton and  
> "r" is a property upon which I call the changed when I load a new language. I 
> work well. I did not made C++ translation with it, since my views are pure 
> Qml and my C++ keep models and controller only.
>
> Not sure it might help, but might give some idea.
>
> From: Interest  on behalf 
> of Mark Gaiser 
> Sent: June 7, 2018 11:26 AM
> To: rainer_wiesenfa...@trimble.com
> Cc: Qt Interest
> Subject: Re: [Interest] How to properly translate an application?
>
> On Thu, Jun 7, 2018 at 3:09 PM Rainer Wiesenfarth 
>  wrote:
>
> On Thu, Jun 7, 2018 at 2:22 PM, Mark Gaiser  wrote:
> I have a windows desktop application (Qt 5.9 LTS) here that has Dutch and 
> English translations files (in .ts format) created with Qt Linguist. Any 
> strings in that file show up in the Qt UI just fine in the chosen language.
>
> But if i set the language to Dutch (operating system language is English) 
> then Qt's default buttons are still in English. Sure, they can be translated 
> on a case-by-case basis but i don't think that
> should be needed.
>
> I don't think there is a problem with the .ts files as anything in there just 
> works in the UI.
> But perhaps i missed a step?
>
> For a couple of languages, there are .qm files for Qt (search e.g. for 
> qt_de.qm). These contain the translations of Qt itself. Unfortunately, Dutch 
> seems to be not included here...
>
> The page http://wiki.qt.io/Qt_Localization may be useful for further 
> investigations.
>
> That seems like a good point to investigate further.
> Thank you for the link!
>
>
> Cheers, Rainer
>
> --
> Software Engineer | Trimble Imaging Division
> Rotebühlstraße 81 | 70178 Stuttgart | Germany
> Office +49 711 22881 0 | Fax +49 711 22881 11
> http://www.trimble.com/imaging/ | http://www.inpho.de/
>
> Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
> Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
> Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
> ___
> 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 mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to properly translate an application?

2018-06-11 Thread Jérôme Godbout
I just checkout the retranslate doc and I found this:


Note: Due to a limitation in the implementation, this function refreshes all 
the engine's bindings, not only those that use strings marked for translation. 
This may be optimized in a future release.


Ouch! I will stick with my property changes for the time being.



From: Interest  on behalf 
of Jérôme Godbout 
Sent: June 11, 2018 9:07 AM
To: EXT Artem Sidyakin; mark...@gmail.com
Cc: Qt Interest
Subject: Re: [Interest] How to properly translate an application?


Note: For 5.10, you have to call 
QQmlEngine::retranslate() to 
make this work. Not sure this is needed for 5.11 as I haven't move on to 5.11 
because of borken Qml MouseGesture, will have to try it out. But good to known 
this is now fixed.



From: EXT Artem Sidyakin 
Sent: June 11, 2018 4:48 AM
To: Jérôme Godbout; mark...@gmail.com
Cc: Qt Interest
Subject: Re: [Interest] How to properly translate an application?

> For the Qml part I have all my qsTr(“My str to tr") + I18n.r where I18n is a 
> singleton and  "r" is a property upon which I call the changed when I load a 
> new language

There is no need for that since Qt 5.10 (QTBUG-15602). Although, OP asked about 
Qt 5.9, and there you still have to use this trick.

Speaking about translating QML applications, I would also recommend this 
article: https://retifrav.github.io/blog/2017/01/04/translating-qml-app/

---
Artem Sidyakin

> On 7 Jun 2018, at 18:36, Jérôme Godbout  wrote:
>
> I for one, use the .qm into my qrc file and then load it with QTranslator() 
> from my resource. The  I add/remove it to the 
> QCoreApplication::instance()->installTranslator() or removeTranslator().
>
> This might not be the best way to do it, but I can change my language at 
> runtime with it. I list the availbale language from my resource folder, then 
> user can select any, I load it and remove the previous one. For the Qml part 
> I have all my qsTr("My str to tr") + I18n.r where I18n is a singleton and  
> "r" is a property upon which I call the changed when I load a new language. I 
> work well. I did not made C++ translation with it, since my views are pure 
> Qml and my C++ keep models and controller only.
>
> Not sure it might help, but might give some idea.
>
> From: Interest  on behalf 
> of Mark Gaiser 
> Sent: June 7, 2018 11:26 AM
> To: rainer_wiesenfa...@trimble.com
> Cc: Qt Interest
> Subject: Re: [Interest] How to properly translate an application?
>
> On Thu, Jun 7, 2018 at 3:09 PM Rainer Wiesenfarth 
>  wrote:
>
> On Thu, Jun 7, 2018 at 2:22 PM, Mark Gaiser  wrote:
> I have a windows desktop application (Qt 5.9 LTS) here that has Dutch and 
> English translations files (in .ts format) created with Qt Linguist. Any 
> strings in that file show up in the Qt UI just fine in the chosen language.
>
> But if i set the language to Dutch (operating system language is English) 
> then Qt's default buttons are still in English. Sure, they can be translated 
> on a case-by-case basis but i don't think that
> should be needed.
>
> I don't think there is a problem with the .ts files as anything in there just 
> works in the UI.
> But perhaps i missed a step?
>
> For a couple of languages, there are .qm files for Qt (search e.g. for 
> qt_de.qm). These contain the translations of Qt itself. Unfortunately, Dutch 
> seems to be not included here...
>
> The page http://wiki.qt.io/Qt_Localization may be useful for further 
> investigations.
>
> That seems like a good point to investigate further.
> Thank you for the link!
>
>
> Cheers, Rainer
>
> --
> Software Engineer | Trimble Imaging Division
> Rotebühlstraße 81 | 70178 Stuttgart | Germany
> Office +49 711 22881 0 | Fax +49 711 22881 11
> http://www.trimble.com/imaging/ | http://www.inpho.de/
>
> Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
> Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
> Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
> ___
> 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 mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Can't debug on Android device anymore

2018-06-11 Thread René Hansen
Hi,


Has anyone else starting seeing this error, when trying to run in debug
mode on device?

"Can't find C++ debugger."

It seems to have started just recently and I haven't made any changes to my
ndk afaict.

QtCreator 4.6.2 on macOS.


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


Re: [Interest] Can't debug on Android device anymore

2018-06-11 Thread John Weeks
Yes. My recollection is that it happened when I upgraded Xcode and the Xcode 
command line tools. I think I resolved it by shutting down Creator, trashing 
the built application bundle and the build folders. You might even want to 
restart your computer. It's also possible that all that is a red herring and 
that I solved it accidentally in some way that I can't recall :)

-John Weeks

> On Jun 11, 2018, at 6:56 AM, René Hansen  wrote:
> 
> Hi,
> 
> 
> Has anyone else starting seeing this error, when trying to run in debug mode 
> on device?
> 
> "Can't find C++ debugger."
> 
> It seems to have started just recently and I haven't made any changes to my 
> ndk afaict.
> 
> QtCreator 4.6.2 on macOS.
> 
> 
> /René
> ___
> 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] Can't debug on Android device anymore

2018-06-11 Thread Jérôme Godbout
I also had to trash the build folder, reboot the system after all update. 
Reopen the Qt Creator and rebuild the solution to make this work on my side.



From: Interest  on behalf 
of John Weeks 
Sent: June 11, 2018 1:04 PM
To: interest
Subject: Re: [Interest] Can't debug on Android device anymore

Yes. My recollection is that it happened when I upgraded Xcode and the Xcode 
command line tools. I think I resolved it by shutting down Creator, trashing 
the built application bundle and the build folders. You might even want to 
restart your computer. It's also possible that all that is a red herring and 
that I solved it accidentally in some way that I can't recall :)

-John Weeks

> On Jun 11, 2018, at 6:56 AM, René Hansen  wrote:
>
> Hi,
>
>
> Has anyone else starting seeing this error, when trying to run in debug mode 
> on device?
>
> "Can't find C++ debugger."
>
> It seems to have started just recently and I haven't made any changes to my 
> ndk afaict.
>
> QtCreator 4.6.2 on macOS.
>
>
> /René
> ___
> 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 mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Can't debug on Android device anymore

2018-06-11 Thread Stanislas RENAN
Hi,

If you found a solution, would you please consider documenting it in this bug ?

https://bugreports.qt.io/browse/QTCREATORBUG-20403

Note that the problem occurs on several building platforms, not only on macOS.

Stanislas RENAN

Le 11 juin 2018 19:50:15 GMT+02:00, "Jérôme Godbout"  a 
écrit :
>I also had to trash the build folder, reboot the system after all
>update. Reopen the Qt Creator and rebuild the solution to make this
>work on my side.
>
>
>
>From: Interest  on
>behalf of John Weeks 
>Sent: June 11, 2018 1:04 PM
>To: interest
>Subject: Re: [Interest] Can't debug on Android device anymore
>
>Yes. My recollection is that it happened when I upgraded Xcode and the
>Xcode command line tools. I think I resolved it by shutting down
>Creator, trashing the built application bundle and the build folders.
>You might even want to restart your computer. It's also possible that
>all that is a red herring and that I solved it accidentally in some way
>that I can't recall :)
>
>-John Weeks
>
>> On Jun 11, 2018, at 6:56 AM, René Hansen  wrote:
>>
>> Hi,
>>
>>
>> Has anyone else starting seeing this error, when trying to run in
>debug mode on device?
>>
>> "Can't find C++ debugger."
>>
>> It seems to have started just recently and I haven't made any changes
>to my ndk afaict.
>>
>> QtCreator 4.6.2 on macOS.
>>
>>
>> /René
>> ___
>> 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

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma 
brièveté.___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building Qt 5.11.0 with -no-opengl

2018-06-11 Thread Igor Mironchik

Hello,

Is it possible to build Qt 5.11 with -no-opengl option?

I tried to do this and got:

g++ -c -pipe -g -Og -fPIC -std=c++1z -fvisibility=hidden 
-fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time 
-D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS 
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS 
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_STATICPLUGIN -DQT_PLUGIN 
-DQT_SERVICE_SUPPORT_LIB -DQT_WAYLANDCLIENT_LIB -DQT_GUI_LIB 
-DQT_CORE_LIB -I. 
-I../../../../hardwareintegration/client/shm-emulation-server 
-I../../../../../include/QtWaylandClient/5.11.0 
-I../../../../../include/QtWaylandClient/5.11.0/QtWaylandClient 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtServiceSupport 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtServiceSupport/5.11.0 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtServiceSupport/5.11.0/QtServiceSupport 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtGui/5.11.0 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtGui/5.11.0/QtGui 
-I../../../../../include -I../../../../../include/QtWaylandClient 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtGui 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtCore/5.11.0 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtCore/5.11.0/QtCore 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/include/QtCore 
-I.moc 
-I/home/igor/Work/Qt/stable/qt-everywhere-src-5.11.0/qtbase/mkspecs/linux-g++ 
-o .obj/shmserverbufferintegration.o 
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp: 
In function ‘QOpenGLTexture* createTextureFromShm(const QString&, int, 
int, int, int)’:
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:81:10: 
error: ‘QOpenGLContext’ has not been declared

 if (!QOpenGLContext::currentContext())
  ^
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:84:43: 
error: incomplete type ‘QOpenGLTexture’ used in nested name specifier
 auto *tex = new QOpenGLTexture(image, 
QOpenGLTexture::DontGenerateMipMaps);

   ^
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:84:78: 
error: invalid use of incomplete type ‘class QOpenGLTexture’
 auto *tex = new QOpenGLTexture(image, 
QOpenGLTexture::DontGenerateMipMaps);

^
In file included from 
../../../../../include/QtWaylandClient/5.11.0/QtWaylandClient/private/qwaylandserverbufferintegration_p.h:1:0,
 from 
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.h:45,
 from 
../../../../hardwareintegration/client/shm-emulation-server/shmserverbufferintegration.cpp:40:
../../../../../include/QtWaylandClient/5.11.0/QtWaylandClient/private/../../../../../src/client/hardwareintegration/qwaylandserverbufferintegration_p.h:62:7: 
note: forward declaration of ‘class QOpenGLTexture’

 class QOpenGLTexture;
   ^
Makefile:1255: recipe for target '.obj/shmserverbufferintegration.o' failed

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