From 0b414df5b25a9e473cac58a65ad8149e8b68904f Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Thu, 16 Dec 2021 17:56:42 +0800 Subject: [PATCH] - fix: auto add 32-bit compiler sets for TDM64-GCC --- RedPandaIDE/compiler/compiler.cpp | 5 +++-- RedPandaIDE/widgets/cpudialog.ui | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/RedPandaIDE/compiler/compiler.cpp b/RedPandaIDE/compiler/compiler.cpp index 50c83e2a..3954ed4f 100644 --- a/RedPandaIDE/compiler/compiler.cpp +++ b/RedPandaIDE/compiler/compiler.cpp @@ -529,8 +529,8 @@ void Compiler::runCommand(const QString &cmd, const QString &arguments, const Q bool errorOccurred = false; process.setProgram(cmd); QString cmdDir = extractFileDir(cmd); + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); if (!cmdDir.isEmpty()) { - QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); QString path = env.value("PATH"); if (path.isEmpty()) { path = cmdDir; @@ -538,8 +538,9 @@ void Compiler::runCommand(const QString &cmd, const QString &arguments, const Q path = cmdDir + PATH_SEPARATOR + path; } env.insert("PATH",path); - process.setProcessEnvironment(env); } + env.insert("LANG","en"); + process.setProcessEnvironment(env); process.setArguments(QProcess::splitCommand(arguments)); process.setWorkingDirectory(workingDir); diff --git a/RedPandaIDE/widgets/cpudialog.ui b/RedPandaIDE/widgets/cpudialog.ui index dc3b809a..fb613d2f 100644 --- a/RedPandaIDE/widgets/cpudialog.ui +++ b/RedPandaIDE/widgets/cpudialog.ui @@ -181,9 +181,27 @@ QAbstractItemView::NoEditTriggers + + false + + + false + + + QAbstractItemView::NoDragDrop + + + Qt::IgnoreAction + true + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + Qt::ElideNone