diff options
154 files changed, 64 insertions, 238 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index cdd009e7e..d32301116 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,8 @@ -cmake_minimum_required(VERSION 3.15) +cmake_minimum_required(VERSION 3.10) + +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.15") + cmake_policy(VERSION 3.15) +endif() ## Add paths to check for cmake modules: list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -35,7 +39,7 @@ find_package(Qt${QT_VERSION_MAJOR} REQUIRED ) -find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS Script) +find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS Script QUIET) if (Qt6_FOUND) find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core5Compat REQUIRED) @@ -48,7 +52,8 @@ else() add_library(Qt6Core5Compat INTERFACE) endif() if (NOT QBS_USE_BUNDLED_QT_SCRIPT AND Qt5Script_FOUND) - add_library(qbsscriptengine ALIAS Qt5::Script) + add_library(qbsscriptengine INTERFACE) + target_link_libraries(qbsscriptengine INTERFACE Qt5::Script) endif() endif() diff --git a/cmake/QbsBuildConfig.cmake b/cmake/QbsBuildConfig.cmake index f0861010a..08e36bc67 100644 --- a/cmake/QbsBuildConfig.cmake +++ b/cmake/QbsBuildConfig.cmake @@ -36,16 +36,19 @@ file(RELATIVE_PATH QBS_RELATIVE_APP_RPATH "/${QBS_APP_INSTALL_DIR}" "/${QBS_LIB_ file(RELATIVE_PATH QBS_RELATIVE_PLUGINS_RPATH "/${QBS_PLUGINS_INSTALL_DIR}" "/${QBS_LIB_INSTALL_DIR}") if(WIN32 OR NOT QBS_ENABLE_RPATH) + set(QBS_MACOSX_RPATH OFF) set(QBS_LIB_RPATH "") set(QBS_LIBEXEC_RPATH "") set(QBS_APP_RPATH "") set(QBS_PLUGINS_RPATH "") elseif(APPLE) + set(QBS_MACOSX_RPATH ON) set(QBS_LIB_RPATH "@loader_path") set(QBS_LIBEXEC_RPATH "@loader_path/${QBS_RELATIVE_LIBEXEC_RPATH}") set(QBS_APP_RPATH "@loader_path/${QBS_RELATIVE_APP_RPATH}") set(QBS_PLUGINS_RPATH "@loader_path/${QBS_RELATIVE_PLUGINS_RPATH}") else() + set(QBS_MACOSX_RPATH OFF) set(QBS_LIB_RPATH "\$ORIGIN") set(QBS_LIBEXEC_RPATH "\$ORIGIN/${QBS_RELATIVE_LIBEXEC_RPATH}") set(QBS_APP_RPATH "\$ORIGIN/${QBS_RELATIVE_APP_RPATH}") @@ -119,6 +122,7 @@ function(add_qbs_app target_name) RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${QBS_OUTPUT_PREFIX}${_DESTINATION} BUILD_RPATH "${QBS_APP_RPATH}" INSTALL_RPATH "${QBS_APP_RPATH}" + MACOSX_RPATH ${QBS_MACOSX_RPATH} ) install(TARGETS ${target_name} RUNTIME DESTINATION ${_DESTINATION}) endfunction() @@ -160,6 +164,7 @@ function(add_qbs_library target_name) RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${QBS_OUTPUT_PREFIX}${QBS_DLL_INSTALL_DIR} BUILD_RPATH "${QBS_LIB_RPATH}" INSTALL_RPATH "${QBS_LIB_RPATH}" + MACOSX_RPATH ${QBS_MACOSX_RPATH} SOVERSION ${_SOVERSION} VERSION ${QBS_VERSION} ) @@ -195,6 +200,7 @@ function(add_qbs_plugin target_name) RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${QBS_OUTPUT_PREFIX}${QBS_PLUGINS_INSTALL_DIR} BUILD_RPATH "${QBS_PLUGINS_RPATH}" INSTALL_RPATH "${QBS_PLUGINS_RPATH}" + MACOSX_RPATH ${QBS_MACOSX_RPATH} ) install(TARGETS ${target_name} LIBRARY DESTINATION ${QBS_PLUGINS_INSTALL_DIR} @@ -241,6 +247,7 @@ function(add_qbs_test test_name) RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${QBS_OUTPUT_PREFIX}${QBS_APP_INSTALL_DIR} BUILD_RPATH "${QBS_APP_RPATH}" INSTALL_RPATH "${QBS_APP_RPATH}" + MACOSX_RPATH ${QBS_MACOSX_RPATH} ) install(TARGETS ${target_name} RUNTIME DESTINATION ${QBS_APP_INSTALL_DIR}) add_test(NAME ${target_name} COMMAND ${target_name}) diff --git a/doc/doc.qbs b/doc/doc.qbs index 8ab6cfdb9..03c82e18c 100644 --- a/doc/doc.qbs +++ b/doc/doc.qbs @@ -1,4 +1,3 @@ -import qbs 1.0 import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/doc/man/man.qbs b/doc/man/man.qbs index 32f8e624e..8b81f62ae 100644 --- a/doc/man/man.qbs +++ b/doc/man/man.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.ModUtils diff --git a/doc/reference/items/probe/include-probe.qdoc b/doc/reference/items/probe/include-probe.qdoc index 370567dc3..eb8fcf8b9 100644 --- a/doc/reference/items/probe/include-probe.qdoc +++ b/doc/reference/items/probe/include-probe.qdoc @@ -39,7 +39,6 @@ For example, IncludeProbe can be used to search for a zlib header as follows: \code - import qbs import qbs.Probes CppApplication { diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index 1628bc80e..1483dc9c7 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -854,7 +854,7 @@ If the value is left undefined, the compiler default will be used. If the list contains more than one value, the highest version is chosen. - Possible values include: \c{"c++98"}, \c{"c++11"}, \c{"c++14"}, \c{"c++17"}. + Possible values include: \c{"c++98"}, \c{"c++11"}, \c{"c++14"}, \c{"c++17"}, \c{"c++20"}. \nodefaultvalue */ @@ -1925,3 +1925,17 @@ \windowsproperty \nodefaultvalue */ + +/*! + \qmlproperty string cpp::enableCxxLanguageMacro + \since Qbs 1.20 + + Whether to set the \c{/Zc:__cplusplus} macro + (\l{https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus}) + + This property only applies to MSVC toolchain. clang-cl also supports + this option, but it has no effect. + + \windowsproperty + \defaultvalue \c{true} for MSVC, \c{false} for clang-cl +*/ diff --git a/examples/app-and-lib/app-and-lib.qbs b/examples/app-and-lib/app-and-lib.qbs index baa42307f..8170f37a2 100644 --- a/examples/app-and-lib/app-and-lib.qbs +++ b/examples/app-and-lib/app-and-lib.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs 1.0 - Project { references: [ "app/app.qbs", diff --git a/examples/app-and-lib/app/app.qbs b/examples/app-and-lib/app/app.qbs index e94391877..dcb9e7af2 100644 --- a/examples/app-and-lib/app/app.qbs +++ b/examples/app-and-lib/app/app.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs 1.0 - Application { consoleApplication: true files : [ "main.cpp" ] diff --git a/examples/app-and-lib/lib/lib.qbs b/examples/app-and-lib/lib/lib.qbs index b67ba9ba6..a5fbc6fb8 100644 --- a/examples/app-and-lib/lib/lib.qbs +++ b/examples/app-and-lib/lib/lib.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs 1.0 - StaticLibrary { name: "mylib" files: [ diff --git a/examples/baremetal/at90can128olimex/at90can128olimex.qbs b/examples/baremetal/at90can128olimex/at90can128olimex.qbs index dc1760fe9..2c206f7cc 100644 --- a/examples/baremetal/at90can128olimex/at90can128olimex.qbs +++ b/examples/baremetal/at90can128olimex/at90can128olimex.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for Olimex AVR-CAN board" references: [ diff --git a/examples/baremetal/at90can128olimex/redblink/redblink.qbs b/examples/baremetal/at90can128olimex/redblink/redblink.qbs index 84323e3c1..afdbe46f7 100644 --- a/examples/baremetal/at90can128olimex/redblink/redblink.qbs +++ b/examples/baremetal/at90can128olimex/redblink/redblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.contains("avr")) diff --git a/examples/baremetal/baremetal.qbs b/examples/baremetal/baremetal.qbs index 82e913a4f..0d71968b6 100644 --- a/examples/baremetal/baremetal.qbs +++ b/examples/baremetal/baremetal.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "BareMetal" references: [ diff --git a/examples/baremetal/cc2540usbdongle/cc2540usbdongle.qbs b/examples/baremetal/cc2540usbdongle/cc2540usbdongle.qbs index 52e1948eb..6cb99e6a4 100644 --- a/examples/baremetal/cc2540usbdongle/cc2540usbdongle.qbs +++ b/examples/baremetal/cc2540usbdongle/cc2540usbdongle.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for cc2540usbdongle board" references: [ diff --git a/examples/baremetal/cc2540usbdongle/greenblink/greenblink.qbs b/examples/baremetal/cc2540usbdongle/greenblink/greenblink.qbs index e8aa3d1fd..d1d3281a9 100644 --- a/examples/baremetal/cc2540usbdongle/greenblink/greenblink.qbs +++ b/examples/baremetal/cc2540usbdongle/greenblink/greenblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.contains("mcs51")) diff --git a/examples/baremetal/cy7c68013a/cy7c68013a.qbs b/examples/baremetal/cy7c68013a/cy7c68013a.qbs index 370844725..dca261d70 100644 --- a/examples/baremetal/cy7c68013a/cy7c68013a.qbs +++ b/examples/baremetal/cy7c68013a/cy7c68013a.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for cy7c68013a board" references: [ diff --git a/examples/baremetal/cy7c68013a/nes-gamepads/nes-gamepads.qbs b/examples/baremetal/cy7c68013a/nes-gamepads/nes-gamepads.qbs index 0d7994033..81566ff96 100644 --- a/examples/baremetal/cy7c68013a/nes-gamepads/nes-gamepads.qbs +++ b/examples/baremetal/cy7c68013a/nes-gamepads/nes-gamepads.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.contains("mcs51")) diff --git a/examples/baremetal/esp8266/access-point/access-point.qbs b/examples/baremetal/esp8266/access-point/access-point.qbs index fd2890fbd..e9b06c340 100644 --- a/examples/baremetal/esp8266/access-point/access-point.qbs +++ b/examples/baremetal/esp8266/access-point/access-point.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { condition: qbs.toolchain.contains("gcc") && qbs.architecture === "xtensa" diff --git a/examples/baremetal/esp8266/esp8266.qbs b/examples/baremetal/esp8266/esp8266.qbs index 6056a33e0..faa74434e 100644 --- a/examples/baremetal/esp8266/esp8266.qbs +++ b/examples/baremetal/esp8266/esp8266.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for esp8266-wroom-02 board" qbsSearchPaths: "qbs" diff --git a/examples/baremetal/esp8266/qbs/modules/esp8266_sdk/Esp8266SdkModule.qbs b/examples/baremetal/esp8266/qbs/modules/esp8266_sdk/Esp8266SdkModule.qbs index ba7cbbe44..57e1f8572 100644 --- a/examples/baremetal/esp8266/qbs/modules/esp8266_sdk/Esp8266SdkModule.qbs +++ b/examples/baremetal/esp8266/qbs/modules/esp8266_sdk/Esp8266SdkModule.qbs @@ -1,5 +1,3 @@ -import qbs - Module { Depends { name: "cpp" } diff --git a/examples/baremetal/msp430f5529/msp430f5529.qbs b/examples/baremetal/msp430f5529/msp430f5529.qbs index f4a6f95b9..64e62dd57 100644 --- a/examples/baremetal/msp430f5529/msp430f5529.qbs +++ b/examples/baremetal/msp430f5529/msp430f5529.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for msp430f5529 board" references: [ diff --git a/examples/baremetal/msp430f5529/nes-gamepads/nes-gamepads.qbs b/examples/baremetal/msp430f5529/nes-gamepads/nes-gamepads.qbs index 37dfe8ca6..a06cfc6a2 100644 --- a/examples/baremetal/msp430f5529/nes-gamepads/nes-gamepads.qbs +++ b/examples/baremetal/msp430f5529/nes-gamepads/nes-gamepads.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.contains("msp430")) diff --git a/examples/baremetal/msp430f5529/redblink/redblink.qbs b/examples/baremetal/msp430f5529/redblink/redblink.qbs index 0f056e101..d89d307a9 100644 --- a/examples/baremetal/msp430f5529/redblink/redblink.qbs +++ b/examples/baremetal/msp430f5529/redblink/redblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.contains("msp430")) diff --git a/examples/baremetal/pca10001/greenblink/greenblink.qbs b/examples/baremetal/pca10001/greenblink/greenblink.qbs index f5e4c3cc1..1a4dabde7 100644 --- a/examples/baremetal/pca10001/greenblink/greenblink.qbs +++ b/examples/baremetal/pca10001/greenblink/greenblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.startsWith("arm")) diff --git a/examples/baremetal/pca10001/pca10001.qbs b/examples/baremetal/pca10001/pca10001.qbs index fc5c4d190..db1303268 100644 --- a/examples/baremetal/pca10001/pca10001.qbs +++ b/examples/baremetal/pca10001/pca10001.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for pca10001/pca10024 boards" references: [ diff --git a/examples/baremetal/pca10040/greenblink/greenblink.qbs b/examples/baremetal/pca10040/greenblink/greenblink.qbs index dcf9c388f..2ae3dc2a1 100644 --- a/examples/baremetal/pca10040/greenblink/greenblink.qbs +++ b/examples/baremetal/pca10040/greenblink/greenblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.startsWith("arm")) diff --git a/examples/baremetal/pca10040/pca10040.qbs b/examples/baremetal/pca10040/pca10040.qbs index caceae0b6..e5e516c3f 100644 --- a/examples/baremetal/pca10040/pca10040.qbs +++ b/examples/baremetal/pca10040/pca10040.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for pca10040 board" references: [ diff --git a/examples/baremetal/stm32f103/greenblink/greenblink.qbs b/examples/baremetal/stm32f103/greenblink/greenblink.qbs index d925344fb..18fe8e536 100644 --- a/examples/baremetal/stm32f103/greenblink/greenblink.qbs +++ b/examples/baremetal/stm32f103/greenblink/greenblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.startsWith("arm")) diff --git a/examples/baremetal/stm32f103/stm32f103.qbs b/examples/baremetal/stm32f103/stm32f103.qbs index bb5ab33e7..705502c52 100644 --- a/examples/baremetal/stm32f103/stm32f103.qbs +++ b/examples/baremetal/stm32f103/stm32f103.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for stm32f103 board" references: [ diff --git a/examples/baremetal/stm32f4discovery/blueblink/blueblink.qbs b/examples/baremetal/stm32f4discovery/blueblink/blueblink.qbs index 4a89cf684..f2e1dfcc9 100644 --- a/examples/baremetal/stm32f4discovery/blueblink/blueblink.qbs +++ b/examples/baremetal/stm32f4discovery/blueblink/blueblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.startsWith("arm")) diff --git a/examples/baremetal/stm32f4discovery/stm32f4discovery.qbs b/examples/baremetal/stm32f4discovery/stm32f4discovery.qbs index a402848ca..cbb3bdc3a 100644 --- a/examples/baremetal/stm32f4discovery/stm32f4discovery.qbs +++ b/examples/baremetal/stm32f4discovery/stm32f4discovery.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for stm32f4discovery board" references: [ diff --git a/examples/baremetal/stm8s103f3/redblink/redblink.qbs b/examples/baremetal/stm8s103f3/redblink/redblink.qbs index 197bae8ae..c01f323cd 100644 --- a/examples/baremetal/stm8s103f3/redblink/redblink.qbs +++ b/examples/baremetal/stm8s103f3/redblink/redblink.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { condition: { if (!qbs.architecture.contains("stm8")) diff --git a/examples/baremetal/stm8s103f3/stm8s103f3.qbs b/examples/baremetal/stm8s103f3/stm8s103f3.qbs index 922c4c1f0..cfbfc87a8 100644 --- a/examples/baremetal/stm8s103f3/stm8s103f3.qbs +++ b/examples/baremetal/stm8s103f3/stm8s103f3.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { name: "Examples for stm8s103f3 board" references: [ diff --git a/examples/cocoa-application/cocoa-application.qbs b/examples/cocoa-application/cocoa-application.qbs index 472758764..9c1ad1370 100644 --- a/examples/cocoa-application/cocoa-application.qbs +++ b/examples/cocoa-application/cocoa-application.qbs @@ -49,7 +49,6 @@ ** ****************************************************************************/ -import qbs import qbs.Utilities Project { diff --git a/examples/cocoa-application/dmg.qbs b/examples/cocoa-application/dmg.qbs index 0f5d3587b..0ae68b297 100644 --- a/examples/cocoa-application/dmg.qbs +++ b/examples/cocoa-application/dmg.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - AppleApplicationDiskImage { condition: qbs.targetOS.contains("macos") name: "Cocoa Application DMG" diff --git a/examples/cocoa-touch-application/cocoa-touch-application.qbs b/examples/cocoa-touch-application/cocoa-touch-application.qbs index bf2fb4080..ec199d4a5 100644 --- a/examples/cocoa-touch-application/cocoa-touch-application.qbs +++ b/examples/cocoa-touch-application/cocoa-touch-application.qbs @@ -49,8 +49,6 @@ ** ****************************************************************************/ -import qbs 1.0 - CppApplication { Depends { name: "xcode"; required: false } Depends { condition: product.condition; name: "ib" } diff --git a/examples/code-generator/code-generator.qbs b/examples/code-generator/code-generator.qbs index f17c13095..4d664c0ec 100644 --- a/examples/code-generator/code-generator.qbs +++ b/examples/code-generator/code-generator.qbs @@ -47,7 +47,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -import qbs Project { // A code generator that outputs a "Hello World" C++ program. diff --git a/examples/collidingmice/collidingmice.qbs b/examples/collidingmice/collidingmice.qbs index 52231882e..8f93a3230 100644 --- a/examples/collidingmice/collidingmice.qbs +++ b/examples/collidingmice/collidingmice.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs 1.0 - CppApplication { name : "CollidingMice" Depends { name: "Qt.widgets" } diff --git a/examples/compiled-qml/compiled-qml.qbs b/examples/compiled-qml/compiled-qml.qbs index 3a900fac9..5d5dd3a8c 100644 --- a/examples/compiled-qml/compiled-qml.qbs +++ b/examples/compiled-qml/compiled-qml.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { Depends { name: "Qt.quick" } diff --git a/examples/examples.qbs b/examples/examples.qbs index 18205d67a..d457b8a88 100644 --- a/examples/examples.qbs +++ b/examples/examples.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - Project { references: [ "app-and-lib/app-and-lib.qbs", diff --git a/examples/helloworld-complex/helloworld-complex.qbs b/examples/helloworld-complex/helloworld-complex.qbs index 16e7eace0..fab3fd516 100644 --- a/examples/helloworld-complex/helloworld-complex.qbs +++ b/examples/helloworld-complex/helloworld-complex.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs 1.0 - Project { property bool hasSpecialFeature: true Application { diff --git a/examples/helloworld-minimal/helloworld-minimal.qbs b/examples/helloworld-minimal/helloworld-minimal.qbs index 5cad9f4bf..40149d01f 100644 --- a/examples/helloworld-minimal/helloworld-minimal.qbs +++ b/examples/helloworld-minimal/helloworld-minimal.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - CppApplication { name: "HelloWorld-minimal" files: "main.cpp" diff --git a/examples/helloworld-qt/helloworld-qt.qbs b/examples/helloworld-qt/helloworld-qt.qbs index 4c6e070af..8d8b6e493 100644 --- a/examples/helloworld-qt/helloworld-qt.qbs +++ b/examples/helloworld-qt/helloworld-qt.qbs @@ -48,8 +48,6 @@ ** ****************************************************************************/ -import qbs - QtApplication { name: "HelloWorld-Qt" files: "main.cpp" diff --git a/examples/install-bundle/install-bundle.qbs b/examples/install-bundle/install-bundle.qbs index 9cd856dbd..cedfc2105 100644 --- a/examples/install-bundle/install-bundle.qbs +++ b/examples/install-bundle/install-bundle.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo Project { diff --git a/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs b/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs index f01ca47f2..51bc386d6 100644 --- a/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs +++ b/examples/protobuf/addressbook_cpp/addressbook_cpp.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { consoleApplication: true condition: protobuf.cpp.present && qbs.targetPlatform === qbs.hostPlatform diff --git a/examples/protobuf/addressbook_objc/addressbook_objc.qbs b/examples/protobuf/addressbook_objc/addressbook_objc.qbs index fe819d77a..a573b9015 100644 --- a/examples/protobuf/addressbook_objc/addressbook_objc.qbs +++ b/examples/protobuf/addressbook_objc/addressbook_objc.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { consoleApplication: true condition: protobuf.objc.present && qbs.targetOS.contains("macos") diff --git a/qbs-resources/imports/QbsApp.qbs b/qbs-resources/imports/QbsApp.qbs index 2ddb3cb38..5aad28650 100644 --- a/qbs-resources/imports/QbsApp.qbs +++ b/qbs-resources/imports/QbsApp.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo QbsProduct { diff --git a/qbs-resources/imports/QbsAutotest.qbs b/qbs-resources/imports/QbsAutotest.qbs index 0bf118bc9..8624f65e7 100644 --- a/qbs-resources/imports/QbsAutotest.qbs +++ b/qbs-resources/imports/QbsAutotest.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo import qbs.Utilities diff --git a/qbs-resources/imports/QbsProduct.qbs b/qbs-resources/imports/QbsProduct.qbs index f1e4c81b7..5df694dd8 100644 --- a/qbs-resources/imports/QbsProduct.qbs +++ b/qbs-resources/imports/QbsProduct.qbs @@ -1,5 +1,3 @@ -import qbs - Product { Depends { name: "qbsbuildconfig" } Depends { name: "qbsversion" } diff --git a/qbs-resources/imports/QbsUnittest.qbs b/qbs-resources/imports/QbsUnittest.qbs index 30e93e65c..5b54b9a51 100644 --- a/qbs-resources/imports/QbsUnittest.qbs +++ b/qbs-resources/imports/QbsUnittest.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo import qbs.Utilities diff --git a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs index 374fdfacc..7a7bd1462 100644 --- a/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs +++ b/qbs-resources/modules/qbsbuildconfig/qbsbuildconfig.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo import qbs.Utilities diff --git a/qbs-resources/modules/qbsversion/qbsversion.qbs b/qbs-resources/modules/qbsversion/qbsversion.qbs index ff1fd18f0..2e9a2ae42 100644 --- a/qbs-resources/modules/qbsversion/qbsversion.qbs +++ b/qbs-resources/modules/qbsversion/qbsversion.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.TextFile @@ -1,5 +1,3 @@ -import qbs 1.0 - Project { minimumQbsVersion: "1.6" qbsSearchPaths: ["qbs-resources"] diff --git a/scripts/scripts.qbs b/scripts/scripts.qbs index 9a631ed10..8c6f77a6f 100644 --- a/scripts/scripts.qbs +++ b/scripts/scripts.qbs @@ -1,5 +1,3 @@ -import qbs - Product { name: "qbs dev scripts" files: [ diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js index 060ea7a0a..b1239a78a 100644 --- a/share/qbs/module-providers/Qt/setup-qt.js +++ b/share/qbs/module-providers/Qt/setup-qt.js @@ -753,6 +753,7 @@ function doSetupLibraries(modInfo, qtProps, debugBuild, nonExistingPrlFiles, and for (i = 0; i < parts.length; ++i) { var part = parts[i]; part = part.replace("$$[QT_INSTALL_LIBS]", qtProps.libraryPath); + part = part.replace("$$[QT_INSTALL_PREFIX]", qtProps.installPrefixPath); if (part.startsWith("-l")) { libs.push(part.slice(2)); } else if (part.startsWith("-L")) { diff --git a/share/qbs/module-providers/__fallback/fallback.qbs b/share/qbs/module-providers/__fallback/fallback.qbs index 632d1aa7a..52a3f080a 100644 --- a/share/qbs/module-providers/__fallback/fallback.qbs +++ b/share/qbs/module-providers/__fallback/fallback.qbs @@ -37,7 +37,6 @@ ** ****************************************************************************/ -import qbs import qbs.FileInfo import qbs.Probes diff --git a/share/qbs/modules/Exporter/qbs/qbsexporter.qbs b/share/qbs/modules/Exporter/qbs/qbsexporter.qbs index 861483ef0..b08639e38 100644 --- a/share/qbs/modules/Exporter/qbs/qbsexporter.qbs +++ b/share/qbs/modules/Exporter/qbs/qbsexporter.qbs @@ -62,7 +62,6 @@ Module { cmd.description = "Creating " + output.fileName; cmd.sourceCode = function() { var f = new TextFile(output.filePath, TextFile.WriteOnly); - f.writeLine("import qbs"); HelperFunctions.writeImportStatements(product, f); f.writeLine("\nModule {"); HelperFunctions.writeModuleProperties(project, product, output, f); diff --git a/share/qbs/modules/capnproto/capnprotobase.qbs b/share/qbs/modules/capnproto/capnprotobase.qbs index 2dcb6c7e2..e84d39433 100644 --- a/share/qbs/modules/capnproto/capnprotobase.qbs +++ b/share/qbs/modules/capnproto/capnprotobase.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs import qbs.Probes import "capnproto.js" as HelperFunctions diff --git a/share/qbs/modules/codesign/CodeSignModule.qbs b/share/qbs/modules/codesign/CodeSignModule.qbs index 2115baebf..6db35c85c 100644 --- a/share/qbs/modules/codesign/CodeSignModule.qbs +++ b/share/qbs/modules/codesign/CodeSignModule.qbs @@ -29,7 +29,6 @@ ** ****************************************************************************/ -import qbs import qbs.File import qbs.FileInfo import "codesign.js" as CodeSign diff --git a/share/qbs/modules/codesign/android.qbs b/share/qbs/modules/codesign/android.qbs index be96d42de..f4535aa9c 100644 --- a/share/qbs/modules/codesign/android.qbs +++ b/share/qbs/modules/codesign/android.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs import qbs.Environment import qbs.File import qbs.FileInfo diff --git a/share/qbs/modules/codesign/apple.qbs b/share/qbs/modules/codesign/apple.qbs index 565d29080..4340e3037 100644 --- a/share/qbs/modules/codesign/apple.qbs +++ b/share/qbs/modules/codesign/apple.qbs @@ -29,7 +29,6 @@ ** ****************************************************************************/ -import qbs import qbs.BundleTools import qbs.DarwinTools import qbs.Environment diff --git a/share/qbs/modules/codesign/noop.qbs b/share/qbs/modules/codesign/noop.qbs index 3234d7476..d8c75eabc 100644 --- a/share/qbs/modules/codesign/noop.qbs +++ b/share/qbs/modules/codesign/noop.qbs @@ -29,8 +29,6 @@ ** ****************************************************************************/ -import qbs - CodeSignModule { condition: true priority: -100 diff --git a/share/qbs/modules/codesign/signtool.qbs b/share/qbs/modules/codesign/signtool.qbs index d0dda3a31..afc91e7fc 100644 --- a/share/qbs/modules/codesign/signtool.qbs +++ b/share/qbs/modules/codesign/signtool.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs import qbs.File import qbs.ModUtils import qbs.Probes diff --git a/share/qbs/modules/cpp/cosmic.qbs b/share/qbs/modules/cpp/cosmic.qbs index acc744a5b..64248cd8f 100644 --- a/share/qbs/modules/cpp/cosmic.qbs +++ b/share/qbs/modules/cpp/cosmic.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs 1.0 import qbs.File import qbs.FileInfo import qbs.PathTools diff --git a/share/qbs/modules/cpp/iar.qbs b/share/qbs/modules/cpp/iar.qbs index 79d4a0720..f02c033ce 100644 --- a/share/qbs/modules/cpp/iar.qbs +++ b/share/qbs/modules/cpp/iar.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs 1.0 import qbs.File import qbs.FileInfo import qbs.PathTools diff --git a/share/qbs/modules/cpp/keil.qbs b/share/qbs/modules/cpp/keil.qbs index 8e4d98402..c66e95a47 100644 --- a/share/qbs/modules/cpp/keil.qbs +++ b/share/qbs/modules/cpp/keil.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs 1.0 import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/share/qbs/modules/cpp/msvc.js b/share/qbs/modules/cpp/msvc.js index 1ebe5173b..630272d37 100644 --- a/share/qbs/modules/cpp/msvc.js +++ b/share/qbs/modules/cpp/msvc.js @@ -83,6 +83,19 @@ function hasCxx17Option(input) || (input.qbs.toolchain.contains("clang-cl") && input.cpp.compilerVersionMajor >= 7); } +function hasZCplusPlusOption(input) +{ + // /Zc:__cplusplus is supported starting from Visual Studio 15.7 + // Looks like closest MSVC version is 14.14.26428 (cl ver 19.14.26433) + // At least, this version is tested + // https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus + // clang-cl supports this option starting around-ish versions 8/9, but it + // ignores this option, so this doesn't really matter + // https://reviews.llvm.org/D45877 + return Utilities.versionCompare(input.cpp.compilerVersion, "19.14.26433") >= 0 + || (input.qbs.toolchain.contains("clang-cl") && input.cpp.compilerVersionMajor >= 9); +} + function supportsExternalIncludesOption(input) { if (input.qbs.toolchain.contains("clang-cl")) return false; // Exclude clang-cl. @@ -95,7 +108,7 @@ function supportsExternalIncludesOption(input) { function addLanguageVersionFlag(input, args) { var cxxVersion = Cpp.languageVersion(input.cpp.cxxLanguageVersion, - ["c++17", "c++14", "c++11", "c++98"], "C++"); + ["c++20", "c++17", "c++14", "c++11", "c++98"], "C++"); if (!cxxVersion) return; @@ -240,6 +253,9 @@ function prepareCompiler(project, product, inputs, outputs, input, output, expli if (input.cpp.generateCompilerListingFiles) args.push("/Fa" + FileInfo.toWindowsSeparators(outputs.lst[0].filePath)); + if (input.cpp.enableCxxLanguageMacro && hasZCplusPlusOption(input)) + args.push("/Zc:__cplusplus"); + var objectMap = outputs.obj || outputs.intermediate_obj var objOutput = objectMap ? objectMap[0] : undefined args.push('/Fo' + FileInfo.toWindowsSeparators(objOutput.filePath)) diff --git a/share/qbs/modules/cpp/sdcc.qbs b/share/qbs/modules/cpp/sdcc.qbs index 0f33e9f02..4e6f05bc0 100644 --- a/share/qbs/modules/cpp/sdcc.qbs +++ b/share/qbs/modules/cpp/sdcc.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs 1.0 import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/share/qbs/modules/cpp/windows-clang-cl.qbs b/share/qbs/modules/cpp/windows-clang-cl.qbs index 556efb042..e1f4ee425 100644 --- a/share/qbs/modules/cpp/windows-clang-cl.qbs +++ b/share/qbs/modules/cpp/windows-clang-cl.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs import qbs.ModUtils import qbs.Probes import qbs.FileInfo diff --git a/share/qbs/modules/cpp/windows-msvc-base.qbs b/share/qbs/modules/cpp/windows-msvc-base.qbs index 4efd20668..3d4975dda 100644 --- a/share/qbs/modules/cpp/windows-msvc-base.qbs +++ b/share/qbs/modules/cpp/windows-msvc-base.qbs @@ -104,6 +104,7 @@ CppModule { property var buildEnv readonly property bool shouldSignArtifacts: codesign.enableCodeSigning + property bool enableCxxLanguageMacro: false setupBuildEnvironment: { for (var key in product.cpp.buildEnv) { diff --git a/share/qbs/modules/cpp/windows-msvc.qbs b/share/qbs/modules/cpp/windows-msvc.qbs index 33c5e74c8..5e41c76fa 100644 --- a/share/qbs/modules/cpp/windows-msvc.qbs +++ b/share/qbs/modules/cpp/windows-msvc.qbs @@ -65,4 +65,6 @@ MsvcBaseModule { toolchainInstallPath: compilerPathProbe.found ? compilerPathProbe.path : undefined buildEnv: msvcProbe.buildEnv + + enableCxxLanguageMacro: true } diff --git a/share/qbs/modules/freedesktop/FreeDesktop.qbs b/share/qbs/modules/freedesktop/FreeDesktop.qbs index bb2ba79f4..5ff56a9a4 100644 --- a/share/qbs/modules/freedesktop/FreeDesktop.qbs +++ b/share/qbs/modules/freedesktop/FreeDesktop.qbs @@ -28,7 +28,6 @@ ** ****************************************************************************/ -import qbs import qbs.ModUtils import qbs.TextFile import "freedesktop.js" as Fdo diff --git a/share/qbs/modules/pkgconfig/pkgconfig.qbs b/share/qbs/modules/pkgconfig/pkgconfig.qbs index ec4b59188..b436263e9 100644 --- a/share/qbs/modules/pkgconfig/pkgconfig.qbs +++ b/share/qbs/modules/pkgconfig/pkgconfig.qbs @@ -37,7 +37,6 @@ ** ****************************************************************************/ -import qbs import qbs.File import qbs.Probes diff --git a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs index 36b92dd30..e1459658d 100644 --- a/share/qbs/modules/protobuf/cpp/protobufcpp.qbs +++ b/share/qbs/modules/protobuf/cpp/protobufcpp.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/share/qbs/modules/protobuf/nanopb/nanopb.qbs b/share/qbs/modules/protobuf/nanopb/nanopb.qbs index 86cd93600..898e230b6 100644 --- a/share/qbs/modules/protobuf/nanopb/nanopb.qbs +++ b/share/qbs/modules/protobuf/nanopb/nanopb.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/share/qbs/modules/protobuf/objc/protobufobjc.qbs b/share/qbs/modules/protobuf/objc/protobufobjc.qbs index 4bb697bc4..a3e708898 100644 --- a/share/qbs/modules/protobuf/objc/protobufobjc.qbs +++ b/share/qbs/modules/protobuf/objc/protobufobjc.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/share/qbs/modules/protobuf/protobufbase.qbs b/share/qbs/modules/protobuf/protobufbase.qbs index 30c1d244a..e302d3758 100644 --- a/share/qbs/modules/protobuf/protobufbase.qbs +++ b/share/qbs/modules/protobuf/protobufbase.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/share/share.qbs b/share/share.qbs index 9349d5c8b..b02e971f6 100644 --- a/share/share.qbs +++ b/share/share.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.TextFile diff --git a/src/app/apps.qbs b/src/app/apps.qbs index ba20515f2..4ea0a2c87 100644 --- a/src/app/apps.qbs +++ b/src/app/apps.qbs @@ -1,5 +1,3 @@ -import qbs - Project { references: [ "config/config.qbs", diff --git a/src/app/config-ui/config-ui.qbs b/src/app/config-ui/config-ui.qbs index 8b5e37559..544542ca4 100644 --- a/src/app/config-ui/config-ui.qbs +++ b/src/app/config-ui/config-ui.qbs @@ -1,5 +1,3 @@ -import qbs 1.0 - QbsApp { Depends { name: "Qt.widgets" } name: "qbs-config-ui" diff --git a/src/app/config/config.qbs b/src/app/config/config.qbs index 9daa701f6..2744b93f7 100644 --- a/src/app/config/config.qbs +++ b/src/app/config/config.qbs @@ -1,5 +1,3 @@ -import qbs 1.0 - QbsApp { name: "qbs-config" files: [ diff --git a/src/app/qbs-create-project/createproject.cpp b/src/app/qbs-create-project/createproject.cpp index cb6229ce3..f2f1364f5 100644 --- a/src/app/qbs-create-project/createproject.cpp +++ b/src/app/qbs-create-project/createproject.cpp @@ -104,7 +104,6 @@ void ProjectCreator::serializeProject(const ProjectCreator::Project &project) } QTextStream fileContents(&projectFile); qbs::setupDefaultCodec(fileContents); - fileContents << "import qbs\n\n"; if (!project.fileNames.empty() || m_projectStructure == ProjectStructure::Flat) { fileContents << "Product {\n"; const ProductFlags productFlags = getFlags(project); diff --git a/src/app/qbs-create-project/qbs-create-project.qbs b/src/app/qbs-create-project/qbs-create-project.qbs index b65f9177f..ae79001ee 100644 --- a/src/app/qbs-create-project/qbs-create-project.qbs +++ b/src/app/qbs-create-project/qbs-create-project.qbs @@ -1,5 +1,3 @@ -import qbs - QbsApp { name: "qbs-create-project" files: [ diff --git a/src/app/qbs-setup-android/qbs-setup-android.qbs b/src/app/qbs-setup-android/qbs-setup-android.qbs index 949c07c45..b18e152b0 100644 --- a/src/app/qbs-setup-android/qbs-setup-android.qbs +++ b/src/app/qbs-setup-android/qbs-setup-android.qbs @@ -1,5 +1,3 @@ -import qbs - QbsApp { name: "qbs-setup-android" files: [ diff --git a/src/app/qbs-setup-qt/qbs-setup-qt.qbs b/src/app/qbs-setup-qt/qbs-setup-qt.qbs index 44f2b7f05..3be090155 100644 --- a/src/app/qbs-setup-qt/qbs-setup-qt.qbs +++ b/src/app/qbs-setup-qt/qbs-setup-qt.qbs @@ -1,5 +1,3 @@ -import qbs 1.0 - QbsApp { name: "qbs-setup-qt" files: [ diff --git a/src/app/qbs-setup-toolchains/qbs-setup-toolchains.qbs b/src/app/qbs-setup-toolchains/qbs-setup-toolchains.qbs index d33b4c8fb..2daf916e9 100644 --- a/src/app/qbs-setup-toolchains/qbs-setup-toolchains.qbs +++ b/src/app/qbs-setup-toolchains/qbs-setup-toolchains.qbs @@ -1,5 +1,3 @@ -import qbs 1.0 - QbsApp { name: "qbs-setup-toolchains" cpp.dynamicLibraries: qbs.targetOS.contains("windows") ? base.concat("shell32") : base diff --git a/src/app/qbs/qbs.qbs b/src/app/qbs/qbs.qbs index 530036f3a..03685dd21 100644 --- a/src/app/qbs/qbs.qbs +++ b/src/app/qbs/qbs.qbs @@ -1,4 +1,3 @@ -import qbs 1.0 import qbs.Utilities QbsApp { diff --git a/src/lib/corelib/corelib.qbs b/src/lib/corelib/corelib.qbs index cece18126..0648a051f 100644 --- a/src/lib/corelib/corelib.qbs +++ b/src/lib/corelib/corelib.qbs @@ -1,4 +1,3 @@ -import qbs 1.0 import qbs.Utilities QbsLibrary { diff --git a/src/lib/libs.qbs b/src/lib/libs.qbs index 1cea47c52..264036e1a 100644 --- a/src/lib/libs.qbs +++ b/src/lib/libs.qbs @@ -1,5 +1,3 @@ -import qbs - Project { references: [ "corelib/corelib.qbs", diff --git a/src/lib/msbuild/msbuild.qbs b/src/lib/msbuild/msbuild.qbs index 897960303..505b977be 100644 --- a/src/lib/msbuild/msbuild.qbs +++ b/src/lib/msbuild/msbuild.qbs @@ -1,5 +1,3 @@ -import qbs - QbsStaticLibrary { Depends { name: "cpp" } Depends { name: "qbscore" } diff --git a/src/lib/scriptengine/scriptengine.qbs b/src/lib/scriptengine/scriptengine.qbs index 8183f3bc1..0a7090ac0 100644 --- a/src/lib/scriptengine/scriptengine.qbs +++ b/src/lib/scriptengine/scriptengine.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.Probes diff --git a/src/libexec/libexec.qbs b/src/libexec/libexec.qbs index a43e26157..edf081487 100644 --- a/src/libexec/libexec.qbs +++ b/src/libexec/libexec.qbs @@ -1,5 +1,3 @@ -import qbs - Project { references: [ "qbs_processlauncher/qbs_processlauncher.qbs", diff --git a/src/libexec/qbs_processlauncher/qbs_processlauncher.qbs b/src/libexec/qbs_processlauncher/qbs_processlauncher.qbs index 7aa7d3fc0..5be05163f 100644 --- a/src/libexec/qbs_processlauncher/qbs_processlauncher.qbs +++ b/src/libexec/qbs_processlauncher/qbs_processlauncher.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo QbsProduct { diff --git a/src/packages/archive/archive.qbs b/src/packages/archive/archive.qbs index 430f1ff15..d1875a1ac 100644 --- a/src/packages/archive/archive.qbs +++ b/src/packages/archive/archive.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo import qbs.ModUtils import qbs.Process diff --git a/src/packages/chocolatey/chocolatey.qbs b/src/packages/chocolatey/chocolatey.qbs index e878f8e0d..2ea79e3ff 100644 --- a/src/packages/chocolatey/chocolatey.qbs +++ b/src/packages/chocolatey/chocolatey.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.Environment import qbs.File import qbs.FileInfo diff --git a/src/packages/packages.qbs b/src/packages/packages.qbs index aa740aafe..d2b88ccfe 100644 --- a/src/packages/packages.qbs +++ b/src/packages/packages.qbs @@ -1,5 +1,3 @@ -import qbs - Project { references: [ "archive/archive.qbs", diff --git a/src/plugins/generator/clangcompilationdb/clangcompilationdb.qbs b/src/plugins/generator/clangcompilationdb/clangcompilationdb.qbs index 741d6dbf0..89f7c84b9 100644 --- a/src/plugins/generator/clangcompilationdb/clangcompilationdb.qbs +++ b/src/plugins/generator/clangcompilationdb/clangcompilationdb.qbs @@ -1,4 +1,3 @@ -import qbs import "../../qbsplugin.qbs" as QbsPlugin QbsPlugin { diff --git a/src/plugins/generator/iarew/iarew.qbs b/src/plugins/generator/iarew/iarew.qbs index 82c95ea5d..cf1af83b8 100644 --- a/src/plugins/generator/iarew/iarew.qbs +++ b/src/plugins/generator/iarew/iarew.qbs @@ -1,4 +1,3 @@ -import qbs import "../../qbsplugin.qbs" as QbsPlugin QbsPlugin { diff --git a/src/plugins/generator/keiluv/keiluv.qbs b/src/plugins/generator/keiluv/keiluv.qbs index 65f8fa029..6074380b4 100644 --- a/src/plugins/generator/keiluv/keiluv.qbs +++ b/src/plugins/generator/keiluv/keiluv.qbs @@ -1,4 +1,3 @@ -import qbs import "../../qbsplugin.qbs" as QbsPlugin QbsPlugin { diff --git a/src/plugins/generator/makefilegenerator/makefilegenerator.qbs b/src/plugins/generator/makefilegenerator/makefilegenerator.qbs index baabc43e3..8d61defe1 100644 --- a/src/plugins/generator/makefilegenerator/makefilegenerator.qbs +++ b/src/plugins/generator/makefilegenerator/makefilegenerator.qbs @@ -1,4 +1,3 @@ -import qbs import "../../qbsplugin.qbs" as QbsPlugin QbsPlugin { diff --git a/src/plugins/generator/visualstudio/visualstudio.qbs b/src/plugins/generator/visualstudio/visualstudio.qbs index dcb165d55..718c8523e 100644 --- a/src/plugins/generator/visualstudio/visualstudio.qbs +++ b/src/plugins/generator/visualstudio/visualstudio.qbs @@ -1,4 +1,3 @@ -import qbs import "../../qbsplugin.qbs" as QbsPlugin QbsPlugin { diff --git a/src/plugins/plugins.qbs b/src/plugins/plugins.qbs index ee101f60e..55fafe90a 100644 --- a/src/plugins/plugins.qbs +++ b/src/plugins/plugins.qbs @@ -1,5 +1,3 @@ -import qbs - Project { name: "qbs plugins" references: [ diff --git a/src/plugins/qbsplugin.qbs b/src/plugins/qbsplugin.qbs index b37fffe81..b4721198f 100644 --- a/src/plugins/qbsplugin.qbs +++ b/src/plugins/qbsplugin.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo QbsProduct { diff --git a/src/plugins/scanner/cpp/cpp.qbs b/src/plugins/scanner/cpp/cpp.qbs index 93a64e7cd..a274e0bba 100644 --- a/src/plugins/scanner/cpp/cpp.qbs +++ b/src/plugins/scanner/cpp/cpp.qbs @@ -1,4 +1,3 @@ -import qbs 1.0 import "../../qbsplugin.qbs" as QbsPlugin QbsPlugin { diff --git a/src/plugins/scanner/qt/qt.qbs b/src/plugins/scanner/qt/qt.qbs index a6aea1c33..94144665c 100644 --- a/src/plugins/scanner/qt/qt.qbs +++ b/src/plugins/scanner/qt/qt.qbs @@ -1,4 +1,3 @@ -import qbs 1.0 import "../../qbsplugin.qbs" as QbsPlugin QbsPlugin { diff --git a/src/shared/bundledqt/bundledqt.qbs b/src/shared/bundledqt/bundledqt.qbs index c6f3ebbf8..e0f79df59 100644 --- a/src/shared/bundledqt/bundledqt.qbs +++ b/src/shared/bundledqt/bundledqt.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.File import qbs.FileInfo import qbs.Utilities diff --git a/src/shared/json/json.qbs b/src/shared/json/json.qbs index e58c30caf..f5b2517a6 100644 --- a/src/shared/json/json.qbs +++ b/src/shared/json/json.qbs @@ -1,5 +1,3 @@ -import qbs - QbsStaticLibrary { name: "qbsjson" files: [ diff --git a/src/src.qbs b/src/src.qbs index ae58f41ae..757a16878 100644 --- a/src/src.qbs +++ b/src/src.qbs @@ -1,5 +1,3 @@ -import qbs - Project { references: [ "app/apps.qbs", diff --git a/tests/auto/api/api.qbs b/tests/auto/api/api.qbs index 21ff86a90..10064c888 100644 --- a/tests/auto/api/api.qbs +++ b/tests/auto/api/api.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.Utilities QbsAutotest { diff --git a/tests/auto/api/testdata/dependency-on-multiplexed-type/dependency-on-multiplexed-type.qbs b/tests/auto/api/testdata/dependency-on-multiplexed-type/dependency-on-multiplexed-type.qbs index cfc2769d2..f0ffebe39 100644 --- a/tests/auto/api/testdata/dependency-on-multiplexed-type/dependency-on-multiplexed-type.qbs +++ b/tests/auto/api/testdata/dependency-on-multiplexed-type/dependency-on-multiplexed-type.qbs @@ -1,5 +1,3 @@ -import qbs - Project { Product { name: "dep"; type: "x" } Product { diff --git a/tests/auto/api/testdata/qt5-plugin/qt5-plugin.qbs b/tests/auto/api/testdata/qt5-plugin/qt5-plugin.qbs index 204711625..d50072ad8 100644 --- a/tests/auto/api/testdata/qt5-plugin/qt5-plugin.qbs +++ b/tests/auto/api/testdata/qt5-plugin/qt5-plugin.qbs @@ -1,4 +1,3 @@ -import qbs.base import qbs.File import qbs.FileInfo diff --git a/tests/auto/api/tst_api.cpp b/tests/auto/api/tst_api.cpp index f2a9e4865..200239081 100644 --- a/tests/auto/api/tst_api.cpp +++ b/tests/auto/api/tst_api.cpp @@ -2974,7 +2974,7 @@ void TestApi::trackAddQObjectHeader() = defaultSetupParameters("missing-qobject-header/missingheader.qbs"); QFile qbsFile(params.projectFilePath()); QVERIFY(qbsFile.open(QIODevice::WriteOnly | QIODevice::Truncate)); - qbsFile.write("import qbs.base 1.0\nCppApplication {\n Depends { name: 'Qt.core' }\n" + qbsFile.write("CppApplication {\n Depends { name: 'Qt.core' }\n" " files: ['main.cpp', 'myobject.cpp']\n}"); qbsFile.close(); ProcessResultReceiver receiver; @@ -2985,7 +2985,7 @@ void TestApi::trackAddQObjectHeader() WAIT_FOR_NEW_TIMESTAMP(); QVERIFY(qbsFile.open(QIODevice::WriteOnly | QIODevice::Truncate)); - qbsFile.write("import qbs.base 1.0\nCppApplication {\n Depends { name: 'Qt.core' }\n" + qbsFile.write("CppApplication {\n Depends { name: 'Qt.core' }\n" " files: ['main.cpp', 'myobject.cpp','myobject.h']\n}"); qbsFile.close(); errorInfo = doBuildProject("missing-qobject-header/missingheader.qbs"); @@ -2999,7 +2999,7 @@ void TestApi::trackRemoveQObjectHeader() removeBuildDir(params); QFile qbsFile(params.projectFilePath()); QVERIFY(qbsFile.open(QIODevice::WriteOnly | QIODevice::Truncate)); - qbsFile.write("import qbs.base 1.0\nCppApplication {\n Depends { name: 'Qt.core' }\n" + qbsFile.write("CppApplication {\n Depends { name: 'Qt.core' }\n" " files: ['main.cpp', 'myobject.cpp','myobject.h']\n}"); qbsFile.close(); qbs::ErrorInfo errorInfo = doBuildProject("missing-qobject-header/missingheader.qbs"); @@ -3007,7 +3007,7 @@ void TestApi::trackRemoveQObjectHeader() WAIT_FOR_NEW_TIMESTAMP(); QVERIFY(qbsFile.open(QIODevice::WriteOnly | QIODevice::Truncate)); - qbsFile.write("import qbs.base 1.0\nCppApplication {\n Depends { name: 'Qt.core' }\n" + qbsFile.write("CppApplication {\n Depends { name: 'Qt.core' }\n" " files: ['main.cpp', 'myobject.cpp']\n}"); qbsFile.close(); ProcessResultReceiver receiver; diff --git a/tests/auto/auto.qbs b/tests/auto/auto.qbs index 0d87af9fe..2f0aef37c 100644 --- a/tests/auto/auto.qbs +++ b/tests/auto/auto.qbs @@ -1,5 +1,3 @@ -import qbs - Project { name: "Autotests" references: [ diff --git a/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs b/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs index 0dc55fde9..6f57c1e44 100644 --- a/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs +++ b/tests/auto/blackbox/testdata-apple/aggregateDependencyLinking/aggregateDependencyLinking.qbs @@ -1,5 +1,3 @@ -import qbs - Project { minimumQbsVersion: "1.8" diff --git a/tests/auto/blackbox/testdata-qt/included-moc-cpp/included-moc-cpp.qbs b/tests/auto/blackbox/testdata-qt/included-moc-cpp/included-moc-cpp.qbs index 218d5c150..265b0c9e3 100644 --- a/tests/auto/blackbox/testdata-qt/included-moc-cpp/included-moc-cpp.qbs +++ b/tests/auto/blackbox/testdata-qt/included-moc-cpp/included-moc-cpp.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.Utilities QtApplication { diff --git a/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs b/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs index a8efb97b5..e3dacffea 100644 --- a/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs +++ b/tests/auto/blackbox/testdata/deprecated-property/deprecated-property.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Product { Depends { name: "themodule" } diff --git a/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs b/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs index 106ed4135..cd6b0b70c 100644 --- a/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs +++ b/tests/auto/blackbox/testdata/deprecated-property/modules/themodule/m.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Module { property bool newProp diff --git a/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs b/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs index 52f7c940d..5acdb8892 100644 --- a/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs +++ b/tests/auto/blackbox/testdata/dynamic-project/dynamic-project.qbs @@ -23,7 +23,6 @@ Project var productFilePath = FileInfo.joinPaths(tempDir, name + ".qbs"); var file = new TextFile(productFilePath, TextFile.WriteOnly); try { - file.writeLine("import qbs"); file.writeLine("CppApplication"); file.writeLine("{"); file.writeLine("\tfiles: [ \"" + productSrcDir + "/*.cpp\" ]"); diff --git a/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs b/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs index 60c3d304f..b3519ba4c 100644 --- a/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs +++ b/tests/auto/blackbox/testdata/freedesktop/freedesktop.qbs @@ -1,5 +1,3 @@ -import qbs 1.0 - Project { CppApplication { name: "main" diff --git a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs index 353a40f8c..4e46da210 100644 --- a/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs +++ b/tests/auto/blackbox/testdata/grpc/grpc_cpp.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { name: "grpc_cpp" consoleApplication: true diff --git a/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs b/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs index 449b130e2..cb93547d4 100644 --- a/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs +++ b/tests/auto/blackbox/testdata/lexyacc/modules/bisonhelper/bisonhelper.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.Process Module { diff --git a/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs b/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs index 9723fd3f5..e69cde064 100644 --- a/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs +++ b/tests/auto/blackbox/testdata/linker-library-duplicates/setup-run-environment.qbs @@ -1,5 +1,3 @@ -import qbs 1.0 - Project { DynamicLibrary { id: idLib1 diff --git a/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs b/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs index 519b6e065..7425cdca5 100644 --- a/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs +++ b/tests/auto/blackbox/testdata/linker-module-definition/linker-module-definition.qbs @@ -1,5 +1,3 @@ -import qbs - Project { condition: { var result = qbs.targetPlatform === qbs.hostPlatform; diff --git a/tests/auto/blackbox/testdata/module-conditions/module-conditions.qbs b/tests/auto/blackbox/testdata/module-conditions/module-conditions.qbs index dc3768203..207df5ded 100644 --- a/tests/auto/blackbox/testdata/module-conditions/module-conditions.qbs +++ b/tests/auto/blackbox/testdata/module-conditions/module-conditions.qbs @@ -1,5 +1,3 @@ -import qbs - Project { Product { name: "p1" diff --git a/tests/auto/blackbox/testdata/no-such-profile/no-such-profile.qbs b/tests/auto/blackbox/testdata/no-such-profile/no-such-profile.qbs index 8e64ba478..1de3a4b10 100644 --- a/tests/auto/blackbox/testdata/no-such-profile/no-such-profile.qbs +++ b/tests/auto/blackbox/testdata/no-such-profile/no-such-profile.qbs @@ -1,5 +1,3 @@ -import qbs - Product { name: "theProduct" property int p diff --git a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs index 2d9afb134..3330b8263 100644 --- a/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs +++ b/tests/auto/blackbox/testdata/proper quoting/proper quoting.qbs @@ -1,5 +1,3 @@ -import qbs 1.0 - Project { Product { condition: { diff --git a/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs b/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs index e69ab8408..af7e6ced6 100644 --- a/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs +++ b/tests/auto/blackbox/testdata/protobuf-library-install/protobuf-library.qbs @@ -1,5 +1,3 @@ -import qbs - StaticLibrary { condition: { var result = qbs.targetPlatform === qbs.hostPlatform; diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs index 5e6ffc508..ac97f6bd5 100644 --- a/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs +++ b/tests/auto/blackbox/testdata/protobuf/addressbook_cpp.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { condition: { var result = qbs.targetPlatform === qbs.hostPlatform; diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs index 9640bb888..92243d31f 100644 --- a/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs +++ b/tests/auto/blackbox/testdata/protobuf/addressbook_nanopb.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { condition: { var result = qbs.targetPlatform === qbs.hostPlatform; diff --git a/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs b/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs index 54433ea66..448a9284a 100644 --- a/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs +++ b/tests/auto/blackbox/testdata/protobuf/addressbook_objc.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { condition: { var result = qbs.targetPlatform === qbs.hostPlatform; diff --git a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs index b01a47a39..d888937f1 100644 --- a/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs +++ b/tests/auto/blackbox/testdata/protobuf/create-proto-library.qbs @@ -1,5 +1,3 @@ -import qbs - Project { StaticLibrary { condition: { diff --git a/tests/auto/blackbox/testdata/protobuf/import.qbs b/tests/auto/blackbox/testdata/protobuf/import.qbs index ef4e80c1b..4d7e1b5c9 100644 --- a/tests/auto/blackbox/testdata/protobuf/import.qbs +++ b/tests/auto/blackbox/testdata/protobuf/import.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { condition: { var result = qbs.targetPlatform === qbs.hostPlatform; diff --git a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs index 493632a0e..4914ea484 100644 --- a/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs +++ b/tests/auto/blackbox/testdata/protobuf/needs-import-dir.qbs @@ -1,5 +1,3 @@ -import qbs - CppApplication { condition: { var result = qbs.targetPlatform === qbs.hostPlatform; diff --git a/tests/auto/buildgraph/buildgraph.qbs b/tests/auto/buildgraph/buildgraph.qbs index c6414b688..694d59578 100644 --- a/tests/auto/buildgraph/buildgraph.qbs +++ b/tests/auto/buildgraph/buildgraph.qbs @@ -1,5 +1,3 @@ -import qbs - QbsUnittest { Depends { name: "qbsconsolelogger" } testName: "buildgraph" diff --git a/tests/auto/cmdlineparser/cmdlineparser.qbs b/tests/auto/cmdlineparser/cmdlineparser.qbs index 47ed0a776..340a0c42e 100644 --- a/tests/auto/cmdlineparser/cmdlineparser.qbs +++ b/tests/auto/cmdlineparser/cmdlineparser.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.Utilities QbsAutotest { diff --git a/tests/auto/language/language.qbs b/tests/auto/language/language.qbs index d3619a243..3767477db 100644 --- a/tests/auto/language/language.qbs +++ b/tests/auto/language/language.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.Utilities QbsUnittest { diff --git a/tests/auto/language/testdata/dotted-names/dotted-names.qbs b/tests/auto/language/testdata/dotted-names/dotted-names.qbs index cf5658384..714988f0b 100644 --- a/tests/auto/language/testdata/dotted-names/dotted-names.qbs +++ b/tests/auto/language/testdata/dotted-names/dotted-names.qbs @@ -1,5 +1,3 @@ -import qbs - Project { name: "theProject" property bool includeDottedProduct diff --git a/tests/auto/language/testdata/dotted-names/modules/x/y/xy.qbs b/tests/auto/language/testdata/dotted-names/modules/x/y/xy.qbs index 71cfac9cb..eee46458d 100644 --- a/tests/auto/language/testdata/dotted-names/modules/x/y/xy.qbs +++ b/tests/auto/language/testdata/dotted-names/modules/x/y/xy.qbs @@ -1,5 +1,3 @@ -import qbs - Module { property string z: "default" } diff --git a/tests/auto/language/testdata/erroneous/duplicate-multiplex-value.qbs b/tests/auto/language/testdata/erroneous/duplicate-multiplex-value.qbs index 56da41af1..965fd36f7 100644 --- a/tests/auto/language/testdata/erroneous/duplicate-multiplex-value.qbs +++ b/tests/auto/language/testdata/erroneous/duplicate-multiplex-value.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Product { name: "p" diff --git a/tests/auto/language/testdata/erroneous/duplicate-multiplex-value2.qbs b/tests/auto/language/testdata/erroneous/duplicate-multiplex-value2.qbs index e412e5210..e6ed35d42 100644 --- a/tests/auto/language/testdata/erroneous/duplicate-multiplex-value2.qbs +++ b/tests/auto/language/testdata/erroneous/duplicate-multiplex-value2.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Product { name: "p" diff --git a/tests/auto/language/testdata/erroneous/original-in-export-item.qbs b/tests/auto/language/testdata/erroneous/original-in-export-item.qbs index 51fedb9a2..06adeb111 100644 --- a/tests/auto/language/testdata/erroneous/original-in-export-item.qbs +++ b/tests/auto/language/testdata/erroneous/original-in-export-item.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Project { Product { diff --git a/tests/auto/language/testdata/erroneous/original-in-export-item2.qbs b/tests/auto/language/testdata/erroneous/original-in-export-item2.qbs index d932d4aee..68b83118f 100644 --- a/tests/auto/language/testdata/erroneous/original-in-export-item2.qbs +++ b/tests/auto/language/testdata/erroneous/original-in-export-item2.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Project { Product { diff --git a/tests/auto/language/testdata/erroneous/original-in-export-item3.qbs b/tests/auto/language/testdata/erroneous/original-in-export-item3.qbs index d7bcb322e..30b30dd0e 100644 --- a/tests/auto/language/testdata/erroneous/original-in-export-item3.qbs +++ b/tests/auto/language/testdata/erroneous/original-in-export-item3.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Project { Product { diff --git a/tests/auto/language/testdata/erroneous/original-in-module-prototype.qbs b/tests/auto/language/testdata/erroneous/original-in-module-prototype.qbs index e7128092a..00661fb66 100644 --- a/tests/auto/language/testdata/erroneous/original-in-module-prototype.qbs +++ b/tests/auto/language/testdata/erroneous/original-in-module-prototype.qbs @@ -1,5 +1,3 @@ -import qbs - Product { Depends { name: "module-with-invalid-original" } } diff --git a/tests/auto/language/testdata/eval-error-in-non-present-module.qbs b/tests/auto/language/testdata/eval-error-in-non-present-module.qbs index c112bc6d4..6882a2216 100644 --- a/tests/auto/language/testdata/eval-error-in-non-present-module.qbs +++ b/tests/auto/language/testdata/eval-error-in-non-present-module.qbs @@ -1,5 +1,3 @@ -import qbs - Product { name: "p" property bool moduleRequired diff --git a/tests/auto/language/testdata/inherited-properties-items/imports/DebugName.qbs b/tests/auto/language/testdata/inherited-properties-items/imports/DebugName.qbs index 5ac15658c..d129dc9db 100644 --- a/tests/auto/language/testdata/inherited-properties-items/imports/DebugName.qbs +++ b/tests/auto/language/testdata/inherited-properties-items/imports/DebugName.qbs @@ -1,5 +1,3 @@ -import qbs - Properties { condition: qbs.buildVariant === "debug" name: "product_debug" diff --git a/tests/auto/language/testdata/inherited-properties-items/imports/ReleaseName.qbs b/tests/auto/language/testdata/inherited-properties-items/imports/ReleaseName.qbs index e33c5652b..57ab96a7e 100644 --- a/tests/auto/language/testdata/inherited-properties-items/imports/ReleaseName.qbs +++ b/tests/auto/language/testdata/inherited-properties-items/imports/ReleaseName.qbs @@ -1,5 +1,3 @@ -import qbs - Properties { condition: qbs.buildVariant === "release" name: "product_release" diff --git a/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items-product.qbs b/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items-product.qbs index c20f045c8..6d148ba53 100644 --- a/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items-product.qbs +++ b/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items-product.qbs @@ -1,5 +1,3 @@ -import qbs - Product { name: "product_default" DebugName {} diff --git a/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items.qbs b/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items.qbs index 40d41c2fb..52f7ffc00 100644 --- a/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items.qbs +++ b/tests/auto/language/testdata/inherited-properties-items/inherited-properties-items.qbs @@ -1,5 +1,3 @@ -import qbs - Project { qbsSearchPaths: sourceDirectory references: "inherited-properties-items-product.qbs" diff --git a/tests/auto/language/testdata/modules/broken/broken.qbs b/tests/auto/language/testdata/modules/broken/broken.qbs index b960117cf..302573bbf 100644 --- a/tests/auto/language/testdata/modules/broken/broken.qbs +++ b/tests/auto/language/testdata/modules/broken/broken.qbs @@ -1,4 +1,4 @@ -import qbs +import qbs // FIXME: Don't remove this import because then the test fails! Module { Probe { diff --git a/tests/auto/language/tst_language.cpp b/tests/auto/language/tst_language.cpp index 4837d6000..cbb7d7556 100644 --- a/tests/auto/language/tst_language.cpp +++ b/tests/auto/language/tst_language.cpp @@ -3212,8 +3212,7 @@ void TestLanguage::wildcards() QVERIFY(projectFile.open(QIODevice::WriteOnly)); QTextStream s(&projectFile); using Qt::endl; - s << "import qbs.base 1.0" << endl << endl - << "Application {" << endl + s << "Application {" << endl << " name: \"MyProduct\"" << endl; if (useGroup) { s << " Group {" << endl diff --git a/tests/auto/tools/tools.qbs b/tests/auto/tools/tools.qbs index 384ba74eb..781d6edae 100644 --- a/tests/auto/tools/tools.qbs +++ b/tests/auto/tools/tools.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.Utilities QbsUnittest { diff --git a/tests/benchmarker/benchmarker.qbs b/tests/benchmarker/benchmarker.qbs index 3a2654ff3..753359c59 100644 --- a/tests/benchmarker/benchmarker.qbs +++ b/tests/benchmarker/benchmarker.qbs @@ -1,5 +1,3 @@ -import qbs - QtApplication { name: "qbs_benchmarker" type: "application" diff --git a/tests/fuzzy-test/fuzzy-test.qbs b/tests/fuzzy-test/fuzzy-test.qbs index 8ec0f792d..cfa31363c 100644 --- a/tests/fuzzy-test/fuzzy-test.qbs +++ b/tests/fuzzy-test/fuzzy-test.qbs @@ -1,5 +1,3 @@ -import qbs - QtApplication { name: "qbs_fuzzy-test" type: "application" diff --git a/tests/tests.qbs b/tests/tests.qbs index 52eafb3f0..3cc757c8a 100644 --- a/tests/tests.qbs +++ b/tests/tests.qbs @@ -1,4 +1,3 @@ -import qbs import qbs.FileInfo Project { |