From 52ed2b79f7c7f81c56d29d4cb84b018269fdb3b2 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 25 Dec 2022 12:01:51 +0800 Subject: [PATCH] auto remove a.out generead by tcc --- RedPandaIDE/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index b3262727..fdbcb31f 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -5455,7 +5455,11 @@ void MainWindow::onCompileFinished(QString filename, bool isCheckSyntax) if (isCheckSyntax) { if (!CompilerInfoManager::supportSyntaxCheck(pSettings->compilerSets().defaultSet()->compilerType())) { QDir dir(extractFileDir(filename)); +#ifdef Q_OS_WIN QFile::remove(dir.absoluteFilePath("a.exe")); +#else + QFile::remove(dir.absoluteFilePath("a.out")); +#endif } // check syntax in back, don't change message panel