forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.2'
Conflicts: src/shared/qbs Change-Id: I05c4945d238b7724ca73477fc3b21554564951c0
This commit is contained in:
@@ -480,10 +480,16 @@ void SettingsDialog::showPage(const Id pageId)
|
||||
return; // Unknown settings page, probably due to missing plugin.
|
||||
|
||||
if (initialCategoryIndex != -1) {
|
||||
const QModelIndex modelIndex = m_proxyModel->mapFromSource(m_model->index(initialCategoryIndex));
|
||||
QModelIndex modelIndex = m_proxyModel->mapFromSource(m_model->index(initialCategoryIndex));
|
||||
if (!modelIndex.isValid()) { // filtered out, so clear filter first
|
||||
m_filterLineEdit->setText(QString());
|
||||
modelIndex = m_proxyModel->mapFromSource(m_model->index(initialCategoryIndex));
|
||||
}
|
||||
m_categoryList->setCurrentIndex(modelIndex);
|
||||
if (initialPageIndex != -1)
|
||||
categories.at(initialCategoryIndex)->tabWidget->setCurrentIndex(initialPageIndex);
|
||||
if (initialPageIndex != -1) {
|
||||
if (QTC_GUARD(categories.at(initialCategoryIndex)->tabWidget))
|
||||
categories.at(initialCategoryIndex)->tabWidget->setCurrentIndex(initialPageIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -113,10 +113,10 @@ public:
|
||||
void stashPrompt(const QString &command, const QString &statusOutput, QString *errorMessage);
|
||||
void executeStash(const QString &command, QString *errorMessage);
|
||||
|
||||
StashResult m_stashResult;
|
||||
StashResult m_stashResult = NotStashed;
|
||||
QString m_message;
|
||||
QString m_workingDir;
|
||||
StashFlag m_flags;
|
||||
StashFlag m_flags = Default;
|
||||
PushAction m_pushAction = NoPush;
|
||||
};
|
||||
|
||||
|
||||
@@ -208,10 +208,16 @@ void ProjectTree::update(Node *node, Project *project)
|
||||
}
|
||||
}
|
||||
|
||||
if (!node && Core::EditorManager::currentDocument()) {
|
||||
connect(Core::EditorManager::currentDocument(), &Core::IDocument::changed,
|
||||
this, &ProjectTree::updateExternalFileWarning,
|
||||
Qt::UniqueConnection);
|
||||
if (Core::IDocument *document = Core::EditorManager::currentDocument()) {
|
||||
if (node) {
|
||||
disconnect(document, &Core::IDocument::changed,
|
||||
this, &ProjectTree::updateExternalFileWarning);
|
||||
document->infoBar()->removeInfo(EXTERNAL_FILE_WARNING);
|
||||
} else {
|
||||
connect(document, &Core::IDocument::changed,
|
||||
this, &ProjectTree::updateExternalFileWarning,
|
||||
Qt::UniqueConnection);
|
||||
}
|
||||
}
|
||||
|
||||
if (changedNode) {
|
||||
|
||||
@@ -201,8 +201,21 @@ static void collectFilesForProject(const qbs::ProjectData &project, Project::Fil
|
||||
}
|
||||
if (mode & Project::GeneratedFiles) {
|
||||
foreach (const qbs::ProductData &prd, project.products()) {
|
||||
foreach (const qbs::ArtifactData &artifact, prd.generatedArtifacts())
|
||||
result.insert(artifact.filePath());
|
||||
foreach (const qbs::ArtifactData &artifact, prd.generatedArtifacts()) {
|
||||
// A list of human-readable file types that we can reasonably expect
|
||||
// to get generated during a build. Extend as needed.
|
||||
static const QSet<QString> sourceTags = {
|
||||
QLatin1String("c"), QLatin1String("cpp"), QLatin1String("hpp"),
|
||||
QLatin1String("objc"), QLatin1String("objcpp"),
|
||||
QLatin1String("c_pch_src"), QLatin1String("cpp_pch_src"),
|
||||
QLatin1String("objc_pch_src"), QLatin1String("objcpp_pch_src"),
|
||||
QLatin1String("asm"), QLatin1String("asm_cpp"),
|
||||
QLatin1String("linkerscript"),
|
||||
QLatin1String("qrc"), QLatin1String("java.java")
|
||||
};
|
||||
if (artifact.fileTags().toSet().intersects(sourceTags))
|
||||
result.insert(artifact.filePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user