diff --git a/src/libs/3rdparty/cplusplus/Parser.cpp b/src/libs/3rdparty/cplusplus/Parser.cpp index 54b7c045703..b5cf315e64f 100644 --- a/src/libs/3rdparty/cplusplus/Parser.cpp +++ b/src/libs/3rdparty/cplusplus/Parser.cpp @@ -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: diff --git a/src/libs/3rdparty/cplusplus/QtContextKeywords.cpp b/src/libs/3rdparty/cplusplus/QtContextKeywords.cpp index ce7bd0a1dde..f903b2b9b21 100644 --- a/src/libs/3rdparty/cplusplus/QtContextKeywords.cpp +++ b/src/libs/3rdparty/cplusplus/QtContextKeywords.cpp @@ -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; } diff --git a/src/libs/3rdparty/cplusplus/QtContextKeywords.h b/src/libs/3rdparty/cplusplus/QtContextKeywords.h index 42dce9b917d..f5d39a49cfc 100644 --- a/src/libs/3rdparty/cplusplus/QtContextKeywords.h +++ b/src/libs/3rdparty/cplusplus/QtContextKeywords.h @@ -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); diff --git a/src/libs/clangsupport/CMakeLists.txt b/src/libs/clangsupport/CMakeLists.txt index dcaa4647101..93487a9f946 100644 --- a/src/libs/clangsupport/CMakeLists.txt +++ b/src/libs/clangsupport/CMakeLists.txt @@ -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() diff --git a/src/libs/utils/namevaluevalidator.cpp b/src/libs/utils/namevaluevalidator.cpp index 580a476e01e..be4506b28df 100644 --- a/src/libs/utils/namevaluevalidator.cpp +++ b/src/libs/utils/namevaluevalidator.cpp @@ -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); diff --git a/src/libs/utils/namevaluevalidator.h b/src/libs/utils/namevaluevalidator.h index 508fc78e54f..c81dbe2e5bd 100644 --- a/src/libs/utils/namevaluevalidator.h +++ b/src/libs/utils/namevaluevalidator.h @@ -29,6 +29,7 @@ #include "utils_global.h" #include +#include #include #include @@ -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 diff --git a/src/libs/utils/synchronousprocess.cpp b/src/libs/utils/synchronousprocess.cpp index 0845e4b8034..d722801efb6 100644 --- a/src/libs/utils/synchronousprocess.cpp +++ b/src/libs/utils/synchronousprocess.cpp @@ -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()); - connect(&d->m_process, &QProcess::started, this, [this, writeData] { - d->m_process.write(writeData); - d->m_process.closeWriteChannel(); - }); + 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 diff --git a/src/plugins/clangcodemodel/clangbackendcommunicator.cpp b/src/plugins/clangcodemodel/clangbackendcommunicator.cpp index 98a44a5a4ad..569645bd2de 100644 --- a/src/plugins/clangcodemodel/clangbackendcommunicator.cpp +++ b/src/plugins/clangcodemodel/clangbackendcommunicator.cpp @@ -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) diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 50cab2e1566..e09cbae8fab 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -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)}); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index eb24142bd67..f2d3bbfa211 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -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 { diff --git a/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp b/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp index c3f0ddb0e58..915518c67a7 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/signallist.cpp @@ -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())); } diff --git a/src/plugins/qmldesigner/components/bindingeditor/signallistdialog.cpp b/src/plugins/qmldesigner/components/bindingeditor/signallistdialog.cpp index fde8c9649b8..faa04ab3b72 100644 --- a/src/plugins/qmldesigner/components/bindingeditor/signallistdialog.cpp +++ b/src/plugins/qmldesigner/components/bindingeditor/signallistdialog.cpp @@ -118,8 +118,14 @@ void SignalListDialog::initialize(QStandardItemModel *model) header->setStretchLastSection(false); auto eventFilterFun = [this](const QString &str) { - if (auto *fm = qobject_cast(m_table->model())) - fm->setFilterFixedString(str); + if (auto *fm = qobject_cast(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); }