Merge remote-tracking branch 'origin/4.14'

Change-Id: I6e67f23464fc14dda5a659004f0aa360d6f5d25f
This commit is contained in:
Eike Ziller
2021-01-27 12:28:47 +01:00
18 changed files with 85 additions and 75 deletions

View File

@@ -3,7 +3,7 @@ name: CMake Build Matrix
on: [push, pull_request]
env:
QT_VERSION: 5.15.1
QT_VERSION: 5.15.2
CLANG_VERSION: 110
ELFUTILS_VERSION: 0.175
CMAKE_VERSION: 3.18.3
@@ -132,7 +132,7 @@ jobs:
foreach(qt_mirror $ENV{QT_MIRRORS})
cmake_language(EVAL CODE "
message(\"Downloading: ${qt_base_url}/Updates.xml\")
file(DOWNLOAD \"${qt_base_url}/Updates.xml\" ./Updates.xml TIMEOUT 60)
file(DOWNLOAD \"${qt_base_url}/Updates.xml\" ./Updates.xml)
")
file(SIZE ./Updates.xml fileSize)
if (fileSize GREATER 0)
@@ -154,7 +154,7 @@ jobs:
foreach(qt_mirror $ENV{QT_MIRRORS})
cmake_language(EVAL CODE "
message(\"Downloading ${url}\")
file(DOWNLOAD \"${url}\" ./${archive} TIMEOUT 60)
file(DOWNLOAD \"${url}\" ./${archive})
")
file(SIZE ./${archive} fileSize)
if (fileSize GREATER 0)
@@ -234,7 +234,7 @@ jobs:
foreach(qt_mirror $ENV{QT_MIRRORS})
cmake_language(EVAL CODE "
message(\"Downloading ${openssl_base_url}/Updates.xml}\")
file(DOWNLOAD \"${openssl_base_url}/Updates.xml\" ./Updates.xml TIMEOUT 60)
file(DOWNLOAD \"${openssl_base_url}/Updates.xml\" ./Updates.xml)
")
file(SIZE ./Updates.xml fileSize)
if (fileSize GREATER 0)
@@ -258,7 +258,7 @@ jobs:
foreach(qt_mirror $ENV{QT_MIRRORS})
cmake_language(EVAL CODE "
message(\"Downloading ${url}\")
file(DOWNLOAD \"${url}\" ./openssl.7z TIMEOUT 60)
file(DOWNLOAD \"${url}\" ./openssl.7z)
")
file(SIZE ./openssl.7z fileSize)
if (fileSize GREATER 0)
@@ -295,7 +295,7 @@ jobs:
foreach(qt_mirror $ENV{QT_MIRRORS})
cmake_language(EVAL CODE "
message(\"Downloading ${libclang_url}\")
file(DOWNLOAD \"${libclang_url}\" ./libclang.7z TIMEOUT 240)
file(DOWNLOAD \"${libclang_url}\" ./libclang.7z)
")
file(SIZE ./libclang.7z fileSize)
if (fileSize GREATER 0)
@@ -332,7 +332,7 @@ jobs:
foreach(qt_mirror $ENV{QT_MIRRORS})
cmake_language(EVAL CODE "
message(\"Downloading ${elfutils_url}\")
file(DOWNLOAD \"${elfutils_url}\" ./elfutils.7z TIMEOUT 60)
file(DOWNLOAD \"${elfutils_url}\" ./elfutils.7z)
")
file(SIZE ./elfutils.7z fileSize)
if (fileSize GREATER 0)

View File

@@ -270,24 +270,6 @@ function(add_qtc_library name)
qtc_enable_separate_debug_info(${name} "${IDE_LIBRARY_PATH}")
if (library_type STREQUAL "SHARED")
set(target_prefix ${CMAKE_SHARED_LIBRARY_PREFIX})
if (WIN32)
set(target_suffix ${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(target_prefix "")
elseif(APPLE)
set(target_suffix .${PROJECT_VERSION_MAJOR}${CMAKE_SHARED_LIBRARY_SUFFIX})
else()
set(target_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX}.${PROJECT_VERSION_MAJOR})
endif()
set(lib_dir "${IDE_LIBRARY_PATH}")
if (WIN32)
set(lib_dir "${_DESTINATION}")
endif()
update_cached_list(__QTC_INSTALLED_LIBRARIES
"${lib_dir}/${target_prefix}${name}${target_suffix}")
endif()
if (NAMELINK_OPTION)
install(TARGETS ${name}
LIBRARY
@@ -544,16 +526,6 @@ function(add_qtc_plugin target_name)
FILE ${CMAKE_BINARY_DIR}/cmake/${export}Targets.cmake
)
endif()
get_target_property(target_suffix ${target_name} SUFFIX)
get_target_property(target_prefix ${target_name} PREFIX)
if (target_suffix STREQUAL "target_suffix-NOTFOUND")
set(target_suffix ${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()
if (target_prefix STREQUAL "target_prefix-NOTFOUND")
set(target_prefix ${CMAKE_SHARED_LIBRARY_PREFIX})
endif()
update_cached_list(__QTC_INSTALLED_PLUGINS
"${plugin_dir}/${target_prefix}${target_name}${target_suffix}")
endif()
endfunction()
@@ -754,9 +726,6 @@ function(add_qtc_executable name)
endif()
qtc_enable_separate_debug_info(${name} "${_DESTINATION}")
update_cached_list(__QTC_INSTALLED_EXECUTABLES
"${_DESTINATION}/${name}${CMAKE_EXECUTABLE_SUFFIX}")
endif()
endfunction()

View File

@@ -88,11 +88,8 @@ else()
endif ()
set(__QTC_PLUGINS "" CACHE INTERNAL "*** Internal ***")
set(__QTC_INSTALLED_PLUGINS "" CACHE INTERNAL "*** Internal ***")
set(__QTC_LIBRARIES "" CACHE INTERNAL "*** Internal ***")
set(__QTC_INSTALLED_LIBRARIES "" CACHE INTERNAL "*** Internal ***")
set(__QTC_EXECUTABLES "" CACHE INTERNAL "*** Internal ***")
set(__QTC_INSTALLED_EXECUTABLES "" CACHE INTERNAL "*** Internal ***")
set(__QTC_TESTS "" CACHE INTERNAL "*** Internal ***")
function(append_extra_translations target_name)

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@@ -1230,7 +1230,7 @@
\li \c{bitsize(self)} - Returns the size of an object of this type in
bits.
\li \c{(alignment(self)} - Returns the required alignment for objects of
\li \c{alignment(self)} - Returns the required alignment for objects of
this type in bytes.
\li \c{deference(self)} - Returns the dereferences type for pointer
@@ -1319,8 +1319,8 @@
\li \c{pointer(self)} - Returns an interpretation of this value as a
pointer in the current address space.
\li \c{members(self)} - Returns a list of \c{Dumper.Value} objects
representing the base objects and data members of this value.
\li \c{members(self, includeBases)} - Returns a list of \c{Dumper.Value}
objects representing the base objects and data members of this value.
\li \c{dereference(self)} - For values describing pointers, returns the
dereferenced value, and \c None otherwise.

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -76,6 +76,35 @@
\uicontrol Properties view. There, you can also enter the value
of the \uicontrol Rotation property in degrees.
\section1 Zooming
You can use the zoom buttons on the toolbar to zoom into and out of
\uicontrol {Form Editor} or select the zoom level as a percentage
from a list. More buttons are availabe for zooming to fit all content
in the view or zooming to fit the currently selected components.
\image qmldesigner-zooming.gif "Zooming in Form Editor"
The following table lists the zoom buttons:
\table
\header
\li Icon
\li Tooltip
\row
\li \inlineimage icons/zoomIn.png
\li Zoom in
\row
\li \inlineimage icons/zoomOut.png
\li Zoom out
\row
\li \inlineimage icons/zoomAll.png
\li Zoom to fit all content
\row
\li \inlineimage icons/zoomSelection.png
\li Zoom to fit the current selection
\endtable
\section1 Snapping to Parent and Sibling Items
When you are working on a design, you can use snapping to align
@@ -136,6 +165,17 @@
\uicontrol {Qt Quick} > \uicontrol {Qt Quick Designer} and
specify the canvas width and height in the \uicontrol Canvas group.
\section1 Setting Canvas Color
If you set the background of the root item of your component transparent,
the canvas color can make it difficult to see the component you are working
on. To make components more visible, you can select the canvas color in
the \inlineimage icons/canvas-color.png
list. By default, the color is transparent. Setting the canvas color does
not affect the background color of your UI or components in any way.
\image qmldesigner-canvas-color.png "Transparent canvas color for a transparent component"
\section1 Refreshing the Form Editor Contents
When you open QML files in the Design mode, the items in the file are drawn

View File

@@ -62,7 +62,7 @@ CapturedDataCommand::StateData collectStateData(ServerNodeInstance rootNodeInsta
CapturedDataCommand::NodeData nodeData;
nodeData.nodeId = instance.instanceId();
nodeData.contentRect = instance.contentItemBoundingRect();
nodeData.contentRect = instance.boundingRect();
nodeData.sceneTransform = instance.sceneTransform();
auto textProperty = instance.property("text");
if (!textProperty.isNull() && instance.holdsGraphical())

View File

@@ -39,6 +39,16 @@ file(WRITE ${CMAKE_BINARY_DIR}/cmake/QtCreatorConfig.cmake "
\# add module path for special FindQt5.cmake that considers Qt6 too
list(APPEND CMAKE_MODULE_PATH \${CMAKE_CURRENT_LIST_DIR})
\# force plugins to same path naming conventions as Qt Creator
\# otherwise plugins will not be found
if(UNIX AND NOT APPLE)
include(GNUInstallDirs)
set(CMAKE_INSTALL_BINDIR ${CMAKE_INSTALL_BINDIR})
set(CMAKE_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR})
set(CMAKE_INSTALL_LIBEXECDIR ${CMAKE_INSTALL_LIBEXECDIR})
set(CMAKE_INSTALL_DATAROOTDIR ${CMAKE_INSTALL_DATAROOTDIR})
endif()
include(CMakeFindDependencyMacro)
find_dependency(Qt5 ${IDE_QT_VERSION_MIN}
COMPONENTS Concurrent Core Gui Widgets Core5Compat Network PrintSupport Qml Quick QuickWidgets Sql REQUIRED

View File

@@ -139,15 +139,17 @@ QList<AssistProposalItemInterface *> ClangCompletionAssistProcessor::toAssistPro
considerOnlySignals = CppTools::CppModelManager::instance()
->positionRequiresSignal(m_interface->filePath().toString(), m_content, m_position);
}
for (const CodeCompletion &codeCompletion : completions) {
if (considerOnlySignals && codeCompletion.completionKind
!= CodeCompletion::SignalCompletionKind) {
continue;
}
if (codeCompletion.text.isEmpty())
continue; // It's an OverloadCandidate which has text but no typedText.
if (considerOnlySignals
&& codeCompletion.completionKind != CodeCompletion::ClassCompletionKind
&& codeCompletion.completionKind != CodeCompletion::NamespaceCompletionKind
&& codeCompletion.completionKind != CodeCompletion::SignalCompletionKind) {
continue;
}
// Don't offer symbols that are not accessible here.
if (codeCompletion.availability == CodeCompletion::NotAvailable
|| codeCompletion.availability == CodeCompletion::NotAccessible) {

View File

@@ -765,27 +765,29 @@ void ClangCodeCompletionTest::testSignalCompletion_data()
QTest::addColumn<QByteArray>("customContents");
QTest::addColumn<QByteArrayList>("hits");
// libclang mis-reports CXCursor_ClassDecl instead of CXCursor_Constructor, so the lists
// below include the class name.
QTest::addRow("positive: connect() on QObject class")
<< QByteArray("int main() { QObject::connect(dummy, QObject::")
<< QByteArrayList{"aSignal", "anotherSignal"};
<< QByteArrayList{"aSignal", "anotherSignal", "QObject"};
QTest::addRow("positive: connect() on QObject object")
<< QByteArray("int main() { QObject o; o.connect(dummy, QObject::")
<< QByteArrayList{"aSignal", "anotherSignal"};
<< QByteArrayList{"aSignal", "anotherSignal", "QObject"};
QTest::addRow("positive: connect() on QObject pointer")
<< QByteArray("int main() { QObject *o; o->connect(dummy, QObject::")
<< QByteArrayList{"aSignal", "anotherSignal"};
<< QByteArrayList{"aSignal", "anotherSignal", "QObject"};
QTest::addRow("positive: connect() on QObject rvalue")
<< QByteArray("int main() { QObject().connect(dummy, QObject::")
<< QByteArrayList{"aSignal", "anotherSignal"};
<< QByteArrayList{"aSignal", "anotherSignal", "QObject"};
QTest::addRow("positive: connect() on QObject pointer rvalue")
<< QByteArray("int main() { (new QObject)->connect(dummy, QObject::")
<< QByteArrayList{"aSignal", "anotherSignal"};
<< QByteArrayList{"aSignal", "anotherSignal", "QObject"};
QTest::addRow("positive: disconnect() on QObject")
<< QByteArray("int main() { QObject::disconnect(dummy, QObject::")
<< QByteArrayList{"aSignal", "anotherSignal"};
<< QByteArrayList{"aSignal", "anotherSignal", "QObject"};
QTest::addRow("positive: connect() in member function of derived class")
<< QByteArray("void DerivedFromQObject::alsoNotASignal() { connect(this, DerivedFromQObject::")
<< QByteArrayList{"aSignal", "anotherSignal", "myOwnSignal"};
<< QByteArrayList{"aSignal", "anotherSignal", "myOwnSignal", "QObject", "DerivedFromQObject"};
const QByteArrayList allQObjectFunctions{"aSignal", "anotherSignal", "notASignal", "connect",
"disconnect", "QObject", "~QObject", "operator="};

View File

@@ -743,23 +743,13 @@ void Client::handleCodeActionResponse(const CodeActionRequest::Response &respons
void Client::executeCommand(const Command &command)
{
using CommandOptions = LanguageServerProtocol::ServerCapabilities::ExecuteCommandOptions;
const QString method(ExecuteCommandRequest::methodName);
if (Utils::optional<bool> registered = m_dynamicCapabilities.isRegistered(method)) {
if (!registered.value())
return;
const CommandOptions option(m_dynamicCapabilities.option(method).toObject());
if (option.isValid(nullptr) && !option.commands().isEmpty() && !option.commands().contains(command.command()))
return;
} else if (Utils::optional<CommandOptions> option = m_serverCapabilities.executeCommandProvider()) {
if (option->isValid(nullptr) && !option->commands().isEmpty() && !option->commands().contains(command.command()))
return;
} else {
return;
}
const ExecuteCommandRequest request((ExecuteCommandParams(command)));
sendContent(request);
bool serverSupportsExecuteCommand = m_serverCapabilities.executeCommandProvider().has_value();
serverSupportsExecuteCommand = m_dynamicCapabilities
.isRegistered(ExecuteCommandRequest::methodName)
.value_or(serverSupportsExecuteCommand);
if (serverSupportsExecuteCommand)
sendContent(ExecuteCommandRequest(ExecuteCommandParams(command)));
}
static const FormattingOptions formattingOptions(const TextEditor::TabSettings &settings)

View File

@@ -47,7 +47,7 @@ static Utils::FilePath getMultilanguageDatabaseFilePath(ProjectExplorer::Target
{
if (target) {
auto filePath = target->project()->projectDirectory().pathAppended(
"multilanguage-experimental-v2.db");
"multilanguage-experimental-v3.db");
if (filePath.exists())
return filePath;
}