Git: Support encoding convert of commit messages

We need read i18n.commitEncoding value, to write correct encoding of the commit file.
In Windows OS, the default encoding is GBK, So we need convert to correct encoding of the commit messages.

Change-Id: Id5f35745dba15da2c9ceb1266e0ea537cba7da73
Merge-request: 382
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Yuchen Deng
2011-10-21 09:30:56 +00:00
committed by Tobias Hunger
parent 5801841130
commit 08f97b50d7
8 changed files with 33 additions and 8 deletions

View File

@@ -58,7 +58,7 @@ PerforceSubmitEditorWidget *PerforceSubmitEditor::submitEditorWidget()
return static_cast<PerforceSubmitEditorWidget *>(widget());
}
QString PerforceSubmitEditor::fileContents() const
QByteArray PerforceSubmitEditor::fileContents() const
{
const_cast<PerforceSubmitEditor*>(this)->updateEntries();
QString text;
@@ -70,7 +70,7 @@ QString PerforceSubmitEditor::fileContents() const
}
if (Perforce::Constants::debug)
qDebug() << Q_FUNC_INFO << text;
return text;
return text.toLocal8Bit();
}
bool PerforceSubmitEditor::setFileContents(const QString &contents)