Re: [Interest] [Development] QTextEdit - Line Spacing

2018-11-12 Thread Allan Sandfeld Jensen
On Dienstag, 13. November 2018 07:50:12 CET coroberti . wrote:
> > > Il 11/11/18 17:15, coroberti . ha scritto:
> > > > Following Allan's advise, here's something that is starting to work
> > > > (checks omitted)
> > > > 
> > > > QTextDocument* doc = this->text_edit_->document();
> > > > QTextBlock currentBlock = doc->firstBlock();
> > > > 
> > > >  while (currentBlock.isValid()) {
> > > >  
> > > >  QTextCursor cursor(currentBlock);
> > > >  QTextBlockFormat blockFormat = currentBlock.blockFormat();
> > > >  blockFormat.setLineHeight(200,
> > > >  QTextBlockFormat::ProportionalHeight);
> > > >  cursor.setBlockFormat(blockFormat);
> > > >  
> > > >  currentBlock = currentBlock.next();
> > > >  
> > > >  }
> > > > 
> > > > Thank you very much!
> > > 
> > > Isn't it simpler to use a selection approach instead?
> > > 
> > > QTextBlockFormat format;
> > > format.setLineHeight(...);
> > > 
> > > QTextCursor cursor(textDocument);
> > > cursor.select(QTextCursor::Document);
> > > cursor.mergeBlockFormat(format);
> > > My 2 c,
> > > --
> > > Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
> 
> Thanks, Guiseppe. It also works properly.
> 
> Thanks, Allan.
> So, there are two good ways from the API point of view.
> 
> When HTML from QTextEdit is retrieved by toHtml(), it generates HTML
> with the correct line-height, i.e. 200% as in the example below:
> 
> 
> 
> It's properly treated by browsers, etc.
> 
> However, when saved to an html file and next loaded to QTextEdit,
> line-height attribute inside  tag is ignored.
> This page doesn't refer to line-height as to the supported attributes:
> http://doc.qt.io/qt-5/richtext-html-subset.html#block-attributes
> 
> Is it correct to say that this is not a bug but rather an expected behavior,
> and bug report is not required for this case?
> Thanks.
> 
No I would argue it is a bug, and it is also a bug that line-height is not 
listed as a supported property, we are parsing it after all. And if we cant 
parse what we write outselves that is pretty silly.

'Allan



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


Re: [Interest] Android NDK 18

2018-11-12 Thread ekke
Am 12.11.18 um 22:05 schrieb Jérôme Godbout:
>
> Ok thanks, this also confirm the bribe of information I found that
> that 5.12 will support the clang with NDK 18. As for the previous
> version I will stick with NDK 17, I’m on 5.10 and want to look at 5.11
> again (last time I checked I reverted since I had issue with the Qml
> MouseArea and TouchArea). As for 5.12, I have seen many people having
> issue with it so far, I will wait until it stabilize a bit before I
> switch.
>
I did many tests with my complex mobile business apps (QQC2) for
Android, iOS, macOS, recently also Windows with 5.12 Beta1, Beta2,
Beta3, Beta4 and from my experiences Beta4 is very stable.
Had issues with translations
https://bugreports.qt.io/browse/QTBUG-71553, but it's fixed
Also a very specific issue using an external JS Library for RSA
encryption https://bugreports.qt.io/browse/QTBUG-71591, but Lars Knoll
fixed it

hopefully both Bugs will be part of 5.12 Release Candidate

so for me - I'll switch to 5.12
>
>  
>
> Quick Clang integration question, I have not test 5.12 yet, does it
> get auto detected like GCC was in previous version? Or do we have to
> configure the compiler/linker manually? Any issue with QMake with it?
>
starting with QtCreator 4.8.0 latest Beta-2 snapshots
https://download.qt.io/snapshots/qtcreator/4.8/4.8.0-beta2/ Clang is
auto detected

all my tests done on macOS 10.13.6 (and Windows in Parallels VM running
Windows10Pro)
all my apps QtQuickControls2 - so no experiences with Widgets

ekke
>
>  
>
> Thanks,
>
> Jerome
>
>  
>
> *From:*Interest 
> *On Behalf Of *ekke
> *Sent:* November 12, 2018 1:09 PM
> *To:* interest@qt-project.org
> *Subject:* Re: [Interest] Android NDK 18
>
>  
>
> tested:
> Qt 5.12 Beta 4 + QtC 4.8.0 beta2-snapshot: uses clang and works fine
> with NDK 18b
> Qt 5.10.1 / Qt 5.11.2 + QtC 4.7.2: best to use NDK 16b
>
> see also discussion Android list with BogDan
>
> ekke
>
> Am 12.11.18 um 18:45 schrieb Jérôme Godbout:
>
> Hi,
>
> Just to check if I’m getting this right, I did update my Android
> Studio (I’m finish with my old project and start a new one, so
> it’s a good time to do this normally). But I’m facing an issue
> where my Qt Creator doesn’t find any compiler. After a little
> digging it seem like GCC was remove from NDK 18. So I guess the
> only possible choice is to revert the NDK to version 17. Or is it
> any way to use clang and llvm compiler/linker with Qt Android?
>
>  
>
>  
>
>  
>
>
> 36E56279RAPPROCHEZ LA DISTANCE
>
>   
>
> *Jérôme Godbout**
> *Développeur Logiciel Sénior / 
> Senior Software Developer
>
> *p:* +1 (418) 800-1073 ext.:109
>
> amotus.ca 
> statum-iot.com 
>
>
>  
>
>  
>
>
>
>
> ___
>
> 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] [Development] QTextEdit - Line Spacing

2018-11-12 Thread coroberti .
> > Il 11/11/18 17:15, coroberti . ha scritto:
> > > Following Allan's advise, here's something that is starting to work
> > > (checks omitted)
> > >
> > > QTextDocument* doc = this->text_edit_->document();
> > > QTextBlock currentBlock = doc->firstBlock();
> > >
> > >  while (currentBlock.isValid()) {
> > >
> > >  QTextCursor cursor(currentBlock);
> > >  QTextBlockFormat blockFormat = currentBlock.blockFormat();
> > >  blockFormat.setLineHeight(200, 
> > > QTextBlockFormat::ProportionalHeight);
> > >  cursor.setBlockFormat(blockFormat);
> > >
> > >  currentBlock = currentBlock.next();
> > >  }
> > >
> > > Thank you very much!
> >
> > Isn't it simpler to use a selection approach instead?
> >
> > QTextBlockFormat format;
> > format.setLineHeight(...);
> >
> > QTextCursor cursor(textDocument);
> > cursor.select(QTextCursor::Document);
> > cursor.mergeBlockFormat(format);
> > My 2 c,
> > --
> > Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer

Thanks, Guiseppe. It also works properly.

Thanks, Allan.
So, there are two good ways from the API point of view.

When HTML from QTextEdit is retrieved by toHtml(), it generates HTML
with the correct line-height, i.e. 200% as in the example below:



It's properly treated by browsers, etc.

However, when saved to an html file and next loaded to QTextEdit,
line-height attribute inside  tag is ignored.
This page doesn't refer to line-height as to the supported attributes:
http://doc.qt.io/qt-5/richtext-html-subset.html#block-attributes

Is it correct to say that this is not a bug but rather an expected behavior,
and bug report is not required for this case?
Thanks.

Kind regards,
Robert Iakobashvili

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


Re: [Interest] QLowEnergyController always disconnected after service discovery finished

2018-11-12 Thread nus1998
Hi,


Thanks for your comments, in the past several days I got some information that 
the peripheral needs to be bonded before communication, so I'm confused that 
does QLowEnergyController or any agent support it?

The host needs to send a request with a passkey for bonding, and confirm with a 
auth token on bonding response.


B.R.
Jie



在 2018-11-02 02:22:38,"Jérôme Godbout"  写道:
>A good reference for the BLE snoops is here:
>http://www.fte.com/WebHelp/BPA600/Content/Documentation/WhitePapers/BPA600/Encryption/GettingAndroidLinkKey/RetrievingHCIlog.htm
>
>Note: take care, Samsung device (yet again) have a different path form all 
>other devices.
>
>-Original Message-
>From: Alex Blasche  
>Sent: November 1, 2018 11:11 AM
>To: Jérôme Godbout ; nus1998 
>Cc: interest@qt-project.org
>Subject: Re: [Interest] QLowEnergyController always disconnected after service 
>discovery finished
>
>Hi,
>
>all the comments from Jérôme apply and unfortunately I have had similar issues 
>with early Android devices/versions.
>
>I wanted to add one more way you can debug on Linux (since that's what you are 
>using). You may use wireshark which can log the traffic on your local bt 
>device. Maybe this reveals sth...
>
>In this case the error message says that the cause is somewhere on the 
>peripheral side. Therefore you may even want to enable some sort of logging on 
>the peripheral side. If it happens to be an Android device you can for example 
>enable HCI logging in the developer options.
>
>--
>Alex
>
>
>From: Interest  on 
>behalf of Jérôme Godbout 
>Sent: Wednesday, 31 October 2018 3:16:01 PM
>To: nus1998
>Cc: interest@qt-project.org
>Subject: Re: [Interest] QLowEnergyController always disconnected after service 
>discovery finished
>
>Hi,
>I'm still having some trouble with some particular Android device running 
>5.0.1 to 5.1.1 that I could not figure out so far. I have trouble attaching 
>adb to those devices (thanks Samsung for the missing commands). But I have 
>seen some MTU badly handled on devices making the disconnection.
>
>If you connect successfully and do nothing else and the connection reset, it 
>might be a message that is badly handled by the device and the BLE stack on 
>old Android seem picky about thoses error.  The 15 seconds if constant after 
>connection probably point to some exchange at lower level.
>
>You might want to test with NRFConnect and monitor the whole exchange with the 
>console into that application. This might give you some hint for the device 
>side fixes (if you can control that part).  The unknown problems mention above 
>I can repeat them with NRFConnect but I'm still not sure why the BlueZ want to 
>disconnect even if MTU is handled properly by device (as per specification at 
>least).
>
>If you have any information we could share the information and maybe I could 
>finally find a fix (or a workaround) for this. Here's my list of device that 
>display the problem for me and the information I have gather so far:
>
>
>  *   Open nRFConnect application
>  *   Connect to the device
>  *   Into the top right options (3 dots icon) select show log
>  *   Use the debug level from the lower left corner
>  *   Once the device connect and the device finish discovering application 
> services and characteristic, it will display the following error:  Error 34 
> (0x22) GATT CONN LMP TIMEOUT
>Device that show th problems:
>
>  *   Google Nexus 7", Android 6.0.1 (the only one I could test out).
>  *   Galaxy S4, Android 5.0.1  (debug impossible from Qt Creator)
>  *   Galaxy Tab A, Android 5.1.1 (debug impossible from Qt Creator)
>  *   LG K4 LTE, Android 5.1.1 (I don't have this device, it's a client that 
> had it)
>Deives that doesn't show this behavior that I have tested and debugged:
>
>  *   Google LG Nexus 5, Android 6.0.1
>  *   All iOS device
>  *   LG (multiples one with Android 8.0)
>  *   Google Pixel 2 Android 9.0
>
>Good luck,
>Jerome
>
>From: nus1998 
>Sent: October 30, 2018 9:16 PM
>To: Jérôme Godbout 
>Cc: interest@qt-project.org
>Subject: Re:RE: [Interest] QLowEnergyController always disconnected after 
>service discovery finished
>
>Hi Jerome,
>
>Thanks for your advice, I seperated charateristics reading with service 
>discovery and Error1:"no attribute in ..." is disappeared.
>
>However, the QLowEnergyController is still disconnected several seconds after 
>service discovery is finished, still there is error of "Connection timed out" 
>or "Connection reset by peer". I wonder is this BLE feature and is it normal? 
>as when I use "BLE analyser" on android phone to read BLE devices, there are 
>all automatically disconnected in several seconds after connection is 
>estabilished.
>
>B.R.
>Jie
>
>
>At 2018-10-30 21:10:34, "Jérôme Godbout" 
>mailto:godbo...@amotus.ca>> wrote:
>
>Hi,
>
>You should find and resolve the first error, any error could lead to 
>disconnection:
>qt.bluetooth.bluez: Error1: "no attribute in given range 

[Interest] Qt3D QAbstractItemModel to watch QEntity's

2018-11-12 Thread Philip Schuchardt
I want to create a QAbstractItemModel to watches Entity that have a custom
component. The custom component would have information (a list key value
pairs) for the QAbstractItemModel to change visibility of Entity's via a
QLayer.  The QAbstractItemModel would be attached to a ListView to allow
users to enable and disable visibility. I'm having trouble figuring out how
to access signals and slots for add/remove entity and component events. I'm
think about writing a custom aspect since it get's add/remove/property
updates. The custom aspect probably won't do any real work, ie no jobs, and
just produce scene updates to another component that manages
QAbstractItemModel in the frontend. I think it's possible, but Qt3D uses
QNode::id() for scene events. I would then need to covert the QNode:id() to
a QNode. It looks like there's no public API to ask the private QScene to
convert QNode::id() to a QNode*. I would have to linear search from the
root entry to all the leaf nodes to find QNode::id() for QNode*. This seems
a bit silly.

How bad is it to use private API on Q3DCore::QScene::lookupNode() function
and QNode's private data to get QScene through Q_D()?

or

Is there a public version to convert id to QNode?

or

Is this monitoring approach a bad idea? I just need a list of QEntrity's
and corresponding QComponent's and signals and slots for when they're being
added, removed, or updated for QAbstractItemModel implementation.

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


Re: [Interest] Android NDK 18

2018-11-12 Thread Jérôme Godbout
Ok thanks, this also confirm the bribe of information I found that that 5.12 
will support the clang with NDK 18. As for the previous version I will stick 
with NDK 17, I'm on 5.10 and want to look at 5.11 again (last time I checked I 
reverted since I had issue with the Qml MouseArea and TouchArea). As for 5.12, 
I have seen many people having issue with it so far, I will wait until it 
stabilize a bit before I switch.

Quick Clang integration question, I have not test 5.12 yet, does it get auto 
detected like GCC was in previous version? Or do we have to configure the 
compiler/linker manually? Any issue with QMake with it?

Thanks,
Jerome

From: Interest  On Behalf 
Of ekke
Sent: November 12, 2018 1:09 PM
To: interest@qt-project.org
Subject: Re: [Interest] Android NDK 18

tested:
Qt 5.12 Beta 4 + QtC 4.8.0 beta2-snapshot: uses clang and works fine with NDK 
18b
Qt 5.10.1 / Qt 5.11.2 + QtC 4.7.2: best to use NDK 16b

see also discussion Android list with BogDan

ekke

Am 12.11.18 um 18:45 schrieb Jérôme Godbout:
Hi,
Just to check if I'm getting this right, I did update my Android Studio (I'm 
finish with my old project and start a new one, so it's a good time to do this 
normally). But I'm facing an issue where my Qt Creator doesn't find any 
compiler. After a little digging it seem like GCC was remove from NDK 18. So I 
guess the only possible choice is to revert the NDK to version 17. Or is it any 
way to use clang and llvm compiler/linker with Qt Android?




[36E56279]RAPPROCHEZ LA DISTANCE

Jérôme Godbout
Développeur Logiciel Sénior /
Senior Software Developer

p: +1 (418) 800-1073 ext.:109

amotus.ca
statum-iot.com









___

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] Android NDK 18

2018-11-12 Thread ekke
tested:
Qt 5.12 Beta 4 + QtC 4.8.0 beta2-snapshot: uses clang and works fine
with NDK 18b
Qt 5.10.1 / Qt 5.11.2 + QtC 4.7.2: best to use NDK 16b

see also discussion Android list with BogDan

ekke

Am 12.11.18 um 18:45 schrieb Jérôme Godbout:
>
> Hi,
>
> Just to check if I’m getting this right, I did update my Android
> Studio (I’m finish with my old project and start a new one, so it’s a
> good time to do this normally). But I’m facing an issue where my Qt
> Creator doesn’t find any compiler. After a little digging it seem like
> GCC was remove from NDK 18. So I guess the only possible choice is to
> revert the NDK to version 17. Or is it any way to use clang and llvm
> compiler/linker with Qt Android?
>
>  
>
>  
>
>  
>
>
> 36E56279RAPPROCHEZ LA DISTANCE
>
>   
>
> *Jérôme Godbout**
> *Développeur Logiciel Sénior / 
> Senior Software Developer
>
> *p:* +1 (418) 800-1073 ext.:109
>
> amotus.ca 
> statum-iot.com 
>
>
>  
>
>  
>
>
>
> ___
> 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] Android NDK 18

2018-11-12 Thread Jérôme Godbout
Hi,
Just to check if I'm getting this right, I did update my Android Studio (I'm 
finish with my old project and start a new one, so it's a good time to do this 
normally). But I'm facing an issue where my Qt Creator doesn't find any 
compiler. After a little digging it seem like GCC was remove from NDK 18. So I 
guess the only possible choice is to revert the NDK to version 17. Or is it any 
way to use clang and llvm compiler/linker with Qt Android?




[36E56279]RAPPROCHEZ LA DISTANCE

Jérôme Godbout
Développeur Logiciel Sénior /
Senior Software Developer

p: +1 (418) 800-1073 ext.:109

amotus.ca
statum-iot.com





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


Re: [Interest] qmake with release config is called for debug build

2018-11-12 Thread Olivier B.
You can also use the COPIES qmake variable. It's used in a similar way
as INSTALLS, but instead of being run when you 'make install', it will
be run when you run 'make' of build the generated project in your IDE.
It's usefull when your exe has deps that need to be beside it in the
temp build dir for debugging
Le lun. 12 nov. 2018 à 15:13, Jérôme Godbout  a écrit :
>
> The way you wrote it, it will only copy the file when parsing the .pro/.pri 
> files, you need to make a target and add it to the build sequence.
>
> Here's the doc example:
> mytarget.target = .buildfile
> mytarget.commands = touch $$mytarget.target
> mytarget.depends = mytarget2
>
> mytarget2.commands = @echo Building $$mytarget.target
> QMAKE_EXTRA_TARGETS += mytarget mytarget2
>
> http://doc.qt.io/qt-5/qmake-advanced-usage.html
>
> I still wonder why it's not as simple as the MSBuild target system (I not a 
> lover of MSBuild, but that part was clear and simple) where QMake make it 
> super unfriendly.
>
>
> -Original Message-
> From: Interest  On Behalf 
> Of Alexander Dyagilev
> Sent: November 10, 2018 3:28 AM
> To: interest@qt-project.org
> Subject: [Interest] qmake with release config is called for debug build
>
> Hello,
>
> I'm using the following .pri file:
>
> include(macros.pri)
> win32:CONFIG(release, debug|release) {
>VC_RUNTIME_FOLDER="c:/Program Files (x86)/Microsoft Visual Studio 
> 14.0/VC/redist/x64/Microsoft.VC140.CRT"
>copyFilesToDestdir($$VC_RUNTIME_FOLDER, "msvcp140.dll") }
>
> It's supposed to copy msvcp140.dll to build folder for Release configuration 
> (so it will be included into the installer then).
>
> I do not need this msvcp140.dll to be copied to my Debug folder when I'm 
> working on the project. But it does copy it.
>
> Steps:
> 1) Remove file
> 2) Run qmake on project (active configuration is Debug).
>
> Result: file is copied.
>
> Can anything be done here except the using of QMAKE_POST_LINK here instead? 
> Why is CONFIG(release, debug|release) "not working" here?
>
> Some details below:
>
> copyFilesToDestdir is defined in macros.pri:
>
> defineTest(copyFilesToDestdir) {
>  pathSrc = $$1
>  files = $$2
>  folderDst = $$DESTDIR
>  subfolder = $$3
>  !isEmpty(subfolder) {
>  folderDst=$$folderDst/$$subfolder
>  }
>
>  DEST = $$shell_path($$OUT_PWD/$$folderDst)
>
>  for(filename, files) {
>  FILE = $$shell_path($$pathSrc/$$filename)
>  system($$QMAKE_COPY $$shell_quote($$FILE) $$shell_quote($$DEST))
>  }
> }
>
> ___
> 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] Fatal Q_ASSERT in 5.12.0-beta4?

2018-11-12 Thread Thiago Macieira
On Monday, 12 November 2018 05:59:43 PST Olivier B. wrote:
> It seems that in commit
> https://github.com/qt/qtbase/commit/f4169a633b97b7b6e7365172cf3d38d2f16a8914
> #diff-0e5a174e7dafaad904b9cb7af5a4c89c of September 19th, an optimisation
> disable in VS project generator was reverted. It initially was put to avoid
> the assert i get in QString copy constructor, due to a bug in MSVC2010.
> Could it be that the bug is still there in VS2015? I only get the issue
> with "-tp vc", not when generating nmake makefiles

Yes, it is.

The revert was reverted. Please upgrade to the next 5.12 release.

-- 
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] qmake with release config is called for debug build

2018-11-12 Thread Jérôme Godbout
The way you wrote it, it will only copy the file when parsing the .pro/.pri 
files, you need to make a target and add it to the build sequence.

Here's the doc example:
mytarget.target = .buildfile
mytarget.commands = touch $$mytarget.target
mytarget.depends = mytarget2

mytarget2.commands = @echo Building $$mytarget.target
QMAKE_EXTRA_TARGETS += mytarget mytarget2

http://doc.qt.io/qt-5/qmake-advanced-usage.html

I still wonder why it's not as simple as the MSBuild target system (I not a 
lover of MSBuild, but that part was clear and simple) where QMake make it super 
unfriendly.


-Original Message-
From: Interest  On Behalf 
Of Alexander Dyagilev
Sent: November 10, 2018 3:28 AM
To: interest@qt-project.org
Subject: [Interest] qmake with release config is called for debug build

Hello,

I'm using the following .pri file:

include(macros.pri)
win32:CONFIG(release, debug|release) {
   VC_RUNTIME_FOLDER="c:/Program Files (x86)/Microsoft Visual Studio 
14.0/VC/redist/x64/Microsoft.VC140.CRT"
   copyFilesToDestdir($$VC_RUNTIME_FOLDER, "msvcp140.dll") }

It's supposed to copy msvcp140.dll to build folder for Release configuration 
(so it will be included into the installer then).

I do not need this msvcp140.dll to be copied to my Debug folder when I'm 
working on the project. But it does copy it.

Steps:
1) Remove file
2) Run qmake on project (active configuration is Debug).

Result: file is copied.

Can anything be done here except the using of QMAKE_POST_LINK here instead? Why 
is CONFIG(release, debug|release) "not working" here?

Some details below:

copyFilesToDestdir is defined in macros.pri:

defineTest(copyFilesToDestdir) {
     pathSrc = $$1
     files = $$2
     folderDst = $$DESTDIR
     subfolder = $$3
     !isEmpty(subfolder) {
     folderDst=$$folderDst/$$subfolder
     }

     DEST = $$shell_path($$OUT_PWD/$$folderDst)

     for(filename, files) {
     FILE = $$shell_path($$pathSrc/$$filename)
     system($$QMAKE_COPY $$shell_quote($$FILE) $$shell_quote($$DEST))
     }
}

___
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] Fatal Q_ASSERT in 5.12.0-beta4?

2018-11-12 Thread Olivier B.
It seems that in commit
https://github.com/qt/qtbase/commit/f4169a633b97b7b6e7365172cf3d38d2f16a8914#diff-0e5a174e7dafaad904b9cb7af5a4c89c
of September 19th, an optimisation disable in VS project generator was
reverted. It initially was put to avoid the assert i get in QString
copy constructor, due to a bug in MSVC2010. Could it be that the bug
is still there in VS2015? I only get the issue with "-tp vc", not when
generating nmake makefiles
Le lun. 12 nov. 2018 à 13:00, Kai Koehne  a écrit :
>
> > -Original Message-
> > From: Interest  On Behalf
> > Of Olivier B.
> > Sent: Monday, November 12, 2018 12:33 PM
> > To: interest@qt-project.org
> > Subject: [Interest] Fatal Q_ASSERT in 5.12.0-beta4?
> >
> > I built 5.12.0-beta4 to prepare for the LTS, but qmake on my project aborts 
> > at
> > the assert in QStirng constructor. Trying to remove code to localize the
> > problerm, i get another assert in qvector.
>
> Please try to create a minimal example for the assert, and post it to 
> bugreports.qt.io. Please also include a stack trace.
>
> > I am running the release qmake, and i never saw them in previous
> > (stable) versions. Are asserts enabled for beta releases or something?
>
> I'm not aware of any extra configuration for beta's that we don't also use in 
> the final versions.
>
> Kai
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Fatal Q_ASSERT in 5.12.0-beta4?

2018-11-12 Thread Kai Koehne
> -Original Message-
> From: Interest  On Behalf
> Of Olivier B.
> Sent: Monday, November 12, 2018 12:33 PM
> To: interest@qt-project.org
> Subject: [Interest] Fatal Q_ASSERT in 5.12.0-beta4?
> 
> I built 5.12.0-beta4 to prepare for the LTS, but qmake on my project aborts at
> the assert in QStirng constructor. Trying to remove code to localize the
> problerm, i get another assert in qvector.

Please try to create a minimal example for the assert, and post it to 
bugreports.qt.io. Please also include a stack trace.

> I am running the release qmake, and i never saw them in previous
> (stable) versions. Are asserts enabled for beta releases or something?

I'm not aware of any extra configuration for beta's that we don't also use in 
the final versions.

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


[Interest] Fatal Q_ASSERT in 5.12.0-beta4?

2018-11-12 Thread Olivier B.
I built 5.12.0-beta4 to prepare for the LTS, but qmake on my project
aborts at the assert in QStirng constructor. Trying to remove code to
localize the problerm, i get another assert in qvector.
I am running the release qmake, and i never saw them in previous
(stable) versions. Are asserts enabled for beta releases or something?
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Development] QTextEdit - Line Spacing

2018-11-12 Thread coroberti .
On Mon, Nov 12, 2018 at 12:41 PM Giuseppe D'Angelo via Interest
 wrote:
>
> Il 11/11/18 17:15, coroberti . ha scritto:
> > Following Allan's advise, here's something that is starting to work
> > (checks omitted)
> >
> > QTextDocument* doc = this->text_edit_->document();
> > QTextBlock currentBlock = doc->firstBlock();
> >
> >  while (currentBlock.isValid()) {
> >
> >  QTextCursor cursor(currentBlock);
> >  QTextBlockFormat blockFormat = currentBlock.blockFormat();
> >  blockFormat.setLineHeight(200, 
> > QTextBlockFormat::ProportionalHeight);
> >  cursor.setBlockFormat(blockFormat);
> >
> >  currentBlock = currentBlock.next();
> >  }
> >
> > Thank you very much!
>
> Isn't it simpler to use a selection approach instead?
>
> QTextBlockFormat format;
> format.setLineHeight(...);
>
> QTextCursor cursor(textDocument);
> cursor.select(QTextCursor::Document);
> cursor.mergeBlockFormat(format);
> My 2 c,
> --
> Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer

Dear Giuseppe,
Thank you for your suggestion.

I'll test it and let you and the list to know.

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


Re: [Interest] [Development] QTextEdit - Line Spacing

2018-11-12 Thread Giuseppe D'Angelo via Interest

Il 11/11/18 17:15, coroberti . ha scritto:

Following Allan's advise, here's something that is starting to work
(checks omitted)

QTextDocument* doc = this->text_edit_->document();
QTextBlock currentBlock = doc->firstBlock();

 while (currentBlock.isValid()) {

 QTextCursor cursor(currentBlock);
 QTextBlockFormat blockFormat = currentBlock.blockFormat();
 blockFormat.setLineHeight(200, QTextBlockFormat::ProportionalHeight);
 cursor.setBlockFormat(blockFormat);

 currentBlock = currentBlock.next();
 }

Thank you very much!


Isn't it simpler to use a selection approach instead?

QTextBlockFormat format;
format.setLineHeight(...);

QTextCursor cursor(textDocument);
cursor.select(QTextCursor::Document);
cursor.mergeBlockFormat(format);


My 2 c,

--
Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts



smime.p7s
Description: Firma crittografica S/MIME
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest