diff options
author | Yuchen Deng <loaden@gmail.com> | 2011-10-21 09:30:56 +0000 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2011-10-21 11:42:28 +0200 |
commit | 08f97b50d71a2b16b76659b82062a3d438195990 (patch) | |
tree | e53b860e1aeb6d3604bbbf79e60c92f3bb19aa00 /src/plugins/perforce/perforcesubmiteditor.cpp | |
parent | 5801841130cf89917ba05df3d49c9d0eb63fdbd3 (diff) | |
download | qt-creator-08f97b50d71a2b16b76659b82062a3d438195990.tar.gz |
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>
Diffstat (limited to 'src/plugins/perforce/perforcesubmiteditor.cpp')
-rw-r--r-- | src/plugins/perforce/perforcesubmiteditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<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) |