Extending Qt Creator Manual | TextFileFormat

Extending Qt Creator Manual 4.7.0

# TextFileFormat Class

(Utils::TextFileFormat)

- List of all members, including inherited members

## Public Types

enum | LineTerminationMode { LFLineTerminator, CRLFLineTerminator, NativeLineTerminator }
enum | ReadResult { ReadSuccess, ReadEncodingError, ReadMemoryAllocationError, ReadIOError }

## Public Functions

| TextFileFormat()
bool | decode(const QByteArray &data, QString *target) const
bool | decode(const QByteArray &data, QStringList *target) const
bool | writeFile(const QString &fileName, QString plainText, QString *errorString) const

## Static Public Members

QByteArray | decodingErrorSample(const QByteArray &data)
Utils::TextFileFormat | detect(const QByteArray &data)
Utils::TextFileFormat::ReadResult | readFile(const QString &fileName, const QTextCodec *defaultCodec, QStringList *plainText, Utils::TextFileFormat *format, QString *errorString, QByteArray *decodingErrorSample = nullptr)
Utils::TextFileFormat::ReadResult | readFile(const QString &fileName, const QTextCodec *defaultCodec, QString *plainText, Utils::TextFileFormat *format, QString *errorString, QByteArray *decodingErrorSample = nullptr)
Utils::TextFileFormat::ReadResult | readFileUTF8(const QString &fileName, const QTextCodec *defaultCodec, QByteArray *plainText, QString *errorString)

## Member Type Documentation

### enum TextFileFormat::LineTerminationMode

### enum TextFileFormat::ReadResult

## Member Function Documentation

### TextFileFormat::TextFileFormat()

Default constructs an instance of TextFileFormat.

### bool TextFileFormat::decode(const QByteArray &data, QString *target) const

### bool TextFileFormat::decode(const QByteArray &data, QStringList *target) const

### `[static]` QByteArray TextFileFormat::decodingErrorSample(const QByteArray &data)

### `[static]` Utils::TextFileFormat TextFileFormat::detect(const QByteArray &data)

### `[static]` Utils::TextFileFormat::ReadResult TextFileFormat::readFile(const QString &fileName, const QTextCodec *defaultCodec, QStringList *plainText, Utils::TextFileFormat *format, QString *errorString, QByteArray *decodingErrorSample = nullptr)

### `[static]` Utils::TextFileFormat::ReadResult TextFileFormat::readFile(const QString &fileName, const QTextCodec *defaultCodec, QString *plainText, Utils::TextFileFormat *format, QString *errorString, QByteArray *decodingErrorSample = nullptr)

### `[static]` Utils::TextFileFormat::ReadResult TextFileFormat::readFileUTF8(const QString &fileName, const QTextCodec *defaultCodec, QByteArray *plainText, QString *errorString)

### bool TextFileFormat::writeFile(const QString &fileName, QString plainText, QString *errorString) const