From 08f97b50d71a2b16b76659b82062a3d438195990 Mon Sep 17 00:00:00 2001 From: Yuchen Deng Date: Fri, 21 Oct 2011 09:30:56 +0000 Subject: 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 --- src/plugins/perforce/perforcesubmiteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/perforce/perforcesubmiteditor.cpp') diff --git a/src/plugins/perforce/perforcesubmiteditor.cpp b/src/plugins/perforce/perforcesubmiteditor.cpp index 591de249e2..ff960a8c8b 100644 --- a/src/plugins/perforce/perforcesubmiteditor.cpp +++ b/src/plugins/perforce/perforcesubmiteditor.cpp @@ -58,7 +58,7 @@ PerforceSubmitEditorWidget *PerforceSubmitEditor::submitEditorWidget() return static_cast(widget()); } -QString PerforceSubmitEditor::fileContents() const +QByteArray PerforceSubmitEditor::fileContents() const { const_cast(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) -- cgit v1.2.1