From f68de01740a3b550a12ec0dbea7bce2ff2e1a382 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 15 Feb 2018 12:47:46 +0100 Subject: Get rid of the need for "import qbs" It is difficult to place why the "import qbs" statement is needed. What it does is providing the default imports like CppApplication. There's no advantage in having a project file without this base import, so we always import "qbs" implicitly now. [ChangeLog] Removed the need to add "import qbs" to project files. Change-Id: I5954fbbade361188d1d54815cc3bf806fb461e9d Reviewed-by: Christian Kandeler --- doc/howtos.qdoc | 8 -------- doc/qbs.qdoc | 12 ------------ doc/reference/items/convenience/androidapk.qdoc | 2 -- .../items/convenience/appleapplicationdiskimage.qdoc | 2 -- doc/reference/items/language/group.qbs | 2 -- doc/reference/items/language/module.qdoc | 1 - doc/reference/modules/android-ndk-module.qdoc | 2 -- doc/targets/qbs-target-qnx.qdoc | 2 -- 8 files changed, 31 deletions(-) (limited to 'doc') diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc index 6039a23fb..cc982023d 100644 --- a/doc/howtos.qdoc +++ b/doc/howtos.qdoc @@ -72,7 +72,6 @@ This is achieved by introducing a \e dependency between the two products using the \l{Depends} item. Here is a simple, but complete example: \code - import qbs Project { CppApplication { name : "the-app" @@ -120,8 +119,6 @@ For example: \code - import qbs - CppApplication { name: "the-app" files: ["main.cpp"] @@ -210,7 +207,6 @@ Finally, declare dependencies on \c ThirdParty in your project: \code - import qbs CppApplication { name: "the-app" files: ["main.cpp"] @@ -227,8 +223,6 @@ Here is a simple example for an application: \code - import qbs - Application { Depends { name: "cpp" } Depends { name: "bundle" } @@ -241,8 +235,6 @@ and for a framework: \code - import qbs - DynamicLibrary { Depends { name: "cpp" } Depends { name: "bundle" } diff --git a/doc/qbs.qdoc b/doc/qbs.qdoc index bfeda503a..c73b3f148 100644 --- a/doc/qbs.qdoc +++ b/doc/qbs.qdoc @@ -170,8 +170,6 @@ \l{cpp} module: \code - import qbs - Application { name: "helloworld" files: "main.cpp" @@ -330,8 +328,6 @@ The following example product contains one file tag, \e application: \code - import qbs - Product { Depends { name: "cpp" } type: ["application"] @@ -350,7 +346,6 @@ artifacts that takes \c .cpp artifacts as input. \code - import qbs Module { // ... Rule { @@ -819,8 +814,6 @@ A very simple C++ hello world project looks like this: \code ---helloworld.qbs--- - import qbs 1.0 - Application { name: "helloworld" files: "main.cpp" @@ -862,8 +855,6 @@ \code ---CrazyProduct.qbs--- - import qbs 1.0 - Product { property string craziness: "low" } @@ -887,7 +878,6 @@ } ---myproject.qbs--- - import qbs 1.0 import "helpers.js" as Helpers Product { @@ -934,8 +924,6 @@ module. You specify the optimization level for your product (and all build variants) like this: \code ---helloworld.qbs--- - import qbs 1.0 - Application { name: "helloworld" files: ["main.cpp"] diff --git a/doc/reference/items/convenience/androidapk.qdoc b/doc/reference/items/convenience/androidapk.qdoc index 89a4112b6..19c4541ec 100644 --- a/doc/reference/items/convenience/androidapk.qdoc +++ b/doc/reference/items/convenience/androidapk.qdoc @@ -43,8 +43,6 @@ example that comes with the Android SDK: \code - import qbs - AndroidApk { name: "Basic Media Decoder" packageName: "com.example.android.basicmediadecoder" diff --git a/doc/reference/items/convenience/appleapplicationdiskimage.qdoc b/doc/reference/items/convenience/appleapplicationdiskimage.qdoc index d8011d66a..87129169d 100644 --- a/doc/reference/items/convenience/appleapplicationdiskimage.qdoc +++ b/doc/reference/items/convenience/appleapplicationdiskimage.qdoc @@ -51,8 +51,6 @@ Here is what the project file could look like for a simple DMG installer: \code - import qbs - AppleApplicationDiskImage { Depends { name: "myapp" } name: "My App" diff --git a/doc/reference/items/language/group.qbs b/doc/reference/items/language/group.qbs index 4b478bfa5..c6bbae875 100644 --- a/doc/reference/items/language/group.qbs +++ b/doc/reference/items/language/group.qbs @@ -28,8 +28,6 @@ ** ****************************************************************************/ -import qbs 1.0 - Project { Product { //! [0] diff --git a/doc/reference/items/language/module.qdoc b/doc/reference/items/language/module.qdoc index fb2238e0c..bfaedacc9 100644 --- a/doc/reference/items/language/module.qdoc +++ b/doc/reference/items/language/module.qdoc @@ -41,7 +41,6 @@ characters from them. The module's name is \c{txt_processor}. \code - import qbs import qbs.FileInfo import qbs.TextFile diff --git a/doc/reference/modules/android-ndk-module.qdoc b/doc/reference/modules/android-ndk-module.qdoc index 23c70eec7..032cca97f 100644 --- a/doc/reference/modules/android-ndk-module.qdoc +++ b/doc/reference/modules/android-ndk-module.qdoc @@ -43,8 +43,6 @@ the NDK could look like: \code - import qbs - Project { DynamicLibrary { name: "hello-jni" diff --git a/doc/targets/qbs-target-qnx.qdoc b/doc/targets/qbs-target-qnx.qdoc index fc03ce677..c7e28d905 100644 --- a/doc/targets/qbs-target-qnx.qdoc +++ b/doc/targets/qbs-target-qnx.qdoc @@ -48,8 +48,6 @@ \l{qnx::sdkDir}{qnx.sdkDir} property: \code - import qbs - Application { name: "helloworld" files: "main.cpp" -- cgit v1.2.3