Merge commit '52b9fcca2ddd5d5e95c6e13cbded018699c7dd68' (origin/2.0)

Conflicts:
	src/plugins/debugger/debuggeragents.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
	src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationwidget.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemosshthread.cpp
	src/plugins/qt4projectmanager/qt-maemo/maemosshthread.h
This commit is contained in:
con
2010-07-13 11:31:05 +02:00
22 changed files with 844 additions and 625 deletions

View File

@@ -163,7 +163,16 @@ bool BaseTextDocument::save(const QString &fileName)
{
QTextCursor cursor(m_document);
// When saving the current editor, make sure to maintain the cursor position for undo
Core::IEditor *currentEditor = Core::EditorManager::instance()->currentEditor();
if (BaseTextEditorEditable *editable = qobject_cast<BaseTextEditorEditable*>(currentEditor)) {
if (editable->file() == this)
cursor = editable->editor()->textCursor();
}
cursor.beginEditBlock();
cursor.movePosition(QTextCursor::Start);
if (m_storageSettings.m_cleanWhitespace)
cleanWhitespace(cursor, m_storageSettings.m_cleanIndentation, m_storageSettings.m_inEntireDocument);
if (m_storageSettings.m_addFinalNewLine)