diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-25 12:59:48 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-25 12:59:48 +0100 |
| commit | 97697af47d881b67b531914e9e47b9d7911178b5 (patch) | |
| tree | 9d4dde75dc8b5d2146417a387e7f252d62e85ee7 /src/mainwindow.cpp | |
| parent | a1e3d36dca9c6abf235c7ddf47ab9185c4b748d5 (diff) | |
| download | IT-Sicherheit-97697af47d881b67b531914e9e47b9d7911178b5.tar.gz IT-Sicherheit-97697af47d881b67b531914e9e47b9d7911178b5.zip | |
Implemets the binary file reader and writer
Diffstat (limited to 'src/mainwindow.cpp')
| -rw-r--r-- | src/mainwindow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 2c6088e..4e52e4a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -97,7 +97,8 @@ void MainWindow::setPlainTextFromFile( QPlainTextEdit* destination, QFile* sourc void MainWindow::setBinaryDataFromFile( QPlainTextEdit* destination, QFile* source ) { - QMessageBox::warning(this, "WARNING", "The Method MainWindow::setBinaryDataFromFile is not implemented yet.\nEven the Prototype might change soon!"); + destination->clear(); + destination->appendPlainText(source->readAll().toHex()); } @@ -109,7 +110,7 @@ void MainWindow::writePlainTextToFile( QPlainTextEdit* source, QFile* destinatio void MainWindow::writeBinaryDataToFile( QPlainTextEdit* source, QFile* destination ) { - QMessageBox::warning(this, "WARNING", "The Method MainWindow::setBinaryDataFromFile is not implemented yet.\nEven the Prototype will change soon!"); + destination->write(QByteArray::fromHex(QByteArray().append(source->toPlainText()))); } |
