aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/hostosinfo.h
Commit message (Collapse)AuthorAgeFilesLines
* Utils: Make some HostInfo functions constexprMarco Bubke2022-09-291-2/+2
| | | | | | | | Enables the removal of static function scope variables. Change-Id: I337468c1525546a5cad9e95ae4a859de18ee514d Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Utils: Remove Utils::optionalEike Ziller2022-09-011-2/+3
| | | | | | | | | | Since we are now requiring macOS 10.14 we can remove our local implementation of optional and use std::optional for macOS too. Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ClangCodeModel: Check system for clangd suitability on first runChristian Kandeler2022-06-211-0/+3
| | | | | | | | | Turn off clangd by default if we think the system does not have enough memory. Inform the user and let them override our decision. Task-number: QTCREATORBUG-19297 Change-Id: Ib9715c2f089c10d7a2a559a25180e9a943c118b1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Arm64: Separate Arm64 from Arm on WindowsCristian Adam2022-06-211-1/+1
| | | | | | | | The separation is the first step of proper supporting the native Visual C++ Arm64 that is now in preview in Visual Studio v17.3 Change-Id: I8cfa4b5b248158db68cb4af081dd59cabcd28c95 Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: More forward declarations / drop unused headers [T-Z]Jarek Kobus2022-05-251-1/+3
| | | | | | | | | | | Round 1 - focus on headers. For classes with initial in range [T-Z]. Replace QT_FORWARD_DECLARE_CLASS with QT_BEGIN_NAMESPACE and QT_END_NAMESPACE and forward declare inside. Change-Id: I4ac3a8391e6167aa2db3973a9f94a45ac3c8ebd1 Reviewed-by: hjk <hjk@qt.io>
* Utils: More forward declarations / drop unused headers [H-K]Jarek Kobus2022-05-251-1/+1
| | | | | | | | | | Round 1 - focus on headers. For classes with initial in range [H-K]. Try to keep the same separators between different kind of headers. Change-Id: Iefb032953743be41a847ee011c30527edfa425d8 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add workarounds for running under Rosetta on macOSTor Arne Vestbø2021-07-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Qt Creator is built as an Intel binary, and runs on an Apple Silicon (ARM) Mac, it will be run via the Rosetta translation layer. This means any process spawned by QtC, including qmake, CMake, and lldb, will launch as x86_64 binaries as well. For qmake and CMake, this affects their default choice of build architecture, resulting in x86_64 builds of user applications. We want to produce native arm64 apps, even if Qt Creator itself isn't one, so we explicitly detect the situation, and if Qt has an arm64 slice, we default to arm64 builds. The logic of adding CONFIG+=x86_64 to the qmake step has been disabled, as the assumption that a single qmake run and build will produce only a single architecture does no longer hold. The corresponding logic in Qt was removed in 2015 (qtbase f58e95f098c8d78a5f2db7729606126fe093cbdf). In the case of lldb, running it as an x86_64 binary fails to attach to the running application. We work around this by using the 'arch' tool to explicitly launch it as an arm64 binary. This works for debugging both arm64 and x86_64 applications. Change-Id: I65cc0f600223990f25c76cef18d927895e551260 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Use free functions in OsSpecificAspectshjk2018-04-241-6/+4
| | | | | | | Generates a bit less code in debug mode and is easier to read IMNSHO. Change-Id: Ib9c0b9a0c058327facff16600a7014207167b050 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: ConstExpr is implicitly inlineMarco Bubke2016-09-221-2/+2
| | | | | Change-Id: Ie75071c0479d2483ca82c589fbc45acd9f629e3e Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Fix build with MSVC 2015 Update 2Eike Ziller2016-09-151-27/+22
| | | | | | | Complains about the constexpr otherwise. Change-Id: Idb64ed3287b8f9506a811a091dd1ad8ae11b2ad8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Utils: Add constexpr to most functions in HostOsInfoOrgad Shaneh2016-09-141-7/+7
| | | | | | Change-Id: If45cc91e0ae4061e01e3540e1867b08bffbe5774 Reviewed-by: Daniel Teske <qt@squorn.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Wholesale conversion to #pragma oncehjk2016-03-301-4/+1
| | | | | | | Kudos to cgmb and https://github.com/cgmb/guardonce Change-Id: Ifa8970734b8d43fd08c9260c645bdb0228633791 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-18/+13
| | | | | | | * Update remaining files in src Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Centralize checking for OpenGLRobert Loehning2015-10-021-0/+2
| | | | | Change-Id: Ic2212c8519f4c771ba3e3c61dd32073b93db7ed9 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Provide a way to override file name case sensitivity.Eike Ziller2015-09-011-1/+9
| | | | | | Change-Id: I47ed4f590e5f25380c2052fa77eae3f0d315c5d3 Task-number: QTCREATORBUG-13507 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Utils: Introduce new class OsSpecificAspects.Christian Kandeler2013-08-161-20/+21
| | | | | | | | | | | | This is basically a generalization of HostOsInfo for a system that might not be the host system. HostOsInfo is now implemented in terms of the new class. Prospective use case: Untie Utils::Environment from the host system. Change-Id: If333b96674652109fcb0ad79f75aaaf5e86e17e3 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Qt4RunConfiguration: Add missing .exeDaniel Teske2013-04-101-1/+1
| | | | | | | | | Broke in 3c6f76d16c142c2b98564fc9167b67564ead7fe5 Task-number: QTCREATORBUG-9046 Change-Id: I9bace8f8cefaefe9adf73aa3c5ebd93dae66e258 Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Incremented year in copyright infoRobert Loehning2013-02-011-1/+1
| | | | | Change-Id: Ia11f4d7a94465de7f12cc390855e54e3256e5455 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Compile fix for HostInfo on Linuxhjk2013-01-171-3/+1
| | | | | Change-Id: I77924e1025baef92ebcff42ce683dbf9d8feb162 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Add architecture information to Utils::HostOsInfoDaniel Teske2013-01-161-1/+6
| | | | | | Change-Id: I2e8ec214ba4ea4567e1eeb5d2f3bd1a59000bc48 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* License changesTobias Hunger2012-10-091-20/+20
| | | | | Change-Id: Ie8d2adaa2b20473d2e3e16d1f44ad951ff2744be Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Utils::HostOsInfo: Introduce controlModifier() method.Christian Kandeler2012-09-131-0/+5
| | | | | Change-Id: Ibd244963c5cd643fc0e8358ceabff0ad5f6599eb Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* HostOsInfo: Add some more useful abstractions.Christian Kandeler2012-09-051-0/+26
| | | | | | | | | | | | | Namely: - path list separator - executable suffix - file name case sensitivity All of these are duplicated in various places in the current Creator code. Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* make Utils::HostOsInfo have zero runtime costOswald Buddenhagen2012-08-311-2/+26
| | | | | Change-Id: I2d5bf2324a81bedcbe6ea0bb8d8a0eead94e52e4 Reviewed-by: hjk <qthjk@ovi.com>
* Utils: Introduce HostOsInfo class.Christian Kandeler2012-08-271-0/+53
The class' member functions are intended to be used instead of the Q_OS_* macros in all contexts where the latter are not syntactically required. This lowers the likelihood of changes made on one platform breaking the build on another, e.g. due to the code model missing symbols in #ifdef'ed out code when refactoring. Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa Reviewed-by: hjk <qthjk@ovi.com>