qtdeclarative/tools/qmlls
Sami Shalayel 13dc5b3c9d qmlls: fix the order in which the build directory is obtained
Make sure that the order in which the build directory is obtained is
intuitive. The preference should be:

1. Command line option
2. If there is no command line option, search for the environment
   variable.
3. If there environment variable, check for .qmlls.ini files

Add a test to test all combinations of this.

Check that the paths passed via the --build-dir argument to qmlls does
point to a directory and complain when it does not. Same for the paths
passed via the QMLLS_BUILD_DIRS environment variable. Also inform the
user when none of --build-dir nor QMLLS_BUILD_DIRS was passed that
the build dir will be set by the .qmlls.ini files.

Also, remove the broken #if QT_CONFIG(commandlineparser)-block in the
code: the parser defined in this #if-block is also used outside the #if.
Instead, do not compile qmlls if the commandlineparser feature is
disabled.

Also use platform-specific separators when passing multiple build
directories.

[ChangeLog][Qmlls] Qmlls warns when inexisting build folder
paths are passed to the --build-dir argument or the QMLLS_BUILD_DIRS
environment variable. Also, it will inform the user if the build
directory was set using the command line option, the environment
variable or an .qmlls.ini settings file, if existent in the source
folder.

Pick-to: 6.6
Task-number: QTBUG-114474
Change-Id: I6cb4f2db47945f8ea9549b7519a92f9d15d5ce66
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2023-06-23 09:03:27 +02:00
..
CMakeLists.txt qmlls: move into own private static library 2023-02-07 19:23:13 +01:00
qmllanguageservertool.cpp qmlls: fix the order in which the build directory is obtained 2023-06-23 09:03:27 +02:00