From 78dee1a5c1e8aee12fcd75dc69d33572bdcd4eab Mon Sep 17 00:00:00 2001 From: rabix Date: Mon, 30 Sep 2024 16:41:42 +0800 Subject: [PATCH] remove watch and debug --- RedPandaIDE/compiler/compiler.cpp | 8 ++++++++ RedPandaIDE/compiler/compiler.h | 1 + RedPandaIDE/compiler/filecompiler.cpp | 2 ++ RedPandaIDE/compiler/projectcompiler.cpp | 2 ++ RedPandaIDE/compiler/projectcompiler.h | 1 + RedPandaIDE/settings.cpp | 12 +++++++----- 6 files changed, 21 insertions(+), 5 deletions(-) diff --git a/RedPandaIDE/compiler/compiler.cpp b/RedPandaIDE/compiler/compiler.cpp index e8ef1640..245100f9 100644 --- a/RedPandaIDE/compiler/compiler.cpp +++ b/RedPandaIDE/compiler/compiler.cpp @@ -861,6 +861,14 @@ void Compiler::setRebuild(bool isRebuild) mRebuild = isRebuild; } +QStringList Compiler::getReflextiveArguments() +{ + QStringList result{ + "-Wall", "-Werror", "-Wextra", "-pedantic", "-Wconversion" + }; + return result; +} + void Compiler::log(const QString &msg) { emit compileOutput(msg); diff --git a/RedPandaIDE/compiler/compiler.h b/RedPandaIDE/compiler/compiler.h index 852699ba..e3cd2fbe 100644 --- a/RedPandaIDE/compiler/compiler.h +++ b/RedPandaIDE/compiler/compiler.h @@ -83,6 +83,7 @@ protected: virtual bool parseForceUTF8ForAutolink( const QString& filename, QSet& parsedFiles); + virtual QStringList getReflextiveArguments(); void log(const QString& msg); void error(const QString& msg); void runCommand(const QString& cmd, const QStringList& arguments, const QString& workingDir, const QByteArray& inputText=QByteArray(), const QString& outputFile=QString()); diff --git a/RedPandaIDE/compiler/filecompiler.cpp b/RedPandaIDE/compiler/filecompiler.cpp index e50e58e3..313cc293 100644 --- a/RedPandaIDE/compiler/filecompiler.cpp +++ b/RedPandaIDE/compiler/filecompiler.cpp @@ -125,6 +125,7 @@ bool FileCompiler::prepareForCompile() mArguments += getCCompileArguments(mOnlyCheckSyntax); mArguments += getCIncludeArguments(); mArguments += getProjectIncludeArguments(); + mArguments += getReflextiveArguments(); strFileType = "C"; mCompiler = compilerSet()->CCompiler(); break; @@ -132,6 +133,7 @@ bool FileCompiler::prepareForCompile() mArguments += getCppCompileArguments(mOnlyCheckSyntax); mArguments += getCppIncludeArguments(); mArguments += getProjectIncludeArguments(); + mArguments += getReflextiveArguments(); strFileType = "C++"; mCompiler = compilerSet()->cppCompiler(); break; diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp index 4d29a0e8..5f4d3f54 100644 --- a/RedPandaIDE/compiler/projectcompiler.cpp +++ b/RedPandaIDE/compiler/projectcompiler.cpp @@ -249,6 +249,8 @@ void ProjectCompiler::writeMakeDefines(QFile &file, bool &genModuleDef) cIncludeArguments += getProjectIncludeArguments(); QStringList cxxIncludeArguments = getCppIncludeArguments(); cxxIncludeArguments += getProjectIncludeArguments(); + cxxIncludeArguments += getReflextiveArguments(); + cIncludeArguments += getReflextiveArguments(); #ifdef Q_OS_WIN QStringList resourceArguments = parseArguments(mProject->options().resourceCmd, devCppMacroVariables(), true); #endif diff --git a/RedPandaIDE/compiler/projectcompiler.h b/RedPandaIDE/compiler/projectcompiler.h index acdaa42b..1e676461 100644 --- a/RedPandaIDE/compiler/projectcompiler.h +++ b/RedPandaIDE/compiler/projectcompiler.h @@ -50,6 +50,7 @@ private: // Compiler interface private: bool mOnlyClean; + protected: bool prepareForCompile() override; bool prepareForRebuild() override; diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index 4febc731..19b761b5 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -3249,9 +3249,11 @@ void Settings::CompilerSets::findSets() #ifdef Q_OS_WIN pathList = QStringList{ mSettings->dirs().appDir() + "/clang64/bin", + mSettings->dirs().appDir() + "/clang/bin", mSettings->dirs().appDir() + "/mingw64/bin", mSettings->dirs().appDir() + "/mingw32/bin", - } + pathList; + mSettings->dirs().appDir() + "/nuwen/bin", + };// + pathList; #endif QString folder, canonicalFolder; for (int i=pathList.count()-1;i>=0;i--) { @@ -6328,7 +6330,7 @@ void Settings::UI::doSave() saveValue("show_tool_windowbars", mShowToolWindowBars); saveValue("show_project", mShowProject); - saveValue("show_watch", mShowWatch); + saveValue("show_watch", false); saveValue("show_structure", mShowStructure); saveValue("show_file", mShowFiles); saveValue("show_problem_set", mShowProblemSet); @@ -6393,15 +6395,15 @@ void Settings::UI::doLoad() mShowStatusBar = boolValue("show_statusbar",true); mShowToolWindowBars = boolValue("show_tool_windowbars",true); - mShowProject = boolValue("show_project",true); - mShowWatch = boolValue("show_watch",true); + mShowProject = boolValue("show_project",false); + mShowWatch = false; mShowStructure = boolValue("show_structure",true); mShowFiles = boolValue("show_file",true); mShowProblemSet = boolValue("show_problem_set",true); mShowIssues = boolValue("show_issues",true); mShowCompileLog = boolValue("show_compile_log",true); - mShowDebug = boolValue("show_debug",true); + mShowDebug = false; mShowSearch = boolValue("show_search",true); mShowTODO = boolValue("show_todo",true); mShowBookmark = boolValue("show_bookmark",true);