[SailfishDevel] Qt Creator Yaml file editor loses new entries

Thomas Tanghus thomas at tanghus.net
Wed Jan 8 21:49:39 UTC 2014


On Wednesday 08 January 2014 21:24 David Greaves wrote:
> The original intention was to offer a range of functionality to suite
> different skill levels.

And the intention is much appreciated especially for n00bs like me :)
It only needs a bit of tweaking:

1. Disable updating the yaml all together for experienced users.

2. Recognizing '%{_bindir}, %{_datadir} (are there others to be aware of?) 

3. What would be optimal was to show a dialog: Would you like to add X 
requirements and X installs/install paths.

For day-to-day developing I know now that I should just overwrite the yaml, 
but what really messes it up is if I forget to close the SDK and run a 
scheduled CI. It can be circumvented by some git-foo though.

> Essentially "the Qt way" is to use the .pro files to specify things like
> myapp.files/myapp.path and INSTALLS += myapp. That should drive the Files:
> section of the yaml. To avoid making experience Qt devs change how they did
> things and invalidate the extensive Qt knowledge out on the web we decided
> not to reinvent the wheel.
> 
> Even things like QT += particles should drive the Requires: and we have a
> rudimentary qml import analyser which can also ensure Requires: for qml are
> handled too.
> 
> The very few user-editable parts of the packaging for the yaml file that
> didn't come from the .pro file would be presented in a form. That basic
> functionality was developed but not really progressed. What we see at the
> moment is mainly a few minor bugs in QtC's handling of the yaml
> 
> For more experienced users there would be direct access by right click on
> the yaml - open in text editor (which is still there). That would support
> multi package rpms etc.
> 
> Of course for more advanced stuff the spec file has areas which can be hand
> edited. That supports %pre and %post (not applicable for harbour anyway but
> fine for community apps) and other things like advanced builds for included
> libraries.
> 
> Finally you can always just use the plain spec file and do it all by hand.
> 
> Hope that helps with context and history
> 
> David
> 
> On 08/01/14 21:07, Wim de Vries wrote:
> > Indeed, as a novice with rpm I always open .yaml it in kate.
> > 
> > On 01/08/2014 06:06 PM, christopher.lamb at thurweb.ch wrote:
> >> seconded: So far I have not seen the benefit of a dedicated editor: It
> >> does
> >> not make it any easier for the novice to understand what the entries are
> >> for, so why this dedicated Editor?
> >> 
> >> mfg
> >> 
> >> Chris
> >> 
> >> Zitat von "Luciano Montanaro" <mikelima at gmail.com>:
> >>> But anyway, it changes it in a way that fails the validator.... I
> >>> would prefer if it left it alone after creation.
> >>> 
> >>> Also, I find the custom form editor is an anti-feature...
> >>> 
> >>>  * it gets in the way as soon as the .yaml file gets complex
> >>>  * it has fixed-size text box, and to undo the changes one has to
> >>> 
> >>> remove lines one by one
> >>> 
> >>> I would prefer a .yaml syntax highlighter, with the possibility to
> >>> highlight syntax errors.
> >>> But even without highlighting, I would rather use the normal text
> >>> editor component... as it is, if I have to modify it I have to open
> >>> the yaml file with vim (I have added a few variables to feed the
> >>> VERSION to the qmake command line to my project).
> >>> 
> >>> Regards,
> >>> Luciano
> >>> 
> >>> 
> >>> 
> >>> On Tue, Jan 7, 2014 at 9:41 PM, Artem Marchenko
> >>> 
> >>> <artem.marchenko at gmail.com> wrote:
> >>>> Technically I think it's a feature, QtC plugin just doesn't expect
> >>>> .yaml to
> >>>> be changed in a way you changed it :)
> >>>> 
> >>>> Anyway, someone from Jolla team already told they were going to disable
> >>>> the
> >>>> .yaml autoupdate or at least make it optional. Meanwhile version
> >>>> control is
> >>>> your friend. Or as I also do it, I keep .yaml open in the text editor,
> >>>> so I
> >>>> can Undo changes there.
> >>>> 
> >>>> /Artem
> >>>> 
> >>>> On Mon, Jan 6, 2014 at 9:39 PM, Sven Putze <sailfish.os at hardcodes.de> 
wrote:
> >>>>> Oh, it's a bug?!
> >>>>> 
> >>>>> 
> >>>>> https://together.jolla.com/question/10996/bug-qt-creator-reorders-yaml
> >>>>> -file-for-no-apparent-reason/
> >>>>> 
> >>>>> 
> >>>>> BR.
> >>>>> Sven
> >>>>> 
> >>>>> On 06.01.2014, at 00:39, Thomas Tanghus <thomas at tanghus.net> wrote:
> >>>>> > On Sunday 05 January 2014 14:12 Putze Sven wrote:
> >>>>> >> IMHO the .yaml file is (partly) rewritten if something changes in
> >>>>> >> your
> >>>>> >> .pro
> >>>>> >> file,
> >>>>> > 
> >>>>> > Which is good to start with, but f***** annoying in the long run,
> >>>>> > firstly
> >>>>> > because it's writing full paths as in /usr/share instead of
> >>>>> > %{_datadir}
> >>>>> > and
> >>>>> > insists in making those "corrections" every time you touch the .pro,
> >>>>> > secondly
> >>>>> > because it makes any kind of Continuous Integration close to
> >>>>> > impossible
> >>>>> > if you
> >>>>> > have the IDE open when it's is running.
> >>>>> > Causes a loop between SDK IDE noticing .pro has been **touched**,
> >>>>> > not
> >>>>> > edited,
> >>>>> > and then updating the .yaml, ending up in git conflicts.
> >>>>> > *Sigh* - I spend the better part of last night trying to figure out
> >>>>> > where my
> >>>>> > very simple scripts went wrong, until I found out it was the
> >>>>> > freaking
> >>>>> > SDK that
> >>>>> > was messing with me :D

-- 
Med venlig hilsen / Best Regards

Thomas Tanghus


More information about the Devel mailing list