summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/UicOnly
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/QtAutogen/UicOnly')
-rw-r--r--Tests/QtAutogen/UicOnly/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/UicOnly/UicOnly.cpp18
-rw-r--r--Tests/QtAutogen/UicOnly/UicOnly.hpp15
-rw-r--r--Tests/QtAutogen/UicOnly/main.cpp7
-rw-r--r--Tests/QtAutogen/UicOnly/uiA.ui (renamed from Tests/QtAutogen/UicOnly/uiconly.ui)4
-rw-r--r--Tests/QtAutogen/UicOnly/uiB.ui24
-rw-r--r--Tests/QtAutogen/UicOnly/uiC.ui24
-rw-r--r--Tests/QtAutogen/UicOnly/uiD.ui24
-rw-r--r--Tests/QtAutogen/UicOnly/uiconly.cpp18
-rw-r--r--Tests/QtAutogen/UicOnly/uiconly.h20
10 files changed, 115 insertions, 43 deletions
diff --git a/Tests/QtAutogen/UicOnly/CMakeLists.txt b/Tests/QtAutogen/UicOnly/CMakeLists.txt
index 89a9a1b..f927f72 100644
--- a/Tests/QtAutogen/UicOnly/CMakeLists.txt
+++ b/Tests/QtAutogen/UicOnly/CMakeLists.txt
@@ -3,8 +3,6 @@ project(UicOnly)
include("../AutogenTest.cmake")
# Test AUTOUIC being enabled only
-# The moc is provided by the Qt macro
-qtx_wrap_cpp(uicOnlyMoc uiconly.h)
-add_executable(uicOnly uiconly.cpp ${uicOnlyMoc})
+add_executable(uicOnly main.cpp UicOnly.cpp)
set_property(TARGET uicOnly PROPERTY AUTOUIC ON)
target_link_libraries(uicOnly ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/UicOnly/UicOnly.cpp b/Tests/QtAutogen/UicOnly/UicOnly.cpp
new file mode 100644
index 0000000..8eee6d2
--- /dev/null
+++ b/Tests/QtAutogen/UicOnly/UicOnly.cpp
@@ -0,0 +1,18 @@
+#include "ui_uiC.h"
+#include "ui_uiD.h"
+// AUTOUIC includes on the first two lines of a source file
+#include "UicOnly.hpp"
+
+UicOnly::UicOnly()
+ : uiA(new Ui::UiA)
+ , uiB(new Ui::UiB)
+{
+ Ui::UiC uiC;
+ Ui::UiD uiD;
+}
+
+UicOnly::~UicOnly()
+{
+ delete uiB;
+ delete uiA;
+}
diff --git a/Tests/QtAutogen/UicOnly/UicOnly.hpp b/Tests/QtAutogen/UicOnly/UicOnly.hpp
new file mode 100644
index 0000000..24e1e0b
--- /dev/null
+++ b/Tests/QtAutogen/UicOnly/UicOnly.hpp
@@ -0,0 +1,15 @@
+#include "ui_uiA.h"
+#include "ui_uiB.h"
+// AUTOUIC includes on the first two lines of a header file
+#include <QObject>
+
+class UicOnly : public QObject
+{
+public:
+ UicOnly();
+ ~UicOnly();
+
+private:
+ Ui::UiA* uiA;
+ Ui::UiB* uiB;
+};
diff --git a/Tests/QtAutogen/UicOnly/main.cpp b/Tests/QtAutogen/UicOnly/main.cpp
new file mode 100644
index 0000000..bdd242e
--- /dev/null
+++ b/Tests/QtAutogen/UicOnly/main.cpp
@@ -0,0 +1,7 @@
+#include "UicOnly.hpp"
+
+int main(int argc, char* argv[])
+{
+ UicOnly uicOnly;
+ return 0;
+}
diff --git a/Tests/QtAutogen/UicOnly/uiconly.ui b/Tests/QtAutogen/UicOnly/uiA.ui
index 13fb832..4c5762e 100644
--- a/Tests/QtAutogen/UicOnly/uiconly.ui
+++ b/Tests/QtAutogen/UicOnly/uiA.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>UicOnly</class>
- <widget class="QWidget" name="UicOnly">
+ <class>UiA</class>
+ <widget class="QWidget" name="UiA">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/Tests/QtAutogen/UicOnly/uiB.ui b/Tests/QtAutogen/UicOnly/uiB.ui
new file mode 100644
index 0000000..6ca77de
--- /dev/null
+++ b/Tests/QtAutogen/UicOnly/uiB.ui
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UiB</class>
+ <widget class="QWidget" name="UiB">
+ <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>
diff --git a/Tests/QtAutogen/UicOnly/uiC.ui b/Tests/QtAutogen/UicOnly/uiC.ui
new file mode 100644
index 0000000..6802550
--- /dev/null
+++ b/Tests/QtAutogen/UicOnly/uiC.ui
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UiC</class>
+ <widget class="QWidget" name="UiC">
+ <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>
diff --git a/Tests/QtAutogen/UicOnly/uiD.ui b/Tests/QtAutogen/UicOnly/uiD.ui
new file mode 100644
index 0000000..aad79cf
--- /dev/null
+++ b/Tests/QtAutogen/UicOnly/uiD.ui
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>UiD</class>
+ <widget class="QWidget" name="UiD">
+ <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>
diff --git a/Tests/QtAutogen/UicOnly/uiconly.cpp b/Tests/QtAutogen/UicOnly/uiconly.cpp
deleted file mode 100644
index 7b91b25..0000000
--- a/Tests/QtAutogen/UicOnly/uiconly.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-
-#include "uiconly.h"
-
-UicOnly::UicOnly(QWidget* parent)
- : QWidget(parent)
- , ui(new Ui::UicOnly)
-{
-}
-
-UicOnly::~UicOnly()
-{
- delete ui;
-}
-
-int main()
-{
- return 0;
-}
diff --git a/Tests/QtAutogen/UicOnly/uiconly.h b/Tests/QtAutogen/UicOnly/uiconly.h
deleted file mode 100644
index 8f4eebe..0000000
--- a/Tests/QtAutogen/UicOnly/uiconly.h
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#ifndef UIC_ONLY_H
-#define UIC_ONLY_H
-
-#include <QWidget>
-
-#include "ui_uiconly.h"
-
-class UicOnly : public QWidget
-{
- Q_OBJECT
-public:
- explicit UicOnly(QWidget* parent = 0);
- ~UicOnly();
-
-private:
- Ui::UicOnly* ui;
-};
-
-#endif