summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-09-16 23:23:57 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-09-18 07:41:16 (GMT)
commite3c97a1914aa0a521b55b53ab1b0d71732c5e466 (patch)
tree2bf4429537174c4457b7ba9b6cc431f3a7013c88 /Tests
parentb8877b1d62599bba7a014e95fbbd670f177243ce (diff)
downloadCMake-e3c97a1914aa0a521b55b53ab1b0d71732c5e466.zip
CMake-e3c97a1914aa0a521b55b53ab1b0d71732c5e466.tar.gz
CMake-e3c97a1914aa0a521b55b53ab1b0d71732c5e466.tar.bz2
QtAutogen: Process all ui files in a source file (#14981).
Use a vector to store a list of matched ui_ includes, instead of overwriting the previous match.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutogen/CMakeLists.txt1
-rw-r--r--Tests/QtAutogen/multiplewidgets.cpp19
-rw-r--r--Tests/QtAutogen/multiplewidgets.h33
-rw-r--r--Tests/QtAutogen/widget1.ui45
-rw-r--r--Tests/QtAutogen/widget2.ui29
5 files changed, 127 insertions, 0 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index f9aa309..f1a272a 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -68,6 +68,7 @@ add_custom_command(
)
add_executable(QtAutogen main.cpp calwidget.cpp second_widget.cpp foo.cpp blub.cpp bar.cpp abc.cpp
+ multiplewidgets.cpp
xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot>
test.qrc second_resource.qrc resourcetester.cpp generated.cpp
)
diff --git a/Tests/QtAutogen/multiplewidgets.cpp b/Tests/QtAutogen/multiplewidgets.cpp
new file mode 100644
index 0000000..f143875
--- /dev/null
+++ b/Tests/QtAutogen/multiplewidgets.cpp
@@ -0,0 +1,19 @@
+
+#include "multiplewidgets.h"
+
+#include "ui_widget1.h"
+#include "ui_widget2.h"
+
+Widget1::Widget1(QWidget *parent)
+ : QWidget(parent),
+ ui(new Ui::Widget1)
+{
+ ui->setupUi(this);
+}
+
+Widget2::Widget2(QWidget *parent)
+ : QWidget(parent),
+ ui(new Ui::Widget2)
+{
+ ui->setupUi(this);
+}
diff --git a/Tests/QtAutogen/multiplewidgets.h b/Tests/QtAutogen/multiplewidgets.h
new file mode 100644
index 0000000..6ae6ad1
--- /dev/null
+++ b/Tests/QtAutogen/multiplewidgets.h
@@ -0,0 +1,33 @@
+
+#ifndef MULTIPLEWIDGETS_H
+#define MULTIPLEWIDGETS_H
+
+#include <QWidget>
+
+namespace Ui {
+class Widget1;
+}
+
+class Widget1 : public QWidget
+{
+ Q_OBJECT
+public:
+ Widget1(QWidget *parent = 0);
+private:
+ Ui::Widget1 *ui;
+};
+
+namespace Ui {
+class Widget2;
+}
+
+class Widget2 : public QWidget
+{
+ Q_OBJECT
+public:
+ Widget2(QWidget *parent = 0);
+private:
+ Ui::Widget2 *ui;
+};
+
+#endif
diff --git a/Tests/QtAutogen/widget1.ui b/Tests/QtAutogen/widget1.ui
new file mode 100644
index 0000000..8fce81a
--- /dev/null
+++ b/Tests/QtAutogen/widget1.ui
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Widget1</class>
+ <widget class="QWidget" name="Widget1">
+ <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>
+ <widget class="QPushButton" name="pushButton">
+ <property name="geometry">
+ <rect>
+ <x>140</x>
+ <y>80</y>
+ <width>80</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>PushButton</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="pushButton_2">
+ <property name="geometry">
+ <rect>
+ <x>190</x>
+ <y>170</y>
+ <width>80</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>PushButton</string>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/Tests/QtAutogen/widget2.ui b/Tests/QtAutogen/widget2.ui
new file mode 100644
index 0000000..1f411b9
--- /dev/null
+++ b/Tests/QtAutogen/widget2.ui
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Widget2</class>
+ <widget class="QWidget" name="Widget1">
+ <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>
+ <widget class="QListWidget" name="listWidget">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>20</y>
+ <width>256</width>
+ <height>192</height>
+ </rect>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>