Extract Core::TextFile from TextEditor::BaseTextDocument.

Use it in BaseTextEditor and Designer to preserve CRLF
of the files.

Task-number: QTCREATORBUG-5901
Change-Id: I7599ce78649a3b09f2e5118d02f8cbf3db27ed31
Reviewed-on: http://codereview.qt.nokia.com/3591
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
Friedemann Kleint
2011-08-25 12:54:20 +02:00
parent e29881015d
commit bd5a1a9bce
13 changed files with 684 additions and 199 deletions

View File

@@ -35,7 +35,7 @@
#include "texteditor_global.h"
#include <coreplugin/ifile.h>
#include <coreplugin/textfile.h>
QT_BEGIN_NAMESPACE
class QTextCursor;
@@ -51,7 +51,7 @@ class ExtraEncodingSettings;
class SyntaxHighlighter;
class BaseTextDocumentPrivate;
class TEXTEDITOR_EXPORT BaseTextDocument : public Core::IFile
class TEXTEDITOR_EXPORT BaseTextDocument : public Core::TextFile
{
Q_OBJECT
@@ -95,11 +95,6 @@ public:
void setSyntaxHighlighter(SyntaxHighlighter *highlighter);
SyntaxHighlighter *syntaxHighlighter() const;
bool hasDecodingError() const;
QTextCodec *codec() const;
void setCodec(QTextCodec *c);
QByteArray decodingErrorSample() const;
bool reload(QString *errorString, QTextCodec *codec);
void cleanWhitespace(const QTextCursor &cursor);