diff options
author | Christian Kandeler <christian.kandeler@digia.com> | 2013-10-25 17:05:06 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-10-29 17:09:21 +0100 |
commit | bb3f7fa4ead8b0a23539376fc4d23aee51a88863 (patch) | |
tree | 622073f4487b48cd0a0899c8324b1344b79d497c | |
parent | ceaa4b9a1f856aa82dfb95fbdef8b99f2105a669 (diff) |
Add examples.
These are mostly former manual tests that seem useful for
demonstrating some feature to learners.
Change-Id: I06d895ebdee1280699416cf4930a08602951aaf7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r-- | examples/cocoa-application/CocoaApplication.qbs (renamed from tests/manual/CocoaApplication/CocoaApplication.qbs) | 2 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication.xcodeproj/project.pbxproj (renamed from tests/manual/CocoaApplication/CocoaApplication.xcodeproj/project.pbxproj) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/AppDelegate.h (renamed from tests/manual/CocoaApplication/CocoaApplication/AppDelegate.h) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/AppDelegate.m (renamed from tests/manual/CocoaApplication/CocoaApplication/AppDelegate.m) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/CocoaApplication-Info.plist (renamed from tests/manual/CocoaApplication/CocoaApplication/CocoaApplication-Info.plist) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/CocoaApplication-Prefix.pch (renamed from tests/manual/CocoaApplication/CocoaApplication/CocoaApplication-Prefix.pch) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/en.lproj/Credits.rtf (renamed from tests/manual/CocoaApplication/CocoaApplication/en.lproj/Credits.rtf) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/en.lproj/InfoPlist.strings (renamed from tests/manual/CocoaApplication/CocoaApplication/en.lproj/InfoPlist.strings) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/en.lproj/MainMenu.xib (renamed from tests/manual/CocoaApplication/CocoaApplication/en.lproj/MainMenu.xib) | 0 | ||||
-rw-r--r-- | examples/cocoa-application/CocoaApplication/main.m (renamed from tests/manual/CocoaApplication/CocoaApplication/main.m) | 0 | ||||
-rw-r--r-- | examples/collidingmice/collidingmice.qbs (renamed from tests/manual/collidingmice/collidingmice.qbs) | 0 | ||||
-rw-r--r-- | examples/collidingmice/images/cheese.jpg (renamed from tests/manual/collidingmice/images/cheese.jpg) | bin | 3029 -> 3029 bytes | |||
-rw-r--r-- | examples/collidingmice/main.cpp (renamed from tests/manual/collidingmice/main.cpp) | 0 | ||||
-rw-r--r-- | examples/collidingmice/mice.qrc (renamed from tests/manual/collidingmice/mice.qrc) | 0 | ||||
-rw-r--r-- | examples/collidingmice/mouse.cpp (renamed from tests/manual/collidingmice/mouse.cpp) | 0 | ||||
-rw-r--r-- | examples/collidingmice/mouse.h (renamed from tests/manual/collidingmice/mouse.h) | 0 | ||||
-rw-r--r-- | examples/examples.qbs | 12 | ||||
-rw-r--r-- | examples/helloworld-complex/hello.qbs | 39 | ||||
-rw-r--r-- | examples/helloworld-complex/src/foo.cpp (renamed from tests/manual/hello/src/foo.cpp) | 0 | ||||
-rw-r--r-- | examples/helloworld-complex/src/foo.h (renamed from tests/manual/hello/src/foo.h) | 0 | ||||
-rw-r--r-- | examples/helloworld-complex/src/main.cpp (renamed from tests/manual/hello/src/main.cpp) | 8 | ||||
-rw-r--r-- | examples/helloworld-complex/src/specialfeature.cpp | 8 | ||||
-rw-r--r-- | examples/helloworld-complex/src/specialfeature.h | 6 | ||||
-rw-r--r-- | examples/helloworld-minimal/hello.qbs | 6 | ||||
-rw-r--r-- | examples/helloworld-minimal/main.cpp | 6 | ||||
-rw-r--r-- | examples/helloworld-qt/hello.qbs | 7 | ||||
-rw-r--r-- | examples/helloworld-qt/main.cpp | 9 | ||||
-rw-r--r-- | qbs.qbs | 4 | ||||
-rw-r--r-- | tests/manual/application/foo.c | 9 | ||||
-rw-r--r-- | tests/manual/application/main.cpp | 53 | ||||
-rw-r--r-- | tests/manual/application/main_dbg.cpp | 53 | ||||
-rw-r--r-- | tests/manual/application/object1.cpp | 35 | ||||
-rw-r--r-- | tests/manual/application/object1.h | 42 | ||||
-rw-r--r-- | tests/manual/application/object2.cpp | 38 | ||||
-rw-r--r-- | tests/manual/application/object2.h | 42 | ||||
-rw-r--r-- | tests/manual/application/somecustomfeature.cpp | 36 | ||||
-rw-r--r-- | tests/manual/application/test.qbs | 43 | ||||
-rw-r--r-- | tests/manual/hello/hello.qbs | 23 |
38 files changed, 105 insertions, 376 deletions
diff --git a/tests/manual/CocoaApplication/CocoaApplication.qbs b/examples/cocoa-application/CocoaApplication.qbs index 490467923..f67adbfc4 100644 --- a/tests/manual/CocoaApplication/CocoaApplication.qbs +++ b/examples/cocoa-application/CocoaApplication.qbs @@ -1,7 +1,7 @@ import qbs 1.0 CppApplication { - Depends { name: "ib" } + Depends { condition: product.condition; name: "ib" } condition: qbs.targetOS.contains("osx") type: "applicationbundle" name: "CocoaApplication" diff --git a/tests/manual/CocoaApplication/CocoaApplication.xcodeproj/project.pbxproj b/examples/cocoa-application/CocoaApplication.xcodeproj/project.pbxproj index 6f2a6beda..6f2a6beda 100644 --- a/tests/manual/CocoaApplication/CocoaApplication.xcodeproj/project.pbxproj +++ b/examples/cocoa-application/CocoaApplication.xcodeproj/project.pbxproj diff --git a/tests/manual/CocoaApplication/CocoaApplication/AppDelegate.h b/examples/cocoa-application/CocoaApplication/AppDelegate.h index 1b556ce2d..1b556ce2d 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/AppDelegate.h +++ b/examples/cocoa-application/CocoaApplication/AppDelegate.h diff --git a/tests/manual/CocoaApplication/CocoaApplication/AppDelegate.m b/examples/cocoa-application/CocoaApplication/AppDelegate.m index 8db0bec8d..8db0bec8d 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/AppDelegate.m +++ b/examples/cocoa-application/CocoaApplication/AppDelegate.m diff --git a/tests/manual/CocoaApplication/CocoaApplication/CocoaApplication-Info.plist b/examples/cocoa-application/CocoaApplication/CocoaApplication-Info.plist index 546cb7972..546cb7972 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/CocoaApplication-Info.plist +++ b/examples/cocoa-application/CocoaApplication/CocoaApplication-Info.plist diff --git a/tests/manual/CocoaApplication/CocoaApplication/CocoaApplication-Prefix.pch b/examples/cocoa-application/CocoaApplication/CocoaApplication-Prefix.pch index 8a4e3cbd7..8a4e3cbd7 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/CocoaApplication-Prefix.pch +++ b/examples/cocoa-application/CocoaApplication/CocoaApplication-Prefix.pch diff --git a/tests/manual/CocoaApplication/CocoaApplication/en.lproj/Credits.rtf b/examples/cocoa-application/CocoaApplication/en.lproj/Credits.rtf index 9caf316e0..9caf316e0 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/en.lproj/Credits.rtf +++ b/examples/cocoa-application/CocoaApplication/en.lproj/Credits.rtf diff --git a/tests/manual/CocoaApplication/CocoaApplication/en.lproj/InfoPlist.strings b/examples/cocoa-application/CocoaApplication/en.lproj/InfoPlist.strings index b92732c79..b92732c79 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/en.lproj/InfoPlist.strings +++ b/examples/cocoa-application/CocoaApplication/en.lproj/InfoPlist.strings diff --git a/tests/manual/CocoaApplication/CocoaApplication/en.lproj/MainMenu.xib b/examples/cocoa-application/CocoaApplication/en.lproj/MainMenu.xib index faedd4637..faedd4637 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/en.lproj/MainMenu.xib +++ b/examples/cocoa-application/CocoaApplication/en.lproj/MainMenu.xib diff --git a/tests/manual/CocoaApplication/CocoaApplication/main.m b/examples/cocoa-application/CocoaApplication/main.m index c66c01585..c66c01585 100644 --- a/tests/manual/CocoaApplication/CocoaApplication/main.m +++ b/examples/cocoa-application/CocoaApplication/main.m diff --git a/tests/manual/collidingmice/collidingmice.qbs b/examples/collidingmice/collidingmice.qbs index 9df92b74c..9df92b74c 100644 --- a/tests/manual/collidingmice/collidingmice.qbs +++ b/examples/collidingmice/collidingmice.qbs diff --git a/tests/manual/collidingmice/images/cheese.jpg b/examples/collidingmice/images/cheese.jpg Binary files differindex dea5795fd..dea5795fd 100644 --- a/tests/manual/collidingmice/images/cheese.jpg +++ b/examples/collidingmice/images/cheese.jpg diff --git a/tests/manual/collidingmice/main.cpp b/examples/collidingmice/main.cpp index 633a1f003..633a1f003 100644 --- a/tests/manual/collidingmice/main.cpp +++ b/examples/collidingmice/main.cpp diff --git a/tests/manual/collidingmice/mice.qrc b/examples/collidingmice/mice.qrc index accdb4d0a..accdb4d0a 100644 --- a/tests/manual/collidingmice/mice.qrc +++ b/examples/collidingmice/mice.qrc diff --git a/tests/manual/collidingmice/mouse.cpp b/examples/collidingmice/mouse.cpp index fb263b49a..fb263b49a 100644 --- a/tests/manual/collidingmice/mouse.cpp +++ b/examples/collidingmice/mouse.cpp diff --git a/tests/manual/collidingmice/mouse.h b/examples/collidingmice/mouse.h index cf3f06d03..cf3f06d03 100644 --- a/tests/manual/collidingmice/mouse.h +++ b/examples/collidingmice/mouse.h diff --git a/examples/examples.qbs b/examples/examples.qbs new file mode 100644 index 000000000..bea9e3139 --- /dev/null +++ b/examples/examples.qbs @@ -0,0 +1,12 @@ +import qbs + +Project { + condition: withExamples + references: [ + "cocoa-application/CocoaApplication.qbs", + "collidingmice/collidingmice.qbs", + "helloworld-complex/hello.qbs", + "helloworld-minimal/hello.qbs", + "helloworld-qt/hello.qbs", + ] +} diff --git a/examples/helloworld-complex/hello.qbs b/examples/helloworld-complex/hello.qbs new file mode 100644 index 000000000..393179a5e --- /dev/null +++ b/examples/helloworld-complex/hello.qbs @@ -0,0 +1,39 @@ +import qbs 1.0 + +Project { + property bool hasSpecialFeature: true + Application { + name: 'HelloWorld-Complex' + + Depends { name: 'cpp' } + cpp.defines: ['SOMETHING'] + + + files: [ + "src/foo.h", + "src/foo.cpp" + ] + + Group { + condition: project.hasSpecialFeature + prefix: "src/" + files: ["specialfeature.cpp", "specialfeature.h"] + } + + Group { + cpp.defines: { + var defines = outer.concat([ + 'HAVE_MAIN_CPP', + cpp.debugInformation ? '_DEBUG' : '_RELEASE' + ]); + if (project.hasSpecialFeature) + defines.push("HAS_SPECIAL_FEATURE"); + return defines; + } + prefix: "src/" + files: [ + 'main.cpp' + ] + } + } +} diff --git a/tests/manual/hello/src/foo.cpp b/examples/helloworld-complex/src/foo.cpp index 126abcdbd..126abcdbd 100644 --- a/tests/manual/hello/src/foo.cpp +++ b/examples/helloworld-complex/src/foo.cpp diff --git a/tests/manual/hello/src/foo.h b/examples/helloworld-complex/src/foo.h index 1e4fd7b94..1e4fd7b94 100644 --- a/tests/manual/hello/src/foo.h +++ b/examples/helloworld-complex/src/foo.h diff --git a/tests/manual/hello/src/main.cpp b/examples/helloworld-complex/src/main.cpp index 6334c608b..2b4313eaf 100644 --- a/tests/manual/hello/src/main.cpp +++ b/examples/helloworld-complex/src/main.cpp @@ -1,4 +1,9 @@ #include "foo.h" + +#ifdef HAS_SPECIAL_FEATURE +#include "specialfeature.h" +#endif + #include <stdio.h> #ifndef HAVE_MAIN_CPP @@ -17,5 +22,8 @@ int main() #else puts("Hello World! (release version)"); #endif +#ifdef HAS_SPECIAL_FEATURE + bragAboutSpecialFeature(); +#endif } diff --git a/examples/helloworld-complex/src/specialfeature.cpp b/examples/helloworld-complex/src/specialfeature.cpp new file mode 100644 index 000000000..8dad4502f --- /dev/null +++ b/examples/helloworld-complex/src/specialfeature.cpp @@ -0,0 +1,8 @@ +#include "specialfeature.h" + +#include <iostream> + +void bragAboutSpecialFeature() +{ + std::cout << "I have a special feature!" << std::endl; +} diff --git a/examples/helloworld-complex/src/specialfeature.h b/examples/helloworld-complex/src/specialfeature.h new file mode 100644 index 000000000..a3fa53ab0 --- /dev/null +++ b/examples/helloworld-complex/src/specialfeature.h @@ -0,0 +1,6 @@ +#ifndef HELLO_SPECIAL_FEATURE +#define HELLO_SPECIAL_FEATURE + +void bragAboutSpecialFeature(); + +#endif diff --git a/examples/helloworld-minimal/hello.qbs b/examples/helloworld-minimal/hello.qbs new file mode 100644 index 000000000..ed1c15d33 --- /dev/null +++ b/examples/helloworld-minimal/hello.qbs @@ -0,0 +1,6 @@ +import qbs + +CppApplication { + name: "HelloWorld-minimal" + files: "main.cpp" +} diff --git a/examples/helloworld-minimal/main.cpp b/examples/helloworld-minimal/main.cpp new file mode 100644 index 000000000..7f95e64bb --- /dev/null +++ b/examples/helloworld-minimal/main.cpp @@ -0,0 +1,6 @@ +#include <iostream> + +int main() +{ + std::cout << "Hello, World!" << std::endl; +} diff --git a/examples/helloworld-qt/hello.qbs b/examples/helloworld-qt/hello.qbs new file mode 100644 index 000000000..de37369f3 --- /dev/null +++ b/examples/helloworld-qt/hello.qbs @@ -0,0 +1,7 @@ +import qbs + +CppApplication { + name: "HelloWorld-Qt" + Depends { name: "Qt.core" } + files: "main.cpp" +} diff --git a/examples/helloworld-qt/main.cpp b/examples/helloworld-qt/main.cpp new file mode 100644 index 000000000..0bbe4daac --- /dev/null +++ b/examples/helloworld-qt/main.cpp @@ -0,0 +1,9 @@ +#include <QCoreApplication> +#include <QTextStream> + +#include <cstdio> + +int main() +{ + QTextStream(stdout) << QCoreApplication::translate("hello", "Hello, World!") << endl; +} @@ -4,6 +4,7 @@ Project { property bool enableUnitTests: false property bool enableRPath: true property bool installApiHeaders: true + property bool withExamples: true property path libInstallDir: qbs.targetOS.contains("windows") ? "bin" : "lib" property path libRPaths: { if (!project.enableRPath) @@ -16,9 +17,10 @@ Project { property path resourcesInstallDir: "" references: [ - "src/src.qbs", "doc/doc.qbs", + "examples/examples.qbs", "share/share.qbs", + "src/src.qbs", "tests/auto/auto.qbs" ] } diff --git a/tests/manual/application/foo.c b/tests/manual/application/foo.c deleted file mode 100644 index 2a0b103fd..000000000 --- a/tests/manual/application/foo.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <stdio.h> - -int some_c_function(int x) -{ - printf("Some C function has been called. (arg: %d)\n", x); - return 123; -} - - diff --git a/tests/manual/application/main.cpp b/tests/manual/application/main.cpp deleted file mode 100644 index 313ed6f8a..000000000 --- a/tests/manual/application/main.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Build Suite. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include <cstdio> -#include "object1.h" -#include "object2.h" - -extern void someCustomFeature(); -extern "C" int some_c_function(int); - -class Object3 : public QObject -{ - Q_OBJECT -}; - -int main() -{ - Object1 obj1; - Object2 obj2; - Object3 obj3; - printf("Hello World\n"); - someCustomFeature(); - some_c_function(156); -} - -#include "main.moc" - diff --git a/tests/manual/application/main_dbg.cpp b/tests/manual/application/main_dbg.cpp deleted file mode 100644 index a801a0980..000000000 --- a/tests/manual/application/main_dbg.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Build Suite. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include <cstdio> -#include "object1.h" -#include "object2.h" - -extern void someCustomFeature(); -extern "C" int some_c_function(int); - -class Object3 : public QObject -{ - Q_OBJECT -}; - -int main() -{ - Object1 obj1; - Object2 obj2; - Object3 obj3; - printf("Hello World (debug version)\n"); - someCustomFeature(); - some_c_function(156); -} - -#include "main_dbg.moc" - diff --git a/tests/manual/application/object1.cpp b/tests/manual/application/object1.cpp deleted file mode 100644 index d515461fd..000000000 --- a/tests/manual/application/object1.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Build Suite. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include "object1.h" - -Object1::Object1(QObject *parent) - : QObject(parent) -{} - diff --git a/tests/manual/application/object1.h b/tests/manual/application/object1.h deleted file mode 100644 index 1bdbeec00..000000000 --- a/tests/manual/application/object1.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Build Suite. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#ifndef OBJECT1_H -#define OBJECT1_H -#include <QObject> - -class Object1 : public QObject -{ - Q_OBJECT -public: - Object1(QObject *parent = 0); -}; - -#endif - diff --git a/tests/manual/application/object2.cpp b/tests/manual/application/object2.cpp deleted file mode 100644 index 0e2e0272c..000000000 --- a/tests/manual/application/object2.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Build Suite. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include "object2.h" - -Object2::Object2(QObject *parent) - : QObject(parent) -{} - - -#include "moc_object2.cpp" - diff --git a/tests/manual/application/object2.h b/tests/manual/application/object2.h deleted file mode 100644 index 08957cc79..000000000 --- a/tests/manual/application/object2.h +++ /dev/null @@ -1,42 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Build Suite. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#ifndef OBJECT2_H -#define OBJECT2_H -#include <QtCore/QObject> - -class Object2 : public QObject -{ - Q_OBJECT -public: - Object2(QObject *parent = 0); -}; - -#endif - diff --git a/tests/manual/application/somecustomfeature.cpp b/tests/manual/application/somecustomfeature.cpp deleted file mode 100644 index bdf263527..000000000 --- a/tests/manual/application/somecustomfeature.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Build Suite. -** -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -****************************************************************************/ - -#include <cstdio> - -void someCustomFeature() -{ - printf("void someCustomFeature() called\n"); -} - diff --git a/tests/manual/application/test.qbs b/tests/manual/application/test.qbs deleted file mode 100644 index a2e71fccf..000000000 --- a/tests/manual/application/test.qbs +++ /dev/null @@ -1,43 +0,0 @@ -import qbs 1.0 - -Project { - Product { - type: "application" - name: "QtHelloWorld" - - Depends { - name: "Qt" - submodules: ["gui"] - } - - property bool someCustomFeature: true - - Group { - condition: qbs.debugInformation === false - files : [ "main.cpp" ] - } - - Group { - condition: qbs.debugInformation === true - files : [ "main_dbg.cpp" ] - } - - files : [ - "object1.h", - "object1.cpp", - "object2.cpp", - "foo.c" - ] - - Group { - files: [ "object2.h" ] - fileTags: [ "hpp" ] - } - - Group { - condition: someCustomFeature == true - files: [ "somecustomfeature.cpp" ] - } - } -} - diff --git a/tests/manual/hello/hello.qbs b/tests/manual/hello/hello.qbs deleted file mode 100644 index aeb46faf9..000000000 --- a/tests/manual/hello/hello.qbs +++ /dev/null @@ -1,23 +0,0 @@ -import qbs 1.0 - -Application { - name: 'HelloWorld' - - Depends { name: 'cpp' } - - cpp.defines: ['SOMETHING'] - - files: [ - "src/foo.h", - "src/foo.cpp" - ] - - Group { - cpp.defines: outer.concat(['HAVE_MAIN_CPP', cpp.debugInformation ? '_DEBUG' : '_RELEASE']) - prefix: "src/" - files: [ - 'main.cpp' - ] - } -} - |