From 1d1b1e025087fc99702beb14d70ead9291ed6470 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 26 Dec 2018 19:03:23 +0100 Subject: Store lua code as 8 bit ascii instead of utf8. --- src/mainwindow.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mainwindow.cc') diff --git a/src/mainwindow.cc b/src/mainwindow.cc index ba6c779..8271eb6 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -55,7 +55,7 @@ MainWindow::MainWindow(QString p) file.open(QIODevice::ReadOnly); editor->setPlainText(file.readAll()); file.close(); - + out = new OutputWindow(); splitter->addWidget(out); @@ -79,7 +79,7 @@ void MainWindow::reset() QFile file(program); file.open(QIODevice::WriteOnly); QString code = editor->toPlainText(); - file.write(code.toStdString().c_str(), code.length()); + file.write(code.toLocal8Bit()); file.close(); out->stopScript(); l->stopScript(); -- cgit v1.2.3