From a3c335eed6018e372fd858fc5b142c4a29ef2698 Mon Sep 17 00:00:00 2001 From: royqh1979 Date: Mon, 25 Oct 2021 21:36:23 +0800 Subject: [PATCH] - fix: options not correctly set when change compiler set in the project settings - change: reset compiler settings when change the project compiler set --- NEWS.md | 2 + RedPandaIDE/RedPandaIDE_zh_CN.qm | Bin 99125 -> 99859 bytes RedPandaIDE/RedPandaIDE_zh_CN.ts | 230 ++++++++++-------- RedPandaIDE/mainwindow.cpp | 12 +- RedPandaIDE/project.cpp | 27 ++ RedPandaIDE/project.h | 2 + RedPandaIDE/projectoptions.h | 1 + RedPandaIDE/settings.cpp | 15 ++ RedPandaIDE/settings.h | 12 +- .../projectcompileparamaterswidget.cpp | 4 - .../projectcompileparamaterswidget.ui | 14 -- .../settingsdialog/projectcompilerwidget.cpp | 12 +- .../settingsdialog/projectcompilerwidget.ui | 36 ++- 13 files changed, 229 insertions(+), 138 deletions(-) diff --git a/NEWS.md b/NEWS.md index 2ae32135..a5b064f7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -14,6 +14,8 @@ Version 0.7.3 - fix: compiler autolinks options widget don't show autolink infos - fix: autolink parameters are repeated when compile single files - enhancement: prompt for filename when create new project unit file + - fix: options not correctly set when change compiler set in the project settings + - change: reset compiler settings when change the project compiler set Version 0.7.2 - fix: rainbow parenthesis stop functioning when change editor's general options diff --git a/RedPandaIDE/RedPandaIDE_zh_CN.qm b/RedPandaIDE/RedPandaIDE_zh_CN.qm index 7256ad45c418b3f5eb5eb3ca39e376d5c9e2cc24..c14595d9061a36f1995823e6bd68d7f4485dcb93 100644 GIT binary patch delta 7501 zcmZ9RXFwF$(uV8wbWaXS7?KP~GA?Ees3-^uDyX0m1SO1$7ePVs>Ry>uTyt&{=8P+* zl~qg#ix^i$%$NhBf?3ox^1aO5yFb2P4?W#|QdPZG)f|{973WJAJDWV467eEY>EGZo zqLa?xa?l@K0geJ!g7d*u;O}4#cpcnN%rgXhN37`~BEgDSb34$NDD$+L%zqOYhTk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&(efCH%4tQwNm(?88Vv3OOFaoj09Er zzP0l0I!#Q-HjDyGG-E3&ph{6Qfkz=ZT!ll=WYw&JWw(O<(HJx-I_R!{UQTa)?>O>glW&B}Qg;DhrtD|evI-`&ux zErrZFywa?f^04(Qa!oxWcWunlhe;pToSU^9 zZw*OPaPR@@tM)!ZuZh&Y zyFZu6@v`;*_9?K&*KqoozHq zXyrGZqYgr9tcP;7;dG-K36PUnH)?MQ+HXDGxY`$uesgr=Z=FG423qLB{7&fNPyCK9Wv7eJ zcZW$H*Tom$LD9ch$Q)kEgBp07OHS)%pE42ao}*g;FJ&#B>Q?o{aplN&-Ksx!;Jx2C z-P)Y~7?~v9x(l$CIa=KY=WVdX54!ZVSpSay=?*+?fI0b^?o93RETarO4DQyQIUk5a zT~@J!vgL6dOZU00RrK{R58?)jq?q@YU+<(dY@&hNc+UxH9h1%K+kCKn>6b#*ms zkb|!tdd2<~P-3oLxuG4=X-~aoGIANcPj49akSM&F-Z&pGkj^iZhr63>`rXqzBt;M< zebhVFo?)NYms8x0HZQ;H1E<1CVvp;CdSU9fy&`A1`qqBYgf>^}<1aphu!Hpp z!I1E7cYQ)Q9@^!yerhQMAH7&Vw=a(D-x}!WsbX=257IAKjo=SBu3uJ$r=4x3U)O&> zUhvh^Z+yogdE@ju)+Z9_?DabI<*Btm?n?)H2KhN!*X|=);p^W zX;tu{fudop5_LE4m0@ioEa926Vf{wjTly>?@HCp~C&SKD8JJ0%8nWkzQWn%QZp(NOj=x4!jvmb2nUbW%w@C4Ay@T?t{ zJgl3cs@#BH{@U>2O*)3+JBH8yxZrg8$?$ck6KYLq_%SM$lr*Xd96hFGM!46 - - - - - + + + + + Issues 编译器 @@ -3466,7 +3466,7 @@ Are you really want to continue? - + Clear all breakpoints 删除所有断点 @@ -3567,7 +3567,7 @@ Are you really want to continue? - + Rename Symbol 重命名符号 @@ -3588,13 +3588,13 @@ Are you really want to continue? - + Export As RTF 导出为RTF - + Export As HTML 导出为HTML @@ -3640,7 +3640,7 @@ Are you really want to continue? - + Open Folder 打开文件夹 @@ -3891,15 +3891,15 @@ Are you really want to continue? - - + + Bookmark Description 书签描述 - - + + Description: 描述: @@ -4048,128 +4048,143 @@ Are you really want to continue? 保存失败 - + + Change Project Compiler Set + 改变项目编译器配置集 + + + + Change the project's compiler set will lose all custom compiler set options. + 改变项目的编译器配置集会导致所有的自定义编译器选项被重置。 + + + + Do you really want to do that? + 你真的想要做那些吗? + + + Do you really want to clear all breakpoints in this file? 您真的要清除该文件的所有断点吗? - + New project 新建项目 - + Close %1 and start new project? 关闭'%1'以打开新项目? - + Folder not exist 文件夹不存在 - + Folder '%1' doesn't exist. Create it now? 文件夹'%1'不存在。是否创建? - + Can't create folder 无法创建文件夹 - + Failed to create folder '%1'. 创建文件夹'%1'失败。 - + Save new project as - + Red panda Dev-C++ project file (*.dev) 小熊猫Dev-C++项目文件 (*.dev) - + New project fail 新建项目失败 - + Can't assign project template 无法使用模板创建项目 - + untitled - 无标题 + 无标题 - + New Project File Name - + 新的项目文件名 - + File Name: - 文件名: + 文件名: - + File Already Exists! - + 文件已存在! - + File '%1' already exists! - + 文件'%1'已经存在! - + Add to project 添加到项目 - + Rename Error 重命名出错 - + Symbol '%1' is defined in system header. 符号'%1'在系统头文件中定义,无法修改。 - + New Name 新名称 - - + + Replace Error 替换出错 - + Can't open file '%1' for replace! 无法打开文件'%1'进行替换! - + Contents has changed since last search! 内容和上次查找时不一致。 - + Rich Text Format Files (*.rtf) RTF格式文件 (*.rtf) - + HTML Files (*.html) HTML文件 (*.html) @@ -4187,8 +4202,8 @@ Are you really want to continue? - - + + Error 错误 @@ -4223,50 +4238,50 @@ Are you really want to continue? 打开 - + Compile Failed 编译失败 - + Run Failed 运行失败 - - + + Confirm Convertion 确认转换 - - + + The editing file will be saved using %1 encoding. <br />This operation can't be reverted. <br />Are you sure to continue? 当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗? - + New Watch Expression 新监视表达式 - + Enter Watch Expression (it is recommended to use 'this->' for class members): 输入监视表达式 - + Parsing file %1 of %2: "%3" (%1/%2)正在解析文件"%3" - - + + Done parsing %1 files in %2 seconds 完成%1个文件的解析,用时%2秒 - + (%1 files per second) (每秒%1个文件) @@ -4348,67 +4363,67 @@ Are you really want to continue? 无法保存文件'%1'. - + Error Load File - + 载入文件错误 - + File Exists 文件已存在 - + File '%1' is already in the project 文件'%1'已在项目中 - + Project Updated 项目已升级 - + Your project was succesfully updated to a newer file format! 已成功将项目升级到新的格式 - + If something has gone wrong, we kept a backup-file: '%1'... 旧项目文件备份在'%1'。 - + Settings need update 设置需要更新 - + The compiler settings format of Dev-C++ has changed. Dev-C++的编译器设置格式已发生改变。 - + Please update your settings at Project >> Project Options >> Compiler and save your project. 请在项目 >> 项目属性 >> 编译器设置中修改您的设置并保存您的项目 - + Compiler not found 未找到编译器 - + The compiler set you have selected for this project, no longer exists. 您为该项目设置的编译器不存在。 - + It will be substituted by the global compiler set. 它将会被全局编译器设置代替。 - + Developed using the Red Panda Dev-C++ IDE 使用小熊猫Dev-C++编辑器开发 @@ -4422,31 +4437,26 @@ Are you really want to continue? - Add encoding options to compiler - 编译时加入文件编码参数 - - - - Statically link libraries - 静态链接所有库 - - - Additional build options: - 附加构建参数: + Add encoding options to compiler + 更多编译选项: - + Statically link libraries + 静态链接所有库 + + + C Compiler C编译器 - + C++ Compiler C++编译器 - + Linker 链接器 @@ -4512,17 +4522,17 @@ Are you really want to continue? 表单 - + Base compiler set: 基础编译器设置: - + Tab 1 标签1 - + Tab 2 标签2 @@ -4531,6 +4541,16 @@ Are you really want to continue? Customize (apply to this project only): 自定义设置(仅对本项目生效) + + + Statically link libraries + 静态链接所有库 + + + + Add encoding options to compiler + 在编译时加入字符集选项 + ProjectDLLHostWidget @@ -4794,24 +4814,24 @@ Are you really want to continue? ProjectModel - + File exists 文件已存在 - + File '%1' already exists. Delete it now? 文件'%1'已存在。是否删除? - - + + Remove failed 删除失败 - - + + Failed to remove file '%1' 无法删除文件'%1' @@ -5302,23 +5322,23 @@ Are you really want to continue? 只生成汇编代码(-S) - - + + Confirm 确认 - + The following problems were found during validation of compiler set "%1": 在验证编译器设置"%1"时遇到了下列问题: - + Compiler set not configuared. 未配置编译器设置。 - + Would you like Red Panda C++ to search for compilers in the following locations: <BR />'%1'<BR />'%2'? 您需要小熊猫C++在下列位置搜索编译器吗:<br />%1<br />%2 @@ -5344,13 +5364,13 @@ Are you really want to continue? - + No - + Yes @@ -6070,7 +6090,7 @@ Are you really want to continue? 自动链接 - + @@ -6146,7 +6166,7 @@ Are you really want to continue? 杂项 - + Program Runner 程序运行 diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 065e329e..deab36cc 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -3050,7 +3050,17 @@ void MainWindow::onCompilerSetChanged(int index) if (mProject) { Editor *e = mEditorList->getEditor(); if (!e || e->inProject()) { - mProject->options().compilerSet = index; + if(QMessageBox::warning( + e, + tr("Change Project Compiler Set"), + tr("Change the project's compiler set will lose all custom compiler set options.") + +"
" + + tr("Do you really want to do that?"), + QMessageBox::Yes | QMessageBox::No, + QMessageBox::No) != QMessageBox::Yes) { + return; + } + mProject->setCompilerSet(index); mProject->saveOptions(); return; } diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index c85ed724..0eda57c3 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -615,6 +615,14 @@ PFolderNode Project::pointerToNode(FolderNode *p, PFolderNode parent) return PFolderNode(); } +void Project::setCompilerSet(int compilerSetIndex) +{ + if (mOptions.compilerSet != compilerSetIndex) { + mOptions.compilerSet = compilerSetIndex; + updateCompilerSetType(); + } +} + bool Project::assignTemplate(const std::shared_ptr aTemplate) { if (!aTemplate) { @@ -716,6 +724,7 @@ void Project::saveOptions() ini.SetLongValue("Project","IncludeVersionInfo", mOptions.includeVersionInfo); ini.SetLongValue("Project","SupportXPThemes", mOptions.supportXPThemes); ini.SetLongValue("Project","CompilerSet", mOptions.compilerSet); + ini.SetLongValue("Project","CompilerSetType", mOptions.compilerSetType); ini.SetValue("Project","CompilerSettings", mOptions.compilerOptions); ini.SetLongValue("Project","StaticLink", mOptions.staticLink); ini.SetLongValue("Project","AddCharset", mOptions.addCharset); @@ -1370,6 +1379,11 @@ void Project::loadOptions(SimpleIni& ini) mOptions.compilerOptions = ini.GetValue("Project", "CompilerSettings", ""); mOptions.staticLink = ini.GetBoolValue("Project", "StaticLink", true); mOptions.addCharset = ini.GetBoolValue("Project", "AddCharset", true); + + mOptions.compilerSetType = ini.GetLongValue("Project","CompilerSetType",-1); + if (mOptions.compilerSetType<0) { + updateCompilerSetType(); + } bool useUTF8 = ini.GetBoolValue("Project", "UseUTF8", false); if (useUTF8) { mOptions.encoding = fromByteArray(ini.GetValue("Project","Encoding", ENCODING_UTF8)); @@ -1516,6 +1530,19 @@ void Project::updateFolderNode(PFolderNode node) } } +void Project::updateCompilerSetType() +{ + Settings::PCompilerSet defaultSet = pSettings->compilerSets().getSet(mOptions.compilerSet); + if (defaultSet) { + mOptions.compilerSetType=defaultSet->compilerSetType(); + mOptions.staticLink = defaultSet->staticLink(); + mOptions.compilerOptions = defaultSet->iniOptions(); + } else { + mOptions.compilerSetType=CST_DEBUG; + mOptions.staticLink = false; + } +} + const QList &Project::units() const { return mUnits; diff --git a/RedPandaIDE/project.h b/RedPandaIDE/project.h index 8bde8514..3c37f000 100644 --- a/RedPandaIDE/project.h +++ b/RedPandaIDE/project.h @@ -163,6 +163,7 @@ public: void updateFolders(); void updateNodeIndexes(); PFolderNode pointerToNode(FolderNode * p, PFolderNode parent=PFolderNode()); + void setCompilerSet(int compilerSetIndex); //void showOptions(); bool assignTemplate(const std::shared_ptr aTemplate); @@ -190,6 +191,7 @@ private: void open(); void removeFolderRecurse(PFolderNode node); void updateFolderNode(PFolderNode node); + void updateCompilerSetType(); private: QList mUnits; diff --git a/RedPandaIDE/projectoptions.h b/RedPandaIDE/projectoptions.h index e1710c71..1b3c9259 100644 --- a/RedPandaIDE/projectoptions.h +++ b/RedPandaIDE/projectoptions.h @@ -60,6 +60,7 @@ struct ProjectOptions{ bool includeVersionInfo; bool supportXPThemes; int compilerSet; + int compilerSetType; QByteArray compilerOptions; ProjectVersionInfo versionInfo; QString cmdLineArgs; diff --git a/RedPandaIDE/settings.cpp b/RedPandaIDE/settings.cpp index c64d53d5..dcaa1a42 100644 --- a/RedPandaIDE/settings.cpp +++ b/RedPandaIDE/settings.cpp @@ -2204,6 +2204,16 @@ QByteArray Settings::CompilerSet::getCompilerOutput(const QString &binDir, const return result.trimmed(); } +int Settings::CompilerSet::compilerSetType() const +{ + return mCompilerSetType; +} + +void Settings::CompilerSet::setCompilerSetType(int newCompilerSetType) +{ + mCompilerSetType = newCompilerSetType; +} + void Settings::CompilerSet::setCompilerType(const QString &newCompilerType) { mCompilerType = newCompilerType; @@ -2318,14 +2328,17 @@ void Settings::CompilerSets::addSets(const QString &folder) platformName = "32-bit"; } baseSet->setName(baseName + " " + platformName + " Release"); + baseSet->setCompilerSetType(CompilerSetType::CST_RELEASE); setReleaseOptions(baseSet); baseSet = addSet(folder); baseSet->setName(baseName + " " + platformName + " Debug"); + baseSet->setCompilerSetType(CompilerSetType::CST_DEBUG); setDebugOptions(baseSet); baseSet = addSet(folder); baseSet->setName(baseName + " " + platformName + " Profiling"); + baseSet->setCompilerSetType(CompilerSetType::CST_PROFILING); setProfileOptions(baseSet); mDefaultIndex = mList.size() - 2; @@ -2543,6 +2556,7 @@ void Settings::CompilerSets::saveSet(int index) mSettings->mSettings.setValue("Name", pSet->name()); mSettings->mSettings.setValue("Target", pSet->target()); mSettings->mSettings.setValue("CompilerType", pSet->compilerType()); + mSettings->mSettings.setValue("CompilerSetType", pSet->compilerSetType()); // Paths savePathList("Bins",pSet->binDirs()); @@ -2605,6 +2619,7 @@ Settings::PCompilerSet Settings::CompilerSets::loadSet(int index) pSet->setName(mSettings->mSettings.value("Name").toString()); pSet->setTarget(mSettings->mSettings.value("Target").toString()); pSet->setCompilerType(mSettings->mSettings.value("CompilerType").toString()); + pSet->setCompilerSetType(mSettings->mSettings.value("CompilerSetType").toInt()); // Paths loadPathList("Bins",pSet->binDirs()); diff --git a/RedPandaIDE/settings.h b/RedPandaIDE/settings.h index 5ae18c6e..c9f36283 100644 --- a/RedPandaIDE/settings.h +++ b/RedPandaIDE/settings.h @@ -34,6 +34,12 @@ extern const char ValueToChar[28]; class Settings; +enum CompilerSetType { + CST_RELEASE, + CST_DEBUG, + CST_PROFILING +}; + typedef struct { QString name; // language table index of "Generate debugging info" QString section; // language table index of "C options" @@ -968,6 +974,9 @@ public: void setCompilerType(const QString &newCompilerType); + int compilerSetType() const; + void setCompilerSetType(int newCompilerSetType); + private: // Initialization void setExecutables(); @@ -1003,7 +1012,8 @@ public: QString mName; // "TDM-GCC 4.7.1 Release" QStringList mDefines; // list of predefined constants QString mTarget; // 'X86_64' / 'i686' - QString mCompilerType; + QString mCompilerType; // 'Clang' / 'GCC' + int mCompilerSetType; // RELEASE/ DEBUG/ Profile // User settings bool mUseCustomCompileParams; diff --git a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp index f63fd089..dd931011 100644 --- a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp +++ b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp @@ -17,8 +17,6 @@ ProjectCompileParamatersWidget::~ProjectCompileParamatersWidget() void ProjectCompileParamatersWidget::doLoad() { - ui->chkAddCharset->setChecked(pMainWindow->project()->options().addCharset); - ui->chkStaticLink->setChecked(pMainWindow->project()->options().staticLink); ui->txtCCompiler->setPlainText(pMainWindow->project()->options().compilerCmd); ui->txtCPPCompiler->setPlainText(pMainWindow->project()->options().cppCompilerCmd); ui->txtLinker->setPlainText(pMainWindow->project()->options().linkerCmd); @@ -26,8 +24,6 @@ void ProjectCompileParamatersWidget::doLoad() void ProjectCompileParamatersWidget::doSave() { - pMainWindow->project()->options().addCharset = ui->chkAddCharset->isChecked(); - pMainWindow->project()->options().staticLink = ui->chkStaticLink->isChecked(); pMainWindow->project()->options().compilerCmd = ui->txtCCompiler->toPlainText(); pMainWindow->project()->options().cppCompilerCmd = ui->txtCPPCompiler->toPlainText(); pMainWindow->project()->options().linkerCmd = ui->txtLinker->toPlainText(); diff --git a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui index 505a1617..a536b31e 100644 --- a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui +++ b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui @@ -14,20 +14,6 @@ Form - - - - Add encoding options to compiler - - - - - - - Statically link libraries - - - diff --git a/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp b/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp index d3448b1c..46329ad5 100644 --- a/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp +++ b/RedPandaIDE/settingsdialog/projectcompilerwidget.cpp @@ -18,9 +18,10 @@ ProjectCompilerWidget::~ProjectCompilerWidget() void ProjectCompilerWidget::refreshOptions() { - Settings::PCompilerSet pSet = pSettings->compilerSets().defaultSet(); + Settings::PCompilerSet pSet = pSettings->compilerSets().getSet(ui->cbCompilerSet->currentIndex()); if (!pSet) return; + mOptions = pSet->iniOptions(); QTabWidget* pTab = ui->tabOptions; while (pTab->count()>0) { QWidget* p=pTab->widget(0); @@ -79,10 +80,15 @@ void ProjectCompilerWidget::refreshOptions() QSpacerItem* horizontalSpacer = new QSpacerItem(10, 100, QSizePolicy::Minimum, QSizePolicy::Expanding); pLayout->addItem(horizontalSpacer,row,0); } + + ui->chkStaticLink->setChecked(pSet->staticLink()); } void ProjectCompilerWidget::doLoad() { + ui->chkAddCharset->setChecked(pMainWindow->project()->options().addCharset); + ui->chkStaticLink->setChecked(pMainWindow->project()->options().staticLink); + mOptions = pMainWindow->project()->options().compilerOptions; ui->cbCompilerSet->setCurrentIndex(pMainWindow->project()->options().compilerSet); } @@ -113,8 +119,10 @@ void ProjectCompilerWidget::doSave() } } } - pMainWindow->project()->options().compilerSet = ui->cbCompilerSet->currentIndex(); + pMainWindow->project()->setCompilerSet(ui->cbCompilerSet->currentIndex()); pMainWindow->project()->options().compilerOptions = mOptions; + pMainWindow->project()->options().addCharset = ui->chkAddCharset->isChecked(); + pMainWindow->project()->options().staticLink = ui->chkStaticLink->isChecked(); pMainWindow->project()->saveOptions(); } diff --git a/RedPandaIDE/settingsdialog/projectcompilerwidget.ui b/RedPandaIDE/settingsdialog/projectcompilerwidget.ui index 5e1ae547..6de52b42 100644 --- a/RedPandaIDE/settingsdialog/projectcompilerwidget.ui +++ b/RedPandaIDE/settingsdialog/projectcompilerwidget.ui @@ -14,6 +14,9 @@ Form + + + @@ -30,17 +33,7 @@ - - - - Base compiler set: - - - - - - @@ -54,13 +47,34 @@ - + + + + Base compiler set: + + + + Customize (apply to this project only): + + + + Statically link libraries + + + + + + + Add encoding options to compiler + + +