diff options
| author | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-25 13:29:18 +0100 |
|---|---|---|
| committer | Stefan Suhren <suhren.stefan@fh-swf.de> | 2015-03-25 13:29:18 +0100 |
| commit | a2f1b90ba22e59dd19065ac13bd4cd018d58a0ae (patch) | |
| tree | bb7f5290360cd58937112216420395ef838ce502 | |
| parent | 97697af47d881b67b531914e9e47b9d7911178b5 (diff) | |
| download | IT-Sicherheit-a2f1b90ba22e59dd19065ac13bd4cd018d58a0ae.tar.gz IT-Sicherheit-a2f1b90ba22e59dd19065ac13bd4cd018d58a0ae.zip | |
Formats the hex view with spaces
| -rw-r--r-- | src/mainwindow.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4e52e4a..f98fd38 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -98,7 +98,12 @@ void MainWindow::setPlainTextFromFile( QPlainTextEdit* destination, QFile* sourc void MainWindow::setBinaryDataFromFile( QPlainTextEdit* destination, QFile* source ) { destination->clear(); - destination->appendPlainText(source->readAll().toHex()); + QString tmp = source->readAll().toHex().toUpper(); + for(int i = 2; i < tmp.size(); i+=3) + { + tmp.insert(i," "); + } + destination->appendPlainText(tmp); } |
