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

Addin generates wrong include statement for files outside project directory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • 3.0.1
    • 2.2.1
    • Build-time integration
    • None

    Description

      Previous "Custom build tool" produced proper output. Compare what was generated before and after. We have custom lib with "includes/Qqt/ColorEditButton.h" file outside project dir.

      Before:
      in Visual Studio 2015 -> Solution Explorer -> header file -> properties -> Custom build tool -> Command line -> there is option with proper path:
      -f../../../includes/Qqt/ColorEditButton.h"

      After:
      New msbuild-based addin 2.2.1 produces wrong output: Solution Explorer -> header file -> Properties -> Qt Meta-Object Compiler -> "Force include" contains only

      ../../%(Filename)%(Extension)

      So produced include statement is wrong and included file is not found and moc_*.cpp fails to compile.

      Steps to reproduse
      create folder near the project directory (not inside project directory), create subfolder there, place header there with class with Q_OBJECT statement, choose Visual Studio - "add existing file" command. Try to build. We use precompiled header, if it depends on it, and files from that project are included also in precompiled header. Solution explorer ->project ->properties -> VC++ directories - contains folder "includes", if it depends on it.

      Workaround
      Solution explorer - Project ->Properties -> Qt meta-Object Compiler -> Force include: change "../../%(Filename)%(Extension)" to %(FullPath)

      Attachments

        1. 1-before.png
          1-before.png
          93 kB
        2. 2-after.png
          2-after.png
          122 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mecfc Miguel Costa
            neurocod Konstantine Kozachuck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes