forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14'
Change-Id: I26a53ef81a54a2f7aa482448118298895b712941
This commit is contained in:
2
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
2
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -2308,6 +2308,7 @@ bool Parser::parseAccessDeclaration(DeclarationAST *&node)
|
||||
[SCRIPTABLE bool]
|
||||
[STORED bool]
|
||||
[USER bool]
|
||||
[BINDABLE bindableFunction]
|
||||
[CONSTANT]
|
||||
[FINAL])
|
||||
|
||||
@@ -2363,6 +2364,7 @@ bool Parser::parseQtPropertyDeclaration(DeclarationAST *&node)
|
||||
case Token_READ:
|
||||
case Token_WRITE:
|
||||
case Token_MEMBER:
|
||||
case Token_BINDABLE:
|
||||
case Token_RESET:
|
||||
case Token_NOTIFY:
|
||||
case Token_REVISION:
|
||||
|
||||
@@ -159,6 +159,23 @@ static inline int classify8(const char *s) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (s[0] == 'B') {
|
||||
if (s[1] == 'I') {
|
||||
if (s[2] == 'N') {
|
||||
if (s[3] == 'D') {
|
||||
if (s[4] == 'A') {
|
||||
if (s[5] == 'B') {
|
||||
if (s[6] == 'L') {
|
||||
if (s[7] == 'E') {
|
||||
return Token_BINDABLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Token_not_Qt_context_keyword;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,8 @@ enum {
|
||||
Token_DESIGNABLE,
|
||||
Token_SCRIPTABLE,
|
||||
Token_REVISION,
|
||||
Token_MEMBER
|
||||
Token_MEMBER,
|
||||
Token_BINDABLE
|
||||
};
|
||||
|
||||
CPLUSPLUS_EXPORT int classifyQtContextKeyword(const char *s, int n);
|
||||
|
||||
@@ -5,8 +5,8 @@ add_qtc_library(ClangSupport
|
||||
PUBLIC_DEPENDS Utils Sqlite Qt5::Core Qt5::Network
|
||||
PUBLIC_DEFINES
|
||||
CLANG_VERSION="${CLANG_VERSION}"
|
||||
CLANG_INCLUDE_DIR="${IDE_LIBEXEC_PATH}/clang/lib/clang/${CLANG_VERSION}/include"
|
||||
CLANG_BINDIR="${IDE_LIBEXEC_PATH}/clang/bin"
|
||||
CLANG_INCLUDE_DIR="${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"
|
||||
CLANG_BINDIR="${LLVM_TOOLS_BINARY_DIR}"
|
||||
DEFINES CLANGSUPPORT_BUILD_LIB
|
||||
PUBLIC_INCLUDES
|
||||
"${CMAKE_CURRENT_LIST_DIR}"
|
||||
@@ -146,18 +146,3 @@ add_qtc_library(ClangSupport
|
||||
if (NOT TARGET libclang)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# For the developer build directory
|
||||
qtc_copy_to_builddir(copy_clang_to_builddir
|
||||
DIRECTORIES "${LLVM_LIBRARY_DIR}/clang/${CLANG_VERSION}/include"
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/lib/clang/${CLANG_VERSION}/include"
|
||||
)
|
||||
|
||||
foreach(executable clang clang-cl clangd clang-tidy clazy-standalone)
|
||||
if (EXISTS "${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
qtc_copy_to_builddir(copy_clang_${executable}_to_builddir
|
||||
FILES "${LLVM_TOOLS_BINARY_DIR}/${executable}${CMAKE_EXECUTABLE_SUFFIX}"
|
||||
DESTINATION "${IDE_LIBEXEC_PATH}/clang/bin/"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -62,6 +62,8 @@ void NameValueValidator::fixup(QString &input) const
|
||||
{
|
||||
Q_UNUSED(input)
|
||||
|
||||
if (!m_index.isValid())
|
||||
return;
|
||||
QPoint pos = m_view->mapToGlobal(m_view->visualRect(m_index).topLeft());
|
||||
pos -= Utils::ToolTip::offsetFromPosition();
|
||||
Utils::ToolTip::show(pos, m_toolTipText);
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "utils_global.h"
|
||||
|
||||
#include <QModelIndex>
|
||||
#include <QPersistentModelIndex>
|
||||
#include <QTimer>
|
||||
#include <QValidator>
|
||||
|
||||
@@ -52,7 +53,7 @@ private:
|
||||
const QString m_toolTipText;
|
||||
Utils::NameValueModel *m_model;
|
||||
QTreeView *m_view;
|
||||
QModelIndex m_index;
|
||||
QPersistentModelIndex m_index;
|
||||
mutable QTimer m_hideTipTimer;
|
||||
};
|
||||
} // namespace Utils
|
||||
|
||||
@@ -481,10 +481,12 @@ SynchronousProcessResponse SynchronousProcess::run(const CommandLine &cmd,
|
||||
// only with the OpenMode
|
||||
d->m_process.setProgram(cmd.executable().toString());
|
||||
d->m_process.setArguments(cmd.splitArguments());
|
||||
if (!writeData.isEmpty()) {
|
||||
connect(&d->m_process, &QProcess::started, this, [this, writeData] {
|
||||
d->m_process.write(writeData);
|
||||
d->m_process.closeWriteChannel();
|
||||
});
|
||||
}
|
||||
d->m_process.start(writeData.isEmpty() ? QIODevice::ReadOnly : QIODevice::ReadWrite);
|
||||
|
||||
// On Windows, start failure is triggered immediately if the
|
||||
|
||||
@@ -478,6 +478,7 @@ void BackendCommunicator::documentsClosed(const FileContainers &fileContainers)
|
||||
{
|
||||
const DocumentsClosedMessage message(fileContainers);
|
||||
m_sender->documentsClosed(message);
|
||||
documentVisibilityChanged(); // QTCREATORBUG-25193
|
||||
}
|
||||
|
||||
void BackendCommunicator::unsavedFilesUpdated(const FileContainers &fileContainers)
|
||||
|
||||
@@ -4150,6 +4150,9 @@ void GdbEngine::setupInferior()
|
||||
// Do that first, otherwise no symbols are loaded.
|
||||
QFileInfo fi = executable.toFileInfo();
|
||||
QString path = fi.absoluteFilePath();
|
||||
// This is *not* equivalent to -file-exec-and-symbols. If the file is not executable
|
||||
// (contains only debugging symbols), this should still work.
|
||||
runCommand({"-file-exec-file \"" + path + '"'});
|
||||
runCommand({"-file-symbol-file \"" + path + '"',
|
||||
CB(handleFileExecAndSymbols)});
|
||||
|
||||
|
||||
@@ -342,10 +342,15 @@ static BuildConfiguration *currentBuildConfiguration()
|
||||
return target ? target->activeBuildConfiguration() : nullptr;
|
||||
}
|
||||
|
||||
static BuildConfiguration *activeBuildConfiguration()
|
||||
static Target *activeTarget()
|
||||
{
|
||||
const Project * const project = SessionManager::startupProject();
|
||||
const Target * const target = project ? project->activeTarget() : nullptr;
|
||||
return project ? project->activeTarget() : nullptr;
|
||||
}
|
||||
|
||||
static BuildConfiguration *activeBuildConfiguration()
|
||||
{
|
||||
const Target * const target = activeTarget();
|
||||
return target ? target->activeBuildConfiguration() : nullptr;
|
||||
}
|
||||
|
||||
@@ -1862,6 +1867,20 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
return project->projectFilePath().toString();
|
||||
return {};
|
||||
});
|
||||
expander->registerVariable("ActiveProject:Kit:Name",
|
||||
"The name of the active project's active kit.", // TODO: tr()
|
||||
[]() -> QString {
|
||||
if (const Target * const target = activeTarget())
|
||||
return target->kit()->displayName();
|
||||
return {};
|
||||
});
|
||||
expander->registerVariable("ActiveProject:BuildConfig:Name",
|
||||
"The name of the active project's active build configuration.", // TODO: tr()
|
||||
[]() -> QString {
|
||||
if (const BuildConfiguration * const bc = activeBuildConfiguration())
|
||||
return bc->displayName();
|
||||
return {};
|
||||
});
|
||||
expander->registerVariable("ActiveProject:BuildConfig:Type",
|
||||
tr("The type of the active project's active build configuration."),
|
||||
[]() -> QString {
|
||||
|
||||
@@ -74,8 +74,8 @@ bool SignalListFilterModel::filterAcceptsRow(int sourceRow, const QModelIndex &s
|
||||
QModelIndex targetIndex = sourceModel()->index(sourceRow, SignalListModel::TargetColumn, sourceParent);
|
||||
QModelIndex signalIndex = sourceModel()->index(sourceRow, SignalListModel::SignalColumn, sourceParent);
|
||||
|
||||
return (sourceModel()->data(targetIndex).toString().contains(filterRegExp())
|
||||
|| sourceModel()->data(signalIndex).toString().contains(filterRegExp()));
|
||||
return (sourceModel()->data(targetIndex).toString().contains(filterRegularExpression())
|
||||
|| sourceModel()->data(signalIndex).toString().contains(filterRegularExpression()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -118,8 +118,14 @@ void SignalListDialog::initialize(QStandardItemModel *model)
|
||||
header->setStretchLastSection(false);
|
||||
|
||||
auto eventFilterFun = [this](const QString &str) {
|
||||
if (auto *fm = qobject_cast<SignalListFilterModel *>(m_table->model()))
|
||||
fm->setFilterFixedString(str);
|
||||
if (auto *fm = qobject_cast<SignalListFilterModel *>(m_table->model())) {
|
||||
const QRegularExpression::PatternOption option
|
||||
= fm->filterCaseSensitivity() == Qt::CaseInsensitive
|
||||
? QRegularExpression::CaseInsensitiveOption
|
||||
: QRegularExpression::NoPatternOption;
|
||||
fm->setFilterRegularExpression(
|
||||
QRegularExpression(QRegularExpression::escape(str), option));
|
||||
}
|
||||
};
|
||||
connect(m_searchLine, &Utils::FancyLineEdit::filterChanged, eventFilterFun);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user