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

Exception while adding moc build steps if QTDIR is only defined in a user macro (property sheet)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 2.4.0
    • 2.1.1
    • General
    • None
    • Qt5.6.2, VS2017

    Description

      When a Qt version variable is defined only in a user macro and is used in the vcxproj file (ex: Qt5Version_x0020_x64="$(QTDIR)"), the extension throws an exception in AddMocStep (QtProject.cs) when mocing because "VersionInformation.Get(versionManager.GetInstallPath(envPro))" (line 837) returns null (since commit 828f4d86) and we try to access it later to set the variable "mocSupportsIncludes" (line 838).

      This is a problem for us because the Qt version variable "$(QTDIR)" is defined in a user macro with a property sheet (multiple Qt paths for static/non-static with x86/x64 build configs) and the extension doesn't use that macro when it tries to find which Qt version is available while adding the moc build steps.

      Attachments

        Issue Links

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

          Activity

            People

              mecfc Miguel Costa
              mgenessegrenier Mathieu Genesse-Grenier
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes