aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2013-10-30 18:22:21 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-10-31 17:48:47 +0100
commit7f0cc84396dd3d729200d3c99aae6358b9ed647e (patch)
tree51db9c6c8c48e8a9af073afc0f3e679518910c01 /examples
parent4cdb21ade421b4635d49a0f0d7b72118532b6ef6 (diff)
Clean up manual tests.
Turn some manual tests that add coverage of a feature into autotests. Turn some manual tests that demonstrate a feature into examples. Remove some manual tests that do neither. Change-Id: Ie54005e1ba5aad07319eb864cc5ad70e26308080 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/app-and-lib/app/app.qbs10
-rw-r--r--examples/app-and-lib/app/main.cpp36
-rw-r--r--examples/app-and-lib/app_and_lib.qbs8
-rw-r--r--examples/app-and-lib/lib/lib.cpp40
-rw-r--r--examples/app-and-lib/lib/lib.qbs10
-rw-r--r--examples/examples.qbs1
6 files changed, 105 insertions, 0 deletions
diff --git a/examples/app-and-lib/app/app.qbs b/examples/app-and-lib/app/app.qbs
new file mode 100644
index 000000000..01800e744
--- /dev/null
+++ b/examples/app-and-lib/app/app.qbs
@@ -0,0 +1,10 @@
+import qbs 1.0
+
+Product {
+ type: "application"
+ name : "app-and-lib-app"
+ files : [ "main.cpp" ]
+ Depends { name: "cpp" }
+ Depends { name: "app-and-lib-lib" }
+}
+
diff --git a/examples/app-and-lib/app/main.cpp b/examples/app-and-lib/app/main.cpp
new file mode 100644
index 000000000..e7d24bdc3
--- /dev/null
+++ b/examples/app-and-lib/app/main.cpp
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** 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 <stdio.h>
+
+int bla();
+int main()
+{
+ return bla();
+}
diff --git a/examples/app-and-lib/app_and_lib.qbs b/examples/app-and-lib/app_and_lib.qbs
new file mode 100644
index 000000000..56edf28a4
--- /dev/null
+++ b/examples/app-and-lib/app_and_lib.qbs
@@ -0,0 +1,8 @@
+import qbs 1.0
+Project {
+ references: [
+ "app/app.qbs",
+ "lib/lib.qbs"
+ ]
+}
+
diff --git a/examples/app-and-lib/lib/lib.cpp b/examples/app-and-lib/lib/lib.cpp
new file mode 100644
index 000000000..fed239535
--- /dev/null
+++ b/examples/app-and-lib/lib/lib.cpp
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** 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 <stdio.h>
+
+#ifndef CRUCIAL_DEFINE
+# error CRUCIAL_DEFINE not defined
+#endif
+
+int bla()
+{
+ puts("Hello World!");
+ return 2;
+}
diff --git a/examples/app-and-lib/lib/lib.qbs b/examples/app-and-lib/lib/lib.qbs
new file mode 100644
index 000000000..32d985294
--- /dev/null
+++ b/examples/app-and-lib/lib/lib.qbs
@@ -0,0 +1,10 @@
+import qbs 1.0
+
+Product {
+ type: "staticlibrary"
+ name: "app-and-lib-lib"
+ files: [ "lib.cpp" ]
+ cpp.defines: ['CRUCIAL_DEFINE']
+ Depends { name: 'cpp' }
+}
+
diff --git a/examples/examples.qbs b/examples/examples.qbs
index 7eb5f70f8..567d51b9a 100644
--- a/examples/examples.qbs
+++ b/examples/examples.qbs
@@ -2,6 +2,7 @@ import qbs
Project {
references: [
+ "app-and-lib/app_and_lib.qbs",
"cocoa-application/CocoaApplication.qbs",
"collidingmice/collidingmice.qbs",
"helloworld-complex/hello.qbs",