diff options
author | Brad King <brad.king@kitware.com> | 2014-08-11 13:59:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-08-11 13:59:46 (GMT) |
commit | c6f1c5585aabdd2f670e3fc5390ffef43232456f (patch) | |
tree | eb753e8129f9c59b294b9e61519cc688eac87b34 /Tests | |
parent | 76acc128a272b1fae303215a985410faec87c3e0 (diff) | |
parent | 71a11252e95797113ecb1a969386f496b7d4861b (diff) | |
download | CMake-c6f1c5585aabdd2f670e3fc5390ffef43232456f.zip CMake-c6f1c5585aabdd2f670e3fc5390ffef43232456f.tar.gz CMake-c6f1c5585aabdd2f670e3fc5390ffef43232456f.tar.bz2 |
Merge branch 'fix-Qt-Autogen' into release
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/QtAutogen/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/QtAutogen/resourcetester.cpp | 2 | ||||
-rw-r--r-- | Tests/QtAutogen/second_resource.qrc | 5 | ||||
-rw-r--r-- | Tests/QtAutogen/second_widget.cpp | 14 | ||||
-rw-r--r-- | Tests/QtAutogen/second_widget.h | 19 | ||||
-rw-r--r-- | Tests/QtAutogen/second_widget.ui | 32 |
6 files changed, 74 insertions, 2 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 0821b45..d2116aa 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -64,9 +64,9 @@ 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 resourcetester.cpp generated.cpp + test.qrc second_resource.qrc resourcetester.cpp generated.cpp ) set_property(TARGET QtAutogen APPEND PROPERTY AUTOGEN_TARGET_DEPENDS generate_moc_input "${CMAKE_CURRENT_BINARY_DIR}/myotherinterface.h") diff --git a/Tests/QtAutogen/resourcetester.cpp b/Tests/QtAutogen/resourcetester.cpp index 43314e1..0c64d80 100644 --- a/Tests/QtAutogen/resourcetester.cpp +++ b/Tests/QtAutogen/resourcetester.cpp @@ -16,6 +16,8 @@ void ResourceTester::doTest() { if (!QFile::exists(":/CMakeLists.txt")) qApp->exit(EXIT_FAILURE); + if (!QFile::exists(":/main.cpp")) + qApp->exit(EXIT_FAILURE); QTimer::singleShot(0, qApp, SLOT(quit())); } diff --git a/Tests/QtAutogen/second_resource.qrc b/Tests/QtAutogen/second_resource.qrc new file mode 100644 index 0000000..27bfb14 --- /dev/null +++ b/Tests/QtAutogen/second_resource.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>main.cpp</file> +</qresource> +</RCC> 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> |