Autogen: Add AUTOUIC_SEARCH_PATHS test

This commit is contained in:
Sebastian Holtermann
2017-02-23 21:36:10 +01:00
committed by Brad King
parent 1cdf7c1be2
commit 6d7c02db34
7 changed files with 100 additions and 0 deletions

View File

@@ -286,6 +286,10 @@ if (NOT QT_TEST_VERSION STREQUAL 4)
endif()
# -- Test
# Tests various .ui include directories
add_subdirectory(uicInclude)
# -- Test
# Complex test case
add_subdirectory(complex)

View File

@@ -0,0 +1,8 @@
# Test moc include patterns
set(CMAKE_AUTOUIC_SEARCH_PATHS "dirA")
add_executable(uicInclude main.cpp)
target_link_libraries(uicInclude ${QT_LIBRARIES})
set_target_properties(uicInclude PROPERTIES AUTOUIC ON)
set_property(TARGET uicInclude APPEND PROPERTY AUTOUIC_SEARCH_PATHS "dirB")

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PageC</class>
<widget class="QWidget" name="PageC">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTreeView" name="treeView"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PageA</class>
<widget class="QWidget" name="PageA">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTreeView" name="treeView"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>PageB</class>
<widget class="QWidget" name="PageB">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QTreeView" name="treeView"/>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,10 @@
#include "main.hpp"
int main(int argv, char** args)
{
return 0;
}
#include "sub/ui_PageB.h"
#include "ui_PageC.h"

View File

@@ -0,0 +1,6 @@
#ifndef MAIN_HPP
#define MAIN_HPP
#include "ui_PageA.h"
#endif