Added some information about Qt Creator IDE integration to the wiki

Michael Weghorn m.weghorn at posteo.de
Thu Feb 11 08:19:15 UTC 2021


Hi,

On 10/02/2021 19.14, Hossein Noorikhah wrote:
> I am also using "Qt Creator 4.14.0", and I am using the up-to-date git master. I
> removed all the .pro.user and .pro files generated by the invocation of
> "bin/gbuild-to-ide --ide qtcreator", using this tiny script:
> 
>      for f in `find -name "*.pro.user"`
>      do
>          pro=${f/\.user/}
>          echo $f
>          rm $pro
>          rm $f
>      done
> 
> then regenerated .pro files using:
> 
>      make qtcreator-ide-integration
> 
> and then loaded lo.pro in Qt Creator.

Sounds reasonable. I think both, *.pro.user and  and *.pro files are 
overwritten when running 'make qtcreator-ide-integration' anyway, so it 
shouldn't even be needed to delete them explicitly.

I just double-checked it works for me with newly generated files and a 
fresh Qt Creator profile taking these steps:

1. make sure Qt Creator is not running

2. Generate the IDE integration files:

     make qtcreator-ide-integration

3. For reference, create archive with the autogenerated files:

     tar cavf qtc_autogenerated.tar.gz $(find . -regex 
'\(.*\.pro\)\|\(.*\.pro.user\)')

4. start Qt Creator with a fresh, temporary profile:

     qtcreator -settingspath $(mktemp -d)

5. load project using lo.pro

6. check build and run settings

7. close Qt Creator

8. For reference, create archive with the files as they look once opened 
and written back by Qt Creator:

     tar cavf qtc_after_running_once.tar.gz $(find . -regex 
'\(.*\.pro\)\|\(.*\.pro.user\)')

I've uploaded the archives from steps 3 and 8 here for reference:
https://nextcloud.documentfoundation.org/s/cXTdxJPw83cfTd3

The screencast at 
https://nextcloud.documentfoundation.org/s/AybdcfMsSYNTSnn shows what 
build and run settings look like for me in steps 5-6 and that 
running/debugging LO right away basically "just works".
(In addition to the above, I'd enable system GDB pretty printers and 
disable that the project is built before running every time, but that's 
unrelated here.)

Can you double-check with these steps? If you send me your generated 
files from steps 3 and 8, I can take a quick look whether I can see 
anything obvious when comparing to my own ones.

> In this stage, I had to:
> 
> 1. Disable shadow build, otherwise I was getting several errors when I wanted to
> build the project.
> 2. Remove qmake build step, otherwise I was also getting several errors when I
> wanted to build the project.

I remember to have seen that previously, i.e. without the 3 patches 
mentioned in my previous email. Do you have a "01-Global-Build" build 
configuration for the project (as shown in the screencast) at all?

> 3. Change "SUBDIRS = . \" to "SUBDIRS = ../core \", otherwise I wasn't able to
> see core.pro get loaded and I was getting this error message:
>      /path/to/libreoffice/core/lo.pro: Could not find .pro file for subdirectory
>          "." in "/path/to/libreoffice/core/.".

Is that in lo.pro? Mine looks different and just lists all the subdirs 
by name:

SUBDIRS = UnoControls \
accessibility \
animations \
avmedia \
basctl \
basegfx \
[...]

Are you running ./autogen.sh and the build from right within the git 
checkout or from a separate directory (I'm doing the former and haven't 
checked the latter)?

> 4. Manually add the executable "instdir/program/soffice.bin", otherwise I was
> getting this error message:
>      You need to set an executable in the custom run configuration.

Same as written for 1. and 2. above: I had the same behaviour without 
the 3 patches from Sunday, but now that's prefilled as shown in the 
screencast.

> 
> After doing all these steps, things were fine. So, I think all these steps are
> currently necessary, unless the "bin/gbuild-to-ide" script is further tuned.

Would of course be nice if that "just worked", and I can try to take a 
look once it's clear why that doesn't work for your case yet.

Michael


More information about the LibreOffice mailing list