Remove spaces before EOL

This commit is contained in:
Boris Zentner 2017-10-23 21:37:52 +02:00 committed by Robin Stuart
parent 45441a6da7
commit 31cc0ae78a
70 changed files with 906 additions and 844 deletions

View file

@ -41,7 +41,7 @@ DataWindow::DataWindow(const QString &input)
setupUi(this);
txtDataInput->setPlainText(input);
txtDataInput->moveCursor(QTextCursor::End, QTextCursor::MoveAnchor);
connect(btnCancel, SIGNAL( clicked( bool )), SLOT(quit_now()));
connect(btnReset, SIGNAL( clicked( bool )), SLOT(clear_data()));
connect(btnOK, SIGNAL( clicked( bool )), SLOT(okay()));
@ -81,7 +81,7 @@ void DataWindow::from_file()
open_dialog.setWindowTitle("Open File");
open_dialog.setDirectory(settings.value("studio/default_dir", QDir::toNativeSeparators(QDir::homePath())).toString());
if (open_dialog.exec()) {
filename = open_dialog.selectedFiles().at(0);
} else {
@ -93,14 +93,14 @@ void DataWindow::from_file()
QMessageBox::critical(this, tr("Open Error"), tr("Could not open selected file."));
return;
}
outstream = file.readAll();
/* Allow some non-printing (control) characters to be read from file
by converting them to escape sequences */
escape_string.clear();
escape_string.append(QString(outstream));
escape_string.replace((QChar)'\\', (QString)"\\\\", Qt::CaseInsensitive);
escape_string.replace((QChar)0x04, (QString)"\\E", Qt::CaseInsensitive); /* End of Transmission */
escape_string.replace((QChar)'\a', (QString)"\\a", Qt::CaseInsensitive); /* Bell */
@ -112,9 +112,9 @@ void DataWindow::from_file()
escape_string.replace((QChar)0x1b, (QString)"\\e", Qt::CaseInsensitive); /* Escape */
escape_string.replace((QChar)0x1d, (QString)"\\G", Qt::CaseInsensitive); /* Group Separator */
escape_string.replace((QChar)0x1e, (QString)"\\R", Qt::CaseInsensitive); /* Record Separator */
txtDataInput->setPlainText(QString(escape_string));
file.close();
settings.setValue("studio/default_dir", filename.mid(0, filename.lastIndexOf(QDir::separator())));
}
}