... to ProjectExplorer::ProjectUpdaterInterface and generalize it
regarding language, but create a convience function for the C++
case, as that's the only user right now.
Also add the self-registering factory boilerplate and adapt all
buildsystems.
Change-Id: If928512609d41c25fad2aa58633c8bffabc4c48f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Don't operate on the same CompilationDbParser instance
in the main and the separate threads.
Pass needed data as parseProject's arguments.
Change-Id: Idf5e5d92727d5a279256673088880e6d2f48a7c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
QFile::exists only calls QFileInfo::exists, so this saves one
function call per invocation.
Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
They were still using variables in qmake style.
Directly use CMake variables in the json.in files and remove the no
longer needed escaping of quotes.
Adds a fatal message if it detects the old style in a .json.in file for
easier porting.
Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
GCC also accepts -iquote and -idirafter flags to set include path.
Change-Id: Id8088faa4cfcfb9d6005ad13527c0bc26dc4feb3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... out of SessionManager.
The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.
Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.
Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Move the .toString() uses into DeploymentData::addFilesFromDeploymentFile
Change-Id: Ic9ef22da1918ca105c92f0231960dab27b0d80bb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
BTW, spotted some other unused includes marked with yellow.
Change-Id: I364e4b6fae73a2be2cfd3a63c1100be4a91aa49a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...
While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only
Change was done by running
find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;
Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
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>
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>
Do not blindly remove all flags that contain the file's base name.
Fixes: QTCREATORBUG-27990
Change-Id: Ib51b65a8694e82ec22af859176b0db0e5d86b5f0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
In this code, database file is being hashed and if hash stays the same,
parser quickly returns ParseResult::Cached. But as database never gets
read, source tree isn't being built, thus dbContents() never gets called
I moved ParseGuard::markAsSuccess() call to the finish() method of parser,
so we tell ProjectExplorer that parsing finished successfully on Cached state
Change-Id: I7ea28017e653ac6e2d7f50047c09a6eb7ecda13f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Except FakeVim, which had it before.
for i in [a-eg-z]*/*.json ; do
upper=${i##*/}
upper=${upper/.json/}
lower=${i%/*}
trfile=$lower/${lower}tr.h
cat << EOT > $lower/${lower}tr.h
/****************************************************************************
**
** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Creator.
**
** 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
namespace $upper {
struct Tr
{
Q_DECLARE_TR_FUNCTIONS($upper)
};
} // namespace $upper
EOT
git add $trfile
perl -pi -e "s/(${lower}_global.h)/\1\n ${lower}tr.h/" $lower/CMakeLists.txt
perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/" $lower/$lower.qbs
done
Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Mostly unused #include's, also sort them or reduce scope.
A few namespaces, ...
Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
The code would blindly remove all "options" starting with /, which meant
that all file paths arguments got lost on Unix-like hosts.
Fixes: QTCREATORBUG-22949
Change-Id: I43e2b1e57ed0e9ced9da8fa46d98d9ac25f83d13
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
- configure with QTC_USE_NEW_MIMEDATABASE to switch to the new one in
utils/mimetypes2/
- added utils/mimeutils.h header for the Qt Creator specific static
wrappers, that also includes the "public" headers for MimeType et al
from the new or old implementation, depending on configuration
- change all utils/mimetypes/ includes to utils/mimeutils.h
- move the implementation for the wrappers to
utils/mimetypes(2)/mimeutils.cpp
- also move the MimeDatabase declaration in the "old" implementation
back to utils/mimetypes/mimedatabase.h
Change-Id: Ie8de229c035d6cd9a5e4739dc0fa78d9c17228e3
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.
Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
- We checked for the QFuture's canceled status at a time where it would
always yield true.
- A pointless default value was used for the project root path.
Fixes: QTCREATORBUG-26356
Change-Id: I4d17c6ecb7e9e7e71df737d85b42feb37d3ead5d
Reviewed-by: David Schulz <david.schulz@qt.io>
Linux mingw uses lowercase headers, so cross-building on Linux for Windows
target must use the correct form. Windows is case-insensitive, so it won't
affect host-native builds.
Change-Id: Ic2140412bb367bbce83b5e2546d70e0936928c5c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>