forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14'
Change-Id: Ie52e046f8e280e8c39f0cc5e9e710b4f885010a6
This commit is contained in:
@@ -17,8 +17,6 @@ if (yaml-cpp_FOUND)
|
||||
endif()
|
||||
set_target_properties(yaml-cpp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${yaml_cpp_include_dir}")
|
||||
else()
|
||||
set(yaml-cpp_FOUND 1)
|
||||
set_package_properties(yaml-cpp PROPERTIES DESCRIPTION "using internal src/libs/3rdparty/yaml-cpp")
|
||||
set(YAML_SOURCE_DIR ${PROJECT_SOURCE_DIR}/src/libs/3rdparty/yaml-cpp)
|
||||
add_qtc_library(yaml-cpp
|
||||
DEFINES YAML_CPP_DLL yaml_cpp_EXPORTS
|
||||
@@ -114,8 +112,12 @@ else()
|
||||
${YAML_SOURCE_DIR}/src/tag.h
|
||||
${YAML_SOURCE_DIR}/src/token.h
|
||||
)
|
||||
if(MSVC)
|
||||
target_compile_options(yaml-cpp PUBLIC /wd4251 /wd4275)
|
||||
if(TARGET yaml-cpp)
|
||||
set(yaml-cpp_FOUND 1)
|
||||
set_package_properties(yaml-cpp PROPERTIES DESCRIPTION "using internal src/libs/3rdparty/yaml-cpp")
|
||||
if(MSVC)
|
||||
target_compile_options(yaml-cpp PUBLIC /wd4251 /wd4275)
|
||||
endif()
|
||||
endif()
|
||||
unset(YAML_SOURCE_DIR)
|
||||
endif()
|
||||
|
10
dist/changes-4.14.0.md
vendored
10
dist/changes-4.14.0.md
vendored
@@ -28,6 +28,7 @@ Editing
|
||||
|
||||
### C++
|
||||
|
||||
* Updated to LLVM 11
|
||||
* Added refactoring action that creates getters and setters for all class members
|
||||
(QTCREATORBUG-14504)
|
||||
* Added refactoring action that generates member from class member initialization
|
||||
@@ -207,17 +208,20 @@ André Pönitz
|
||||
Antonio Di Monaco
|
||||
Asit Dhal
|
||||
Assam Boudjelthia
|
||||
Björn Schäpers
|
||||
Christiaan Janssen
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
Cristian Adam
|
||||
David Schulz
|
||||
Dawid Sliwa
|
||||
Denis Shienkov
|
||||
Eike Ziller
|
||||
Fabio Falsini
|
||||
Fawzi Mohamed
|
||||
Federico Guerinoni
|
||||
Henning Gruendl
|
||||
Ivan Komissarov
|
||||
Jaroslaw Kobus
|
||||
Jeremy Ephron
|
||||
Jochen Seemann
|
||||
@@ -233,16 +237,22 @@ Mahmoud Badri
|
||||
Marco Bubke
|
||||
Martin Kampas
|
||||
Michael Weghorn
|
||||
Michael Winkelmann
|
||||
Miikka Heikkinen
|
||||
Miklós Márton
|
||||
Morten Johan Sørvig
|
||||
Orgad Shaneh
|
||||
Oswald Buddenhagen
|
||||
Raphaël Cotty
|
||||
Richard Weickelt
|
||||
Robert Löhning
|
||||
Tasuku Suzuki
|
||||
Thiago Macieira
|
||||
Thomas Hartmann
|
||||
Tim Jenssen
|
||||
Tobias Hunger
|
||||
Venugopal Shivashankar
|
||||
Vikas Pachdha
|
||||
Ville Voutilainen
|
||||
Volodymyr Zibarov
|
||||
Wojciech Smigaj
|
||||
|
@@ -239,7 +239,7 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin):
|
||||
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'libclang.dll'),
|
||||
os.path.join(install_dir, 'bin')))
|
||||
for binary in ['clang', 'clang-cl', 'clangd', 'clang-tidy', 'clazy-standalone']:
|
||||
binary_filepath = os.path.join(llvm_install_dir, 'bin', 'clang.exe')
|
||||
binary_filepath = os.path.join(llvm_install_dir, 'bin', binary + '.exe')
|
||||
if os.path.exists(binary_filepath):
|
||||
deployinfo.append((binary_filepath, clangbindirtarget))
|
||||
resourcetarget = os.path.join(clanglibdirtarget, 'clang')
|
||||
|
@@ -2,7 +2,7 @@ QT += core gui widgets qml quick network
|
||||
QT += core-private qml-private quick-private gui-private
|
||||
|
||||
CONFIG += c++17
|
||||
win32: QMAKE_CXXFLAGS += /std:c++17
|
||||
win32:!mingw: QMAKE_CXXFLAGS += /std:c++17
|
||||
|
||||
DEFINES -= QT_CREATOR
|
||||
|
||||
|
@@ -92,7 +92,7 @@ namespace ADS
|
||||
{
|
||||
public:
|
||||
DockManager *q;
|
||||
QList<FloatingDockContainer *> m_floatingWidgets;
|
||||
QList<QPointer<FloatingDockContainer>> m_floatingWidgets;
|
||||
QList<DockContainerWidget *> m_containers;
|
||||
DockOverlay *m_containerOverlay = nullptr;
|
||||
DockOverlay *m_dockAreaOverlay = nullptr;
|
||||
@@ -357,9 +357,11 @@ namespace ADS
|
||||
save();
|
||||
saveStartupWorkspace();
|
||||
|
||||
for (auto floatingWidget : d->m_floatingWidgets)
|
||||
delete floatingWidget;
|
||||
|
||||
for (auto floatingWidget : d->m_floatingWidgets) {
|
||||
if (floatingWidget)
|
||||
delete floatingWidget.data();
|
||||
}
|
||||
d->m_floatingWidgets.clear();
|
||||
delete d;
|
||||
}
|
||||
|
||||
@@ -485,7 +487,7 @@ namespace ADS
|
||||
return d->m_containers;
|
||||
}
|
||||
|
||||
const QList<FloatingDockContainer *> DockManager::floatingWidgets() const
|
||||
const QList<QPointer<FloatingDockContainer>> DockManager::floatingWidgets() const
|
||||
{
|
||||
return d->m_floatingWidgets;
|
||||
}
|
||||
|
@@ -389,7 +389,7 @@ public:
|
||||
/**
|
||||
* Returns the list of all floating widgets.
|
||||
*/
|
||||
const QList<FloatingDockContainer *> floatingWidgets() const;
|
||||
const QList<QPointer<FloatingDockContainer> > floatingWidgets() const;
|
||||
|
||||
/**
|
||||
* This function always return 0 because the main window is always behind
|
||||
|
@@ -1428,6 +1428,7 @@ AspectContainer::~AspectContainer() = default;
|
||||
void AspectContainer::addAspectHelper(BaseAspect *aspect)
|
||||
{
|
||||
d->m_items.append(aspect);
|
||||
connect(aspect, &BaseAspect::changed, this, &BaseAspect::changed);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
@@ -372,6 +372,11 @@ static QString preferredAbi(const QStringList &appAbis, const Target *target)
|
||||
QString AndroidManager::apkDevicePreferredAbi(const Target *target)
|
||||
{
|
||||
auto libsPath = dirPath(target).pathAppended("libs");
|
||||
if (!libsPath.exists()) {
|
||||
if (const ProjectNode *node = currentProjectNode(target))
|
||||
return preferredAbi(node->data(Android::Constants::ANDROID_ABIS).toStringList(),
|
||||
target);
|
||||
}
|
||||
QStringList apkAbis;
|
||||
for (const auto &abi : QDir{libsPath.toString()}.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
|
||||
if (!QDir{libsPath.pathAppended(abi).toString()}.entryList(QStringList("*.so"), QDir::Files | QDir::NoDotAndDotDot).isEmpty())
|
||||
|
@@ -1,14 +1,26 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(QLiteHtml)
|
||||
|
||||
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/litehtml/CMakeLists.txt)
|
||||
set(ORIG_FPIC ${CMAKE_POSITION_INDEPENDENT_CODE})
|
||||
if (WIN32)
|
||||
set(LITEHTML_UTF8 ON CACHE BOOL "")
|
||||
endif()
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# suppress warning about VERSION being overwritten or not
|
||||
# and add subdirectory
|
||||
set(ORIG_VERSION ${PROJECT_VERSION})
|
||||
set(ORIG_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(ORIG_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set(ORIG_PATCH ${PROJECT_VERSION_PATCH})
|
||||
set(PROJECT_VERSION "")
|
||||
set(PROJECT_VERSION_MAJOR "")
|
||||
set(PROJECT_VERSION_MINOR "")
|
||||
set(PROJECT_VERSION_PATCH "")
|
||||
add_subdirectory(litehtml EXCLUDE_FROM_ALL)
|
||||
set(PROJECT_VERSION ${ORIG_VERSION})
|
||||
set(PROJECT_VERSION_MAJOR ${ORIG_MAJOR})
|
||||
set(PROJECT_VERSION_MINOR ${ORIG_MINOR})
|
||||
set(PROJECT_VERSION_PATCH ${ORIG_PATCH})
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE "${ORIG_FPIC}")
|
||||
# force optimized litehtml even in debug
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
@@ -22,13 +34,6 @@ else()
|
||||
find_package(litehtml REQUIRED)
|
||||
endif()
|
||||
|
||||
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
add_qtc_library(qlitehtml
|
||||
PUBLIC_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS Qt5::Widgets litehtml
|
||||
|
@@ -151,6 +151,33 @@ QString QbsProductNode::getBuildKey(const QJsonObject &product)
|
||||
+ product.value("multiplex-configuration-id").toString();
|
||||
}
|
||||
|
||||
bool QbsProductNode::isAggregated() const
|
||||
{
|
||||
return m_productData.value("is-multiplexed").toBool()
|
||||
&& m_productData.value("multiplex-configuration-id").toString().isEmpty();
|
||||
}
|
||||
|
||||
const QList<const QbsProductNode*> QbsProductNode::aggregatedProducts() const
|
||||
{
|
||||
if (!isAggregated())
|
||||
return {};
|
||||
const ProjectNode *parentNode = managingProject();
|
||||
QTC_ASSERT(parentNode != nullptr && parentNode != this, return {});
|
||||
|
||||
QSet<QString> dependencies;
|
||||
for (const auto &a : m_productData.value("dependencies").toArray())
|
||||
dependencies << a.toString();
|
||||
|
||||
QList<const QbsProductNode*> qbsProducts;
|
||||
parentNode->forEachProjectNode([&qbsProducts, dependencies](const ProjectNode *node) {
|
||||
if (const auto qbsChildNode = dynamic_cast<const QbsProductNode *>(node)) {
|
||||
if (dependencies.contains(qbsChildNode->fullDisplayName()))
|
||||
qbsProducts << qbsChildNode;
|
||||
}
|
||||
});
|
||||
return qbsProducts;
|
||||
}
|
||||
|
||||
QVariant QbsProductNode::data(Id role) const
|
||||
{
|
||||
if (role == Android::Constants::AndroidDeploySettingsFile) {
|
||||
@@ -164,10 +191,16 @@ QVariant QbsProductNode::data(Id role) const
|
||||
|
||||
if (role == Android::Constants::AndroidSoLibPath) {
|
||||
QStringList ret{m_productData.value("build-directory").toString()};
|
||||
forAllArtifacts(m_productData, ArtifactType::Generated, [&ret](const QJsonObject &artifact) {
|
||||
if (artifact.value("file-tags").toArray().contains("dynamiclibrary"))
|
||||
ret << QFileInfo(artifact.value("file-path").toString()).path();
|
||||
});
|
||||
if (!isAggregated()) {
|
||||
forAllArtifacts(m_productData, ArtifactType::Generated,
|
||||
[&ret](const QJsonObject &artifact) {
|
||||
if (artifact.value("file-tags").toArray().contains("dynamiclibrary"))
|
||||
ret << QFileInfo(artifact.value("file-path").toString()).path();
|
||||
});
|
||||
} else {
|
||||
for (const auto &a : aggregatedProducts())
|
||||
ret += a->data(Android::Constants::AndroidSoLibPath).toStringList();
|
||||
}
|
||||
ret.removeDuplicates();
|
||||
return ret;
|
||||
}
|
||||
@@ -188,6 +221,28 @@ QVariant QbsProductNode::data(Id role) const
|
||||
return m_productData.value("module-properties").toObject()
|
||||
.value("Qt.core.enableKeywords").toBool();
|
||||
|
||||
if (role == Android::Constants::ANDROID_ABIS) {
|
||||
// Try using qbs.architectures
|
||||
QStringList qbsAbis;
|
||||
QMap<QString, QString> archToAbi {
|
||||
{"armv7a", ProjectExplorer::Constants::ANDROID_ABI_ARMEABI_V7A},
|
||||
{"arm64", ProjectExplorer::Constants::ANDROID_ABI_ARM64_V8A},
|
||||
{"x86", ProjectExplorer::Constants::ANDROID_ABI_X86},
|
||||
{"x86_64", ProjectExplorer::Constants::ANDROID_ABI_X86_64}};
|
||||
for (const auto &a : m_productData.value("module-properties").toObject()
|
||||
.value(Constants::QBS_ARCHITECTURES).toArray()) {
|
||||
if (archToAbi.contains(a.toString()))
|
||||
qbsAbis << archToAbi[a.toString()];
|
||||
}
|
||||
if (!qbsAbis.empty())
|
||||
return qbsAbis;
|
||||
// Try using qbs.architecture
|
||||
QString architecture = m_productData.value("module-properties").toObject()
|
||||
.value(Constants::QBS_ARCHITECTURE).toString();
|
||||
if (archToAbi.contains(architecture))
|
||||
qbsAbis << archToAbi[architecture];
|
||||
return qbsAbis;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
|
@@ -65,6 +65,9 @@ public:
|
||||
|
||||
static QString getBuildKey(const QJsonObject &product);
|
||||
|
||||
bool isAggregated() const;
|
||||
const QList<const QbsProductNode*> aggregatedProducts() const;
|
||||
|
||||
const QJsonObject productData() const { return m_productData; }
|
||||
QJsonObject mainGroup() const;
|
||||
QVariant data(Utils::Id role) const override;
|
||||
|
@@ -376,6 +376,8 @@ RunEnvironmentResult QbsSession::getRunEnvironment(
|
||||
void QbsSession::insertRequestedModuleProperties(QJsonObject &request)
|
||||
{
|
||||
request.insert("module-properties", QJsonArray::fromStringList({
|
||||
"qbs.architecture",
|
||||
"qbs.architectures",
|
||||
"cpp.commonCompilerFlags",
|
||||
"cpp.compilerVersionMajor",
|
||||
"cpp.compilerVersionMinor",
|
||||
|
@@ -174,6 +174,9 @@ public:
|
||||
|
||||
ModelNode getNodeForCanonicalIndex(int index);
|
||||
|
||||
signals:
|
||||
void modelInterfaceProjectUpdated();
|
||||
|
||||
protected: // functions
|
||||
void importAdded(const Import &import);
|
||||
void importRemoved(const Import &import);
|
||||
@@ -191,6 +194,7 @@ private: //variables
|
||||
ModelNode nodeAtTextCursorPositionHelper(const ModelNode &root, int cursorPosition) const;
|
||||
void setupCanonicalHashes() const;
|
||||
void handleLibraryInfoUpdate();
|
||||
void handleProjectUpdate();
|
||||
|
||||
TextModifier *m_textModifier = nullptr;
|
||||
int transactionLevel = 0;
|
||||
|
@@ -91,6 +91,10 @@ RewriterView::RewriterView(DifferenceHandling differenceHandling, QObject *paren
|
||||
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
|
||||
connect(modelManager, &QmlJS::ModelManagerInterface::libraryInfoUpdated,
|
||||
this, &RewriterView::handleLibraryInfoUpdate, Qt::QueuedConnection);
|
||||
connect(modelManager, &QmlJS::ModelManagerInterface::projectInfoUpdated,
|
||||
this, &RewriterView::handleProjectUpdate, Qt::DirectConnection);
|
||||
connect(this, &RewriterView::modelInterfaceProjectUpdated,
|
||||
this, &RewriterView::handleLibraryInfoUpdate, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
RewriterView::~RewriterView() = default;
|
||||
@@ -832,6 +836,11 @@ void RewriterView::handleLibraryInfoUpdate()
|
||||
m_amendTimer.start();
|
||||
}
|
||||
|
||||
void RewriterView::handleProjectUpdate()
|
||||
{
|
||||
emit modelInterfaceProjectUpdated();
|
||||
}
|
||||
|
||||
ModelNode RewriterView::nodeAtTextCursorPosition(int cursorPosition) const
|
||||
{
|
||||
return nodeAtTextCursorPositionHelper(rootModelNode(), cursorPosition);
|
||||
|
@@ -99,8 +99,22 @@ static QByteArray defaultFileLoader(const QString &filename, bool *success)
|
||||
|
||||
static bool defaultFileClassifier(const QString &filename)
|
||||
{
|
||||
// We cannot dynamically load changes in qtquickcontrols2.conf
|
||||
return !filename.endsWith("qtquickcontrols2.conf");
|
||||
const QStringList list = {
|
||||
".glsl",
|
||||
".glslv",
|
||||
".glslf",
|
||||
".vsh",
|
||||
".fsh",
|
||||
".frag",
|
||||
".vert",
|
||||
"qtquickcontrols2.conf" };
|
||||
|
||||
for (const QString &suffix : list)
|
||||
if (filename.endsWith(suffix))
|
||||
return false;
|
||||
|
||||
// We cannot dynamically load changes in qtquickcontrols2.conf and shaders
|
||||
return true;
|
||||
}
|
||||
|
||||
static void defaultFpsHandler(quint16 frames[8])
|
||||
|
@@ -28,7 +28,7 @@ import QtQuick 2.0
|
||||
ListModel {
|
||||
ListElement {
|
||||
projectName: "ClusterTutorial"
|
||||
qmlFileName: "Cluster_Art.ui.qml"
|
||||
qmlFileName: "ClusterTutorial.qml"
|
||||
thumbnail: "images/tutorialclusterdemo_thumbnail.png"
|
||||
displayName: "Cluster Tutorial"
|
||||
}
|
||||
@@ -42,21 +42,21 @@ ListModel {
|
||||
|
||||
ListElement {
|
||||
projectName: "SideMenu"
|
||||
qmlFileName: "MainFile.ui.qml"
|
||||
qmlFileName: "SideMenu.qml"
|
||||
thumbnail: "images/sidemenu_demo.png"
|
||||
displayName: "Side Menu"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
projectName: "WebinarDemo"
|
||||
qmlFileName: "MainApp.ui.qml"
|
||||
qmlFileName: "DesignStudioWebinar.qml"
|
||||
thumbnail: "images/webinardemo_thumbnail.png"
|
||||
displayName: "Webinar Demo"
|
||||
}
|
||||
|
||||
ListElement {
|
||||
projectName: "EBikeDesign"
|
||||
qmlFileName: "Screen01.ui.qml"
|
||||
qmlFileName: "EBikeDesign.qml"
|
||||
thumbnail: "images/ebike_demo_thumbnail.png"
|
||||
displayName: "E-Bike Design"
|
||||
}
|
||||
|
@@ -610,8 +610,8 @@ protected:
|
||||
virtual void slotCursorPositionChanged(); // Used in VcsBase
|
||||
virtual void slotCodeStyleSettingsChanged(const QVariant &); // Used in CppEditor
|
||||
|
||||
bool inFindScope(const QTextCursor &cursor);
|
||||
bool inFindScope(int selectionStart, int selectionEnd);
|
||||
Q_INVOKABLE bool inFindScope(const QTextCursor &cursor);
|
||||
Q_INVOKABLE bool inFindScope(int selectionStart, int selectionEnd);
|
||||
|
||||
private:
|
||||
Internal::TextEditorWidgetPrivate *d;
|
||||
|
Reference in New Issue
Block a user