forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.14'
Change-Id: I26a53ef81a54a2f7aa482448118298895b712941
This commit is contained in:
@@ -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