CMake: Do not ask to rebuild after editing CMakeLists.txt files

This happens automatically now, do not bother the user with that
anymore.

Change-Id: Icc411e74ea5de42037f3718c6b75cc15772a64b9
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2016-02-12 15:32:27 +01:00
parent c1a914197c
commit 761d480453
3 changed files with 0 additions and 41 deletions

View File

@@ -35,7 +35,6 @@
#include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
#include <extensionsystem/pluginmanager.h>
@@ -62,37 +61,6 @@ namespace Internal {
// CMakeEditor
//
CMakeEditor::CMakeEditor()
{
}
void CMakeEditor::finalizeInitialization()
{
connect(document(), &IDocument::changed, [this]() {
BaseTextDocument *document = textDocument();
if (!document->isModified())
return;
InfoBar *infoBar = document->infoBar();
Id infoRunCMake("CMakeEditor.RunCMake");
if (!infoBar->canInfoBeAdded(infoRunCMake))
return;
InfoBarEntry info(infoRunCMake,
tr("Changes to cmake files are shown in the project tree after building."),
InfoBarEntry::GlobalSuppressionEnabled);
info.setCustomButtonInfo(tr("Build now"), [document]() {
foreach (Project *p, SessionManager::projects()) {
if (CMakeProject *cmakeProject = qobject_cast<CMakeProject *>(p)) {
if (cmakeProject->isProjectFile(document->filePath())) {
ProjectExplorerPlugin::buildProject(cmakeProject);
break;
}
}
}
});
infoBar->addInfo(info);
});
}
QString CMakeEditor::contextHelpId() const
{
int pos = position();