Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt5 VisualStudio Add-in 1.2.4 not populating the QTDIR macro

    Tools
    1
    1
    3511
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fsilva last edited by

      I saw (but now can't find again) a bug related to this issue that was already fixed in an older version but it is happening to me every time the *.vcxproj.user file is deleted.

      Qt5 Add-In re-creates it but does not set the QTDIR macro.

      As you can see in the below example, the add-in adds the $(QTDIR)\bin path to the PATH environment variable but does not declare the QTDIR macro.

      @<?xml version="1.0" encoding="utf-8"?>
      <Project ToolsVersion="12.0" >
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
      <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
      <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
      </PropertyGroup>
      </Project>@

      The correct file content (which I have to manually modifiy for all projects in the whole solution) is the following:

      @<?xml version="1.0" encoding="utf-8"?>
      <Project ToolsVersion="12.0" >
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
      <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
      <QTDIR>C:\Qt5\5.3\msvc2013</QTDIR>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
      <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin;$(PATH)</LocalDebuggerEnvironment>
      <QTDIR>C:\Qt5\5.3\msvc2013</QTDIR>
      </PropertyGroup>
      </Project>@

      Seems important to note that in our scenario we have 3 different Qt versions installed in parallel. The Solution's Qt version is the default one but is set by name instead of using the DefaultQtVersion macro, so the *.vcxproj files have something like:

      @Qt5Version_x0020_Win32="5.3"@

      instead of:

      @Qt5Version_x0020_Win32="$(DefaultQtVersion)"@

      1 Reply Last reply Reply Quote 0
      • First post
        Last post