mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-11 20:11:10 -05:00
Autogen: Tests: Add <SUBDIR>/ui_view.h AUTOUIC includes to sameName test
This commit is contained in:
@@ -17,7 +17,10 @@ add_executable(sameName
|
|||||||
main.cpp
|
main.cpp
|
||||||
)
|
)
|
||||||
target_link_libraries(sameName ${QT_LIBRARIES})
|
target_link_libraries(sameName ${QT_LIBRARIES})
|
||||||
set_target_properties(sameName PROPERTIES AUTOMOC TRUE AUTORCC TRUE)
|
set_target_properties(sameName PROPERTIES
|
||||||
|
AUTOMOC TRUE
|
||||||
|
AUTOUIC TRUE
|
||||||
|
AUTORCC TRUE)
|
||||||
|
|
||||||
# Set different compression levels
|
# Set different compression levels
|
||||||
if (QT_TEST_VERSION STREQUAL 4)
|
if (QT_TEST_VERSION STREQUAL 4)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "item.hpp"
|
#include "item.hpp"
|
||||||
|
// Include ui_view.h only in header
|
||||||
|
|
||||||
namespace aaa {
|
namespace aaa {
|
||||||
|
|
||||||
@@ -13,6 +14,7 @@ public:
|
|||||||
|
|
||||||
void Item::go()
|
void Item::go()
|
||||||
{
|
{
|
||||||
|
Ui_ViewAAA ui;
|
||||||
MocLocal obj;
|
MocLocal obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
#define AAA_ITEM_HPP
|
#define AAA_ITEM_HPP
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
// Include ui_view.h only in header
|
||||||
|
#include <aaa/ui_view.h>
|
||||||
|
|
||||||
namespace aaa {
|
namespace aaa {
|
||||||
|
|
||||||
|
|||||||
24
Tests/QtAutogen/sameName/aaa/view.ui
Normal file
24
Tests/QtAutogen/sameName/aaa/view.ui
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ViewAAA</class>
|
||||||
|
<widget class="QWidget" name="Base">
|
||||||
|
<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>
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
#include "item.hpp"
|
#include "item.hpp"
|
||||||
|
// Include ui_view.h only in source
|
||||||
|
#include <bbb/ui_view.h>
|
||||||
|
|
||||||
namespace bbb {
|
namespace bbb {
|
||||||
|
|
||||||
@@ -13,6 +15,7 @@ public:
|
|||||||
|
|
||||||
void Item::go()
|
void Item::go()
|
||||||
{
|
{
|
||||||
|
Ui_ViewBBB ui;
|
||||||
MocLocal obj;
|
MocLocal obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#define BBB_ITEM_HPP
|
#define BBB_ITEM_HPP
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
// Include ui_view.h only in source
|
||||||
|
|
||||||
namespace bbb {
|
namespace bbb {
|
||||||
|
|
||||||
|
|||||||
24
Tests/QtAutogen/sameName/bbb/view.ui
Normal file
24
Tests/QtAutogen/sameName/bbb/view.ui
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ViewBBB</class>
|
||||||
|
<widget class="QWidget" name="Base">
|
||||||
|
<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>
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
#include "item.hpp"
|
#include "item.hpp"
|
||||||
|
// Include ui_view.h in source and header
|
||||||
|
#include <ccc/ui_view.h>
|
||||||
|
|
||||||
namespace ccc {
|
namespace ccc {
|
||||||
|
|
||||||
@@ -13,6 +15,7 @@ public:
|
|||||||
|
|
||||||
void Item::go()
|
void Item::go()
|
||||||
{
|
{
|
||||||
|
Ui_ViewCCC ui;
|
||||||
MocLocal obj;
|
MocLocal obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
#define CCC_ITEM_HPP
|
#define CCC_ITEM_HPP
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
// Include ui_view.h in source and header
|
||||||
|
#include <ccc/ui_view.h>
|
||||||
|
|
||||||
namespace ccc {
|
namespace ccc {
|
||||||
|
|
||||||
|
|||||||
24
Tests/QtAutogen/sameName/ccc/view.ui
Normal file
24
Tests/QtAutogen/sameName/ccc/view.ui
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>ViewCCC</class>
|
||||||
|
<widget class="QWidget" name="Base">
|
||||||
|
<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>
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
#include "item.hpp"
|
#include "item.hpp"
|
||||||
|
// Include ui_view.h in source and header
|
||||||
|
#include <ui_view.h>
|
||||||
|
|
||||||
class MocLocal : public QObject
|
class MocLocal : public QObject
|
||||||
{
|
{
|
||||||
@@ -11,6 +13,7 @@ public:
|
|||||||
|
|
||||||
void Item::go()
|
void Item::go()
|
||||||
{
|
{
|
||||||
|
Ui_View ui;
|
||||||
MocLocal obj;
|
MocLocal obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
#define ITEM_HPP
|
#define ITEM_HPP
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
// Include ui_view.h in source and header
|
||||||
|
#include <ui_view.h>
|
||||||
|
|
||||||
class Item : public QObject
|
class Item : public QObject
|
||||||
{
|
{
|
||||||
|
|||||||
24
Tests/QtAutogen/sameName/view.ui
Normal file
24
Tests/QtAutogen/sameName/view.ui
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>View</class>
|
||||||
|
<widget class="QWidget" name="Base">
|
||||||
|
<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>
|
||||||
Reference in New Issue
Block a user