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

Faulty folder structure issues when importing project using subdirs

    XMLWordPrintable

Details

    • e914ceff01417e7b4a73192bdcecdd091aaa6855

    Description

      Consider the following .pro file:

      Qt += core gui
      
      TEMPLATE = app
      TARGET = MyExe
      DESTDIR = bin
      
      MOC_DIR = test_moc
      OBJECTS_DIR = test_obj
      UI_DIR = test_uic
      RCC_DIR = test_rcc
      
      SOURCES += MyExeClass.cpp \
      main.cpp
      
      HEADERS += MyExeClass.h
      
      FORMS += MyExeClass.ui
      
      RESOURCES += MyExe.qrc
      

      With the Qt options in Visual Studio set like this (just for testing):

      • MocDirectory .\qt_moc\$(ConfigurationName)
      • RccDirectory .\qt_rcc
      • UicDirectory .\qt_uic

      When importing the .pro file into Visual Studio via the Qt-Menu I get the following configuration:

      • Intermediate Directory: $(PlatformName)\$(ConfigurationName)
      • MocDirectory: \GeneratedFiles\$(ConfigurationName)
      • RccDirectory: .\qt_rcc
      • UicDirectory: .\qt_uic

      When generating a vcproj file via "qmake -tp vc" I get the following:

      • Intermediate Directory: test_obj
      • Moc/Rcc/Uic cannot be displayed before converting to a "Qt Add-In" project, but files are generated to the locations specified in the .pro file.

      Now when converting this vcproj file to a Qt Add-In project, the settings are:

      • Intermediate Directory: test_obj
      • MocDirecotry: .\GeneratedFiles\$(ConfigurationName)
      • RccDirectory: .\test_rcc
      • UicDirectory: .\test_uic

      As a summary:

      • Expected behaviour: The MOC/OBJ/UI/RCC folder definitions from the .pro file are used.
      • Generating a .vcproj file with qmake works properly
      • Converting a generated .vcproj file to a Qt Add-In project overrides the MocDirectory with a default setting
      • Importing a .pro file with the VS Add-In ignores the folder definitions completely (obj/moc are defaulted, uic/rcc are taken from the Qt Options in VS)

      Attachments

        Activity

          People

            mecfc Miguel Costa
            thwijeth Tharanga Wijethilake (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: