forked from qt-creator/qt-creator
Don't route request for chunk actions through diff doc
Change-Id: Ia2c052ab4a39e99466d697b44b5d58a574408fb0 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -25,8 +25,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "diffeditorcontroller.h"
|
||||
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <coreplugin/idocument.h>
|
||||
#include <utils/guard.h>
|
||||
|
@@ -66,6 +66,7 @@ public:
|
||||
static DiffEditorController *controller(Core::IDocument *document);
|
||||
|
||||
void branchesReceived(const QString &branches);
|
||||
void requestChunkActions(QMenu *menu, int diffFileIndex, int chunkIndex);
|
||||
|
||||
signals:
|
||||
void chunkActionsRequested(QMenu *menu, bool isValid);
|
||||
@@ -87,7 +88,6 @@ protected:
|
||||
|
||||
private:
|
||||
void requestMoreInformation();
|
||||
void requestChunkActions(QMenu *menu, int diffFileIndex, int chunkIndex);
|
||||
|
||||
Internal::DiffEditorDocument *const m_document;
|
||||
|
||||
|
@@ -71,8 +71,6 @@ void DiffEditorDocument::setController(DiffEditorController *controller)
|
||||
m_controller = controller;
|
||||
|
||||
if (m_controller) {
|
||||
connect(this, &DiffEditorDocument::chunkActionsRequested,
|
||||
m_controller, &DiffEditorController::requestChunkActions);
|
||||
connect(this, &DiffEditorDocument::requestMoreInformation,
|
||||
m_controller, &DiffEditorController::requestMoreInformation);
|
||||
}
|
||||
|
@@ -90,7 +90,6 @@ signals:
|
||||
void temporaryStateChanged();
|
||||
void documentChanged();
|
||||
void descriptionChanged();
|
||||
void chunkActionsRequested(QMenu *menu, int diffFileIndex, int chunkIndex);
|
||||
void requestMoreInformation();
|
||||
|
||||
private:
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "diffeditorwidgetcontroller.h"
|
||||
#include "diffeditorconstants.h"
|
||||
#include "diffeditorcontroller.h"
|
||||
#include "diffeditordocument.h"
|
||||
|
||||
#include <coreplugin/documentmanager.h>
|
||||
@@ -247,7 +248,8 @@ bool DiffEditorWidgetController::setAndVerifyIndexes(QMenu *menu,
|
||||
if (m_contextMenuChunkIndex >= fileData.chunks.count())
|
||||
return false;
|
||||
|
||||
m_document->chunkActionsRequested(menu, diffFileIndex, chunkIndex);
|
||||
if (DiffEditorController *controller = m_document->controller())
|
||||
controller->requestChunkActions(menu, diffFileIndex, chunkIndex);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user