diff --git a/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch b/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch index 3e5bfe553f3..316f3afd178 100644 --- a/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch +++ b/dist/clang/patches/200_D36390_Fix-overloaded-static-functions-in-SemaCodeComplete.patch @@ -1,5 +1,5 @@ ---- a/include/clang/Sema/Sema.h -+++ b/include/clang/Sema/Sema.h +--- a/tools/clang/include/clang/Sema/Sema.h ++++ b/tools/clang/include/clang/Sema/Sema.h @@ -2707,7 +2707,8 @@ OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr, @@ -10,8 +10,8 @@ void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ---- a/lib/Sema/SemaCodeComplete.cpp -+++ b/lib/Sema/SemaCodeComplete.cpp +--- a/tools/clang/lib/Sema/SemaCodeComplete.cpp ++++ b/tools/clang/lib/Sema/SemaCodeComplete.cpp @@ -4396,9 +4396,11 @@ ArgExprs.append(Args.begin(), Args.end()); UnresolvedSet<8> Decls; @@ -25,8 +25,8 @@ } else { FunctionDecl *FD = nullptr; if (auto MCE = dyn_cast(NakedFn)) ---- a/lib/Sema/SemaOverload.cpp -+++ b/lib/Sema/SemaOverload.cpp +--- a/tools/clang/lib/Sema/SemaOverload.cpp ++++ b/tools/clang/lib/Sema/SemaOverload.cpp @@ -6343,24 +6343,36 @@ OverloadCandidateSet& CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs, @@ -72,8 +72,8 @@ SuppressUserConversions, PartialOverloading); } } else { ---- a/test/Index/complete-call.cpp -+++ b/test/Index/complete-call.cpp +--- a/tools/clang/test/Index/complete-call.cpp ++++ b/tools/clang/test/Index/complete-call.cpp @@ -94,6 +94,24 @@ s.foo_7(42,); } diff --git a/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch b/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch index 2296904f7dd..0223c96e784 100644 --- a/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch +++ b/dist/clang/patches/210_D43453_Fix-overloaded-static-functions-for-templates.patch @@ -1,8 +1,8 @@ -diff --git a/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp +diff --git a/tools/clang/lib/Sema/SemaOverload.cpp b/lib/Sema/SemaOverload.cpp index 1b07ec60ce..46ed08d1cf 100644 ---- a/lib/Sema/SemaOverload.cpp -+++ b/lib/Sema/SemaOverload.cpp -@@ -6371,57 +6371,54 @@ void Sema::AddFunctionCandidates(const UnresolvedSetImpl &Fns, +--- a/tools/clang/lib/Sema/SemaOverload.cpp ++++ b/tools/clang/lib/Sema/SemaOverload.cpp +@@ -6321,57 +6321,56 @@ void Sema::AddFunctionCandidates(const UnresolvedSetImpl &Fns, bool FirstArgumentIsBase) { for (UnresolvedSetIterator F = Fns.begin(), E = Fns.end(); F != E; ++F) { NamedDecl *D = F.getDecl()->getUnderlyingDecl(); @@ -56,8 +56,7 @@ index 1b07ec60ce..46ed08d1cf 100644 + Expr::Classification ObjectClassification; + if (Args.size() > 0) { if (Expr *E = Args[0]) { -- // Use the explit base to restrict the lookup: -+ // Use the explicit base to restrict the lookup: + // Use the explit base to restrict the lookup: ObjectType = E->getType(); ObjectClassification = E->Classify(Context); } // .. else there is an implit base. @@ -65,19 +64,17 @@ index 1b07ec60ce..46ed08d1cf 100644 + } + if (IsTemplate) AddMethodTemplateCandidate( -- FunTmpl, F.getPair(), -- cast(FunTmpl->getDeclContext()), -- ExplicitTemplateArgs, ObjectType, ObjectClassification, + FunTmpl, F.getPair(), + cast(FunTmpl->getDeclContext()), + ExplicitTemplateArgs, ObjectType, ObjectClassification, - Args.slice(1), CandidateSet, SuppressUserConversions, -- PartialOverloading); ++ FunctionArgs, CandidateSet, SuppressUserConversions, + PartialOverloading); - } else { - AddTemplateOverloadCandidate(FunTmpl, F.getPair(), - ExplicitTemplateArgs, Args, - CandidateSet, SuppressUserConversions, - PartialOverloading); -+ FunTmpl, F.getPair(), cast(FD), ExplicitTemplateArgs, -+ ObjectType, ObjectClassification, FunctionArgs, CandidateSet, -+ SuppressUserConversions, PartialOverloading); + else + AddMethodCandidate(cast(FD), F.getPair(), + cast(FD)->getParent(), ObjectType, @@ -102,10 +99,10 @@ index 1b07ec60ce..46ed08d1cf 100644 } } } -diff --git a/test/Index/complete-call.cpp b/test/Index/complete-call.cpp +diff --git a/tools/clang/test/Index/complete-call.cpp b/test/Index/complete-call.cpp index ca116485ac..35f2009066 100644 ---- a/test/Index/complete-call.cpp -+++ b/test/Index/complete-call.cpp +--- a/tools/clang/test/Index/complete-call.cpp ++++ b/tools/clang/test/Index/complete-call.cpp @@ -112,6 +112,33 @@ struct Bar2 : public Bar { } }; diff --git a/qbs/modules/pluginjson/pluginjson.qbs b/qbs/modules/pluginjson/pluginjson.qbs index 8cba1834370..f684dbccb4e 100644 --- a/qbs/modules/pluginjson/pluginjson.qbs +++ b/qbs/modules/pluginjson/pluginjson.qbs @@ -13,6 +13,7 @@ Module { Depends { name: "vcs"; condition: hasVcs } Properties { condition: hasVcs + vcs.headerFileName: undefined vcs.repoDir: { // TODO: Could something like this be incorporated into the vcs module? // Currently, the default repo dir is project.sourceDirectory, which diff --git a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp index bb9ec181610..8562f7bc86a 100644 --- a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp +++ b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.cpp @@ -44,9 +44,24 @@ InstanceContainer::InstanceContainer() { } -InstanceContainer::InstanceContainer(qint32 instanceId, const TypeName &type, int majorNumber, int minorNumber, const QString &componentPath, const QString &nodeSource, NodeSourceType nodeSourceType, NodeMetaType metaType) - : m_instanceId(instanceId), m_type(properDelemitingOfType(type)), m_majorNumber(majorNumber), m_minorNumber(minorNumber), m_componentPath(componentPath), - m_nodeSource(nodeSource), m_nodeSourceType(nodeSourceType), m_metaType(metaType) +InstanceContainer::InstanceContainer(qint32 instanceId, + const TypeName &type, + int majorNumber, + int minorNumber, + const QString &componentPath, + const QString &nodeSource, + NodeSourceType nodeSourceType, + NodeMetaType metaType, + NodeFlags metaFlags) + : m_instanceId(instanceId) + ,m_type(properDelemitingOfType(type)) + ,m_majorNumber(majorNumber) + ,m_minorNumber(minorNumber) + ,m_componentPath(componentPath) + ,m_nodeSource(nodeSource) + ,m_nodeSourceType(nodeSourceType) + ,m_metaType(metaType) + ,m_metaFlags(metaFlags) { } @@ -90,6 +105,16 @@ InstanceContainer::NodeMetaType InstanceContainer::metaType() const return static_cast(m_metaType); } +InstanceContainer::NodeFlags InstanceContainer::metaFlags() const +{ + return NodeFlags(m_metaFlags); +} + +bool InstanceContainer::checkFlag(NodeFlag flag) const +{ + return NodeFlags(m_metaFlags).testFlag(flag); +} + QDataStream &operator<<(QDataStream &out, const InstanceContainer &container) { out << container.instanceId(); @@ -100,6 +125,7 @@ QDataStream &operator<<(QDataStream &out, const InstanceContainer &container) out << container.nodeSource(); out << qint32(container.nodeSourceType()); out << qint32(container.metaType()); + out << qint32(container.metaFlags()); return out; } @@ -115,6 +141,7 @@ QDataStream &operator>>(QDataStream &in, InstanceContainer &container) in >> container.m_nodeSource; in >> container.m_nodeSourceType; in >> container.m_metaType; + in >> container.m_metaFlags; return in; } diff --git a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h index 6dc86bf93c9..9d4c21b1274 100644 --- a/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h +++ b/share/qtcreator/qml/qmlpuppet/container/instancecontainer.h @@ -54,8 +54,22 @@ public: ItemMetaType }; + enum NodeFlag { + ParentTakesOverRendering = 1 + }; + + Q_DECLARE_FLAGS(NodeFlags, NodeFlag) + InstanceContainer(); - InstanceContainer(qint32 instanceId, const TypeName &type, int majorNumber, int minorNumber, const QString &componentPath, const QString &nodeSource, NodeSourceType nodeSourceType, NodeMetaType metaType); + InstanceContainer(qint32 instanceId, + const TypeName &type, + int majorNumber, + int minorNumber, + const QString &componentPath, + const QString &nodeSource, + NodeSourceType nodeSourceType, + NodeMetaType metaType, + NodeFlags metaFlags); qint32 instanceId() const; TypeName type() const; @@ -65,6 +79,8 @@ public: QString nodeSource() const; NodeSourceType nodeSourceType() const; NodeMetaType metaType() const; + bool checkFlag(NodeFlag flag) const; + NodeFlags metaFlags() const; private: qint32 m_instanceId = -1; @@ -75,6 +91,7 @@ private: QString m_nodeSource; qint32 m_nodeSourceType = 0; qint32 m_metaType = 0; + qint32 m_metaFlags = 0; }; QDebug operator <<(QDebug debug, const InstanceContainer &command); @@ -82,3 +99,4 @@ QDebug operator <<(QDebug debug, const InstanceContainer &command); } // namespace QmlDesigner Q_DECLARE_METATYPE(QmlDesigner::InstanceContainer) +Q_DECLARE_OPERATORS_FOR_FLAGS(QmlDesigner::InstanceContainer::NodeFlags) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index 1dc4716649c..3ee177a3872 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -126,7 +126,8 @@ void ObjectNodeInstance::initializePropertyWatcher(const ObjectNodeInstance::Poi m_signalSpy.setObjectNodeInstance(objectNodeInstance); } -void ObjectNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance) +void ObjectNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance, + InstanceContainer::NodeFlags /*flags*/) { initializePropertyWatcher(objectNodeInstance); QmlPrivateGate::registerNodeInstanceMetaObject(objectNodeInstance->object(), objectNodeInstance->nodeInstanceServer()->engine()); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h index 8266f0addf8..5977d3d31ce 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h @@ -28,6 +28,8 @@ #include "nodeinstanceserver.h" #include "nodeinstancesignalspy.h" +#include "instancecontainer.h" + #include #include #include @@ -78,7 +80,7 @@ public: NodeInstanceServer *nodeInstanceServer() const; void setNodeInstanceServer(NodeInstanceServer *server); - virtual void initialize(const Pointer &objectNodeInstance); + virtual void initialize(const Pointer &objectNodeInstance, InstanceContainer::NodeFlags flags); virtual QImage renderImage() const; virtual QImage renderPreviewImage(const QSize &previewImageSize) const; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp index a30fbc184a9..647d1d74706 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp @@ -156,7 +156,8 @@ void QuickItemNodeInstance::createEffectItem(bool createEffectItem) s_createEffectItem = createEffectItem; } -void QuickItemNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance) +void QuickItemNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNodeInstance, + InstanceContainer::NodeFlags flags) { if (instanceId() == 0) { @@ -167,10 +168,11 @@ void QuickItemNodeInstance::initialize(const ObjectNodeInstance::Pointer &object if (quickItem()->window()) { if (s_createEffectItem || instanceId() == 0) - designerSupport()->refFromEffectItem(quickItem()); + designerSupport()->refFromEffectItem(quickItem(), + !flags.testFlag(InstanceContainer::ParentTakesOverRendering)); } - ObjectNodeInstance::initialize(objectNodeInstance); + ObjectNodeInstance::initialize(objectNodeInstance, flags); quickItem()->update(); } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h index d655a9a1032..1f000f1ba2b 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h @@ -46,7 +46,8 @@ public: static Pointer create(QObject *objectToBeWrapped); static void createEffectItem(bool createEffectItem); - void initialize(const ObjectNodeInstance::Pointer &objectNodeInstance) override; + void initialize(const ObjectNodeInstance::Pointer &objectNodeInstance, + InstanceContainer::NodeFlags flags) override; QQuickItem *contentItem() const override; bool hasContent() const override; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp index 58b17e2451e..2f090517dc8 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp @@ -188,7 +188,9 @@ Internal::ObjectNodeInstance::Pointer ServerNodeInstance::createInstance(QObject return instance; } -ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceServer, const InstanceContainer &instanceContainer, ComponentWrap componentWrap) +ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceServer, + const InstanceContainer &instanceContainer, + ComponentWrap componentWrap) { Q_ASSERT(instanceContainer.instanceId() != -1); Q_ASSERT(nodeInstanceServer); @@ -229,7 +231,7 @@ ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceSe instance.internalInstance()->setInstanceId(instanceContainer.instanceId()); - instance.internalInstance()->initialize(instance.m_nodeInstance); + instance.internalInstance()->initialize(instance.m_nodeInstance, instanceContainer.metaFlags()); return instance; } diff --git a/share/qtcreator/templates/wizards/autotest/files/googlecommon.js b/share/qtcreator/templates/wizards/autotest/files/googlecommon.js index 1799b1c242c..1079ed5fdf7 100644 --- a/share/qtcreator/templates/wizards/autotest/files/googlecommon.js +++ b/share/qtcreator/templates/wizards/autotest/files/googlecommon.js @@ -13,9 +13,9 @@ ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** **/ -var FileInfo = loadExtension("qbs.FileInfo") +var FileInfo = require("qbs.FileInfo") -function getGTestDir(str) { +function getGTestDir(qbs, str) { if (!str) { if (qbs.hostOS.contains("linux")) return "/usr/include/gtest"; @@ -25,7 +25,7 @@ function getGTestDir(str) { return ""; } -function getGMockDir(str) { +function getGMockDir(qbs, str) { if (!str) { if (qbs.hostOS.contains("linux")) return "/usr/include/gmock"; @@ -35,29 +35,29 @@ function getGMockDir(str) { return ""; } -function getGTestAll(str) { - var gtest = getGTestDir(str); +function getGTestAll(qbs, str) { + var gtest = getGTestDir(qbs, str); if (!gtest) return []; return [FileInfo.joinPaths(gtest, "src/gtest-all.cc")]; } -function getGMockAll(str) { - var gmock = getGMockDir(str); +function getGMockAll(qbs, str) { + var gmock = getGMockDir(qbs, str); if (!gmock) return []; return [FileInfo.joinPaths(gmock, "src/gmock-all.cc")]; } -function getGTestIncludes(str) { - var gtest = getGTestDir(str); +function getGTestIncludes(qbs, str) { + var gtest = getGTestDir(qbs, str); if (!gtest) return []; return [gtest, FileInfo.joinPaths(gtest, "include")]; } -function getGMockIncludes(str) { - var mock = getGMockDir(str); +function getGMockIncludes(qbs, str) { + var mock = getGMockDir(qbs, str); if (!mock) return []; return [mock, FileInfo.joinPaths(mock, "include")]; diff --git a/share/qtcreator/templates/wizards/autotest/files/tst.qbs b/share/qtcreator/templates/wizards/autotest/files/tst.qbs index cb7076a0ace..14d277a429b 100644 --- a/share/qtcreator/templates/wizards/autotest/files/tst.qbs +++ b/share/qtcreator/templates/wizards/autotest/files/tst.qbs @@ -43,14 +43,14 @@ CppApplication { } - cpp.includePaths: [].concat(googleCommon.getGTestIncludes(googletestDir)) - .concat(googleCommon.getGMockIncludes(googletestDir)) + cpp.includePaths: [].concat(googleCommon.getGTestIncludes(qbs, googletestDir)) + .concat(googleCommon.getGMockIncludes(qbs, googletestDir)) files: [ "%{MainCppName}", "%{TestCaseFileWithHeaderSuffix}", - ].concat(googleCommon.getGTestAll(googletestDir)) - .concat(googleCommon.getGMockAll(googletestDir)) + ].concat(googleCommon.getGTestAll(qbs, googletestDir)) + .concat(googleCommon.getGMockAll(qbs, googletestDir)) @endif @if "%{TestFrameWork}" == "QtQuickTest" Depends { name: "cpp" } diff --git a/share/qtcreator/translations/qtcreator_ru.ts b/share/qtcreator/translations/qtcreator_ru.ts index 7c0d2dfd5eb..5770974f8a8 100644 --- a/share/qtcreator/translations/qtcreator_ru.ts +++ b/share/qtcreator/translations/qtcreator_ru.ts @@ -8,6 +8,13 @@ + + AddAnalysisMessageSuppressionComment + + Add a Comment to Suppress This Message + Добавьте комментарий для подавления этого сообщения + + AddSignalHandlerDialog @@ -167,8 +174,8 @@ Версия установленного SDK (%1) не включает скрипты Gradle. Минимальная версия Qt, необходимая для работы сборки Gradle, является %2 - The minimum Qt version required for Gradle build to work is %2. It is recommended to install the latest Qt version. - Для работы сборки Gradle необходима Qt версии не ниже %2. Рекомендуется установить последнюю версию Qt. + The minimum Qt version required for Gradle build to work is %1. It is recommended to install the latest Qt version. + Для работы сборки Gradle необходима Qt версии не ниже %1. Рекомендуется установить последнюю версию Qt. The API level set for the APK is less than the minimum required by the kit. @@ -238,6 +245,17 @@ The minimum API level required by the kit is %1. Сбой запуска виртуального устройства Android. + + Android::AndroidPackageInstallationStep + + Copy application data + Копирование данных приложения + + + Removing directory %1 + Удаление каталога %1 + + Android::Internal::AddNewAVDDialog @@ -311,13 +329,6 @@ The minimum API level required by the kit is %1. Установить на устройство Android - - Android::Internal::AndroidDeployConfigurationFactory - - Deploy on Android - Установить на Android - - Android::Internal::AndroidDeployQtStep @@ -766,6 +777,20 @@ Do you want to uninstall the existing package? Выбор значка высокого разрешения + + Android::Internal::AndroidPackageInstallationFactory + + Deploy to device + Установка на устройство + + + + Android::Internal::AndroidPackageInstallationStepWidget + + Make install + Make install + + Android::Internal::AndroidPotentialKit @@ -1357,10 +1382,6 @@ Install an SDK of at least API version %1. Open package location after build Открывать каталог пакета после создания - - Qt Deployment - Установка Qt - Uses the external Ministro application to download and maintain Qt libraries. Использовать внешнее приложение Ministro для загрузки и обслуживания библиотек Qt. @@ -1369,14 +1390,6 @@ Install an SDK of at least API version %1. Use Ministro service to install Qt Использовать Ministro для установки Qt - - Creates a standalone APK. - Создавать автономный APK. - - - Bundle Qt libraries in APK - Внедрять библиотеки Qt в APK - Packages debug server with the APK to enable debugging. For the signed APK this option is unchecked by default. Добавляет отладочный сервер в APK для включения отладки. Для подписанных APK эта опция отключена по умолчанию. @@ -1502,6 +1515,13 @@ Install an SDK of at least API version %1. Удалять предыдущий пакет + + AndroidPackageInstallationFactory + + Deploy to device + Установка на устройство + + AndroidSdkManager @@ -1626,8 +1646,8 @@ Install an SDK of at least API version %1. Не удалось отправить сообщение - Unable to send command line arguments to the already running instance. It appears to be not responding. Do you want to start a new instance of Creator? - Невозможно отправить параметры командной строки запущенному процессу. Видимо он не отвечает. Желаете запустить ещё один экземпляр Qt Creator? + Unable to send command line arguments to the already running instance. It does not appear to be responding. Do you want to start a new instance of %1? + Невозможно отправить параметры командной строки запущенному процессу. Видимо, он не отвечает. Желаете запустить ещё один экземпляр %1? Could not find Core plugin in %1 @@ -1682,6 +1702,10 @@ Install an SDK of at least API version %1. Run &All Tests Запустить &все + + Run All Tests + Запуск всех тестов + Alt+Shift+T,Alt+A Alt+Shift+T,Alt+A @@ -1690,6 +1714,10 @@ Install an SDK of at least API version %1. &Run Selected Tests &Запустить выбранные + + Run Selected Tests + Запуск выбранных тестов + Alt+Shift+T,Alt+R Alt+Shift+T,Alt+R @@ -1934,8 +1962,8 @@ Warning: Plain text misses some information, such as duration. Выбор конфигурации запуска - Could not determine which run configuration to choose for running tests (%1) - Не удалось определить, какую выбрать конфигурацию запуска для запуска тестов (%1) + Could not determine which run configuration to choose for running tests + Не удалось определить, какую конфигурацию запуска выбрать для запуска тестов Run Configuration: @@ -2035,20 +2063,19 @@ Warning: Plain text misses some information, such as duration. Тесты + + Autotest::Internal::TestOutputReader + + Test executable crashed. + Сбой программы тестирования. + + Autotest::Internal::TestResultsPane Expand All Развернуть всё - - Run All Tests - Запуск всех тестов - - - Run Selected Tests - Запуск выбранных тестов - Stop Test Run Остановка тестов @@ -2225,10 +2252,6 @@ Check the test environment. Test for project "%1" did not produce any expected output. Тест проекта «%1» не создал ожидаемого вывода. - - <unknown> - <неизвестный> - No test cases left for execution. Canceling test run. Не осталось больше тестов для запуска. Запуск отменён. @@ -2376,6 +2399,18 @@ Warning: this is an experimental feature and might lead to failing to execute th Process arguments Передавать параметры + + Framework + Framework + + + Group + Объединить + + + Enables grouping of test cases. + Включение группировки тестов. + Autotest::Internal::TestSettingsWidget @@ -2387,22 +2422,30 @@ Warning: this is an experimental feature and might lead to failing to execute th You will not be able to use the AutoTest plugin without having at least one active test framework. Использовать модуль AutoTest можно только при наличии хотя бы одной активной среды тестирования. + + Enable or disable test frameworks to be handled by the AutoTest plugin. + Включение/отключение управления средами тестирования модулем AutoTest. + + + Enable or disable grouping of test cases by folder. + Включение/отключение объединения тестов по каталогам. + Add Filter Добавление фильтра - <p>Specify a filter expression to be added to the list of filters.<br/>Wildcards are not supported.</p> - <p>Укажите выражение добавляемого в список фильтра<br/>Шаблонные символы не поддерживаются.</p> + Specify a filter expression to be added to the list of filters.<br/>Wildcards are not supported. + Укажите выражение добавляемого в список фильтра<br/>Шаблонные символы не поддерживаются. + + + Specify a filter expression that will replace "%1".<br/>Wildcards are not supported. + Укажите выражение фильтра вместо «%1»<br/>Шаблонные символы не поддерживаются. Edit Filter Изменение фильтра - - <p>Specify a filter expression that will replace "%1".<br/>Wildcards are not supported.</p> - <p>Укажите выражение фильтра вместо «%1»<br/>Шаблонные символы не поддерживаются.</p> - AutotoolsProjectManager::Internal::AutogenStep @@ -3411,7 +3454,7 @@ Local commits are not pushed to the master branch until a normal commit is perfo Remember specified location as default - Запомнить указанное размещение, как умолчальное + Запомнить указанное размещение как размещение по умолчанию Overwrite @@ -4134,6 +4177,13 @@ For example, "Revision: 15" will leave the branch at revision 15.Переименовать закладку + + Bookmarks::Internal::BookmarkFilter + + Bookmarks + Закладки + + Bookmarks::Internal::BookmarkManager @@ -4507,12 +4557,12 @@ For example, "Revision: 15" will leave the branch at revision 15.Генератор: %1<br>Дополнительный генератор: %2 - <br>Platform: %1 - <br>Платформа: %1 + Platform: %1 + Платформа: %1 - <br>Toolset: %1 - <br>Инструментарий: %1 + Toolset: %1 + Инструментарий: %1 CMake Generator @@ -5195,8 +5245,7 @@ For example, "Revision: 15" will leave the branch at revision 15.Не удалось разобрать проект CMake. - %1 in line %3 - думаю, ошибка в оригинале + %1 in line %2 %1 в строке %2 @@ -5254,8 +5303,8 @@ For example, "Revision: 15" will leave the branch at revision 15.Нет результатов сборки - Build artifacts:<br> - Результаты сборки:<br> + Build artifacts: + Результаты сборки: @@ -5410,7 +5459,7 @@ For example, "Revision: 15" will leave the branch at revision 15. Parse templates in a MSVC-compliant way. This helps to parse headers for example from Active Template Library (ATL) or Windows Runtime Library (WRL). However, using the relaxed and extended rules means also that no highlighting/completion can be provided within template functions. - Разбирать шаблоны, как MSVC. Это поможет разобрать заголовки, например из Active Template Library (ATL) и Windows Runtime Library (WRL). + Разбирать шаблоны как MSVC. Это поможет разобрать заголовки, например из Active Template Library (ATL) и Windows Runtime Library (WRL). Однако, использование ослабленных или расширенных правил подразумевает отсутствие подсветки и дополнения внутри шаблонных функций. @@ -5445,6 +5494,13 @@ However, using the relaxed and extended rules means also that no highlighting/co %1 [встроенный] + + ClangHoverHandler + + %1 bytes + %1 байт(ов) + + ClangRefactoring::ClangQueryProjectsFindFilter @@ -6339,8 +6395,8 @@ Output: &Загруженная версия - <html><head/><body><p><b>Note: You will not be able to check in this file without merging the changes (not supported by the plugin)</b></p></body></html> - <b>Внимание! Невозможно зафиксировать данный файл без объединения изменений, которое не поддерживается эти модулем</b> + Note: You will not be able to check in this file without merging the changes (not supported by the plugin) + Внимание! Невозможно зафиксировать данный файл без объединения изменений (не поддерживается модулем) @@ -6582,8 +6638,8 @@ p, li { white-space: pre-wrap; } Вставка в KDE paster требует авторизации.<br/>Для продолжения введите учётные данные KDE Identity. - <span style='background-color:LightYellow;color:red'>Login failed</span><br/><br/> - <span style='background-color:LightYellow;color:red'>Не удалось войти</span><br/><br/> + Login failed + Не удалось войти @@ -8274,6 +8330,25 @@ Do you want to kill it? Тема: + + Core::Internal::JavaScriptFilter + + Evaluate JavaScript + Вычислить JavaScript + + + Reset Engine + Сбросить движок + + + Engine aborted after timeout. + Движок был прерван после таймаута. + + + Copy to clipboard: %1 + Скопировать в буфер обмена: %1 + + Core::Internal::Locator @@ -8491,6 +8566,30 @@ Do you want to kill it? Ctrl+L Ctrl+L + + Zoom In + Увеличить + + + Ctrl++ + Ctrl++ + + + Zoom Out + Уменьшить + + + Ctrl+- + Ctrl+- + + + Original Size + Исходный размер + + + Meta+0 + Meta+0 + &Options... П&араметры... @@ -8573,6 +8672,13 @@ Do you want to kill it? Настройки... + + Core::Internal::MenuBarFilter + + Actions from the Menu + Действия из меню + + Core::Internal::MessageOutputWindow @@ -9163,11 +9269,11 @@ Do you want to kill it? Use "Cmd", "Opt", "Ctrl", and "Shift" for modifier keys. Use "Escape", "Backspace", "Delete", "Insert", "Home", and so on, for special keys. Combine individual keys with "+", and combine multiple shortcuts to a shortcut sequence with ",". For example, if the user must hold the Ctrl and Shift modifier keys while pressing Escape, and then release and press A, enter "Ctrl+Shift+Escape,A". - Используйте «Cmd», «Opt», «Ctrl» и «Shift», как модификаторы. «Escape», «Backspace», «Delete», «Insert», «Home» и прочие, как специальные клавиши. Комбинируйте отдельные клавиши с помощью «+», а комбинации с помощью «,». Например: «Ctrl+Shift+Escape,A» - удерживая «Ctrl» и «Shift» нажать «Escape», отпустить и нажать «A». + Используйте «Cmd», «Opt», «Ctrl» и «Shift» как модификаторы. «Escape», «Backspace», «Delete», «Insert», «Home» и прочие как специальные клавиши. Комбинируйте отдельные клавиши с помощью «+», а комбинации с помощью «,». Например: «Ctrl+Shift+Escape,A» - удерживая «Ctrl» и «Shift» нажать «Escape», отпустить и нажать «A». Use "Ctrl", "Alt", "Meta", and "Shift" for modifier keys. Use "Escape", "Backspace", "Delete", "Insert", "Home", and so on, for special keys. Combine individual keys with "+", and combine multiple shortcuts to a shortcut sequence with ",". For example, if the user must hold the Ctrl and Shift modifier keys while pressing Escape, and then release and press A, enter "Ctrl+Shift+Escape,A". - Используйте «Ctrl», «Alt», «Meta» и «Shift», как модификаторы. «Escape», «Backspace», «Delete», «Insert», «Home» и прочие, как специальные клавиши. Комбинируйте отдельные клавиши с помощью «+», а комбинации с помощью «,». Например: «Ctrl+Shift+Escape,A» - удерживая «Ctrl» и «Shift» нажать «Escape», отпустить и нажать «A». + Используйте «Ctrl», «Alt», «Meta» и «Shift» как модификаторы. «Escape», «Backspace», «Delete», «Insert», «Home» и прочие как специальные клавиши. Комбинируйте отдельные клавиши с помощью «+», а комбинации с помощью «,». Например: «Ctrl+Shift+Escape,A» - удерживая «Ctrl» и «Shift» нажать «Escape», отпустить и нажать «A». Reset @@ -9571,25 +9677,6 @@ Do you want to check them out now? Получить их сейчас? - - Core::RemoveFileDialog - - Remove File - Удалить файл - - - File to remove: - Файл для удаления: - - - &Delete file permanently - &Удалить файл навсегда - - - &Remove from Version Control - У&далить из контроля версий - - Core::SearchResultWindow @@ -9719,6 +9806,33 @@ to version control (%2) Нет доступных иерархий включений + + CppEditor::CppQuickFixFactory + + Create Getter and Setter Member Functions + Создать методы получения и установки значения + + + Create Getter Member Function + Создать метод получения значения + + + Create Setter Member Function + Создать метод установки значения + + + Convert to Stack Variable + Преобразовать в стековую переменную + + + Convert to Pointer + Преобразовать в указатель + + + Generate Missing Q_PROPERTY Members + Создание отсутствующих членов Q_PROPERTY + + CppEditor::InsertDeclOperation @@ -10100,14 +10214,21 @@ to version control (%2) - CppTools::ClangDiagnosticConfigsWidget + CppTools::ClangBaseChecks Form - Configuration to use: - Использовать конфигурацию: + For appropriate options, consult the GCC or Clang manual pages or the <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">GCC online documentation</a>. + Описание параметров можно найти страницах man GCC или Clang или в <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">Документации GCC</a>. + + + + CppTools::ClangDiagnosticConfigsWidget + + Form + Copy... @@ -10117,10 +10238,6 @@ to version control (%2) Remove Удалить - - For appropriate options, consult the GCC or Clang manual pages or the <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">GCC online documentation</a>. - Описание параметров можно найти страницах man GCC или Clang или в <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html">Документации GCC</a>. - Copy Diagnostic Configuration Копирование конфигурации диагностики @@ -10137,6 +10254,10 @@ to version control (%2) Option "%1" is invalid. Параметр «%1» неверен. + + Copy this configuration to customize it. + Изменить можно только копию этой конфигурации. + Configuration passes sanity checks. Конфигурация прошла предпроверку. @@ -10146,14 +10267,61 @@ to version control (%2) %1 - ValidationIcon + Clang + Clang + + + Clang-Tidy + Clang-Tidy + + + Clazy + Clazy + + + InfoIcon - ValidationText + InfoText + + CppTools::ClazyChecks + + Form + + + + Each level adds checks to the previous level. For more information, see <a href="https://github.com/KDE/clazy">clazy's homepage</a>. + Каждый уровень добавляет проверки к предыдущему. Подробнее на <a href="https://github.com/KDE/clazy">домашней странице clazy</a>. + + + Disabled + Отключено + + + Level 0: No false positives + Уровень 0: без ложных срабатываний + + + Level 1: Very few false positives + Уровень 1: немного ложных срабатываний + + + Level 2: More false positives + Уровень 2: больше ложных срабатываний + + + Not always correct, possibly very noisy, might require a knowledgeable developer to review, might have a very big rate of false-positives, might have bugs. + Не всегда корретны, возможно, много шума, может потребоваться информированный разработчик для анализа, может иметь высокий уровень ложных срабатываний, может содержать ошибки. + + + Level 3: Experimental checks + Уровень 3: экспериментальные проверки + + CppTools::CppClassesFilter @@ -10201,17 +10369,13 @@ to version control (%2) Form - - Clang Code Model Warnings - Предупреждения модели кода Clang - <i>The Clang Code Model is enabled because the corresponding plugin is loaded.</i> - <i>Clang Code Model включена, так как соответствующий модуль загружен.</i> + <i>Модель кода Clang включена, так как соответствующий модуль загружен.</i> <i>The Clang Code Model is disabled because the corresponding plugin is not loaded.</i> - <i>Clang Code Model выключена, так как соответствующий модуль не загружен.</i> + <i>Модель кода Clang выключена, так как соответствующий модуль не загружен.</i> Do not index files greater than @@ -10237,6 +10401,10 @@ to version control (%2) Ignore precompiled headers Игнорировать прекомпилированные заголовки + + Clang Diagnostics + Диагностика Clang + CppTools::Internal::CppCodeStyleSettingsPage @@ -10571,17 +10739,17 @@ These prefixes are used in addition to current file name on Switch Header/Source CppTools::Internal::CppFileSettingsWidget /************************************************************************** -** Qt Creator license header template +** %1 license header template ** Special keywords: %USER% %DATE% %YEAR% ** Environment variables: %$VARIABLE% ** To protect a percent sign, use '%%'. **************************************************************************/ /************************************************************************** -** Шаблон лицензии заголовочного файлы Qt Creator -** Специальные ключевые слова: %USER% %DATE% %YEAR% -** Переменные среды: %$VARIABLE% -** Если требуется символ «процент», то используйте «%%». +** %1 license header template +** Special keywords: %USER% %DATE% %YEAR% +** Environment variables: %$VARIABLE% +** To protect a percent sign, use '%%'. **************************************************************************/ @@ -10833,7 +11001,7 @@ Flags: %3 Extract Constant as Function Parameter - Извлечь константу, как параметр функции + Извлечь константу как параметр функции Assign to Local Variable @@ -10884,6 +11052,13 @@ Flags: %3 Завершить оператор Switch + + CppTools::TidyChecks + + Form + + + CustomToolChain @@ -11381,9 +11556,9 @@ Flags: %3 32-х битная версия - <html><body><p>Specify the path to the <a href="%1">Windows Console Debugger executable</a> (%2) here.</p></body></html> + Specify the path to the <a href="%1">Windows Console Debugger executable</a> (%2) here. Label text for path configuration. %2 is "x-bit version". - <html><body><p>Укажите здесь путь к <a href="%1">программе Windows Console Debugger</a> (%2).</p></body></html> + Укажите здесь путь к <a href="%1">программе Windows Console Debugger</a> (%2). Auto-detected CDB at %1 @@ -11574,36 +11749,6 @@ Flags: %3 Копировать - - Debugger::GdbServerPortsGatherer - - Checking available ports... - Проверка доступных портов... - - - Found %n free ports. - - Обнаружен %n свободный порт. - Обнаружено %n свободных порта. - Обнаружено %n свободных портов. - - - - Not enough free ports on device for C++ debugging. - Недостаточно свободных портов на устройстве для отладки C++. - - - Not enough free ports on device for QML debugging. - Недостаточно свободных портов на устройстве для отладки QML. - - - - Debugger::GdbServerRunner - - Starting gdbserver... - Запускается gdbserver... - - Debugger::Internal::AddressDialog @@ -11836,12 +11981,12 @@ Flags: %3 Пут&ь: - &Module: - &Модуль: + Specifying the module (base name of the library or executable) for function or file type breakpoints can significantly speed up debugger startup times (CDB, LLDB). + Указание модуля (имени библиотеки или программы) для точек останова на функциях или исходниках может значительно повысить скорость запуска отладчика (CDB, LLDB). - <p>Debugger commands to be executed when the breakpoint is hit. This feature is only available for GDB. - <p>Команды отладчика, выполняемые при срабатывании точки останова. Данная возможность есть только в GDB. + &Module: + &Модуль: &Commands: @@ -12039,6 +12184,10 @@ Flags: %3 Function Name: Имя функции: + + Debugger commands to be executed when the breakpoint is hit. This feature is only available for GDB. + Команды отладчика, выполняемые при срабатывании точки останова. Данная возможность есть только в GDB. + Line Number: Номер строки: @@ -12131,10 +12280,6 @@ Flags: %3 Break When JavaScript Exception Is Thrown Остановиться при возникновении исключения JavaScript - - <p>Specifying the module (base name of the library or executable) for function or file type breakpoints can significantly speed up debugger startup times (CDB, LLDB). - <p>Указание модуля (имени библиотеки или программы) для точек останова на функциях или исходниках может значительно повысить скорость запуска отладчика (CDB, LLDB). - Function Функция @@ -12244,6 +12389,14 @@ Flags: %3 There is no CDB executable specified. Программа CDB не указана. + + Internal error: The extension %1 cannot be found. +If you have updated %2 via Maintenance Tool, you may need to rerun the Tool and select "Add or remove components" and then select the Qt > Tools > Qt Creator CDB Debugger Support component. +If you build %2 from sources and want to use a CDB executable with another bitness than your %2 build, you will need to build a separate CDB extension with the same bitness as the CDB you want to use. + Внутренняя ошибка: Не удалось найти расширение %1. +Если %2 был обновлён через Maintenance Tool, то следует перезапустить её и выбрать «Добавить или удалить компоненты», затем отметить компонент Qt > Tools -> Qt Creator > Qt Creator CDB Debugger Support. +Если же %2 был собран из исходников и требует программу CDB отличной от него разрядности, то необходимо собрать отдельное расширение CDB соответствующее разрядности используемого CDB. + Interrupting is not possible in remote sessions. Прерывание в удалённых сессиях невозможно. @@ -12272,18 +12425,6 @@ Flags: %3 Malformed stop response received. Получен неверный ответ на требование остановки. - - Internal error: The extension %1 cannot be found. -If you have updated Qt Creator via Maintenance Tool, you may need to rerun the Tool and select "Add or remove components" and then select the -Qt > Tools > Qt Creator > Qt Creator CDB Debugger Support component. -If you build Qt Creator from sources and want to use a CDB executable with another bitness than your Qt Creator build, -you will need to build a separate CDB extension with the same bitness as the CDB you want to use. - Внутренняя ошибка: Не удалось найти расширение %1. -Если Qt Creator был обновлён через Maintenance Tool, то следует перезапустить её и выбрать "Добавить или удалить компоненты", затем -отметить компонент Qt > Tools -> Qt Creator > Qt Creator CDB Debugger Support. -Если же Qt Creator был собран из исходников и требует программу CDB отличной разрядности, то необходимо собрать -отдельное расширение CDB соответствующее разрядности используемого CDB. - Switching to main thread... Переключение в основной поток... @@ -12556,10 +12697,6 @@ you will need to build a separate CDB extension with the same bitness as the CDB Debugging has failed Ошибка отладки - - Setup failed. - Не удалось настроить. - Loading finished. Загрузка завершена. @@ -13132,10 +13269,6 @@ Affected are breakpoints %1 &Threads &Потоки - - Locals and &Expressions - Переменные и &выражения - Debugger Отладчик @@ -13234,6 +13367,14 @@ Affected are breakpoints %1 Source Files Файлы исходных текстов + + Locals + Локальные переменные + + + &Expressions + Выра&жения + Snapshots Снимки @@ -13891,8 +14032,8 @@ You can choose between waiting longer or aborting debugging. Это могло возникнуть из-за ограничений на длину пути в файле дампа. - Try to specify the binary in Debug > Start Debugging > Attach to Core. - Попробуйте указать программу используя диалог Отладка->Начать отладку->Присоединиться к дампу. + Try to specify the binary in Debug > Start Debugging > Load Core File. + Попробуйте указать программу используя диалог Отладка > Начать отладку > Загрузить файл дампа. Starting executable failed: @@ -14316,8 +14457,8 @@ In this case, the value should be increased. Помощники отладчика используются для корректного отображения объектов некоторых типов, вроде QString и std::map в обзоре «Переменные» режима отладки. - <html><head/><body><p>Python commands entered here will be executed after built-in debugging helpers have been loaded and fully initialized. You can load additional debugging helpers or modify existing ones here.</p></body></html> - <html><head/><body><p>Введённые здесь команды на языке Python будут выполнены после загрузки и полной инициализации помощников отладчика. Здесь же можно загрузить дополнительные помощники или изменить существующие.</p></body></html> + Python commands entered here will be executed after built-in debugging helpers have been loaded and fully initialized. You can load additional debugging helpers or modify existing ones here. + Введённые здесь команды на языке Python будут выполнены после загрузки и полной инициализации помощников отладчика. Здесь же можно загрузить дополнительные помощники или изменить существующие. Extra Debugging Helpers @@ -15665,11 +15806,11 @@ You can choose another communication channel here, such as a serial line or cust Display Boolean Values as True or False - Отображать булевы значения, как True и False + Отображать булевы значения как True и False Display Boolean Values as 1 or 0 - Отображать булевы значения, как 1 и 0 + Отображать булевы значения как 1 и 0 Decimal Integer @@ -16499,6 +16640,10 @@ Rebuilding the project might help. Export Property as Alias Экспортировать свойства как алиас + + Insert Keyframe + Вставить ключевой кадр + Binding Editor Редактор привязок @@ -16769,7 +16914,7 @@ Plugin is not available on this platform. Path: %1 Plugin is enabled as dependency of an enabled plugin. Путь: %1 -Модуль включён, как зависимость включённого модуля. +Модуль включён как зависимость включённого модуля. Path: %1 @@ -17355,6 +17500,32 @@ will also disable the following plugins: Sets the letter spacing for the font. Задание интервала между буквами для шрифта. + + Performance + Производительность + + + Kerning + Кернинг + + + Enables or disables the kerning OpenType feature when shaping the text. Disabling this may improve performance when creating or changing the text, at the expense of some cosmetic features. The default value is true. + Включает/выключает OpenType функцию кернинг при оформлении текста. Выключение её может повысить быстродействие при создании или изменении текста за счёт некоторых косметических деталей. По умолчанию включено. + + + Prefer shaping + Предпочитать оформление + + + Sometimes, a font will apply complex rules to a set of characters in order to display them correctly. +In some writing systems, such as Brahmic scripts, this is required in order for the text to be legible, whereas in Latin script, + it is merely a cosmetic feature. Setting the preferShaping property to false will disable all such features +when they are not required, which will improve performance in most cases. + Иногда шрифт требует применения сложных правил к набору символов для правильного отображения. +В некоторых системах письма (например, брахми), они необходимы для читабельности, в то же время для латиницы +это просто косметическая функция. Задание свойству preferShaping значения false отключит все обработки, если они +не обязательны. В большинстве случаев это позволит поднять производительность. + FontSettings_C_OCCURRENCES_UNUSED @@ -17927,10 +18098,6 @@ were not verified among remotes in %3. Select different folder? &Topic: &Тема: - - &Draft - &Черновик - Number of commits Число фиксаций @@ -17951,6 +18118,22 @@ were not verified among remotes in %3. Select different folder? Number of commits between %1 and %2: %3 Число фиксаций между %1 и %2: %3 + + Checked - Mark change as WIP. +Unchecked - Mark change as ready for review. +Partially checked - Do not change current state. + Включите, чтобы отметить как WIP. +Оставьте серым, если менять состояние не требуется. + + + Supported on Gerrit 2.15 and later. + Поддерживается начиная с Gerrit 2.15. + + + Checked - The change is a draft. +Unchecked - The change is not a draft. + Включите, если изменение является черновиком. + No remote branches found. This is probably the initial commit. Внешние ветки не обнаружены. Возможно, это начальная фиксация. @@ -17991,6 +18174,20 @@ Partial names can be used if they are unambiguous. To: В: + + Checked - Mark change as private. +Unchecked - Remove mark. +Partially checked - Do not change current state. + Включите, чтобы отметить изменение личным, оставьте серым, чтобы не менять отметку. + + + &Draft/private + &Черновик + + + &Work-in-progress + В р&аботе + Gerrit::Internal::GerritRemoteChooser @@ -18397,6 +18594,10 @@ Would you like to terminate it? Ignore whitespace only changes. Игнорировать изменения пробелов. + + Reload + Перезагрузить + Ignore Whitespace Игнорировать пробелы @@ -18510,6 +18711,14 @@ Commit now? Create Local Branch Создание локальной ветки + + Nothing to recover + Нечего восстанавливать + + + Files recovered + Файлы восстановлены + Cannot obtain log of "%1": %2 Не удалось получить историю «%1»: %2 @@ -18876,6 +19085,10 @@ Commit now? Show textual graph log. Показать граф журнала в ASCII графике. + + Reload + Перезагрузить + Git::Internal::GitPlugin @@ -19199,6 +19412,10 @@ Commit now? Reflog Reflog + + Recover Deleted Files + Восстановить удалённые файлы + Skip Rebase Пропустить перебазирование @@ -20738,34 +20955,6 @@ Would you like to overwrite it? ImageViewer::Internal::ImageViewerPlugin - - Zoom In - Увеличить - - - Ctrl++ - Ctrl++ - - - Zoom Out - Уменьшить - - - Ctrl+- - Ctrl+- - - - Original Size - Исходный размер - - - Meta+0 - Meta+0 - - - Ctrl+0 - Ctrl+0 - Fit to Screen На весь экран @@ -21007,13 +21196,6 @@ Ids must begin with a lowercase letter. Видимо dSYM %1 устарел, он может смутить отладчик. - - Ios::Internal::IosDeployConfiguration - - Deploy to iOS - Установка на iOS - - Ios::Internal::IosDeployConfigurationFactory @@ -21227,10 +21409,6 @@ Ids must begin with a lowercase letter. Could not get inferior PID. Не удалось получить PID процесса. - - Could not get necessary ports the debugger connection. - Не удалось получить необходимые порты для подключения отладчика. - Run failed. The settings in the Organizer window of Xcode might be incorrect. Не удалось запустить. Настройки Xcode в окне Organizer могут быть неверны. @@ -21333,14 +21511,6 @@ Ids must begin with a lowercase letter. Simulator Start Запустить эмулятор - - Starting simulator devices... - - Запуск эмулируемых устройств... - Запуск эмулируемых устройств... - Запуск эмулируемых устройств... - - Cannot start simulator (%1, %2) in current state: %3 Невозможно запустить эмулятор (%1, %2) в текущем состоянии: %3 @@ -21366,11 +21536,19 @@ Error: %2 Ошибка: %2 - Do you really want to reset the contents and settings of the selected devices? + Starting %n simulator device(s)... - Удалить содержимое и настройки выбранных устройств? - Удалить содержимое и настройки выбранных устройств? - Удалить содержимое и настройки выбранных устройств? + Запуск %n эмулируемого устройства... + Запуск %n эмулируемых устройств... + Запуск %n эмулируемых устройств... + + + + Do you really want to reset the contents and settings of the %n selected device(s)? + + Сбросить содержимое и настройки %n выбранного устройства? + Сбросить содержимое и настройки %n выбранных устройств? + Сбросить содержимое и настройки %n выбранных устройств? @@ -21402,33 +21580,33 @@ Error: %2 Удаление устройства - Do you really want to delete the selected devices? + Do you really want to delete the %n selected device(s)? - Удалить выбранные устройства? - Удалить выбранные устройства? - Удалить выбранные устройства? + Удалить %n выбранное устройство? + Удалить %n выбранных устройства? + Удалить %n выбранных устройств? - Deleting simulator devices... + Deleting %n simulator device(s)... - Удаление эмулируемых устройств... - Удаление эмулируемых устройств... - Удаление эмулируемых устройств... + Удаление %n эмулируемого устройства... + Удаление %n эмулируемых устройств... + Удаление %n эмулируемых устройств... + + + + Capturing screenshots from %n device(s)... + + Создание снимков экрана с %n устройства... + Создание снимков экрана с %n устройств... + Создание снимков экрана с %n устройств... simulator delete удаление эмулятора - - Capturing screenshots from devices... - - Создание снимка экрана устройств... - Создание снимка экрана устройств... - Создание снимка экрана устройств... - - simulator screenshot снимок экрана эмулятора @@ -21553,7 +21731,7 @@ Error: %5 Toggles whether this item is exported as an alias property of the root item. - Переключает режим экспорта элемента, как свойства псевдоним корневого элемента. + Переключает режим экспорта элемента, как псевдонима свойства корневого элемента. Visibility @@ -22096,6 +22274,10 @@ Error: %5 Quit Выйти + + %1 has crashed + %1 аварийно завершился + We specifically send the following information: @@ -22620,25 +22802,14 @@ Error: %5 &Delete &Удалить - - Model Editor - Редактор моделей - Export Diagram... Экспорт диаграммы... - Zoom In - Увеличить - - - Zoom Out - Уменьшить - - - Reset Zoom - Сбросить масштаб + Export Selected Elements... + убрал слово "выбранные", а то слишком длинно для команды. + Экспортировать элементы... Open Parent Diagram @@ -22661,8 +22832,12 @@ Error: %5 Добавить диаграмму холста - Synchronize Browser and Diagram<br><i><small>Press&Hold for options</small></i> - Синхронизировать браузер и диаграмму<br><i><small>Нажмите и удерживайте для настройки</small></i> + Synchronize Browser and Diagram + Согласовывать обозреватель с диаграммой + + + Press && Hold for Options + Нажмите и удерживайте для входа в настройки Edit Element Properties @@ -22724,22 +22899,6 @@ Error: %5 <html><body style="color:#909090; font-size:14px"><div align='center'><div style="font-size:20px">Open a diagram</div><table><tr><td><hr/><div style="margin-top: 5px">&bull; Double-click on diagram in model tree</div><div style="margin-top: 5px">&bull; Select "Open Diagram" from package's context menu in model tree</div></td></tr></table></div></body></html> <html><body style="color:#909090; font-size:14px"><div align='center'><div style="font-size:20px">Открытие диаграммы</div><table><tr><td><hr/><div style="margin-top: 5px">&bull; Двойной щелчок на диаграмме в дереве модели</div><div style="margin-top: 5px">&bull; «Открыть диаграмму» в контекстном меню пакета дерева модели</div></td></tr></table></div></body></html> - - Add Package - Добавить пакет - - - Add Component - Добавить компонент - - - Add Class - Добавить класс - - - Add Canvas Diagram - Добавить диаграмму холста - Synchronize Structure with Diagram Согласовывать структуру с диаграммой @@ -22764,6 +22923,18 @@ Error: %5 Export Diagram Экспорт диаграммы + + Export Selected Elements + Экспорт выбранных элементов + + + Exporting Selected Elements Failed + Не удалось экспортировать выбранные элементы + + + Exporting the selected elements of the current diagram into file<br>"%1"<br>failed. + Не удалось экспортировать выбранные элементы текущей диаграммы в файл<br>«%1». + Exporting Diagram Failed Не удалось экспортировать диаграмму @@ -22772,22 +22943,42 @@ Error: %5 Exporting the diagram into file<br>"%1"<br>failed. Не удалось экспортировать диаграмму в файл «%1». + + New %1 + Новый %1 + Package Пакет + + New Package + Создать пакет + Component Компонент + + New Component + Создать компонент + Class Класс + + New Class + Создать класс + Item Элемент + + New Item + Создать элемент + Annotation Аннотация @@ -24036,6 +24227,37 @@ Error: %5 Интервал между внутренними элементами элемента управления. + + ProcessCreator + + Executable does not exist: %1 + Программа отсутствует: %1 + + + Unknown error occurred. + Возникла неизвестная ошибка. + + + Process crashed. + Процесс аварийно завершился. + + + Process failed at startup. + Сбой запуска процесса. + + + Process timed out. + Вышло время ожидания процесса. + + + Cannot write to process. + Не удалось отправить данные процессу. + + + Cannot read from process. + Не удалось получить данные от процесса. + + ProjectExplorer @@ -24189,16 +24411,6 @@ Error: %5 ProjectExplorer::BuildConfiguration - - Build - Display name of the build build step list. Used as part of the labels in the project window. - Сборка - - - Clean - Display name of the clean build step list. Used as part of the labels in the project window. - Очистка - Build Settings Настройки сборки @@ -24300,6 +24512,19 @@ Error: %5 Этап сборки + + ProjectExplorer::BuildStepList + + Build + Display name of the build build step list. Used as part of the labels in the project window. + Сборка + + + Clean + Display name of the clean build step list. Used as part of the labels in the project window. + Очистка + + ProjectExplorer::BuildableHelperLibrary @@ -24562,6 +24787,7 @@ cannot be found in the path. ProjectExplorer::DeployConfigurationFactory Deploy Configuration + Display name of the default deploy configuration Конфигурация установки @@ -24643,10 +24869,6 @@ cannot be found in the path. DebugBreakProcess failed: Ошибка DebugBreakProcess: - - %1 does not exist. If you built Qt Creator yourself, check out https://code.qt.io/cgit/qt-creator/binary-artifacts.git/. - %1 не существует. Если производится самостоятельная сборка Qt Creator, то посетите https://code.qt.io/cgit/qt-creator/binary-artifacts.git/. - could not break the process. не удалось остановить процесс. @@ -24659,6 +24881,10 @@ cannot be found in the path. Cannot interrupt process with pid %1: %2 Не удалось прервать процесс с PID %1: %2 + + %1 does not exist. If you built %2 yourself, check out https://code.qt.io/cgit/qt-creator/binary-artifacts.git/. + %1 не существует. Если вы сами собрали %2, то посетите https://code.qt.io/cgit/qt-creator/binary-artifacts.git/. + Cannot start %1. Check src\tools\win64interrupt\win64interrupt.c for more information. Не удалось запустить %1. Подробности можно найти в src\tools\win64interrupt\win64interrupt.c. @@ -24828,23 +25054,16 @@ cannot be found in the path. Базовая среда данной конфигурации выполнения: - - ProjectExplorer::EnvironmentIdAccessor - - <p>No .user settings file created by this instance of %1 was found.</p><p>Did you work with this project on another machine or using a different settings path before?</p><p>Do you still want to load the settings file "%2"?</p> - <p>Не удалось найти файл настроек от этого %1.</p><p>Не работали ли вы ранее с этим проектом на другой машине или не использовали ли вы другой путь к настройкам?</p><p>Продолжить загрузку файла настроек «%2»?</p> - - - Settings File for "%1" from a different Environment? - Настройки проекта «%1» с другого компьютера? - - ProjectExplorer::EnvironmentKitInformation The environment setting value is invalid. Значение параметра среды не верно. + + Environment + Среда + ProjectExplorer::EnvironmentValidator @@ -25566,10 +25785,22 @@ Excluding: %2 Show Hidden Files Отображать скрытые файлы + + The file "%1" was renamed to "%2", but the following projects could not be automatically changed: %3 + Файл «%1» был переименован в «%2», но не удалось автоматически изменить проекты: %3 + + + Show Bread Crumbs + Показать навигационную цепочку + Synchronize with Editor Согласовывать с редактором + + The following projects failed to automatically remove the file: %1 + Не удалось автоматически удалить файл из следующих проектов: %1 + Open Project in "%1" Открыть проект в «%1» @@ -25606,8 +25837,8 @@ Excluding: %2 Alt+Y - Filter Files - Отображение файлов + Options + Параметры @@ -26013,14 +26244,14 @@ Excluding: %2 Same Build Directory В том же каталоге сборки - - Limit build output to - Ограничить вывод сборки - Limit application output to Ограничить вывод приложения + + Limit build output to + Ограничить вывод сборки + ProjectExplorer::Internal::ProjectFileWizardExtension @@ -26650,18 +26881,6 @@ to project "%2". Field has no name. Поле не имеет имени. - - Label data is not an object. - Данные Label не являются объектом. - - - No text given for Label. - Для Label не задан текст. - - - Spacer data is not an object. - Данные Spacer не являются объектом. - Field "%1" has no type. Поле «%1» не имеет типа. @@ -26683,20 +26902,68 @@ to project "%2". При обработке поля «%1»: %2 - "factor" is no integer value. - Значение «factor» не является целым. + Label ("%1") data is not an object. + Данные Label («%1») не являются объектом. - LineEdit data is not an object. - Данные LineEdit не являются объектом. + Label ("%1") has no trText. + У Label («%1») нет trText. - Invalid regular expression "%1" in "validator". - Неверное регулярное выражение «%1» в «validator». + Spacer ("%1") data is not an object. + Данные Spacer («%1») не являются объектом. - TextEdit data is not an object. - Данные TextEdit не являются объектом. + Spacer ("%1") property "factor" is no integer value. + Свойство «factor» элемента Spacer («%1») не целое число. + + + LineEdit ("%1") data is not an object. + Данные LineEdit («%1») не являются объектом. + + + LineEdit ("%1") has an invalid regular expression "%2" in "validator". + LineEdit («%1») содержит неверное регулярное выражение «%2» в поле «validator». + + + TextEdit ("%1") data is not an object. + Данные TextEdit («%1») не являются объектом. + + + CheckBox ("%1") data is not an object. + Данные CheckBox («%1») не являются объектом. + + + CheckBox ("%1") values for checked and unchecked state are identical. + Значения CheckBox («%1») для включённого и выключенного состояний одинаковы. + + + No JSON lists allowed inside List items. + Списки JSON недопустимы внутри элементов List. + + + No "key" found in List items. + Не найден «key» в элементах List. + + + %1 ("%2") data is not an object. + Данные %1 («%2») не являются объектом. + + + %1 ("%2") "index" is not an integer value. + Значение «index» объекта %1 («%2») не является целым. + + + %1 ("%2") "disabledIndex" is not an integer value. + Значение «disabledIndex» объекта %1 («%2») не является целым. + + + %1 ("%2") "items" missing. + Отсутствует элемент «items» у %1 («%2»). + + + %1 ("%2") "items" is not a JSON list. + Поле «items» у %1 («%2») не является списком JSON. PathChooser data is not an object. @@ -26706,46 +26973,6 @@ to project "%2". kind "%1" is not one of the supported "existingDirectory", "directory", "file", "saveFile", "existingCommand", "command", "any". вид «%1» не один из: «existingDirectory», «directory», «file», «saveFile», «existingCommand», «command», «any». - - No "key" found in ComboBox items. - Не найден «key» в элементах ComboBox. - - - ComboBox "index" is not an integer value. - Значение «index» объекта ComboBox не является целым. - - - ComboBox "disabledIndex" is not an integer value. - Значение «disabledIndex» объекта ComboBox не является целым. - - - ComboBox "items" missing. - Элемент «items» ComboBox отсутствует. - - - ComboBox "items" is not a list. - Поле «items» ComboBox не является списком. - - - Internal Error: ComboBox items lists got mixed up. - Внутренняя ошибка: элементы ComboBox перемешаны. - - - CheckBox data is not an object. - Данные CheckBox не являются объектом. - - - CheckBox values for checked and unchecked state are identical. - Значения CheckBox для включённого и выключенного состояний одинаковы. - - - No lists allowed inside ComboBox items list. - Списки не допустимы внутри списка элементов ComboBox. - - - ComboBox data is not an object. - Данные ComboBox не являются объектом. - Files data list entry is not an object. Список файлов не является объектом. @@ -27321,10 +27548,6 @@ Preselects a desktop Qt for building the application if available. Qt Console Application Консольное приложение Qt - - Use Qt Virtual Keyboard. - Использовать виртуальную клавиатуру Qt - This wizard creates an empty .pro file. Этот мастер создаст пустой файл .pro. @@ -27397,10 +27620,6 @@ Preselects a desktop Qt for building the application if available. Qt Test Qt Test - - Googletest - Googletest - GUI Application Приложение с GUI @@ -27507,6 +27726,26 @@ Use this only if you are prototyping. You cannot create a full application with Use Qt Virtual Keyboard Использовать виртуальную клавиатуру Qt + + Google Test + Тест Google + + + Qt Quick Test + Тест Qt Quick + + + Qt 5.10 + Qt 5.10 + + + Creates a scratch model using a temporary file. + Создание черновой модели с использованием временного файла. + + + Scratch Model + Черновая модель + Creates a Qt Canvas 3D QML project, optionally including three.js. Создание проекта Qt Canvas 3D QML, возможно, с three.js. @@ -28098,13 +28337,6 @@ Please close all running instances of your application before starting a build.< Некоторые конфигураций не удалось скопировать. - - ProjectExplorer::ProjectConfiguration - - Clone of %1 - Копия %1 - - ProjectExplorer::ProjectExplorerPlugin @@ -28296,10 +28528,6 @@ Please close all running instances of your application before starting a build.< Rename... Переименовать... - - Diff Against Current File - Сравнить с текущим файлом - Set as Active Project Сделать активным проектом @@ -28933,17 +29161,6 @@ These files are preserved. Безымянная - - ProjectExplorer::SettingsAccessor - - Unsupported Shared Settings File - Неподдерживаемый файл общих настроек - - - The version of your .shared file is not supported by %1. Do you want to try loading it anyway? - Версия вашего файла .shared не поддерживается этой версией %1. Попробовать загрузить файл? - - ProjectExplorer::SimpleTargetRunner @@ -29045,6 +29262,10 @@ These files are preserved. Select all kits Выбрать все комлекты + + Type to filter kits by name... + Фильтр комплектов по имени... + Select Kits for Your Project Выбор комплектов для проекта @@ -29211,7 +29432,7 @@ App ID: %2 PuppetCreator - Puppet is starting ... + Puppet is starting... Запускается Puppet... @@ -29235,8 +29456,8 @@ App ID: %2 Неверный комплект - The QML emulation layer (QML Puppet) cannot be built because the kit is not configured correctly. For example the compiler can be misconfigured. Fix the kit configuration and restart Qt Creator. Otherwise, the fallback emulation layer, which does not support all features, will be used. - Невозможно собрать слой эмуляции QML (QML Puppet), так как комплект не настроен корректно. Например, не настроен компилятор. Исправьте настройку комплекта и перезапустите Qt Creator. Иначе будет использоваться резервный эмулятор, не поддерживающий всех возможностей. + The QML emulation layer (QML Puppet) cannot be built because the kit is not configured correctly. For example the compiler can be misconfigured. Fix the kit configuration and restart %1. Otherwise, the fallback emulation layer, which does not support all features, will be used. + Невозможно собрать слой эмуляции QML (QML Puppet), так как комплект не настроен корректно. Например, не настроен компилятор. Исправьте настройку комплекта и перезапустите %1. Иначе будет использоваться резервный эмулятор, не поддерживающий всех возможностей. Qt Version is not supported @@ -29287,6 +29508,13 @@ App ID: %2 Закрывает прицепляемый виджет + + QObject + + C++ Usages: + Использование C++: + + QSsh::Internal::SftpChannelPrivate @@ -29855,8 +30083,8 @@ App ID: %2 Force probes - Не знаю, что это значит. "Исследовать принудительно"? - Форсировать пробы + Есть такой раздел Probe в проекте QBS, предназначенный для однократного вычисления, возможно, очень ресурсоемкого, поэтому результат кэшируется. Данная галка отключает кэширование. + Всегда выполнять Probe Installation flags: @@ -30144,6 +30372,10 @@ App ID: %2 QbsProjectManager::Internal::QbsRunConfigurationWidget + + Add library paths to run environment + Добавить в среду исполнения пути к библиотекам + <unknown> <неизвестный> @@ -30160,35 +30392,6 @@ App ID: %2 Файлы Qbs - - QmakeAndroidSupport::Internal::AndroidPackageInstallationFactory - - Deploy to device - Установка на устройство - - - - QmakeAndroidSupport::Internal::AndroidPackageInstallationStep - - Copy application data - Копирование данных приложения - - - Removing directory %1 - Удаление каталога %1 - - - - QmakeAndroidSupport::Internal::AndroidPackageInstallationStepWidget - - <b>Make install</b> - <b>Make install</b> - - - Make install - Make install - - QmakeAndroidSupport::Internal::ChooseDirectoryPage @@ -31401,6 +31604,10 @@ Neither the path to the library nor the path to its includes is added to the .pr QML Debugging Отладка QML + + QMake Configuration + Конфигурация QMake + The option will only take effect if the project is recompiled. Do you want to recompile now? Этот параметр вступит в силу только после перекомпиляции проекта. Перекомпилировать? @@ -31601,6 +31808,21 @@ Neither the path to the library nor the path to its includes is added to the .pr Ошибка: %1 + + QmlDebug::QmlDebugConnectionManager + + Debug connection opened. + Отладочное соединение открыто. + + + Debug connection closed. + Отладочное соединение закрыто. + + + Debug connection failed. + Не удалось установить отладочное подключение. + + QmlDebug::QmlOutputParser @@ -31754,8 +31976,8 @@ Neither the path to the library nor the path to its includes is added to the .pr QmlDesigner::DocumentWarningWidget - Ignore always these unsupported Qt Quick Designer warnings. - Всегда игнорировать эти предупреждения Qt Quick Designer. + Always ignore these warnings about features not supported by Qt Quick Designer. + Всегда игнорировать эти предупреждения о неподдерживаемых функциях Qt Quick Designer. Cannot open this QML document because of an error in the QML file: @@ -32046,6 +32268,10 @@ Neither the path to the library nor the path to its includes is added to the .pr Invalid type %1 Неверный тип %1 + + Unknown property for Imports %1 + Неизвестное свойство для Imports %1 + Unknown property for Type %1 Неизвестное свойство для Type %1 @@ -32323,6 +32549,34 @@ Neither the path to the library nor the path to its includes is added to the .pr Library search input hint text <Фильтр> + + Add New Resources... + Добавить новые ресурсы... + + + Add new resources to project. + Добавление новых ресурсов в проект. + + + Add import %1 + Добавить импорт %1 + + + Add Resources + Добавление ресурсов + + + Target Directory + Каталог назначения + + + Failed to Add File + Не удалось добавить файл + + + Could not add %1 to project. + Не удалось добавить файл %1 в проект. + QmlDesigner::NavigatorTreeModel @@ -32332,7 +32586,7 @@ Neither the path to the library nor the path to its includes is added to the .pr Toggles whether this item is exported as an alias property of the root item. - Включает экспорт элемента, как свойства alias корневого элемента. + Включает экспорт элемента, как псевдонима свойства корневого элемента. Toggles the visibility of this item in the form editor. @@ -32366,6 +32620,14 @@ This is independent of the visibility property in QML. QmlDesigner::NavigatorWidget + + Navigator + Навигатор + + + Project + Проект + Navigator Title of navigator view @@ -32389,7 +32651,7 @@ This is independent of the visibility property in QML. Filter Tree - Настроить отображение + Отфильтровать дерево Show only visible items. @@ -32593,10 +32855,6 @@ This is independent of the visibility property in QML. Select All "%1" Выделить все «%1» - - Toggle States Editor - Показать/скрыть редактор состояний - Switch Text/Design Переключить текст/дизайн @@ -32605,6 +32863,10 @@ This is independent of the visibility property in QML. &Restore Default View &Восстановить исходный вид + + Toggle States + Показать/скрыть состояния + Toggle &Left Sidebar Показать/скрыть &левую панель @@ -32662,7 +32924,7 @@ This is independent of the visibility property in QML. The empty string as a name is reserved for the base state. - Пустая строка зарезервирована, как название исходного состояния. + Пустая строка зарезервирована как название исходного состояния. Name already used in another state @@ -32672,8 +32934,8 @@ This is independent of the visibility property in QML. QmlDesigner::StatesEditorView - States Editor - Редактор состояний + States + Состояния base state @@ -32730,6 +32992,13 @@ This is independent of the visibility property in QML. Не найден импорт Qt Quick. + + QmlDesignerAddResources + + Image Files + Файлы изображений + + QmlDesignerContextMenu @@ -32873,7 +33142,7 @@ This is independent of the visibility property in QML. Сбросить положение и использовать неявное. - Fill selected item to parent. + Fill selected item to parent. Заполнить родительским. @@ -33010,6 +33279,17 @@ This is independent of the visibility property in QML. Анонимная функция + + QmlJS Code Model Marks + + Code Model Warning + Предупреждение модели кода + + + Code Model Error + Ошибка модели кода + + QmlJS::Bind @@ -33682,13 +33962,6 @@ For more information, see the "Checking Code Syntax" documentation.Qt Quick - - QmlJSEditor::AddAnalysisMessageSuppressionComment - - Add a Comment to Suppress This Message - Добавьте комментарий для подавления этого сообщения - - QmlJSEditor::ComponentFromObjectDef @@ -34627,21 +34900,6 @@ the QML editor know about a likely URI. Комплект: - - QmlProfiler::Internal::QmlProfilerClientManager - - Debug connection opened - Отладочное соединение открыто - - - Debug connection closed - Отладочное соединение закрыто - - - Debug connection failed - Не удалось установить отладочное подключение - - QmlProfiler::Internal::QmlProfilerConfigWidget @@ -34792,6 +35050,70 @@ itself takes time. Main Program Основная программа + + Callee + Вызываемое + + + Callee Description + Описание вызываемого + + + Caller + Вызывающее + + + Caller Description + Описание вызывающего + + + Calls + Вызовы + + + Details + Подробнее + + + Location + Размещение + + + Longest Time + Наибольшее время + + + Mean Time + Среднее время + + + Self Time + Собственное время + + + Self Time in Percent + Собственное время в процентах + + + Shortest Time + Наименьше время + + + Time in Percent + Время в процентах + + + Total Time + Общее время + + + Type + Тип + + + Median Time + Медианное время + <bytecode> <байтовый код> @@ -35107,10 +35429,6 @@ Do you want to save the data first? QmlProjectManager::Internal::QmlProjectRunConfigurationFactory - - QML Viewer - QML Viewer - QML Scene QML Scene @@ -35141,10 +35459,6 @@ Do you want to save the data first? Qt version is too old. Версия Qt слишком стара. - - Device type is not desktop. - Устройство не соответствует типу desktop. - No Qt version set in kit. Для комплекта не задан профиль Qt. @@ -35170,19 +35484,18 @@ Do you want to save the data first? QmlProjectManager::QmlProjectRunConfiguration - - No qmlviewer or qmlscene found. - Не найдены ни qmlviewer, ни qmlscene. - QML Scene QMLRunConfiguration display name. QML Scene - QML Viewer - QMLRunConfiguration display name. - + No qmlscene found. + qmlscene не найден. + + + No qmlscene binary specified for target device. + Не задана программа qmlscene для целевого устройства. No script file to execute. @@ -35989,6 +36302,10 @@ For more details, see /etc/sysctl.d/10-ptrace.conf The installation location of the current Qt version's plugins. Каталог установки модулей текущего профиля Qt. + + The installation location of the current Qt version's QML files. + Каталог установки файлов QML текущего профиля Qt. + The installation location of the current Qt version's imports. Каталог установки импорта текущего профиля Qt. @@ -36129,10 +36446,6 @@ For more details, see /etc/sysctl.d/10-ptrace.conf qmake "%1" is not an executable. qmake «%1» не является программой. - - No qmlviewer installed. - qmlviewer не установлен. - Desktop Qt Version is meant for the desktop @@ -36745,8 +37058,8 @@ In addition, device connectivity will be tested. RemoteLinux::Internal::RemoteLinuxRunConfigurationFactory - (on Remote Generic Linux Host) - (на удалённой машине с Linux) + %1 (on Remote Generic Linux Host) + %1 (на удалённой машине с Linux) @@ -36878,6 +37191,28 @@ In addition, device connectivity will be tested. Не удалось загрузить окружение: %1 + + RemoteLinux::RemoteLinuxKillAppService + + Trying to kill "%1" on remote device... + Попытка уничтожить «%1» на внешнем устройстве... + + + Remote application killed. + Внешнее приложение уничтожено. + + + Failed to kill remote application. Assuming it was not running. + Не удалось уничтожить внешнее приложение. Возможно, оно не было запущено. + + + + RemoteLinux::RemoteLinuxKillAppStep + + Kill current application instance + Уничтожение текущего экземпляра приложения + + RemoteLinux::RemoteLinuxRunConfiguration @@ -37945,10 +38280,6 @@ Description: %4 Each state must have a unique ID. Каждое состояние должно иметь уникальный ID. - - Missing ID - Отсутствует ID - Missing ID. Отсутствует ID. @@ -38136,10 +38467,6 @@ Row: %4, Column: %5 Re-Layout Перекомпоновать - - Relayout - Перекомпоновать - Change initial state Сменить начальное состояние @@ -38397,6 +38724,14 @@ with a password, which you can enter below. Specifies how the font size of the displayed text is determined. Задаёт режим определения размера шрифта отображаемого текста. + + Line height + Высота строки + + + Sets the line height for the text. + Задаёт высоту строки текста. + StatesDelegate @@ -38829,8 +39164,8 @@ with a password, which you can enter below. Не удалять - Disable Kit %1 in This Project? - Отключить комплект %1 в этом проекте? + Disable Kit "%1" in This Project? + Отключить комплект «%1» в этом проекте? The kit <b>%1</b> is currently being built. @@ -39272,7 +39607,7 @@ Specifies how backspace interacts with indentation. Определяет, как клавиша «забой» взаимодействует с отступами. <ul> -<li>Обычное: Никакого взаимодействия. Поведение, как для обычного текста. +<li>Обычное: Никакого взаимодействия. Поведение как для обычного текста. </li> <li>Следовать предыдущим отступам: Перемещение курсора на ближайший уровень отступов назад, определяемый предыдущими строками текста. @@ -39848,10 +40183,6 @@ In addition, Shift+Enter inserts an escape character at the cursor position and Animate navigation within file Анимировать навигацию по файлу - - Annotations next to lines - Построчная аннотация - Next to editor content За содержимым редактора @@ -39864,6 +40195,14 @@ In addition, Shift+Enter inserts an escape character at the cursor position and Aligned at right side Прижать к правому краю + + Line annotations + Построчная аннотация + + + Between lines + Между строк + TextEditor::Internal::FindInCurrentFile @@ -40086,6 +40425,79 @@ In addition, Shift+Enter inserts an escape character at the cursor position and Настроить отображение + + TextEditor::Internal::Snippets + + + Snippets are text fragments that can be inserted into an editor via the usual completion mechanics using a trigger text. The translated text (trigger variant) is used to disambiguate between snippets with the same trigger. + + + + derived from QObject + group:'C++' trigger:'class' + производный от QObject + + + derived from QWidget + group:'C++' trigger:'class' + производный от QWidget + + + template + group:'C++' trigger:'class' + шаблон + + + with if + group:'C++' trigger:'else' + с if + + + and else + group:'C++' trigger:'if' + и else + + + and catch + group:'C++' trigger:'try' + и catch + + + namespace + group:'C++' trigger:'using' + пространство имён + + + template + group:'C++' trigger:'struct' + шаблон + + + with targets + group:'QML' trigger:'NumberAnimation' + с целями + + + with target + group:'QML' trigger:'NumberAnimation' + с целью + + + with targets + group:'QML' trigger:'PropertyAction' + с целями + + + with target + group:'QML' trigger:'PropertyAction' + с целью + + + example + group:'Text' trigger:'global' + пример + + TextEditor::Internal::SnippetsCollection @@ -40667,6 +41079,14 @@ Influences the indentation of continuation lines. Select Word Under Cursor Выбрать слово под курсором + + Go to Document Start + Перейти в начало документа + + + Go to Document End + Перейти в конец документа + Go to Line Start Перейти в начало строки @@ -40804,33 +41224,6 @@ Influences the indentation of continuation lines. Размер шрифта в точках в текущем документе. - - TextEditor::QuickFixFactory - - Create Getter and Setter Member Functions - Создать методы получения и установки значения - - - Create Getter Member Function - Создать метод получения значения - - - Create Setter Member Function - Создать метод установки значения - - - Convert to Stack Variable - Преобразовать в стековую переменную - - - Convert to Pointer - Преобразовать в указатель - - - Generate Missing Q_PROPERTY Members - Создание отсутствующих членов Q_PROPERTY - - TextEditor::SearchEngine @@ -40840,6 +41233,10 @@ Influences the indentation of continuation lines. TextEditor::TextDocument + + Diff Against Current File + Сравнить с текущим файлом + Opening File Открытие файла @@ -41333,12 +41730,20 @@ Will not be applied to whitespace in comments and strings. Цвет подчёркивания контекстов предупреждений. - Declaration - Объявление + Function Declaration + Объявление функции - Declaration of a function, variable, and so on. - Объявление функций, переменных и пр. + Style adjustments to (function) declarations. + Корректировка стиля для объявлений (функций). + + + Function Definition + Реализация функции + + + Name of function at its definition. + Имя функции в месте её реализации. Output Argument @@ -42000,6 +42405,17 @@ Will not be applied to whitespace in comments and strings. Изменение среды + + Utils::EnvironmentIdAccessor + + <p>No .user settings file created by this instance of %1 was found.</p><p>Did you work with this project on another machine or using a different settings path before?</p><p>Do you still want to load the settings file "%2"?</p> + <p>Не удалось найти файл настроек от этого %1.</p><p>Не работали ли вы ранее с этим проектом на другой машине или не использовали ли вы другой путь к настройкам?</p><p>Продолжить загрузку файла настроек «%2»?</p> + + + Settings File for "%1" from a Different Environment? + Настройки проекта «%1» с другого компьютера? + + Utils::EnvironmentModel @@ -42486,14 +42902,42 @@ Will not be applied to whitespace in comments and strings. - Utils::SaveFile + Utils::RemoveFileDialog - File might be locked. - Файл может быть заблокирован. + Remove File + Удаление файла + + + File to remove: + Удаляемый файл: + + + &Delete file permanently + &Удалить файл навсегда + + + &Remove from version control + Удалить из-под &контроля версий Utils::SettingsAccessor + + Failed to Read File + Не удалось прочитать файл + + + Could not open "%1". + Не удалось открыть «%1». + + + Failed to Write File + Не удалось записать файл + + + There was nothing to write. + Нечего записывать. + No Valid Settings Found Подходящие настройки не найдены @@ -42510,6 +42954,14 @@ Will not be applied to whitespace in comments and strings. <p>The versioned backup "%1" of the settings file is used, because the non-versioned file was created by an incompatible version of %2.</p><p>Settings changes made since the last time this version of %2 was used are ignored, and changes made now will <b>not</b> be propagated to the newer version.</p> <p>Будет использоваться резервная копия файла настроек .user более старой версии («%1»), так как текущий файл создан несовместимой версией %2.</p><p>Изменения настроек проекта, сделанные с момента последнего запуска этой версии %2, не будут учтены, а изменения, вносимые сейчас, <b>не будут</b> сохранены в новую версию файла проекта.</p> + + Unsupported Shared Settings File + Неподдерживаемый файл общих настроек + + + The version of your .shared file is not supported by %1. Do you want to try loading it anyway? + Версия вашего файла .shared не поддерживается этой версией %1. Попробовать загрузить файл? + Utils::SettingsSelector @@ -43205,6 +43657,184 @@ Will not be applied to whitespace in comments and strings. Обработка данных профилирования... + + Valgrind::Internal::HeobData + + Process %1 + Процесс %1 + + + Process finished with exit code %1 (0x%2). + Процесс завершился с кодом %1 (0x%2). + + + Unknown argument: -%1 + Неизвестный параметр: -%1 + + + Cannot create target process. + Не удалось создать целевой процесс. + + + Wrong bitness. + Неверная разрядность. + + + Process killed. + Процесс уничтожен. + + + Only works with dynamically linked CRT. + Работает только с динамически подключаемой CRT. + + + Process stopped with unhandled exception code 0x%1. + Процесс остановлен из-за необработанного исключения с кодом 0x%1. + + + Not enough memory to keep track of allocations. + Недостаточно памяти для сохранения истории выделений. + + + Application stopped unexpectedly. + Приложение неожиданно остановилось. + + + Extra console. + Допольнительная консоль. + + + Unknown exit reason. + Неизвестная причина завершения. + + + Heob stopped unexpectedly. + Heob неожиданно остановился. + + + Heob: %1 + Heob: %1 + + + Heob: Failure in process attach handshake (%1). + Heob: не удалось выполнить рукопожание при подключении к процессу (%1). + + + + Valgrind::Internal::HeobDialog + + XML output file: + Выходной файл XML: + + + Handle exceptions: + Обрабатывать исключения: + + + Off + Откл. + + + On + Вкл. + + + Only + Только + + + Page protection: + Защита страниц: + + + After + Перед + + + Before + После + + + Freed memory protection + Защита освобождённой памяти + + + Raise breakpoint exception on error + Кидать исключение (точка останова) при ошибке + + + Leak details: + Подробности об утечке: + + + None + Нет + + + Simple + Простые + + + Detect Leak Types + Определять типы утечек + + + Detect Leak Types (Show Reachable) + Определять типы утечек (показывать доступные) + + + Fuzzy Detect Leak Types + Нечётко определять типы утечек + + + Fuzzy Detect Leak Types (Show Reachable) + Нечётко определять типы утечек (показывать доступные) + + + Minimum leak size: + Минимальный размер утечки: + + + Control leak recording: + Управление записью утечек: + + + On (Start Disabled) + Вкл. (отключён старт) + + + On (Start Enabled) + Вкл. (включён старт) + + + Run with debugger + Запускать с отладчиком + + + Extra arguments: + Доп. параметры: + + + Heob path: + Путь к Heob: + + + The location of heob32.exe and heob64.exe. + Размещение heob32.exe и heob64.exe. + + + Save current settings as default. + Сохранить текущие настройки как настройки по умолчанию. + + + OK + OK + + + Heob + Heob + + Valgrind::Internal::MemcheckErrorView @@ -43264,10 +43894,47 @@ When a problem is detected, the application is interrupted and can be debugged.< Анализатор памяти Valgrind с GDB использует утилиту Memcheck для поиска утечек памяти. При обнаружении проблем программа останавливается для отладки. + + Heob + Х.з. что такое + Heob + + + Ctrl+Alt+H + Ctrl+Alt+H + Valgrind Memory Analyzer (External Application) Анализатор памяти Valgrind (внешняя программа) + + Heob: No local run configuration available. + Heob: недоступна локальная конфигурация запуска. + + + Heob: No toolchain available. + Heob: недоступен инструментарий. + + + Heob: No executable set. + Heob: программа не задана. + + + Heob: Cannot find %1. + Heob: не удалось найти %1. + + + The %1 executables must be in the appropriate location. + Программы %1 должны быть в соответствущем месте. + + + Heob used with MinGW projects needs the %1 DLLs for proper stacktrace resolution. + При использовании Heob совместно с проектами MinGW требуются динамические библиотеки %1 для корректного разбора трассировки стека. + + + Heob: Cannot create %1 process (%2). + Heob: не удалось создать процесс %1: %2. + A Valgrind Memcheck analysis is still in progress. Анализатор памяти Valgrind уже выполняется. @@ -43289,19 +43956,19 @@ When a problem is detected, the application is interrupted and can be debugged.< Memcheck: Ошибка при разборе вывода Valgrind: %1 - Memory Analyzer Tool finished, %n issues were found. + Memory Analyzer Tool finished. %n issues were found. - Анализ памяти завершён, найдена %n проблема. - Анализ памяти завершён, найдено %n проблемы. - Анализ памяти завершён, найдено %n проблем. + Анализ памяти завершён. Найдена %n проблема. + Анализ памяти завершён. Найдено %n проблемы. + Анализ памяти завершён. Найдено %n проблем. - Log file processed, %n issues were found. + Log file processed. %n issues were found. - Файл журнала обработан, найдена %n проблема. - Файл журнала обработан, найдено %n проблемы. - Файл журнала обработан, найдено %n проблем. + Файл журнала обработан. Найдена %n проблема. + Файл журнала обработан. Найдено %n проблемы. + Файл журнала обработан. Найдено %n проблем. @@ -44566,30 +45233,14 @@ should a repository require SSH-authentication (see documentation on SSH and the Create Connection Создание соединения - - New Package - Новый пакет - - - New Component - Новый компонент - - - New Class - Новый класс - - - New Item - Новый элемент - - - New %1 - Новый %1 - Drop Element Удаление элемента + + Add Related Element + Добавление связанного элемента + Add Element Добавление элемента @@ -44773,6 +45424,10 @@ should a repository require SSH-authentication (see documentation on SSH and the Same Size По размеру + + Add Related Elements + Добавить связанные элементы + qmt::ProjectController @@ -45001,7 +45656,11 @@ should a repository require SSH-authentication (see documentation on SSH and the Outline - Обведённым + Обведённый + + + Flat + Гладкий Emphasized @@ -45061,11 +45720,7 @@ should a repository require SSH-authentication (see documentation on SSH and the Swimlanes - Swimlane'ы - - - <font color=red>Invalid syntax.</font> - <font color=red>Неверный синтаксис.</font> + Swimlane'ы Box @@ -45107,6 +45762,10 @@ should a repository require SSH-authentication (see documentation on SSH and the Boundaries Границы + + Invalid syntax. + Неверный синтаксис. + Multi-Selection Множественное выделение diff --git a/src/libs/qmljs/qmljscheck.cpp b/src/libs/qmljs/qmljscheck.cpp index 5b184d37b0b..1acedaf4a09 100644 --- a/src/libs/qmljs/qmljscheck.cpp +++ b/src/libs/qmljs/qmljscheck.cpp @@ -575,7 +575,6 @@ public: "PropertyAnimation", "SequentialAnimation", "ParallelAnimation", - "NumberAnimation", "Drawer"}) { append(UnsupportedTypesByVisualDesigner()); diff --git a/src/plugins/autotest/testtreeitem.cpp b/src/plugins/autotest/testtreeitem.cpp index a597a2de7ad..362465e923b 100644 --- a/src/plugins/autotest/testtreeitem.cpp +++ b/src/plugins/autotest/testtreeitem.cpp @@ -196,12 +196,13 @@ void TestTreeItem::markForRemovalRecursively(bool mark) void TestTreeItem::markForRemovalRecursively(const QString &filePath) { - if (m_filePath == filePath) - markForRemoval(true); + bool mark = m_filePath == filePath; for (int row = 0, count = childCount(); row < count; ++row) { TestTreeItem *child = childItem(row); child->markForRemovalRecursively(filePath); + mark &= child->markedForRemoval(); } + markForRemoval(mark); } TestTreeItem *TestTreeItem::parentItem() const diff --git a/src/plugins/bineditor/bineditorwidget.cpp b/src/plugins/bineditor/bineditorwidget.cpp index e647432723c..51d80a73c5c 100644 --- a/src/plugins/bineditor/bineditorwidget.cpp +++ b/src/plugins/bineditor/bineditorwidget.cpp @@ -550,17 +550,16 @@ QRect BinEditorWidget::cursorRect() const int BinEditorWidget::posAt(const QPoint &pos) const { - int xoffset = horizontalScrollBar()->value(); + const int xoffset = horizontalScrollBar()->value(); int x = xoffset + pos.x() - m_margin - m_labelWidth; int column = qMin(15, qMax(0,x) / m_columnWidth); - qint64 topLine = verticalScrollBar()->value(); - qint64 line = pos.y() / m_lineHeight; - + const qint64 topLine = verticalScrollBar()->value(); + const qint64 line = topLine + pos.y() / m_lineHeight; if (x > m_bytesPerLine * m_columnWidth + m_charWidth/2) { x -= m_bytesPerLine * m_columnWidth + m_charWidth; for (column = 0; column < 15; ++column) { - int dataPos = (topLine + line) * m_bytesPerLine + column; + const int dataPos = line * m_bytesPerLine + column; if (dataPos < 0 || dataPos >= m_size) break; QChar qc(QLatin1Char(dataAt(dataPos))); @@ -572,7 +571,7 @@ int BinEditorWidget::posAt(const QPoint &pos) const } } - return qMin(m_size, qMin(m_numLines, topLine + line) * m_bytesPerLine) + column; + return qMin(m_size - 1, line * m_bytesPerLine + column); } bool BinEditorWidget::inTextArea(const QPoint &pos) const @@ -1147,16 +1146,31 @@ QString BinEditorWidget::toolTip(const QHelpEvent *helpEvent) const { int selStart = selectionStart(); int selEnd = selectionEnd(); - int byteCount = selEnd - selStart + 1; - if (m_hexCursor == 0 || byteCount > 8) - return QString(); + int byteCount = std::min(8, selEnd - selStart + 1); - const QPoint &startPoint = offsetToPos(selStart); - const QPoint &endPoint = offsetToPos(selEnd + 1); - QRect selRect(startPoint, endPoint); - selRect.setHeight(m_lineHeight); - if (!selRect.contains(helpEvent->pos())) - return QString(); + // check even position against selection line by line + bool insideSelection = false; + int startInLine = selStart; + do { + const int lineIndex = startInLine / m_bytesPerLine; + const int endOfLine = (lineIndex + 1) * m_bytesPerLine - 1; + const int endInLine = std::min(selEnd, endOfLine); + const QPoint &startPoint = offsetToPos(startInLine); + const QPoint &endPoint = offsetToPos(endInLine) + QPoint(m_columnWidth, 0); + QRect selectionLineRect(startPoint, endPoint); + selectionLineRect.setHeight(m_lineHeight); + if (selectionLineRect.contains(helpEvent->pos())) { + insideSelection = true; + break; + } + startInLine = endInLine + 1; + } while (startInLine <= selEnd); + if (!insideSelection) { + // show popup for byte under cursor + selStart = posAt(helpEvent->pos()); + selEnd = selStart; + byteCount = 1; + } quint64 bigEndianValue, littleEndianValue; quint64 bigEndianValueOld, littleEndianValueOld; diff --git a/src/plugins/classview/classviewnavigationwidget.cpp b/src/plugins/classview/classviewnavigationwidget.cpp index 5ce0d24e73a..58cab5a6d87 100644 --- a/src/plugins/classview/classviewnavigationwidget.cpp +++ b/src/plugins/classview/classviewnavigationwidget.cpp @@ -105,7 +105,7 @@ NavigationWidget::NavigationWidget(QWidget *parent) : verticalLayout->addWidget(Core::ItemViewFind::createSearchableWrapper( treeView, Core::ItemViewFind::DarkColored, Core::ItemViewFind::FetchMoreWhileSearching)); - + setFocusProxy(treeView); // tree model treeModel = new TreeItemModel(this); treeView->setModel(treeModel); @@ -282,10 +282,12 @@ void NavigationWidget::onDataUpdate(QSharedPointer result) // expand top level projects QModelIndex sessionIndex; - - for (int i = 0; i < treeModel->rowCount(sessionIndex); ++i) + const int toplevelCount = treeModel->rowCount(sessionIndex); + for (int i = 0; i < toplevelCount; ++i) treeView->expand(treeModel->index(i, 0, sessionIndex)); + if (!treeView->currentIndex().isValid() && toplevelCount > 0) + treeView->setCurrentIndex(treeModel->index(0, 0, sessionIndex)); if (debug) qDebug() << "Class View:" << QDateTime::currentDateTime().toString() << "TreeView is updated in" << timer.elapsed() << "msecs"; diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp index ae5c81234a3..9a4f871de01 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp @@ -239,7 +239,8 @@ CMakeRunConfigurationFactory::CMakeRunConfigurationFactory() QList CMakeRunConfigurationFactory::availableCreators(Target *parent) const { - CMakeProject *project = static_cast(parent->project()); + CMakeProject *project = qobject_cast(parent->project()); + QTC_ASSERT(project, return {}); const QStringList titles = project->buildTargetTitles(true); return Utils::transform(titles, [this](const QString &title) { return convert(title, title); }); } diff --git a/src/plugins/coreplugin/dialogs/newdialog.cpp b/src/plugins/coreplugin/dialogs/newdialog.cpp index 0bc113a42fb..7ae0953ad17 100644 --- a/src/plugins/coreplugin/dialogs/newdialog.cpp +++ b/src/plugins/coreplugin/dialogs/newdialog.cpp @@ -53,6 +53,7 @@ const char LAST_PLATFORM_KEY[] = "Core/NewDialog/LastPlatform"; const char ALLOW_ALL_TEMPLATES[] = "Core/NewDialog/AllowAllTemplates"; const char SHOW_PLATOFORM_FILTER[] = "Core/NewDialog/ShowPlatformFilter"; const char BLACKLISTED_CATEGORIES_KEY[] = "Core/NewDialog/BlacklistedCategories"; +const char ALTERNATIVE_WIZARD_STYLE[] = "Core/NewDialog/AlternativeWizardStyle"; using namespace Core; using namespace Core::Internal; @@ -205,6 +206,21 @@ NewDialog::NewDialog(QWidget *parent) : m_ui->templatesView->setModel(m_filterProxyModel); m_ui->templatesView->setIconSize(QSize(ICON_SIZE, ICON_SIZE)); + const bool alternativeWizardStyle = ICore::settings()->value(ALTERNATIVE_WIZARD_STYLE, false).toBool(); + + if (alternativeWizardStyle) { + m_ui->templatesView->setGridSize(QSize(256, 128)); + m_ui->templatesView->setIconSize(QSize(96, 96)); + m_ui->templatesView->setSpacing(4); + + m_ui->templatesView->setViewMode(QListView::IconMode); + m_ui->templatesView->setMovement(QListView::Static); + m_ui->templatesView->setResizeMode(QListView::Adjust); + m_ui->templatesView->setSelectionRectVisible(false); + m_ui->templatesView->setWrapping(true); + m_ui->templatesView->setWordWrap(true); + } + connect(m_ui->templateCategoryView->selectionModel(), &QItemSelectionModel::currentChanged, this, &NewDialog::currentCategoryChanged); diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index e456421d2fd..8c35d265273 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -270,7 +270,8 @@ void EditorView::updateEditorHistory(IEditor *editor, QList &histo for (int i = 0; i < history.size(); ++i) { const EditLocation &item = history.at(i); if (item.document == document - || !DocumentModel::indexOfFilePath(FileName::fromString(item.fileName))) { + || (!item.document + && !DocumentModel::indexOfFilePath(FileName::fromString(item.fileName)))) { history.removeAt(i--); } } diff --git a/src/plugins/cppeditor/cpptypehierarchy.cpp b/src/plugins/cppeditor/cpptypehierarchy.cpp index 0b3198d4c9f..ad581602f07 100644 --- a/src/plugins/cppeditor/cpptypehierarchy.cpp +++ b/src/plugins/cppeditor/cpptypehierarchy.cpp @@ -154,7 +154,7 @@ void CppTypeHierarchyWidget::perform() if (evaluator.identifiedCppElement()) { const QSharedPointer &cppElement = evaluator.cppElement(); CppElement *element = cppElement.data(); - if (CppClass *cppClass = dynamic_cast(element)) { + if (CppClass *cppClass = element->toCppClass()) { m_inspectedClass->setText(cppClass->name); m_inspectedClass->setLink(cppClass->link); QStandardItem *bases = new QStandardItem(tr("Bases")); diff --git a/src/plugins/cpptools/cppelementevaluator.cpp b/src/plugins/cpptools/cppelementevaluator.cpp index 97ee54e89ac..90fb21a34c4 100644 --- a/src/plugins/cpptools/cppelementevaluator.cpp +++ b/src/plugins/cpptools/cppelementevaluator.cpp @@ -63,6 +63,11 @@ CppElement::CppElement() : helpCategory(TextEditor::HelpItem::Unknown) CppElement::~CppElement() {} +CppClass *CppElement::toCppClass() +{ + return nullptr; +} + class Unknown : public CppElement { public: @@ -156,6 +161,11 @@ bool CppClass::operator==(const CppClass &other) return this->declaration == other.declaration; } +CppClass *CppClass::toCppClass() +{ + return this; +} + void CppClass::lookupBases(Symbol *declaration, const LookupContext &context) { typedef QPair Data; diff --git a/src/plugins/cpptools/cppelementevaluator.h b/src/plugins/cpptools/cppelementevaluator.h index 0755bd3004e..0bececefaf4 100644 --- a/src/plugins/cpptools/cppelementevaluator.h +++ b/src/plugins/cpptools/cppelementevaluator.h @@ -81,6 +81,8 @@ private: QString m_diagnosis; }; +class CppClass; + class CPPTOOLS_EXPORT CppElement { protected: @@ -89,6 +91,8 @@ protected: public: virtual ~CppElement(); + virtual CppClass *toCppClass(); + TextEditor::HelpItem::Category helpCategory; QStringList helpIdCandidates; QString helpMark; @@ -96,7 +100,7 @@ public: QString tooltip; }; -class CppDeclarableElement : public CppElement +class CPPTOOLS_EXPORT CppDeclarableElement : public CppElement { public: explicit CppDeclarableElement(CPlusPlus::Symbol *declaration); @@ -109,7 +113,7 @@ public: QIcon icon; }; -class CppClass : public CppDeclarableElement +class CPPTOOLS_EXPORT CppClass : public CppDeclarableElement { public: CppClass(); @@ -117,6 +121,8 @@ public: bool operator==(const CppClass &other); + CppClass *toCppClass() final; + void lookupBases(CPlusPlus::Symbol *declaration, const CPlusPlus::LookupContext &context); void lookupDerived(CPlusPlus::Symbol *declaration, const CPlusPlus::Snapshot &snapshot); diff --git a/src/plugins/cpptools/tidychecks.ui b/src/plugins/cpptools/tidychecks.ui index 2b26492fadf..a9190b894d6 100644 --- a/src/plugins/cpptools/tidychecks.ui +++ b/src/plugins/cpptools/tidychecks.ui @@ -30,82 +30,82 @@ - android-* + android-* - boost-* + boost-* - bugprone-* + bugprone-* - cert-* + cert-* - cppcoreguidelines-* + cppcoreguidelines-* - clang-analyzer-* + clang-analyzer-* - clang-diagnostic-* + clang-diagnostic-* - google-* + google-* - hicpp-* + hicpp-* - llvm-* + llvm-* - misc-* + misc-* - modernize-* + modernize-* - mpi-* + mpi-* - objc-* + objc-* - performance-* + performance-* - readability-* + readability-* diff --git a/src/plugins/debugger/debuggercore.h b/src/plugins/debugger/debuggercore.h index 3f5f1e6a84e..57f9476bf88 100644 --- a/src/plugins/debugger/debuggercore.h +++ b/src/plugins/debugger/debuggercore.h @@ -124,5 +124,7 @@ QAction *addCheckableAction(QMenu *menu, const QString &display, bool on, bool c // Qt's various build paths for unpatched versions QStringList qtBuildPaths(); +void addDebugInfoTask(unsigned id, const QString &cmd); + } // namespace Internal } // namespace Debugger diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index de8f1ce0ed3..2d3adbc7dc3 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -94,6 +94,7 @@ #include #include #include +#include #include #include #include @@ -569,6 +570,42 @@ static Kit *findUniversalCdbKit() return KitManager::kit(cdbPredicate()); } +/////////////////////////////////////////////////////////////////////// +// +// Debuginfo Taskhandler +// +/////////////////////////////////////////////////////////////////////// + +class DebugInfoTaskHandler : public ITaskHandler +{ +public: + bool canHandle(const Task &task) const final + { + return m_debugInfoTasks.contains(task.taskId); + } + + void handle(const Task &task) final + { + QString cmd = m_debugInfoTasks.value(task.taskId); + QProcess::startDetached(cmd); + } + + void addTask(unsigned id, const QString &cmd) + { + m_debugInfoTasks[id] = cmd; + } + + QAction *createAction(QObject *parent) const final + { + QAction *action = new QAction(DebuggerPlugin::tr("Install &Debug Information"), parent); + action->setToolTip(DebuggerPlugin::tr("Tries to install missing debug information.")); + return action; + } + +private: + QHash m_debugInfoTasks; +}; + /////////////////////////////////////////////////////////////////////// // // DebuggerPluginPrivate @@ -1022,6 +1059,8 @@ public: DebuggerItemManager m_debuggerItemManager; QList m_optionPages; IContext m_debugModeContext; + + DebugInfoTaskHandler m_debugInfoTaskHandler; }; DebuggerPluginPrivate::DebuggerPluginPrivate(DebuggerPlugin *plugin) @@ -2947,6 +2986,11 @@ QMessageBox *showMessageBox(int icon, const QString &title, return mb; } +void addDebugInfoTask(unsigned id, const QString &cmd) +{ + dd->m_debugInfoTaskHandler.addTask(id, cmd); +} + bool isReverseDebuggingEnabled() { static bool enabled = qEnvironmentVariableIsSet("QTC_DEBUGGER_ENABLE_REVERSE"); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 992d4d15041..05075a3ff33 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -55,7 +55,6 @@ #include #include -#include #include #include @@ -131,52 +130,6 @@ static bool isMostlyHarmlessMessage(const QStringRef &msg) "Invalid argument\\n"; } -/////////////////////////////////////////////////////////////////////// -// -// Debuginfo Taskhandler -// -/////////////////////////////////////////////////////////////////////// - -class DebugInfoTask -{ -public: - QString command; -}; - -class DebugInfoTaskHandler : public ITaskHandler -{ -public: - explicit DebugInfoTaskHandler(GdbEngine *engine) - : m_engine(engine) - {} - - bool canHandle(const Task &task) const override - { - return m_debugInfoTasks.contains(task.taskId); - } - - void handle(const Task &task) override - { - m_engine->requestDebugInformation(m_debugInfoTasks.value(task.taskId)); - } - - void addTask(unsigned id, const DebugInfoTask &task) - { - m_debugInfoTasks[id] = task; - } - - QAction *createAction(QObject *parent) const override - { - QAction *action = new QAction(DebuggerPlugin::tr("Install &Debug Information"), parent); - action->setToolTip(DebuggerPlugin::tr("Tries to install missing debug information.")); - return action; - } - -private: - GdbEngine *m_engine; - QHash m_debugInfoTasks; -}; - /////////////////////////////////////////////////////////////////////// // // GdbEngine @@ -190,9 +143,6 @@ GdbEngine::GdbEngine() m_gdbOutputCodec = QTextCodec::codecForLocale(); m_inferiorOutputCodec = QTextCodec::codecForLocale(); - m_debugInfoTaskHandler = new DebugInfoTaskHandler(this); - //ExtensionSystem::PluginManager::addObject(m_debugInfoTaskHandler); - m_commandTimer.setSingleShot(true); connect(&m_commandTimer, &QTimer::timeout, this, &GdbEngine::commandTimeout); @@ -222,10 +172,6 @@ GdbEngine::GdbEngine() GdbEngine::~GdbEngine() { - //ExtensionSystem::PluginManager::removeObject(m_debugInfoTaskHandler); - delete m_debugInfoTaskHandler; - m_debugInfoTaskHandler = 0; - // Prevent sending error messages afterwards. disconnect(); } @@ -434,10 +380,7 @@ void GdbEngine::handleResponse(const QString &buff) FileName(), 0, Debugger::Constants::TASK_CATEGORY_DEBUGGER_DEBUGINFO); TaskHub::addTask(task); - - DebugInfoTask dit; - dit.command = cmd; - m_debugInfoTaskHandler->addTask(task.taskId, dit); + Internal::addDebugInfoTask(task.taskId, cmd); } } @@ -4184,11 +4127,6 @@ void GdbEngine::scheduleTestResponse(int testCase, const QString &response) m_scheduledTestResponses[token] = response; } -void GdbEngine::requestDebugInformation(const DebugInfoTask &task) -{ - QProcess::startDetached(task.command); -} - QString GdbEngine::msgGdbStopFailed(const QString &why) { return tr("The gdb process could not be stopped:\n%1").arg(why); diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index c1901ad400c..d9c0c3cc72b 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -382,11 +382,6 @@ private: ////////// General Interface ////////// QHash m_scheduledTestResponses; QSet m_testCases; - // Debug information - friend class DebugInfoTaskHandler; - void requestDebugInformation(const DebugInfoTask &task); - DebugInfoTaskHandler *m_debugInfoTaskHandler; - bool m_systemDumpersLoaded = false; static QString msgGdbStopFailed(const QString &why); diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp index ec7e724f16f..247427eed52 100644 --- a/src/plugins/git/changeselectiondialog.cpp +++ b/src/plugins/git/changeselectiondialog.cpp @@ -251,7 +251,7 @@ void ChangeSelectionDialog::recalculateDetails() connect(m_process, static_cast(&QProcess::finished), this, &ChangeSelectionDialog::setDetails); - m_process->start(m_gitExecutable.toString(), {"show", "--stat=80", ref}); + m_process->start(m_gitExecutable.toString(), {"show", "--decorate", "--stat=80", ref}); m_process->closeWriteChannel(); if (!m_process->waitForStarted()) m_ui->detailsText->setPlainText(tr("Error: Could not start Git.")); diff --git a/src/plugins/help/textbrowserhelpviewer.cpp b/src/plugins/help/textbrowserhelpviewer.cpp index 2dd128fd323..34e821e5245 100644 --- a/src/plugins/help/textbrowserhelpviewer.cpp +++ b/src/plugins/help/textbrowserhelpviewer.cpp @@ -432,7 +432,7 @@ void TextBrowserHelpWidget::mouseReleaseEvent(QMouseEvent *e) bool controlPressed = e->modifiers() & Qt::ControlModifier; const QString link = linkAt(e->pos()); - if ((controlPressed || e->button() == Qt::MidButton) && link.isEmpty()) { + if ((controlPressed || e->button() == Qt::MidButton) && !link.isEmpty()) { emit m_parent->newPageRequested(QUrl(link)); return; } diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp index 1b73477dda1..e626e8ac96d 100644 --- a/src/plugins/ios/iosrunfactories.cpp +++ b/src/plugins/ios/iosrunfactories.cpp @@ -53,7 +53,8 @@ IosRunConfigurationFactory::IosRunConfigurationFactory() QList IosRunConfigurationFactory::availableCreators(Target *parent) const { - auto project = static_cast(parent->project()); + auto project = qobject_cast(parent->project()); + QTC_ASSERT(project, return {}); return project->runConfigurationCreators(this, {ProjectType::ApplicationTemplate, ProjectType::SharedLibraryTemplate}); } diff --git a/src/plugins/projectexplorer/gcctoolchain.cpp b/src/plugins/projectexplorer/gcctoolchain.cpp index 0650827f43c..13714864ae6 100644 --- a/src/plugins/projectexplorer/gcctoolchain.cpp +++ b/src/plugins/projectexplorer/gcctoolchain.cpp @@ -1185,7 +1185,7 @@ void GccToolChainConfigWidget::handleCompilerCommandChange() { bool haveCompiler = false; Abi currentAbi = m_abiWidget->currentAbi(); - bool customAbi = m_abiWidget->isCustomAbi(); + bool customAbi = m_abiWidget->isCustomAbi() && m_abiWidget->isEnabled(); FileName path = m_compilerCommand->fileName(); QList abiList; diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp index 9942e4aef9e..01288a22e0e 100644 --- a/src/plugins/projectexplorer/projecttreewidget.cpp +++ b/src/plugins/projectexplorer/projecttreewidget.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include @@ -415,8 +416,23 @@ void ProjectTreeWidget::collapseAll() void ProjectTreeWidget::editCurrentItem() { m_delayedRename.clear(); - if (m_view->selectionModel()->currentIndex().isValid()) - m_view->edit(m_view->selectionModel()->currentIndex()); + const QModelIndex currentIndex = m_view->selectionModel()->currentIndex(); + if (!currentIndex.isValid()) + return; + + m_view->edit(currentIndex); + // Select complete file basename for renaming + const Node *node = m_model->nodeForIndex(currentIndex); + if (!node || node->nodeType() != NodeType::File) + return; + QLineEdit *editor = qobject_cast(m_view->indexWidget(currentIndex)); + if (!editor) + return; + + const QString text = editor->text(); + const int dotIndex = text.lastIndexOf(QLatin1Char('.')); + if (dotIndex > 0) + editor->setSelection(0, dotIndex); } void ProjectTreeWidget::renamed(const FileName &oldPath, const FileName &newPath) diff --git a/src/plugins/projectexplorer/taskwindow.cpp b/src/plugins/projectexplorer/taskwindow.cpp index 4882e604fb2..215ec1eaee3 100644 --- a/src/plugins/projectexplorer/taskwindow.cpp +++ b/src/plugins/projectexplorer/taskwindow.cpp @@ -210,11 +210,18 @@ void TaskView::resizeEvent(QResizeEvent *e) class TaskWindowPrivate { public: + ITaskHandler *handler(const QAction *action) + { + ITaskHandler *handler = m_actionToHandlerMap.value(action, nullptr); + return g_taskHandlers.contains(handler) ? handler : nullptr; + } + Internal::TaskModel *m_model; Internal::TaskFilterModel *m_filter; Internal::TaskView *m_listview; Internal::TaskWindowContext *m_taskWindowContext; QMenu *m_contextMenu; + QMap m_actionToHandlerMap; ITaskHandler *m_defaultHandler = nullptr; QToolButton *m_filterWarningsButton; QToolButton *m_categoriesButton; @@ -318,14 +325,6 @@ TaskWindow::~TaskWindow() delete d; } -static ITaskHandler *handler(QAction *action) -{ - QVariant prop = action->property("ITaskHandler"); - ITaskHandler *handler = qobject_cast(prop.value()); - QTC_CHECK(handler); - return handler; -} - void TaskWindow::delayedInitialization() { static bool alreadyDone = false; @@ -340,7 +339,7 @@ void TaskWindow::delayedInitialization() QAction *action = h->createAction(this); QTC_ASSERT(action, continue); - action->setProperty("ITaskHandler", qVariantFromValue(qobject_cast(h))); + d->m_actionToHandlerMap.insert(action, h); connect(action, &QAction::triggered, this, &TaskWindow::actionTriggered); d->m_actions << action; @@ -395,7 +394,7 @@ void TaskWindow::currentChanged(const QModelIndex &index) { const Task task = index.isValid() ? d->m_filter->task(index) : Task(); foreach (QAction *action, d->m_actions) { - ITaskHandler *h = handler(action); + ITaskHandler *h = d->handler(action); action->setEnabled((task.isNull() || !h) ? false : h->canHandle(task)); } } @@ -511,7 +510,7 @@ void TaskWindow::actionTriggered() auto action = qobject_cast(sender()); if (!action || !action->isEnabled()) return; - ITaskHandler *h = handler(action); + ITaskHandler *h = d->handler(action); if (!h) return; diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp index 0df62fc51bb..05c4d8cf842 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp @@ -372,7 +372,7 @@ QString QbsBuildConfiguration::equivalentCommandLine(const BuildStep *buildStep) const QString profileName = QbsManager::profileForKit(buildStep->target()->kit()); const QString buildVariant = qbsConfiguration() .value(QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY)).toString(); - Utils::QtcProcess::addArg(&commandLine, configurationName()); + Utils::QtcProcess::addArg(&commandLine, QLatin1String("config:") + configurationName()); Utils::QtcProcess::addArg(&commandLine, QLatin1String(Constants::QBS_CONFIG_VARIANT_KEY) + QLatin1Char(':') + buildVariant); const Utils::FileName installRoot = stepProxy.installRoot(); diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp index 7b2e024f3e6..ffe80df75f4 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp @@ -634,7 +634,7 @@ void QbsBuildStepConfigWidget::updateState() } if (m_step->isQmlDebuggingEnabled()) - command.append(Constants::QBS_CONFIG_QUICK_DEBUG_KEY).append(":true"); + command.append(' ').append(Constants::QBS_CONFIG_QUICK_DEBUG_KEY).append(":true"); m_ui->commandLineTextEdit->setPlainText(command); QString summary = tr("Qbs: %1").arg(command); diff --git a/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp b/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp index c319e2501cf..5fa073c9c42 100644 --- a/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp +++ b/src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp @@ -57,7 +57,8 @@ QmakeAndroidRunConfigurationFactory::QmakeAndroidRunConfigurationFactory() QList QmakeAndroidRunConfigurationFactory::availableCreators(Target *parent) const { - auto project = static_cast(parent->project()); + auto project = qobject_cast(parent->project()); + QTC_ASSERT(project, return {}); return project->runConfigurationCreators(this, {ProjectType::ApplicationTemplate, ProjectType::SharedLibraryTemplate}); } diff --git a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp index c26d785e181..d2c54dc65d6 100644 --- a/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp +++ b/src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp @@ -437,14 +437,16 @@ DesktopQmakeRunConfigurationFactory::DesktopQmakeRunConfigurationFactory() bool DesktopQmakeRunConfigurationFactory::canCreateHelper(Target *parent, const QString &buildTarget) const { - QmakeProject *project = static_cast(parent->project()); + QmakeProject *project = qobject_cast(parent->project()); + QTC_ASSERT(project, return {}); return project->hasApplicationProFile(Utils::FileName::fromString(buildTarget)); } QList DesktopQmakeRunConfigurationFactory::availableCreators(Target *parent) const { - QmakeProject *project = static_cast(parent->project()); + QmakeProject *project = qobject_cast(parent->project()); + QTC_ASSERT(project, return {}); return project->runConfigurationCreators(this); } diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index db4b726f384..58d4c2608d9 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -614,6 +614,9 @@ bool raiseAvailable(const SelectionContext &selectionState) if (modelNode.isRootNode()) return false; + if (!modelNode.hasParentProperty()) + return false; + if (!modelNode.parentProperty().isNodeListProperty()) return false; diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp index a594a43b5ae..41429bbb160 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp @@ -874,7 +874,7 @@ PropertyName getIndexPropertyName(const ModelNode &modelNode) return PropertyName(); } -void static setIndexProperty(const AbstractProperty &property, const QVariant &value) +static void setIndexProperty(const AbstractProperty &property, const QVariant &value) { if (!property.exists() || property.isVariantProperty()) { /* Using QmlObjectNode ensures we take states into account. */ diff --git a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp index 20ee2531cc8..579a9d792f0 100644 --- a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.cpp @@ -88,7 +88,8 @@ void ContentNotEditableIndicator::updateItems(const QList &ite void ContentNotEditableIndicator::addAddiationEntries(const QList &itemList) { foreach (FormEditorItem *formEditorItem, itemList) { - if (formEditorItem->qmlItemNode().modelNode().metaInfo().isSubclassOf("QtQuick.Loader")) { + const ModelNode modelNode = formEditorItem->qmlItemNode().modelNode(); + if (modelNode.metaInfo().isValid() && modelNode.metaInfo().isSubclassOf("QtQuick.Loader")) { if (!m_entryList.contains(EntryPair(formEditorItem, 0))) { QGraphicsRectItem *indicatorShape = new QGraphicsRectItem(m_layerItem); diff --git a/src/plugins/qmldesigner/components/integration/designdocumentview.cpp b/src/plugins/qmldesigner/components/integration/designdocumentview.cpp index c30a392cef0..bc8930edb6d 100644 --- a/src/plugins/qmldesigner/components/integration/designdocumentview.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocumentview.cpp @@ -130,8 +130,9 @@ QString DesignDocumentView::toText() const ModelNode rewriterNode(rewriterView->rootModelNode()); + rewriterView->writeAuxiliaryData(); + return rewriterView->extractText({rewriterNode}).value(rewriterNode) + rewriterView->getRawAuxiliaryData(); //get the text of the root item without imports - return rewriterView->extractText({rewriterNode}).value(rewriterNode); } void DesignDocumentView::fromText(QString text) @@ -151,6 +152,8 @@ void DesignDocumentView::fromText(QString text) rewriterView->setTextModifier(&modifier); inputModel->setRewriterView(rewriterView.data()); + rewriterView->restoreAuxiliaryData(); + if (rewriterView->errors().isEmpty() && rewriterView->rootModelNode().isValid()) { ModelMerger merger(this); merger.replaceModel(rewriterView->rootModelNode()); diff --git a/src/plugins/qmldesigner/designercore/include/nodehints.h b/src/plugins/qmldesigner/designercore/include/nodehints.h index 3fbb89c72cc..982c3a80b06 100644 --- a/src/plugins/qmldesigner/designercore/include/nodehints.h +++ b/src/plugins/qmldesigner/designercore/include/nodehints.h @@ -64,6 +64,7 @@ public: bool isStackedContainer() const; bool canBeReparentedTo(const ModelNode &potenialParent); QString indexPropertyForStackedContainer() const; + bool takesOverRenderingOfChildren() const; QHash hints() const; static NodeHints fromModelNode(const ModelNode &modelNode); diff --git a/src/plugins/qmldesigner/designercore/include/rewriterview.h b/src/plugins/qmldesigner/designercore/include/rewriterview.h index 4d4cfee8e68..3c73ec1fabc 100644 --- a/src/plugins/qmldesigner/designercore/include/rewriterview.h +++ b/src/plugins/qmldesigner/designercore/include/rewriterview.h @@ -163,6 +163,12 @@ public: void qmlTextChanged(); void delayedSetup(); + void writeAuxiliaryData(); + void restoreAuxiliaryData(); + + QString getRawAuxiliaryData() const; + QString auxiliaryDataAsQML() const; + protected: // functions void importAdded(const Import &import); void importRemoved(const Import &import); diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp index 823f966d8c0..614e61cc544 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include "abstractproperty.h" @@ -125,7 +126,7 @@ NodeInstanceView::~NodeInstanceView() //\{ -bool isSkippedRootNode(const ModelNode &node) +bool static isSkippedRootNode(const ModelNode &node) { static const PropertyNameList skipList({"Qt.ListModel", "QtQuick.ListModel", "Qt.ListModel", "QtQuick.ListModel"}); @@ -136,7 +137,7 @@ bool isSkippedRootNode(const ModelNode &node) } -bool isSkippedNode(const ModelNode &node) +bool static isSkippedNode(const ModelNode &node) { static const PropertyNameList skipList({"QtQuick.XmlRole", "Qt.XmlRole", "QtQuick.ListElement", "Qt.ListElement"}); @@ -146,6 +147,22 @@ bool isSkippedNode(const ModelNode &node) return false; } +bool static parentTakesOverRendering(const ModelNode &modelNode) +{ + if (!modelNode.isValid()) + return false; + + ModelNode currentNode = modelNode; + + while (currentNode.hasParentProperty()) { + currentNode = currentNode.parentProperty().parentModelNode(); + if (NodeHints::fromModelNode(currentNode).takesOverRenderingOfChildren()) + return true; + } + + return false; +} + /*! Notifies the view that it was attached to \a model. For every model node in the model, a NodeInstance will be created. @@ -817,6 +834,11 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand() if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item")) nodeMetaType = InstanceContainer::ItemMetaType; + InstanceContainer::NodeFlags nodeFlags; + + if (parentTakesOverRendering(instance.modelNode())) + nodeFlags |= InstanceContainer::ParentTakesOverRendering; + InstanceContainer container(instance.instanceId(), instance.modelNode().type(), instance.modelNode().majorVersion(), @@ -824,8 +846,8 @@ CreateSceneCommand NodeInstanceView::createCreateSceneCommand() instance.modelNode().metaInfo().componentFileName(), instance.modelNode().nodeSource(), nodeSourceType, - nodeMetaType - ); + nodeMetaType, + nodeFlags); instanceContainerList.append(container); } @@ -958,8 +980,20 @@ CreateInstancesCommand NodeInstanceView::createCreateInstancesCommand(const QLis if (instance.modelNode().metaInfo().isSubclassOf("QtQuick.Item")) nodeMetaType = InstanceContainer::ItemMetaType; - InstanceContainer container(instance.instanceId(), instance.modelNode().type(), instance.modelNode().majorVersion(), instance.modelNode().minorVersion(), - instance.modelNode().metaInfo().componentFileName(), instance.modelNode().nodeSource(), nodeSourceType, nodeMetaType); + InstanceContainer::NodeFlags nodeFlags; + + if (parentTakesOverRendering(instance.modelNode())) + nodeFlags |= InstanceContainer::ParentTakesOverRendering; + + InstanceContainer container(instance.instanceId(), + instance.modelNode().type(), + instance.modelNode().majorVersion(), + instance.modelNode().minorVersion(), + instance.modelNode().metaInfo().componentFileName(), + instance.modelNode().nodeSource(), + nodeSourceType, + nodeMetaType, + nodeFlags); containerList.append(container); } diff --git a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp index 30fe3b4cc27..4183af4b1fe 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/itemlibraryinfo.cpp @@ -350,6 +350,7 @@ QStringList ItemLibraryInfo::showTagsForImports() const auto list = m_showTagsForImports; if (m_baseInfo) list.append(m_baseInfo->m_showTagsForImports); + list.removeDuplicates(); return list; } diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp index 1a38b0a631f..28d7c0a205a 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodehints.cpp @@ -193,6 +193,14 @@ QString NodeHints::indexPropertyForStackedContainer() const return Internal::evaluateExpression(expression, modelNode(), ModelNode()).toString(); } +bool NodeHints::takesOverRenderingOfChildren() const +{ + if (!isValid()) + return false; + + return evaluateBooleanExpression("takesOverRenderingOfChildren", false); +} + QHash NodeHints::hints() const { return m_hints; @@ -277,7 +285,7 @@ bool JSObject::potentialParentIsRoot() const bool JSObject::potentialChildIsRoot() const { - return m_otherNode.isValid() && m_otherNode.isRootNode(); + return m_otherNode.isValid() && m_otherNode.isRootNode(); } bool JSObject::isSubclassOf(const QString &typeName) @@ -303,7 +311,7 @@ bool JSObject::rootItemIsSubclassOf(const QString &typeName) bool JSObject::currentParentIsSubclassOf(const QString &typeName) { if (m_modelNode.hasParentProperty() - && m_modelNode.parentProperty().isValid()) { + && m_modelNode.parentProperty().isValid()) { NodeMetaInfo metaInfo = m_modelNode.parentProperty().parentModelNode().metaInfo(); if (metaInfo.isValid()) return metaInfo.isSubclassOf(typeName.toUtf8()); diff --git a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp index a1569322373..161cf1f9f52 100644 --- a/src/plugins/qmldesigner/designercore/model/modelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelmerger.cpp @@ -60,6 +60,13 @@ static void syncVariantProperties(ModelNode &outputNode, const ModelNode &inputN } } +static void syncAuxiliaryProperties(ModelNode &outputNode, const ModelNode &inputNode) +{ + auto tmp = inputNode.auxiliaryData(); + for (auto iter = tmp.begin(); iter != tmp.end(); ++iter) + outputNode.setAuxiliaryData(iter.key(), iter.value()); +} + static void syncBindingProperties(ModelNode &outputNode, const ModelNode &inputNode, const QHash &idRenamingHash) { foreach (const BindingProperty &bindingProperty, inputNode.bindingProperties()) { @@ -138,6 +145,7 @@ static ModelNode createNodeFromNode(const ModelNode &modelNode,const QHashmodel()->metaInfo(modelNode.type()); ModelNode newNode(view->createModelNode(modelNode.type(), nodeMetaInfo.majorVersion(), nodeMetaInfo.minorVersion(), propertyList, variantPropertyList, modelNode.nodeSource(), modelNode.nodeSourceType())); + syncAuxiliaryProperties(newNode, modelNode); syncBindingProperties(newNode, modelNode, idRenamingHash); syncId(newNode, modelNode, idRenamingHash); syncNodeProperties(newNode, modelNode, idRenamingHash, view); @@ -165,7 +173,6 @@ ModelNode ModelMerger::insertModel(const ModelNode &modelNode) return newNode; } - void ModelMerger::replaceModel(const ModelNode &modelNode) { view()->model()->changeImports(modelNode.model()->imports(), {}); @@ -182,6 +189,7 @@ void ModelMerger::replaceModel(const ModelNode &modelNode) QHash idRenamingHash; setupIdRenamingHash(modelNode, idRenamingHash, view()); + syncAuxiliaryProperties(rootNode, modelNode); syncVariantProperties(rootNode, modelNode); syncBindingProperties(rootNode, modelNode, idRenamingHash); syncId(rootNode, modelNode, idRenamingHash); diff --git a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp index c4cb5bf7102..6bd5522d637 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriterview.cpp +++ b/src/plugins/qmldesigner/designercore/model/rewriterview.cpp @@ -42,11 +42,17 @@ #include #include +#include + +#include +#include using namespace QmlDesigner::Internal; namespace QmlDesigner { +const char annotationsEscapeSequence[] = "##^##"; + RewriterView::RewriterView(DifferenceHandling differenceHandling, QObject *parent): AbstractView(parent), m_differenceHandling(differenceHandling), @@ -442,6 +448,56 @@ void RewriterView::notifyErrorsAndWarnings(const QList &errors) emitDocumentMessage(errors, m_warnings); } +QString RewriterView::auxiliaryDataAsQML() const +{ + bool hasAuxData = false; + + QString str = "Designer {\n "; + + int columnCount = 0; + for (const auto node : allModelNodes()) { + QHash data = node.auxiliaryData(); + if (!data.isEmpty()) { + hasAuxData = true; + if (columnCount > 80) { + str += "\n"; + columnCount = 0; + } + const int startLen = str.length(); + str += "D{"; + str += "i:"; + str += QString::number(node.internalId()); + str += ";"; + + for (auto i = data.begin(); i != data.end(); ++i) { + const QVariant value = i.value(); + QString strValue = value.toString(); + if (static_cast(value.type()) == QMetaType::QString) + strValue = "\"" + strValue + "\""; + + if (!strValue.isEmpty()) { + str += QString::fromUtf8(i.key()) + ":"; + str += strValue; + str += ";"; + } + } + + if (str.endsWith(';')) + str.chop(1); + + str += "}"; + columnCount += str.length() - startLen; + } + } + + str += "\n}\n"; + + if (hasAuxData) + return str; + + return {}; +} + Internal::ModelNodePositionStorage *RewriterView::positionStorage() const { return m_positionStorage.data(); @@ -820,4 +876,108 @@ void RewriterView::delayedSetup() m_textToModelMerger->delayedSetup(); } +static QString annotationsEnd() +{ + const static QString end = QString(" %1*/\n").arg(annotationsEscapeSequence); + return end; +} + +static QString annotationsStart() +{ + const static QString start = QString("\n/*%1 ").arg(annotationsEscapeSequence); + return start; +} + +QString RewriterView::getRawAuxiliaryData() const +{ + QTC_ASSERT(m_textModifier, return {}); + + const QString oldText = m_textModifier->text(); + + QString newText = oldText; + + int startIndex = newText.indexOf(annotationsStart()); + int endIndex = newText.indexOf(annotationsEnd()); + + if (startIndex > 0 && endIndex > 0) + return newText.mid(startIndex, endIndex - startIndex + annotationsEnd().length()); + + return {}; +} + +void RewriterView::writeAuxiliaryData() +{ + QTC_ASSERT(m_textModifier, return); + + const QString oldText = m_textModifier->text(); + + QString newText = oldText; + + int startIndex = newText.indexOf(annotationsStart()); + int endIndex = newText.indexOf(annotationsEnd()); + + if (startIndex > 0 && endIndex > 0) + newText.remove(startIndex, endIndex - startIndex + annotationsEnd().length()); + + QString auxData = auxiliaryDataAsQML(); + + if (!auxData.isEmpty()) { + auxData.prepend(annotationsStart()); + auxData.append(annotationsEnd()); + newText.append(auxData); + + QTextCursor tc(m_textModifier->textDocument()); + Utils::ChangeSet changeSet; + changeSet.replace(0, oldText.length(), newText); + changeSet.apply(&tc); + } +} + +static void checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view); + +static void checkChildNodes(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view) +{ + for (auto child : node->children()) + checkNode(child, view); +} +static void checkNode(QmlJS::SimpleReaderNode::Ptr node, RewriterView *view) +{ + if (!node) + return; + + if (!node->propertyNames().contains("i")) + return; + + const int internalId = node->property("i").toInt(); + const ModelNode modelNode = view->modelNodeForInternalId(internalId); + if (!modelNode.isValid()) + return; + + auto properties = node->properties(); + + for (auto i = properties.begin(); i != properties.end(); ++i) { + if (i.key() != "i") + modelNode.setAuxiliaryData(i.key().toUtf8(), i.value()); + } + + checkChildNodes(node, view); +} + +void RewriterView::restoreAuxiliaryData() +{ + QTC_ASSERT(m_textModifier, return); + + const QString text = m_textModifier->text(); + + int startIndex = text.indexOf(annotationsStart()); + int endIndex = text.indexOf(annotationsEnd()); + + if (startIndex > 0 && endIndex > 0) { + const QString auxSource = text.mid(startIndex + annotationsStart().length(), + endIndex - startIndex - annotationsStart().length()); + QmlJS::SimpleReader reader; + checkChildNodes(reader.readFromSource(auxSource), this); + } +} + } //QmlDesigner diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 3f4e60fb32e..013854c698c 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -94,7 +94,7 @@ static inline QStringList globalQtEnums() static inline QStringList knownEnumScopes() { static const QStringList list = { - "TextInput", "TextEdit", "Material", "Universal", "Font" + "TextInput", "TextEdit", "Material", "Universal", "Font", "Shape", "ShapePath" }; return list; } diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp index c110faf91cd..11334a79e17 100644 --- a/src/plugins/qmlprojectmanager/qmlproject.cpp +++ b/src/plugins/qmlprojectmanager/qmlproject.cpp @@ -279,18 +279,49 @@ void QmlProject::refreshTargetDirectory() bool QmlProject::supportsKit(const Kit *k, QString *errorMessage) const { + if (!k->isValid()) { + if (errorMessage) + *errorMessage = tr("Kit is not valid."); + return false; + } + + IDevice::ConstPtr dev = DeviceKitInformation::device(k); + if (dev.isNull()) { + if (errorMessage) + *errorMessage = tr("Kit has no device."); + return false; + } + QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k); if (!version) { if (errorMessage) *errorMessage = tr("No Qt version set in kit."); return false; } - if (version->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0)) { if (errorMessage) *errorMessage = tr("Qt version is too old."); return false; } + + if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { + if (version->type() == QtSupport::Constants::DESKTOPQT) { + if (static_cast(version)->qmlsceneCommand().isEmpty()) { + if (errorMessage) + *errorMessage = tr("Qt version has no qmlscene command."); + return false; + } + } else { + // Non-desktop Qt on a desktop device? We don't support that. + if (errorMessage) + *errorMessage = tr("Non-desktop Qt is used with a Desktop device."); + return false; + } + } + + // If not a desktop device, don't check the Qt version for qmlscene. + // The device is responsible for providing it and we assume qmlscene can be found + // in $PATH if it's not explicitly given. return true; } @@ -305,43 +336,10 @@ Project::RestoreResult QmlProject::fromMap(const QVariantMap &map, QString *erro if (!activeTarget()) { // find a kit that matches prerequisites (prefer default one) - QList kits = KitManager::kits( - std::function([](const Kit *k) -> bool { - if (!k->isValid()) - return false; - - IDevice::ConstPtr dev = DeviceKitInformation::device(k); - if (dev.isNull()) - return false; - - QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(k); - if (!version || version->qtVersion() < QtSupport::QtVersionNumber(5, 0, 0)) - return false; - - if (dev->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { - if (version->type() != QLatin1String(QtSupport::Constants::DESKTOPQT)) { - return !static_cast(version) - ->qmlsceneCommand().isEmpty(); - } else { - // Non-desktop Qt on a desktop device? We don't support that. - return false; - } - } - - // If not a desktop device, don't check the Qt version for qmlscene. - // The device is responsible for providing it and we assume qmlscene can be found - // in $PATH if it's not explicitly given. - return true; - - }) - ); + const QList kits = KitManager::kits([this](const Kit *k) { return supportsKit(k, nullptr); }); if (!kits.isEmpty()) { - Kit *kit = 0; - if (kits.contains(KitManager::defaultKit())) - kit = KitManager::defaultKit(); - else - kit = kits.first(); + Kit *kit = kits.contains(KitManager::defaultKit()) ? KitManager::defaultKit() : kits.first(); addTarget(createTarget(kit)); } } diff --git a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp index 5cc6fe9988c..a4721ada4e4 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.cpp @@ -27,6 +27,7 @@ #include "qmlproject.h" +#include #include #include #include @@ -39,28 +40,35 @@ namespace QmlProjectManager { QList QmlProjectEnvironmentAspect::possibleBaseEnvironments() const { - return QList() << static_cast(KitEnvironmentBase) - << static_cast(SystemEnvironmentBase); + QList ret; + if (ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(runConfiguration()->target()->kit()) + == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { + ret << SystemEnvironmentBase; + } + ret << CleanEnvironmentBase; + return ret; } QString QmlProjectEnvironmentAspect::baseEnvironmentDisplayName(int base) const { - if (base == static_cast(SystemEnvironmentBase)) + switch (base) { + case SystemEnvironmentBase: return tr("System Environment"); - if (base == static_cast(KitEnvironmentBase)) - return tr("Kit Environment"); - return QString(); + case CleanEnvironmentBase: + return tr("Clean Environment"); + default: + QTC_CHECK(false); + return QString(); + } } Utils::Environment QmlProjectEnvironmentAspect::baseEnvironment() const { - int base = baseEnvironmentBase(); - Utils::Environment env = Utils::Environment::systemEnvironment(); - if (base == static_cast(KitEnvironmentBase)) - runConfiguration()->target()->kit()->addToEnvironment(env); + Utils::Environment env = baseEnvironmentBase() == SystemEnvironmentBase + ? Utils::Environment::systemEnvironment() + : Utils::Environment(); - QmlProject *project = qobject_cast(runConfiguration()->target()->project()); - if (project) + if (QmlProject *project = qobject_cast(runConfiguration()->target()->project())) env.modify(project->environment()); return env; diff --git a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h index 14c460085f6..efa32fdfdb4 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h +++ b/src/plugins/qmlprojectmanager/qmlprojectenvironmentaspect.h @@ -43,7 +43,7 @@ public: private: enum BaseEnvironmentBase { SystemEnvironmentBase = 0, - KitEnvironmentBase + CleanEnvironmentBase, }; }; diff --git a/src/plugins/qnx/qnxrunconfigurationfactory.cpp b/src/plugins/qnx/qnxrunconfigurationfactory.cpp index 1418c736d12..396f1e024af 100644 --- a/src/plugins/qnx/qnxrunconfigurationfactory.cpp +++ b/src/plugins/qnx/qnxrunconfigurationfactory.cpp @@ -29,6 +29,8 @@ #include "qnxrunconfiguration.h" #include "qnxdevicefactory.h" +#include + namespace Qnx { namespace Internal { @@ -36,6 +38,7 @@ QnxRunConfigurationFactory::QnxRunConfigurationFactory() { registerRunConfiguration(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX); addSupportedTargetDeviceType(Constants::QNX_QNX_OS_TYPE); + addSupportedProjectType(QmakeProjectManager::Constants::QMAKEPROJECT_ID); } } // namespace Internal diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index e715d1364d2..cb38340e7c5 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -282,91 +282,7 @@ void BaseQtVersion::ctor(const FileName &qmakePath) void BaseQtVersion::setupExpander() { - m_expander.setDisplayName( - QtKitInformation::tr("Qt version")); - - m_expander.registerVariable("Qt:Version", - QtKitInformation::tr("The version string of the current Qt version."), - [this] { return qtVersionString(); }); - - m_expander.registerVariable("Qt:Type", - QtKitInformation::tr("The type of the current Qt version."), - [this] { return type(); }); - - m_expander.registerVariable("Qt:Mkspec", - QtKitInformation::tr("The mkspec of the current Qt version."), - [this] { return mkspec().toUserOutput(); }); - - m_expander.registerVariable("Qt:QT_INSTALL_PREFIX", - QtKitInformation::tr("The installation prefix of the current Qt version."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_PREFIX"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_DATA", - QtKitInformation::tr("The installation location of the current Qt version's data."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_DATA"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_HEADERS", - QtKitInformation::tr("The installation location of the current Qt version's header files."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_HEADERS"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_LIBS", - QtKitInformation::tr("The installation location of the current Qt version's library files."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_LIBS"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_DOCS", - QtKitInformation::tr("The installation location of the current Qt version's documentation files."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_DOCS"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_BINS", - QtKitInformation::tr("The installation location of the current Qt version's executable files."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_BINS"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_PLUGINS", - QtKitInformation::tr("The installation location of the current Qt version's plugins."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_PLUGINS"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_QML", - QtKitInformation::tr("The installation location of the current Qt version's QML files."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_QML"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_IMPORTS", - QtKitInformation::tr("The installation location of the current Qt version's imports."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_IMPORTS"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_TRANSLATIONS", - QtKitInformation::tr("The installation location of the current Qt version's translation files."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_TRANSLATIONS"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_CONFIGURATION", - QtKitInformation::tr("The installation location of the current Qt version's translation files."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_CONFIGURATION"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_EXAMPLES", - QtKitInformation::tr("The installation location of the current Qt version's examples."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_EXAMPLES"); }); - - m_expander.registerVariable("Qt:QT_INSTALL_DEMOS", - QtKitInformation::tr("The installation location of the current Qt version's demos."), - [this] { return qmakeProperty(m_versionInfo, "QT_INSTALL_DEMOS"); }); - - m_expander.registerVariable("Qt:QMAKE_MKSPECS", - QtKitInformation::tr("The current Qt version's default mkspecs (Qt 4)."), - [this] { return qmakeProperty(m_versionInfo, "QMAKE_MKSPECS"); }); - m_expander.registerVariable("Qt:QMAKE_SPEC", - QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; host system)."), - [this] { return qmakeProperty(m_versionInfo, "QMAKE_SPEC"); }); - m_expander.registerVariable("Qt:QMAKE_XSPEC", - QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; target system)."), - [this] { return qmakeProperty(m_versionInfo, "QMAKE_XSPEC"); }); - - m_expander.registerVariable("Qt:QMAKE_VERSION", - QtKitInformation::tr("The current Qt's qmake version."), - [this] { return qmakeProperty(m_versionInfo, "QMAKE_VERSION"); }); - -// FIXME: Re-enable once we can detect expansion loops. -// m_expander.registerVariable("Qt:Name", -// QtKitInformation::tr("The display name of the current Qt version."), -// [this] { return displayName(); }); + m_expander = createMacroExpander([this]{ return this; }); } BaseQtVersion::~BaseQtVersion() @@ -801,7 +717,7 @@ void BaseQtVersion::setAutoDetectionSource(const QString &autodetectionSource) QString BaseQtVersion::displayName() const { - return m_expander.expand(m_unexpandedDisplayName); + return m_expander->expand(m_unexpandedDisplayName); } QString BaseQtVersion::unexpandedDisplayName() const @@ -1312,7 +1228,169 @@ QStringList BaseQtVersion::qtConfigValues() const MacroExpander *BaseQtVersion::macroExpander() const { - return &m_expander; + return m_expander.get(); +} + +std::unique_ptr BaseQtVersion::createMacroExpander(const std::function &qtVersion) +{ + const auto versionProperty = + [qtVersion](const std::function &property) { + return [property, qtVersion]() -> QString { + BaseQtVersion *version = qtVersion(); + return version ? property(version) : QString(); + }; + }; + std::unique_ptr expander(new Utils::MacroExpander); + expander->setDisplayName(QtKitInformation::tr("Qt version")); + + expander->registerVariable( + "Qt:Version", + QtKitInformation::tr("The version string of the current Qt version."), + versionProperty([](BaseQtVersion *version) { + return version->qtVersionString(); + })); + + expander->registerVariable( + "Qt:Type", + QtKitInformation::tr("The type of the current Qt version."), + versionProperty([](BaseQtVersion *version) { + return version->type(); + })); + + expander->registerVariable( + "Qt:Mkspec", + QtKitInformation::tr("The mkspec of the current Qt version."), + versionProperty([](BaseQtVersion *version) { + return version->mkspec().toUserOutput(); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_PREFIX", + QtKitInformation::tr("The installation prefix of the current Qt version."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_PREFIX"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_DATA", + QtKitInformation::tr("The installation location of the current Qt version's data."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_DATA"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_HEADERS", + QtKitInformation::tr("The installation location of the current Qt version's header files."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_HEADERS"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_LIBS", + QtKitInformation::tr("The installation location of the current Qt version's library files."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_LIBS"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_DOCS", + QtKitInformation::tr("The installation location of the current Qt version's documentation files."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_DOCS"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_BINS", + QtKitInformation::tr("The installation location of the current Qt version's executable files."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_BINS"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_PLUGINS", + QtKitInformation::tr("The installation location of the current Qt version's plugins."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_PLUGINS"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_QML", + QtKitInformation::tr("The installation location of the current Qt version's QML files."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_QML"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_IMPORTS", + QtKitInformation::tr("The installation location of the current Qt version's imports."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_IMPORTS"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_TRANSLATIONS", + QtKitInformation::tr("The installation location of the current Qt version's translation files."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_TRANSLATIONS"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_CONFIGURATION", + QtKitInformation::tr("The installation location of the current Qt version's translation files."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_CONFIGURATION"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_EXAMPLES", + QtKitInformation::tr("The installation location of the current Qt version's examples."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_EXAMPLES"); + })); + + expander->registerVariable( + "Qt:QT_INSTALL_DEMOS", + QtKitInformation::tr("The installation location of the current Qt version's demos."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QT_INSTALL_DEMOS"); + })); + + expander->registerVariable( + "Qt:QMAKE_MKSPECS", + QtKitInformation::tr("The current Qt version's default mkspecs (Qt 4)."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QMAKE_MKSPECS"); + })); + + expander->registerVariable( + "Qt:QMAKE_SPEC", + QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; host system)."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QMAKE_SPEC"); + })); + + expander->registerVariable( + "Qt:QMAKE_XSPEC", + QtKitInformation::tr("The current Qt version's default mkspec (Qt 5; target system)."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QMAKE_XSPEC"); + })); + + expander->registerVariable( + "Qt:QMAKE_VERSION", + QtKitInformation::tr("The current Qt's qmake version."), + versionProperty([](BaseQtVersion *version) { + return version->qmakeProperty(version->m_versionInfo, "QMAKE_VERSION"); + })); + + // FIXME: Re-enable once we can detect expansion loops. + // expander->registerVariable("Qt:Name", + // QtKitInformation::tr("The display name of the current Qt version."), + // versionProperty([](BaseQtVersion *version) { + // return version->displayName(); + // })); + + return expander; } void BaseQtVersion::populateQmlFileFinder(FileInProjectFinder *finder, const Target *target) diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h index 152415a8dfc..672d3c98af5 100644 --- a/src/plugins/qtsupport/baseqtversion.h +++ b/src/plugins/qtsupport/baseqtversion.h @@ -232,6 +232,8 @@ public: QStringList qtConfigValues() const; Utils::MacroExpander *macroExpander() const; // owned by the Qt version + static std::unique_ptr createMacroExpander( + const std::function &qtVersion); static void populateQmlFileFinder(Utils::FileInProjectFinder *finder, const ProjectExplorer::Target *target); @@ -315,7 +317,7 @@ private: mutable QList m_qtAbis; - mutable Utils::MacroExpander m_expander; + std::unique_ptr m_expander; }; } diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index d875511b2a9..48bde825b9f 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include @@ -311,7 +312,8 @@ void ExamplesListModel::parseExamples(QXmlStreamReader *reader, item.projectPath = attributes.value(QLatin1String("projectPath")).toString(); item.hasSourceCode = !item.projectPath.isEmpty(); item.projectPath = relativeOrInstallPath(item.projectPath, projectsOffset, examplesInstallPath); - item.imageUrl = attributes.value(QLatin1String("imageUrl")).toString(); + item.imageUrl = Utils::StyleHelper::dpiSpecificImageFile( + attributes.value(QLatin1String("imageUrl")).toString()); QPixmapCache::remove(item.imageUrl); item.docUrl = attributes.value(QLatin1String("docUrl")).toString(); item.isHighlighted = attributes.value(QLatin1String("isHighlighted")).toString() == QLatin1String("true"); diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index c41677ec7e1..b284d2869d9 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -413,18 +413,16 @@ public: QRect pixmapRect = inner; if (!pm.isNull()) { painter->setPen(foregroundColor2); - if (item.isVideo) - pixmapRect = inner.adjusted(6, 10, -6, -25); + pixmapRect = inner.adjusted(6, 20, -6, -15); QPoint pixmapPos = pixmapRect.center(); - pixmapPos.rx() -= pm.width() / 2; - pixmapPos.ry() -= pm.height() / 2; + pixmapPos.rx() -= pm.width() / pm.devicePixelRatio() / 2; + pixmapPos.ry() -= pm.height() / pm.devicePixelRatio() / 2; painter->drawPixmap(pixmapPos, pm); if (item.isVideo) { painter->setFont(sizedFont(13, option.widget)); - QRect lenRect(x, y + 120, w, 20); QString videoLen = item.videoLength; - lenRect = fm.boundingRect(lenRect, Qt::AlignHCenter, videoLen); - painter->drawText(lenRect.adjusted(0, 0, 5, 0), videoLen); + painter->drawText(pixmapRect.adjusted(0, 0, 0, painter->font().pixelSize() + 3), + videoLen, Qt::AlignBottom | Qt::AlignHCenter); } } else { // The description text as fallback. diff --git a/src/plugins/qtsupport/images/icons/qteventicon.png b/src/plugins/qtsupport/images/icons/qteventicon.png index b3ba23cbe3d..a4d27e29a28 100644 Binary files a/src/plugins/qtsupport/images/icons/qteventicon.png and b/src/plugins/qtsupport/images/icons/qteventicon.png differ diff --git a/src/plugins/qtsupport/images/icons/qteventicon@2x.png b/src/plugins/qtsupport/images/icons/qteventicon@2x.png new file mode 100644 index 00000000000..b3eb6e5eaf1 Binary files /dev/null and b/src/plugins/qtsupport/images/icons/qteventicon@2x.png differ diff --git a/src/plugins/qtsupport/images/icons/tutorialicon.png b/src/plugins/qtsupport/images/icons/tutorialicon.png index 955d29d92c6..a3ac270f8cd 100644 Binary files a/src/plugins/qtsupport/images/icons/tutorialicon.png and b/src/plugins/qtsupport/images/icons/tutorialicon.png differ diff --git a/src/plugins/qtsupport/images/icons/tutorialicon@2x.png b/src/plugins/qtsupport/images/icons/tutorialicon@2x.png new file mode 100644 index 00000000000..5c83982f2e7 Binary files /dev/null and b/src/plugins/qtsupport/images/icons/tutorialicon@2x.png differ diff --git a/src/plugins/qtsupport/images/icons/videotutorialicon.png b/src/plugins/qtsupport/images/icons/videotutorialicon.png index b3e88de859f..037adc27a35 100644 Binary files a/src/plugins/qtsupport/images/icons/videotutorialicon.png and b/src/plugins/qtsupport/images/icons/videotutorialicon.png differ diff --git a/src/plugins/qtsupport/images/icons/videotutorialicon@2x.png b/src/plugins/qtsupport/images/icons/videotutorialicon@2x.png new file mode 100644 index 00000000000..04071e206e6 Binary files /dev/null and b/src/plugins/qtsupport/images/icons/videotutorialicon@2x.png differ diff --git a/src/plugins/qtsupport/qtcreator_tutorials.xml b/src/plugins/qtsupport/qtcreator_tutorials.xml index 264813a594a..2464a480917 100644 --- a/src/plugins/qtsupport/qtcreator_tutorials.xml +++ b/src/plugins/qtsupport/qtcreator_tutorials.xml @@ -60,7 +60,11 @@ - qt creator + qt creator,video + + + + qt creator,video diff --git a/src/plugins/qtsupport/qtkitinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp index 1653b48a16d..3e55fb3fd04 100644 --- a/src/plugins/qtsupport/qtkitinformation.cpp +++ b/src/plugins/qtsupport/qtkitinformation.cpp @@ -124,14 +124,26 @@ ProjectExplorer::IOutputParser *QtKitInformation::createOutputParser(const Proje return nullptr; } +class QtMacroSubProvider +{ +public: + QtMacroSubProvider(Kit *kit) + : expander(BaseQtVersion::createMacroExpander( + [kit] { return QtKitInformation::qtVersion(kit); })) + {} + + MacroExpander *operator()() const + { + return expander.get(); + } + + std::shared_ptr expander; +}; + void QtKitInformation::addToMacroExpander(Kit *kit, MacroExpander *expander) const { QTC_ASSERT(kit, return); - expander->registerSubProvider( - [kit]() -> MacroExpander * { - BaseQtVersion *version = qtVersion(kit); - return version ? version->macroExpander() : nullptr; - }); + expander->registerSubProvider(QtMacroSubProvider(kit)); expander->registerVariable("Qt:Name", tr("Name of Qt Version"), [kit]() -> QString { diff --git a/src/plugins/qtsupport/qtsupport.qrc b/src/plugins/qtsupport/qtsupport.qrc index 03d8dbc7e86..03c14062c04 100644 --- a/src/plugins/qtsupport/qtsupport.qrc +++ b/src/plugins/qtsupport/qtsupport.qrc @@ -7,7 +7,10 @@ images_areaofinterest.xml qtcreator_tutorials.xml images/icons/tutorialicon.png + images/icons/tutorialicon@2x.png images/icons/videotutorialicon.png + images/icons/videotutorialicon@2x.png images/icons/qteventicon.png + images/icons/qteventicon@2x.png diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 5b7a0b27ba4..f36f208376a 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -2997,6 +2997,14 @@ bool TextEditorWidget::event(QEvent *e) void TextEditorWidget::inputMethodEvent(QInputMethodEvent *e) { + if (e->commitString().isEmpty() && e->preeditString().isEmpty() && e->attributes().isEmpty()) { + // Avoid doing anything when getting bogus events as it can happen on Gnome desktop. + // Otherwise QPlainTextEdit will report content changes for locations where factually + // nothing changed. + // Workaround for QTCREATORBUG-19571 + e->accept(); + return; + } if (d->m_inBlockSelectionMode) { if (!e->commitString().isEmpty()) d->insertIntoBlockSelection(e->commitString()); diff --git a/src/plugins/winrt/winrtrunfactories.cpp b/src/plugins/winrt/winrtrunfactories.cpp index bb0c1dbe017..ad0a5f304d7 100644 --- a/src/plugins/winrt/winrtrunfactories.cpp +++ b/src/plugins/winrt/winrtrunfactories.cpp @@ -52,7 +52,8 @@ WinRtRunConfigurationFactory::WinRtRunConfigurationFactory() QList WinRtRunConfigurationFactory::availableCreators(Target *parent) const { - QmakeProject *project = static_cast(parent->project()); + QmakeProject *project = qobject_cast(parent->project()); + QTC_ASSERT(project, return {}); const QList list = project->runConfigurationCreators(this); return Utils::transform(list, [](RunConfigurationCreationInfo rci) { rci.displayName = tr("Run App Package"); diff --git a/src/shared/qbs b/src/shared/qbs index 053b31802b3..abfc4c1b37d 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 053b31802b3520b083a8fc587cd367251fa0b2d8 +Subproject commit abfc4c1b37d18515c8da0678a665886d7cb69af5 diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index d344fe4b247..90a1fee6cf3 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -496,6 +496,37 @@ effect="fill_between_many" linkedpaths="#path2259-2-0-6,0" id="path-effect2469-8" /> + + + + + + + + + + + + + + + + + + + + + + + #include +#include #include #include @@ -8208,5 +8209,123 @@ void tst_TestCore::changeGradientId() } } +static void checkNode(QmlJS::SimpleReaderNode::Ptr node, TestRewriterView *view); + +static void checkChildNodes(QmlJS::SimpleReaderNode::Ptr node, TestRewriterView *view) +{ + for (auto child : node->children()) + checkNode(child, view); +} + +static void checkNode(QmlJS::SimpleReaderNode::Ptr node, TestRewriterView *view) +{ + QVERIFY(node); + QVERIFY(node->propertyNames().contains("i")); + const int internalId = node->property("i").toInt(); + const ModelNode modelNode = view->modelNodeForInternalId(internalId); + QVERIFY(modelNode.isValid()); + auto properties = node->properties(); + + for (auto i = properties.begin(); i != properties.end(); ++i) { + if (i.key() != "i") + QCOMPARE(i.value(), modelNode.auxiliaryData(i.key().toUtf8())); + } + + checkChildNodes(node, view); +} + +void tst_TestCore::writeAnnotations() +{ + const QLatin1String qmlCode("\n" + "import QtQuick 2.1\n" + "\n" + "Rectangle {\n" + " Item {\n" + " }\n" + "\n" + " MouseArea {\n" + " x: 3\n" + " y: 3\n" + " }\n" + "}"); + + const QLatin1String metaCode("\n/*##^## Designer {\n D{i:0;x:10}D{i:1;test:true;x:10;test2:\"string\"}" + "D{i:2;test:true;x:10;test2:\"string\"}\n}\n ##^##*/\n"); + + QPlainTextEdit textEdit; + textEdit.setPlainText(qmlCode); + NotIndentingTextEditModifier textModifier(&textEdit); + + QScopedPointer model(Model::create("QtQuick.Item", 2, 1)); + QVERIFY(model.data()); + + QScopedPointer testRewriterView(new TestRewriterView()); + testRewriterView->setTextModifier(&textModifier); + model->attachView(testRewriterView.data()); + + QVERIFY(model.data()); + ModelNode rootModelNode(testRewriterView->rootModelNode()); + QVERIFY(rootModelNode.isValid()); + + rootModelNode.setAuxiliaryData("x", 10); + for (const auto child : rootModelNode.allSubModelNodes()) { + child.setAuxiliaryData("x", 10); + child.setAuxiliaryData("test", true); + child.setAuxiliaryData("test2", "string"); + } + + const QString metaSource = testRewriterView->auxiliaryDataAsQML(); + + QmlJS::SimpleReader reader; + checkChildNodes(reader.readFromSource(metaSource), testRewriterView.data()); + + testRewriterView->writeAuxiliaryData(); + const QString textWithMeta = testRewriterView->textModifier()->text(); + testRewriterView->writeAuxiliaryData(); + QCOMPARE(textWithMeta.length(), testRewriterView->textModifier()->text().length()); +} + +void tst_TestCore::readAnnotations() +{ + const QLatin1String qmlCode("\n" + "import QtQuick 2.1\n" + "\n" + "Rectangle {\n" + " Item {\n" + " }\n" + "\n" + " MouseArea {\n" + " x: 3\n" + " y: 3\n" + " }\n" + "}"); + + const QLatin1String metaCode("\n/*##^## Designer {\n D{i:0;x:10}D{i:1;test:true;x:10;test2:\"string\"}" + "D{i:2;test:true;x:10;test2:\"string\"}\n}\n ##^##*/\n"); + + const QLatin1String metaCodeQmlCode("Designer {\n D{i:0;x:10}D{i:1;test2:\"string\";x:10;test:true}" + "D{i:2;test2:\"string\";x:10;test:true}\n}\n"); + + QPlainTextEdit textEdit; + textEdit.setPlainText(qmlCode + metaCode); + NotIndentingTextEditModifier textModifier(&textEdit); + + QScopedPointer model(Model::create("QtQuick.Item", 2, 1)); + QVERIFY(model.data()); + + QScopedPointer testRewriterView(new TestRewriterView()); + testRewriterView->setTextModifier(&textModifier); + model->attachView(testRewriterView.data()); + + QVERIFY(model.data()); + ModelNode rootModelNode(testRewriterView->rootModelNode()); + QVERIFY(rootModelNode.isValid()); + + testRewriterView->restoreAuxiliaryData(); + + const QString metaSource = testRewriterView->auxiliaryDataAsQML(); + QCOMPARE(metaSource.length(), QString(metaCodeQmlCode).length()); +} + QTEST_MAIN(tst_TestCore); diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.h b/tests/auto/qml/qmldesigner/coretests/tst_testcore.h index a3ce437947c..def024c63f3 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.h +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.h @@ -229,4 +229,8 @@ private slots: // Object bindings as properties: void loadGradient(); void changeGradientId(); + + // QMLAnnotations + void writeAnnotations(); + void readAnnotations(); };