summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-25 00:26:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-25 00:39:03 (GMT)
commit71a11252e95797113ecb1a969386f496b7d4861b (patch)
treeb5cac8379fc7a3aa35a055ded585498195e7b930 /Tests/QtAutogen
parent261acd91093ba5f2bf79f38a9632887ab2dd5f1c (diff)
downloadCMake-71a11252e95797113ecb1a969386f496b7d4861b.zip
CMake-71a11252e95797113ecb1a969386f496b7d4861b.tar.gz
CMake-71a11252e95797113ecb1a969386f496b7d4861b.tar.bz2
QtAutogen: Fix use of multiple ui files in a single target.
Don't store a mapping of the directory to the ui file. The directory will be a unique key, allowing only one ui file to be specified. Use the source file name instead as the mapping key.
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r--Tests/QtAutogen/CMakeLists.txt2
-rw-r--r--Tests/QtAutogen/second_widget.cpp14
-rw-r--r--Tests/QtAutogen/second_widget.h19
-rw-r--r--Tests/QtAutogen/second_widget.ui32
4 files changed, 66 insertions, 1 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index cf80f41..d2116aa 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -64,7 +64,7 @@ add_custom_command(
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/myotherinterface.h.in"
)
-add_executable(QtAutogen main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp
+add_executable(QtAutogen main.cpp calwidget.cpp second_widget.cpp foo.cpp blub.cpp bar.cpp abc.cpp
xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot>
test.qrc second_resource.qrc resourcetester.cpp generated.cpp
)
diff --git a/Tests/QtAutogen/second_widget.cpp b/Tests/QtAutogen/second_widget.cpp
new file mode 100644
index 0000000..65ba962
--- /dev/null
+++ b/Tests/QtAutogen/second_widget.cpp
@@ -0,0 +1,14 @@
+
+#include "second_widget.h"
+#include "ui_second_widget.h"
+
+SecondWidget::SecondWidget(QWidget *parent)
+ : QWidget(parent), ui(new Ui::SecondWidget)
+{
+ ui->setupUi(this);
+}
+
+SecondWidget::~SecondWidget()
+{
+ delete ui;
+}
diff --git a/Tests/QtAutogen/second_widget.h b/Tests/QtAutogen/second_widget.h
new file mode 100644
index 0000000..fe4d175
--- /dev/null
+++ b/Tests/QtAutogen/second_widget.h
@@ -0,0 +1,19 @@
+
+#include <QWidget>
+
+namespace Ui
+{
+class SecondWidget;
+}
+
+class SecondWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit SecondWidget(QWidget *parent = 0);
+
+ ~SecondWidget();
+
+private:
+ Ui::SecondWidget* ui;
+};
diff --git a/Tests/QtAutogen/second_widget.ui b/Tests/QtAutogen/second_widget.ui
new file mode 100644
index 0000000..4effa58
--- /dev/null
+++ b/Tests/QtAutogen/second_widget.ui
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SecondWidget</class>
+ <widget class="QWidget" name="SecondWidget">
+ <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>80</x>
+ <y>20</y>
+ <width>94</width>
+ <height>24</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>PushButton</string>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>