forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/12.0'
Change-Id: I0ee9c73d7a7e12f98f88b161c35d00ada069cc9d
This commit is contained in:
@@ -50,3 +50,7 @@ install(TARGETS %{ProjectName}App
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
# make IDEs aware of the QML import path
|
||||
set(QML_IMPORT_PATH ${PROJECT_BINARY_DIR}/qml CACHE PATH
|
||||
"Path to the custom QML components defined by the project")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ using namespace Android::Internal;
|
||||
AndroidManifestEditorFactory::AndroidManifestEditorFactory()
|
||||
: m_actionHandler(Constants::ANDROID_MANIFEST_EDITOR_ID,
|
||||
Constants::ANDROID_MANIFEST_EDITOR_CONTEXT,
|
||||
TextEditor::TextEditorActionHandler::None,
|
||||
TextEditor::TextEditorActionHandler::UnCommentSelection,
|
||||
[](Core::IEditor *editor) { return static_cast<AndroidManifestEditor *>(editor)->textEditor(); })
|
||||
{
|
||||
setId(Constants::ANDROID_MANIFEST_EDITOR_ID);
|
||||
|
||||
@@ -299,7 +299,8 @@ bool CMakeBuildSystem::addFiles(Node *context, const FilePaths &filePaths, FileP
|
||||
targetCMakeFile.fileName().toStdString(),
|
||||
errorString)) {
|
||||
qCCritical(cmakeBuildSystemLog).noquote()
|
||||
<< targetCMakeFile.path() << "failed to parse! Error:" << errorString;
|
||||
<< targetCMakeFile.path() << "failed to parse! Error:"
|
||||
<< QString::fromStdString(errorString);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,5 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,26 +1,5 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "emacskeysplugin.h"
|
||||
|
||||
|
||||
@@ -1,26 +1,5 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -1,26 +1,5 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "emacskeysstate.h"
|
||||
|
||||
|
||||
@@ -1,26 +1,5 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
****************************************************************************/
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
void checkState(RunControlState expectedState);
|
||||
void setState(RunControlState state);
|
||||
|
||||
void debugMessage(const QString &msg);
|
||||
void debugMessage(const QString &msg) const;
|
||||
|
||||
void initiateStart();
|
||||
void initiateReStart();
|
||||
@@ -1039,6 +1039,10 @@ bool RunControl::supportsReRunning() const
|
||||
bool RunControlPrivate::supportsReRunning() const
|
||||
{
|
||||
for (RunWorker *worker : m_workers) {
|
||||
if (!worker) {
|
||||
debugMessage("Found unknown deleted worker when checking for re-run support");
|
||||
return false;
|
||||
}
|
||||
if (!worker->d->supportsReRunning)
|
||||
return false;
|
||||
if (worker->d->state != RunWorkerState::Done)
|
||||
@@ -1181,7 +1185,7 @@ void RunControlPrivate::setState(RunControlState newState)
|
||||
}
|
||||
}
|
||||
|
||||
void RunControlPrivate::debugMessage(const QString &msg)
|
||||
void RunControlPrivate::debugMessage(const QString &msg) const
|
||||
{
|
||||
qCDebug(statesLog()) << msg;
|
||||
}
|
||||
|
||||
@@ -84,11 +84,10 @@ private:
|
||||
void stop() override;
|
||||
|
||||
QmlPreviewConnectionManager m_connectionManager;
|
||||
RefreshTranslationWorker m_refreshTranslationWorker;
|
||||
};
|
||||
|
||||
QmlPreviewRunner::QmlPreviewRunner(RunControl *runControl, const QmlPreviewRunnerSetting &settings)
|
||||
: RunWorker(runControl), m_refreshTranslationWorker(runControl, settings)
|
||||
: RunWorker(runControl)
|
||||
{
|
||||
setId("QmlPreviewRunner");
|
||||
m_connectionManager.setFileLoader(settings.fileLoader);
|
||||
@@ -134,7 +133,7 @@ QmlPreviewRunner::QmlPreviewRunner(RunControl *runControl, const QmlPreviewRunne
|
||||
runControl->initiateStop();
|
||||
});
|
||||
|
||||
addStartDependency(&m_refreshTranslationWorker);
|
||||
addStartDependency(new RefreshTranslationWorker(runControl, settings));
|
||||
}
|
||||
|
||||
void QmlPreviewRunner::start()
|
||||
|
||||
@@ -1929,6 +1929,7 @@ void TextEditorWidgetPrivate::foldLicenseHeader()
|
||||
if (TextDocumentLayout::canFold(block) && block.next().isVisible()) {
|
||||
const QString trimmedText = text.trimmed();
|
||||
QStringList commentMarker;
|
||||
QStringList docMarker;
|
||||
if (auto highlighter = qobject_cast<Highlighter *>(
|
||||
q->textDocument()->syntaxHighlighter())) {
|
||||
const HighlighterHelper::Definition def = highlighter->definition();
|
||||
@@ -1939,11 +1940,19 @@ void TextEditorWidgetPrivate::foldLicenseHeader()
|
||||
}
|
||||
} else {
|
||||
commentMarker = QStringList({"/*", "#"});
|
||||
docMarker = QStringList({"/*!", "/**"});
|
||||
}
|
||||
|
||||
if (Utils::anyOf(commentMarker, [&](const QString &marker) {
|
||||
return trimmedText.startsWith(marker);
|
||||
})) {
|
||||
if (Utils::anyOf(docMarker, [&](const QString &marker) {
|
||||
return trimmedText.startsWith(marker)
|
||||
&& (trimmedText.size() == marker.size()
|
||||
|| trimmedText.at(marker.size()).isSpace());
|
||||
})) {
|
||||
break;
|
||||
}
|
||||
TextDocumentLayout::doFoldOrUnfold(block, false);
|
||||
moveCursorVisible();
|
||||
documentLayout->requestUpdate();
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <QTimer>
|
||||
#include <QUrl>
|
||||
#include <QVersionNumber>
|
||||
#include <QJsonDocument>
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
@@ -104,6 +105,20 @@ static bool findXcodePath(QString *xcodePath)
|
||||
return (process.exitStatus() == QProcess::NormalExit && QFile::exists(*xcodePath));
|
||||
}
|
||||
|
||||
static bool checkDevelopmentStatusViaDeviceCtl(const QString &deviceId)
|
||||
{
|
||||
QProcess process;
|
||||
process.start("/usr/bin/xcrun", QStringList({"devicectl",
|
||||
"device", "info", "details", "--quiet", "--device", deviceId, "-j", "-"}));
|
||||
if (!process.waitForFinished(3000)) {
|
||||
qCWarning(loggingCategory) << "Failed to launch devicectl:" << process.errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
auto jsonOutput = QJsonDocument::fromJson(process.readAllStandardOutput());
|
||||
return jsonOutput["result"]["deviceProperties"]["developerModeStatus"] == "enabled";
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Finds the \e DeveloperDiskImage.dmg path corresponding to \a versionStr and \a buildStr.
|
||||
*
|
||||
@@ -1668,13 +1683,20 @@ void DevInfoSession::deviceCallbackReturned()
|
||||
if (!failure) {
|
||||
res[deviceConnectedKey] = QLatin1String("YES");
|
||||
res[deviceNameKey] = getStringValue(device, nullptr, CFSTR("DeviceName"));
|
||||
res[developerStatusKey] = getStringValue(device,
|
||||
res[uniqueDeviceId] = getStringValue(device, nullptr, CFSTR("UniqueDeviceID"));
|
||||
const QString productVersion = getStringValue(device, nullptr, CFSTR("ProductVersion"));
|
||||
|
||||
if (productVersion.startsWith("17.")) {
|
||||
res[developerStatusKey] = checkDevelopmentStatusViaDeviceCtl(res[uniqueDeviceId])
|
||||
? QLatin1String("Development") : QLatin1String("*off*");
|
||||
} else {
|
||||
res[developerStatusKey] = getStringValue(device,
|
||||
CFSTR("com.apple.xcode.developerdomain"),
|
||||
CFSTR("DeveloperStatus"),
|
||||
"*off*");
|
||||
}
|
||||
|
||||
res[cpuArchitectureKey] = getStringValue(device, nullptr, CFSTR("CPUArchitecture"));
|
||||
res[uniqueDeviceId] = getStringValue(device, nullptr, CFSTR("UniqueDeviceID"));
|
||||
const QString productVersion = getStringValue(device, nullptr, CFSTR("ProductVersion"));
|
||||
const QString buildVersion = getStringValue(device, nullptr, CFSTR("BuildVersion"));
|
||||
if (!productVersion.isEmpty() && !buildVersion.isEmpty())
|
||||
res[osVersionKey] = QString("%1 (%2)").arg(productVersion, buildVersion);
|
||||
|
||||
Reference in New Issue
Block a user