Merge remote-tracking branch 'origin/4.12'

Change-Id: I4935b6afdb13627f32e850a4c8b536de0269bc4b
This commit is contained in:
Eike Ziller
2020-06-25 09:28:57 +02:00
4 changed files with 66 additions and 13 deletions

52
scripts/shiboken2tasks.py Executable file
View File

@@ -0,0 +1,52 @@
############################################################################
#
# Copyright (C) 2020 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.
#
############################################################################
'''
shiboken2tasks.py - Convert shiboken warnings into Qt Creator task files.
SYNOPSIS
shiboken2tasks.py < logfile > taskfile
'''
import sys
import re
if __name__ == '__main__':
# qt.shiboken: (<module>) <file>:<line>:[<column>:] text
pattern = re.compile(r'^qt\.shiboken: \(([^)]+)\) ([^:]+):(\d+):(?:\d+:)? (.*)$')
while True:
line = sys.stdin.readline()
if not line:
break
match = pattern.match(line.rstrip())
if match:
module = match.group(1)
file_name = match.group(2).replace('\\', '/')
line_number = match.group(3)
text = match.group(4)
output = "{}\t{}\twarn\t{}: {}".format(file_name, line_number,
module, text)
print(output)

View File

@@ -6923,7 +6923,7 @@ konnte dem Projekt &quot;%2&quot; nicht hinzugefügt werden.</translation>
</message>
<message>
<source>&amp;Debug</source>
<translation>Deb&amp;uggen</translation>
<translation>Debu&amp;ggen</translation>
</message>
<message>
<source>&amp;Start Debugging</source>

View File

@@ -59,7 +59,8 @@ static QString findInProgramFiles(const QString &folder)
McuPackage *createQtForMCUsPackage()
{
auto result = new McuPackage(
McuPackage::tr("Qt for MCUs SDK"),
McuPackage::tr("Qt for MCUs %1 SDK").arg(
McuSupportOptions::supportedQulVersion().toString()),
QDir::homePath(),
Utils::HostOsInfo::withExecutableSuffix("bin/qmltocpp"),
Constants::SETTINGS_KEY_PACKAGE_QT_FOR_MCUS_SDK);
@@ -344,17 +345,17 @@ void targetsAndPackages(const Utils::FilePath &dir, QVector<McuPackage *> *packa
const McuTargetDescription desc = parseDescriptionJson(file.readAll());
if (!McuSupportOptions::supportedQulVersion()
.isPrefixOf(QVersionNumber::fromString(desc.qulVersion)))
continue;
return; // Invalid version means invalid SDK installation.
descriptions.append(desc);
}
if (!descriptions.isEmpty()) {
// Workaround for missing JSON file for Desktop target:
if (dir.pathAppended("/lib/QulQuickUltralite_QT_32bpp_Windows_Release.lib").exists()) {
descriptions.prepend({McuSupportOptions::supportedQulVersion().toString(),
{"Qt"}, {"Qt"}, {32}, {"desktop"}, {}, {}});
}
mcuTargets->append(targetsFromDescriptions(descriptions, packages));
}
}
} // namespace Sdk

View File

@@ -187,7 +187,7 @@ class ProcessProperties: private MemberProcessor
QSet<const ObjectValue *> _processed;
bool _globalCompletion = false;
bool _enumerateGeneratedSlots = false;
bool _enumerateSlots = true;
bool _enumerateMethods = true;
const ScopeChain *_scopeChain;
const ObjectValue *_currentObject = nullptr;
PropertyProcessor *_propertyProcessor = nullptr;
@@ -208,9 +208,9 @@ public:
_enumerateGeneratedSlots = enumerate;
}
void setEnumerateSlots(bool enumerate)
void setEnumerateMethods(bool enumerate)
{
_enumerateSlots = enumerate;
_enumerateMethods = enumerate;
}
void operator ()(const Value *value, PropertyProcessor *processor)
@@ -251,14 +251,14 @@ private:
bool processSignal(const QString &name, const Value *value) override
{
if (_globalCompletion)
if (_globalCompletion || _enumerateMethods)
process(name, value);
return true;
}
bool processSlot(const QString &name, const Value *value) override
{
if (_enumerateSlots)
if (_enumerateMethods)
process(name, value);
return true;
}
@@ -771,7 +771,7 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const AssistInterface *
ProcessProperties processProperties(&scopeChain);
processProperties.setGlobalCompletion(true);
processProperties.setEnumerateGeneratedSlots(true);
processProperties.setEnumerateSlots(false);
processProperties.setEnumerateMethods(false);
// id: is special
AssistProposalItem *idProposalItem = new QmlJSAssistProposalItem;