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