forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/3.2'
Conflicts: qtcreator.pri qtcreator.qbs src/plugins/coreplugin/editormanager/editormanager.cpp src/plugins/projectexplorer/editorconfiguration.cpp src/plugins/projectexplorer/projectfilewizardextension.cpp src/plugins/qmakeandroidsupport/createandroidmanifestwizard.cpp Change-Id: I8de0f6fcdd8d214fbc14e79f74cb0206e6e2c6c1
This commit is contained in:
@@ -134,6 +134,10 @@ void UnifiedDiffEditorWidget::setDiffEditorGuiController(
|
||||
this, SLOT(clearAll(QString)));
|
||||
disconnect(m_controller, SIGNAL(diffFilesChanged(QList<FileData>,QString)),
|
||||
this, SLOT(setDiff(QList<FileData>,QString)));
|
||||
disconnect(m_controller, SIGNAL(saveStateRequested()),
|
||||
this, SLOT(saveStateRequested()));
|
||||
disconnect(m_controller, SIGNAL(restoreStateRequested()),
|
||||
this, SLOT(restoreStateRequested()));
|
||||
|
||||
disconnect(m_guiController, SIGNAL(currentDiffFileIndexChanged(int)),
|
||||
this, SLOT(setCurrentDiffFileIndex(int)));
|
||||
@@ -149,6 +153,10 @@ void UnifiedDiffEditorWidget::setDiffEditorGuiController(
|
||||
this, SLOT(clearAll(QString)));
|
||||
connect(m_controller, SIGNAL(diffFilesChanged(QList<FileData>,QString)),
|
||||
this, SLOT(setDiff(QList<FileData>,QString)));
|
||||
connect(m_controller, SIGNAL(saveStateRequested()),
|
||||
this, SLOT(saveStateRequested()));
|
||||
connect(m_controller, SIGNAL(restoreStateRequested()),
|
||||
this, SLOT(restoreStateRequested()));
|
||||
|
||||
connect(m_guiController, SIGNAL(currentDiffFileIndexChanged(int)),
|
||||
this, SLOT(setCurrentDiffFileIndex(int)));
|
||||
@@ -158,6 +166,23 @@ void UnifiedDiffEditorWidget::setDiffEditorGuiController(
|
||||
}
|
||||
}
|
||||
|
||||
void UnifiedDiffEditorWidget::saveStateRequested()
|
||||
{
|
||||
if (!m_state.isNull())
|
||||
return;
|
||||
|
||||
m_state = saveState();
|
||||
}
|
||||
|
||||
void UnifiedDiffEditorWidget::restoreStateRequested()
|
||||
{
|
||||
if (m_state.isNull())
|
||||
return;
|
||||
|
||||
restoreState(m_state);
|
||||
m_state.clear();
|
||||
}
|
||||
|
||||
DiffEditorGuiController *UnifiedDiffEditorWidget::diffEditorGuiController() const
|
||||
{
|
||||
return m_guiController;
|
||||
@@ -613,7 +638,9 @@ QString UnifiedDiffEditorWidget::showChunk(const ChunkData &chunkData,
|
||||
+ QString::number(chunkData.rightStartingLineNumber+ 1)
|
||||
+ QLatin1Char(',')
|
||||
+ QString::number(rightLineCount)
|
||||
+ QLatin1String(" @@\n");
|
||||
+ QLatin1String(" @@")
|
||||
+ chunkData.contextInfo
|
||||
+ QLatin1Char('\n');
|
||||
|
||||
diffText.prepend(chunkLine);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user