Extending Qt Creator Manual | TextFileFormat

Extending Qt Creator Manual 4.7.0

# TextFileFormat Class

(Debugger::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 Debugger::QByteArray &data, Debugger::QString *target) const
bool | decode(const Debugger::QByteArray &data, Debugger::QStringList *target) const
bool | writeFile(const Debugger::QString &fileName, Debugger::QString plainText, Debugger::QString *errorString) const

## Static Public Members

Debugger::QByteArray | decodingErrorSample(const Debugger::QByteArray &data)
Debugger::Utils::TextFileFormat | detect(const Debugger::QByteArray &data)
Debugger::Utils::TextFileFormat::ReadResult | readFile(const Debugger::QString &fileName, const Debugger::QTextCodec *defaultCodec, Debugger::QStringList *plainText, Debugger::Utils::TextFileFormat *format, Debugger::QString *errorString, Debugger::QByteArray *decodingErrorSample = nullptr)
Debugger::Utils::TextFileFormat::ReadResult | readFile(const Debugger::QString &fileName, const Debugger::QTextCodec *defaultCodec, Debugger::QString *plainText, Debugger::Utils::TextFileFormat *format, Debugger::QString *errorString, Debugger::QByteArray *decodingErrorSample = nullptr)
Debugger::Utils::TextFileFormat::ReadResult | readFileUTF8(const Debugger::QString &fileName, const Debugger::QTextCodec *defaultCodec, Debugger::QByteArray *plainText, Debugger::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 Debugger::QByteArray &data, Debugger::QString *target) const

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

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

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

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

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

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

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