forked from qt-creator/qt-creator
Compile fix
Change-Id: I0b586bd1b024c3d1f0eaebfc057e85fbedfe72cd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
This commit is contained in:
@@ -196,4 +196,11 @@ void DiffEditorController::requestReload()
|
|||||||
emit reloadRequested();
|
emit reloadRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DiffEditorController::requestChunkActions(QMenu *menu,
|
||||||
|
int diffFileIndex,
|
||||||
|
int chunkIndex)
|
||||||
|
{
|
||||||
|
emit chunkActionsRequested(menu, diffFileIndex, chunkIndex);
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace DiffEditor
|
} // namespace DiffEditor
|
||||||
|
|||||||
@@ -55,11 +55,6 @@ public:
|
|||||||
|
|
||||||
QString makePatch(int diffFileIndex, int chunkIndex, bool revert) const;
|
QString makePatch(int diffFileIndex, int chunkIndex, bool revert) const;
|
||||||
|
|
||||||
signals:
|
|
||||||
void chunkActionsRequested(QMenu *menu,
|
|
||||||
int diffFileIndex,
|
|
||||||
int chunkIndex);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void clear();
|
void clear();
|
||||||
void clear(const QString &message);
|
void clear(const QString &message);
|
||||||
@@ -70,6 +65,9 @@ public slots:
|
|||||||
void setContextLinesNumber(int lines);
|
void setContextLinesNumber(int lines);
|
||||||
void setIgnoreWhitespace(bool ignore);
|
void setIgnoreWhitespace(bool ignore);
|
||||||
void requestReload();
|
void requestReload();
|
||||||
|
void requestChunkActions(QMenu *menu,
|
||||||
|
int diffFileIndex,
|
||||||
|
int chunkIndex);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void cleared(const QString &message);
|
void cleared(const QString &message);
|
||||||
@@ -80,6 +78,10 @@ signals:
|
|||||||
void contextLinesNumberChanged(int lines);
|
void contextLinesNumberChanged(int lines);
|
||||||
void ignoreWhitespaceChanged(bool ignore);
|
void ignoreWhitespaceChanged(bool ignore);
|
||||||
void reloadRequested();
|
void reloadRequested();
|
||||||
|
void chunkActionsRequested(QMenu *menu,
|
||||||
|
int diffFileIndex,
|
||||||
|
int chunkIndex);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_clearMessage;
|
QString m_clearMessage;
|
||||||
|
|||||||
@@ -1266,7 +1266,7 @@ void SideBySideDiffEditorWidget::slotLeftContextMenuRequested(QMenu *menu,
|
|||||||
if (m_contextMenuChunkIndex >= fileData.chunks.count())
|
if (m_contextMenuChunkIndex >= fileData.chunks.count())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit m_controller->chunkActionsRequested(menu, diffFileIndex, chunkIndex);
|
m_controller->requestChunkActions(menu, diffFileIndex, chunkIndex);
|
||||||
|
|
||||||
if (fileData.leftFileInfo.fileName == fileData.rightFileInfo.fileName)
|
if (fileData.leftFileInfo.fileName == fileData.rightFileInfo.fileName)
|
||||||
return;
|
return;
|
||||||
@@ -1301,7 +1301,7 @@ void SideBySideDiffEditorWidget::slotRightContextMenuRequested(QMenu *menu,
|
|||||||
if (m_contextMenuChunkIndex >= fileData.chunks.count())
|
if (m_contextMenuChunkIndex >= fileData.chunks.count())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit m_controller->chunkActionsRequested(menu, diffFileIndex, chunkIndex);
|
m_controller->requestChunkActions(menu, diffFileIndex, chunkIndex);
|
||||||
|
|
||||||
revertAction->setEnabled(true);
|
revertAction->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -259,7 +259,7 @@ void UnifiedDiffEditorWidget::addContextMenuActions(QMenu *menu,
|
|||||||
if (m_contextMenuChunkIndex >= fileData.chunks.count())
|
if (m_contextMenuChunkIndex >= fileData.chunks.count())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
emit m_controller->chunkActionsRequested(menu, diffFileIndex, chunkIndex);
|
m_controller->requestChunkActions(menu, diffFileIndex, chunkIndex);
|
||||||
|
|
||||||
revertAction->setEnabled(true);
|
revertAction->setEnabled(true);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user