[Qt-creator] Currently active file from GenericMakeStep or GenericProject?
Frank Siegert
frank.siegert at durham.ac.uk
Mon Jun 22 10:18:46 CEST 2009
Eike Ziller, Monday 22 June 2009:
> I'm thinking of any kind of e.g. build or run configuration, command
> line arguments for starting a program, working directory settings,
> running external tools ... (a variable for the current editor might
> not be the most important one for these, but once the infrastructure
> is there, it could be used for a bunch of variables)
Ok, I have implemented it in the VariableManager now in a way such that it
can be used from anywhere with an arbitrary QFileInfo as input.
Given that, I also thought it would make sense to use the QFileInfo method
names as replacement tags, e.g. ${absolutePath}. That should make it easy
to document the functionality and very natural for every Qt programmer to
actually use it.
> > Also, to implement this in a proper way, I'd have to make sure that I
> > identify the file name components in a more platform-independent
> > way, i.e.
> > not by looking for the last forward-slash.
>
> QFileInfo(filePath).fileName()
> that's what Qt is for ;-)
Thanks, I was sure there must be something like that, and actually had
figured it out from the Qt docs half an hour ago. They are very good, and
I am very new to Qt as you have noticed (it's not even what I am using
QtCreator for ;)).
> Hoping that I'm not too aggressive :),
Not at all, thanks for your help. I have a proper implementation of my
wanted feature now, and am attaching it as a patch for the moment, until I
find out how to do the fancy requesting with gitorious (and have a better
connection than the one in a train ;)). Comments very welcome.
Cheers,
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: builddir-replacement.patch
Type: text/x-patch
Size: 3106 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20090622/8bbb5334/attachment.bin
More information about the Qt-creator-old
mailing list