Re: [Interest] Updated Debian packages or ppa for Qt 5.9+

2018-11-09 Thread Lisandro Damián Nicanor Pérez Meyer
Hi Konstantin!

El miércoles, 7 de noviembre de 2018 05:12:28 -03 Konstantin Shegunov 
escribió:
> On Wed, Nov 7, 2018 at 9:59 AM Hamish Moffatt 
> 
> wrote:
> > Does anyone know of a repository for updated Qt packages for Debian
> > stable (stretch / 9)?

With my Debian Qt maintainer hat on: I'm afraid there is no official repo for 
that. I once tried to provide backports but that would mean that many packages 
would need to get rebuilt against the new Qt version, which seems not possible 
to do on Debian backports.

Backporting Qt 5.10/11 to stable also requires a new dpkg due to the changes 
we did in order to be able to cross compile using plain Debian packages + 
multi arch.

With my personal hat on: I would *love* to provide a PPA-like semi-official 
repo for this, but Debian currently lacks PPAs/bikesheds in order to do that, 
and my build power is limited t a 10 years old machine, so not for now. But 
yes, I do get lots of requests for this :-(

> Pin debian testing repos with a low priority in the apt configuration and
> you can get the binaries from there. Current it 5.11.2.

Only if you really know what you are doing. If you use KDE stuff (kwin for 
example) you will certainly have to upgrade it, and thus half your system, 
because it uses Qt's private methods.

Cheers, Lisandro.

-- 
Lisandro Damián Nicanor Pérez Meyer
http://perezmeyer.com.ar/
http://perezmeyer.blogspot.com/


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] tr() a string while ignoring context?

2018-11-09 Thread Thiago Macieira
On Friday, 9 November 2018 09:47:18 PST Vadim Peretokin wrote:
> I tried QObject::tr but I'm still having difficulty. I'd like to translate
> dynamic input that's not known as compile-time.

You can only translate content known at compile time.

Any dynamism is basically matching the runtime string to one of the static 
strings and then applying the translation of that static strings.

-- 
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] tr() a string while ignoring context?

2018-11-09 Thread René Hansen
QT_TR_NOOP() and QT_TRANSLATE_NOOP() is what you're looking for.

/René

On Fri, 9 Nov 2018 at 18:47 Vadim Peretokin  wrote:

> I tried QObject::tr but I'm still having difficulty. I'd like to translate
> dynamic input that's not known as compile-time.
>
> Basically, I'd like to expose the wealth of translations already available
> for my application to my scripting layer, and as you can see that means the
> context needs to be stripped out - so given any input string, return the
> first known translation, irregardless of the context. Is this feasible and
> am I just misunderstanding you?
>
> - Vadim
>
> On Fri, Nov 9, 2018 at 5:52 PM Andy  wrote:
>
>> Aside from QObject::tr() which works without a context string, I think
>> QT_TR_NOOP() is the only other one without a context.
>>
>>
>> https://doc.qt.io/qt-5/i18n-source-translation.html#using-qt-tr-noop-and-qt-translate-noop-in-c
>>
>> Note that QObject::tr can be used outside the class. See
>> some_global_function example here:
>>
>>
>> https://doc.qt.io/qt-5/i18n-source-translation.html#using-qcoreapplication-translate
>>
>> Also of interest might be "Translating Non-Qt Classes":
>>
>>
>> https://doc.qt.io/qt-5/i18n-source-translation.html#translating-non-qt-classes
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> twitter ~ @asmaloney 
>>
>>
>>
>> On Fri, Nov 9, 2018 at 11:12 AM Vadim Peretokin 
>> wrote:
>>
>>> I'd like to translate a string while ignoring the context of it, but
>>> QCoreApplication::translate("", sourceText.toUtf8().constData()) isn't
>>> cutting it. Any ideas on what would work?
>>>
>>> ___
>>> 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] tr() a string while ignoring context?

2018-11-09 Thread Vadim Peretokin
I tried QObject::tr but I'm still having difficulty. I'd like to translate
dynamic input that's not known as compile-time.

Basically, I'd like to expose the wealth of translations already available
for my application to my scripting layer, and as you can see that means the
context needs to be stripped out - so given any input string, return the
first known translation, irregardless of the context. Is this feasible and
am I just misunderstanding you?

- Vadim

On Fri, Nov 9, 2018 at 5:52 PM Andy  wrote:

> Aside from QObject::tr() which works without a context string, I think
> QT_TR_NOOP() is the only other one without a context.
>
>
> https://doc.qt.io/qt-5/i18n-source-translation.html#using-qt-tr-noop-and-qt-translate-noop-in-c
>
> Note that QObject::tr can be used outside the class. See
> some_global_function example here:
>
>
> https://doc.qt.io/qt-5/i18n-source-translation.html#using-qcoreapplication-translate
>
> Also of interest might be "Translating Non-Qt Classes":
>
>
> https://doc.qt.io/qt-5/i18n-source-translation.html#translating-non-qt-classes
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney 
>
>
>
> On Fri, Nov 9, 2018 at 11:12 AM Vadim Peretokin 
> wrote:
>
>> I'd like to translate a string while ignoring the context of it, but
>> QCoreApplication::translate("", sourceText.toUtf8().constData()) isn't
>> cutting it. Any ideas on what would work?
>>
>> ___
>> 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] tr() a string while ignoring context?

2018-11-09 Thread Andy
Aside from QObject::tr() which works without a context string, I think
QT_TR_NOOP() is the only other one without a context.


https://doc.qt.io/qt-5/i18n-source-translation.html#using-qt-tr-noop-and-qt-translate-noop-in-c

Note that QObject::tr can be used outside the class. See
some_global_function example here:


https://doc.qt.io/qt-5/i18n-source-translation.html#using-qcoreapplication-translate

Also of interest might be "Translating Non-Qt Classes":


https://doc.qt.io/qt-5/i18n-source-translation.html#translating-non-qt-classes

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney 



On Fri, Nov 9, 2018 at 11:12 AM Vadim Peretokin 
wrote:

> I'd like to translate a string while ignoring the context of it, but
> QCoreApplication::translate("", sourceText.toUtf8().constData()) isn't
> cutting it. Any ideas on what would work?
>
> ___
> 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] tr() a string while ignoring context?

2018-11-09 Thread Vadim Peretokin
I'd like to translate a string while ignoring the context of it, but
QCoreApplication::translate("", sourceText.toUtf8().constData()) isn't
cutting it. Any ideas on what would work?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] update on building Qt/Linux with clang?

2018-11-09 Thread René J . V . Bertin
Sérgio Martins wrote:

> FWIW, I just tried -flto with clang-7.0 and gold-1.16 and can't
> reproduce QTBUG-43556 anymore.

Good to know, I use the "regular" ld v2.3.0 (~gold for other reasons I cannot 
really remember).

In the FWIW register: does clang 7 continue the trend of being noticeably 
slower 
that its predecessor (about 15% for clang 6)?

R.

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


Re: [Interest] QML Debug API

2018-11-09 Thread Ulf Hermann
Hi Nils,

> I have read that QML offers a binary debug protocol that is used by 
> several tools to to gain insights into QML applications. I read about 
> this interface here: http://doc.qt.io/qt-5/qtquick-debugging.html
> It is stated that: "The Qt QML module provides services for debugging, 
> inspecting, and profiling applications via a TCP port."

In fact you can also use a local socket or (with restrictions) the 
native debugger as connection mechanism.

> I'm planning to build my own tool on top of that API. I searched around 
> for the description and details about this protocol for a while but 
> couldn't find much beside the qtdeclarative git repository which seems 
> to contain the implementation.
> 
> Do I have to reverese engeneer the API from the source code or is there 
> some form of documentation that I wasn't able to find?

There is private API for interacting with the various debug services. 
Take a look at src/qmldebug in qtdeclarative. The code results in a 
static library called QtQmlDebug. You can either link against that (with 
the usual caveats of using private API), or you can use the code to 
figure out how the protocol works.

There is QQmlDebugConnection to establish a connection to the target 
application, QV4DebugClient for JavaScript debugging, 
QQmlEngineDebugClient and QQmlInspectorClient for QML debugging, 
QQmlProfilerClient for profiling, QQmlEngineControlClient for 
synchronizing the profiler in case of multiple QML engines, and 
QQmlDebugMessageClient to receive debug messages through the connection. 
I'm thinking about adding QQmlDebugProcess to QtQmlDebug, so that you 
get an easy way to start a process and directly connect to it. That 
class so far is in tests/auto/qml/debugger/shared in qtdeclarative.

If there is demand for this, I would consider making it public. It 
probably needs some more cleanup, but generally the client interfaces 
look good.

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