[Qt-creator] Qt Creator and version control: Invoke visual diff viewer on diff

Ziller Eike Eike.Ziller at digia.com
Wed Mar 6 11:01:34 CET 2013


On 05.03.2013, at 22:11, Alfonso Chartier <alfonso.chartier at gmail.com> wrote:

> Thank you Andre, I was not aware of the External Tools menu. This is very powerful.
> 
> I almost have what I am interested in working. The one stumbling block I have is that I need access to the filename so I can pass it as an Argument to my diff program. Unfortunately, the built-in variable %{CurrentDocument:FilePath} includes the full path to the file; this won't work, as I need the file name only.
> 
> Is there a way to add additional custom variables to the list of selectable ones? If not, is there any other way I can just get the name of the current file?

If you are on linux/mac you could wrap whatever you do in a bash script that gets the filepath by using /usr/bin/basename :)
(Aside from that it might be a good idea that we add the file name to the variables, but that's only possible with c++ code)

Br, Eike

> Thanks,
> 
> Alfonso
> 
> 
> On Tue, Mar 5, 2013 at 12:00 PM, André Pönitz <andre.poenitz at mathematik.tu-chemnitz.de> wrote:
> On Mon, Mar 04, 2013 at 06:10:17PM -0800, Alfonso Chartier wrote:
> > Hi,
> >
> > I am wondering if there is an easy way to bring up a visual diff
> > viewer when the diff operation is invoked. Currently, performing a
> > diff (Alt + S, Alt + D) brings up a read-only text-based diff in the
> > editor. It would be great if a visual diff viewer could be launched
> > instead (e.g., Meld).
> 
> > Is there an easy way to configure this? I did not notice any options
> > for this under Tools / Options / Version Control.
> 
> You can configure external tools in Tools->Options->Environemnt
> ->External Tools, and also assign keyboard short cuts for
> launching them
> 
> Note also that 2.7 will have an experimental diff viewer plugin
> and that the plan is to fully integrate that with the other
> plugins in the 2.8 cycle.
> 
> Andre'
> 
> 
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator

-- 
Eike Ziller, Senior Software Engineer - Digia, Qt
 
Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
Geschäftsführer: Mika Pälsi, Juha Varelius, Anja Wasenius
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B




More information about the Qt-creator mailing list