MCPcopy Create free account
hub / github.com/Neverous/efibooteditor / getData

Method getData

src/filepathdialog.cpp:1516–1534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1514}
1515
1516QByteArray FilePathDialog::getData(const QPlainTextEdit &_data, int index) const
1517{
1518 switch(static_cast<DataFormat>(index))
1519 {
1520 case DataFormat::Base64:
1521 return QByteArray::fromBase64(_data.toPlainText().toUtf8());
1522
1523 case DataFormat::Utf16:
1524 return fromUnicode(_data.toPlainText(), "UTF-16");
1525
1526 case DataFormat::Utf8:
1527 return fromUnicode(_data.toPlainText(), "UTF-8");
1528
1529 case DataFormat::Hex:
1530 return QByteArray::fromHex(_data.toPlainText().toUtf8());
1531 }
1532
1533 return {};
1534}
1535
1536void FilePathDialog::dataFormatChanged(int &index, int new_index, QPlainTextEdit &_data, QComboBox &format)
1537{

Callers

nothing calls this directly

Calls 1

fromUnicodeFunction · 0.85

Tested by

no test coverage detected