aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/shiboken2tasks.py52
-rw-r--r--share/qtcreator/translations/qtcreator_de.ts2
-rw-r--r--src/plugins/mcusupport/mcusupportsdk.cpp13
-rw-r--r--src/plugins/qmljseditor/qmljscompletionassist.cpp12
4 files changed, 66 insertions, 13 deletions
diff --git a/scripts/shiboken2tasks.py b/scripts/shiboken2tasks.py
new file mode 100755
index 0000000000..024f53cd15
--- /dev/null
+++ b/scripts/shiboken2tasks.py
@@ -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)
diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts
index 96de085da9..46a1322c4f 100644
--- a/share/qtcreator/translations/qtcreator_de.ts
+++ b/share/qtcreator/translations/qtcreator_de.ts
@@ -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>
diff --git a/src/plugins/mcusupport/mcusupportsdk.cpp b/src/plugins/mcusupport/mcusupportsdk.cpp
index 67fd09e26d..7ea24c2548 100644
--- a/src/plugins/mcusupport/mcusupportsdk.cpp
+++ b/src/plugins/mcusupport/mcusupportsdk.cpp
@@ -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:
+ // 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));
}
+
+ mcuTargets->append(targetsFromDescriptions(descriptions, packages));
}
} // namespace Sdk
diff --git a/src/plugins/qmljseditor/qmljscompletionassist.cpp b/src/plugins/qmljseditor/qmljscompletionassist.cpp
index 839e3fd19f..5cfa28c609 100644
--- a/src/plugins/qmljseditor/qmljscompletionassist.cpp
+++ b/src/plugins/qmljseditor/qmljscompletionassist.cpp
@@ -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;