Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-119

Expose Qt Version as environment variable

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • 2.4.0
    • 1.1.10
    • General
    • None

      Feature request:
      Expose Qt Version $(QTVERSION) as environment variable the same way $(QTDIR) is set by the add-in.

      Reason:
      I have several libraries used in several of my applications.
      Since I use different Qt Versions (static and dynamic) with these applications I have to do a clean build whenever I switch between solutions.

      Hence I'd like to add the Qt version to my temp and out dir in order to separate the builds. (like so: .\..\..\temp\$(TargetName)\$(QTVERSION))

      Here is my proposed fix:

      diff --git a/Qt4VS2003/QtProjectLib/QtProject.cs b/Qt4VS2003/QtProjectLib/QtProject.cs
      index 1d149b1..4a87b1e 100644
      — a/Qt4VS2003/QtProjectLib/QtProject.cs
      +++ b/Qt4VS2003/QtProjectLib/QtProject.cs
      @@ -3583,7 +3583,8 @@ namespace Nokia.QtProjectLib

      string qtDir = null;
      if (qtVersion != "$(QTDIR)")

      • qtDir = QtVersionManager.The().GetInstallPath(qtVersion);
        + qtDir = QtVersionManager.The().GetInstallPath(qtVersion);
        + HelperFunctions.SetEnvironmentVariableEx("QTVERSION", qtVersion);
        HelperFunctions.SetEnvironmentVariableEx("QTDIR", qtDir);
        #if VS2010
        try

      It would be great if the Qt Project Settings dialog would support this as well.

      Regards, ceumern

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mecfc Miguel Costa
            ceumern delete me please
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes