From 93751d1b23476957751e4e78d2b201147ae02604 Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Sun, 6 Nov 2022 22:51:14 +0800 Subject: [PATCH] - fix: When start parsing and exit app, app may crash - enhancement: add "Allow parallel build" option in project option dialog's custom compile options page - fix: crash when rename project file - fix: When remove project file, symbols in it not correctly removed from code parser - fix: infos in class browser (structure panel) not correctly updated when add/create/remove/rename project files --- NEWS.md | 17 +- RedPandaIDE/RedPandaIDE.pro | 2 +- RedPandaIDE/compiler/projectcompiler.cpp | 33 +- RedPandaIDE/editorlist.cpp | 2 + RedPandaIDE/mainwindow.cpp | 27 +- RedPandaIDE/parser/cppparser.cpp | 13 +- RedPandaIDE/parser/cppparser.h | 1 + RedPandaIDE/project.cpp | 17 +- RedPandaIDE/projectoptions.cpp | 2 + RedPandaIDE/projectoptions.h | 2 + .../projectcompileparamaterswidget.cpp | 13 + .../projectcompileparamaterswidget.ui | 34 +- RedPandaIDE/translations/RedPandaIDE_pt_BR.ts | 10 +- RedPandaIDE/translations/RedPandaIDE_zh_CN.ts | 413 +++++++++--------- RedPandaIDE/translations/RedPandaIDE_zh_TW.ts | 12 +- 15 files changed, 367 insertions(+), 231 deletions(-) diff --git a/NEWS.md b/NEWS.md index af11b680..b5488111 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,12 @@ +Red Panda C++ Version 2.3 + + - fix: When start parsing and exit app, app may crash + - enhancement: add "Allow parallel build" option in project option dialog's custom compile options page + - fix: crash when rename project file + - fix: When remove project file, symbols in it not correctly removed from code parser + - fix: infos in class browser (structure panel) not correctly updated when add/create/remove/rename project files + + Red Panda C++ Version 2.2 - enhancement: basic code completion support for C++ lambdas @@ -10,9 +19,11 @@ Red Panda C++ Version 2.2 - fix: Edting / show context menu when code analysis is turned on may crash app. - fix: Show context menu when edting non c/c++ file may crash app. - fix: Project Options Dialog's Files panel will crash app. - - fix: Memory usage of undo system is not correctly calculated - - fix: Set max undo memory usage to 0 don't really remove limit of undo - - fix: Set max undo times to 0 don't really remove limit of undo + - fix: Memory usage of undo system is not correctly calculated, which may cause undo items lost + - fix: Set max undo memory usage to 0 don't really remove the limit for undo + - fix: Set max undo times to 0 don't really remove the limit for undo + - fix: Keep the newest undo info regardless of undo memory usage + Red Panda C++ Version 2.1 diff --git a/RedPandaIDE/RedPandaIDE.pro b/RedPandaIDE/RedPandaIDE.pro index 7207bfca..d4f07958 100644 --- a/RedPandaIDE/RedPandaIDE.pro +++ b/RedPandaIDE/RedPandaIDE.pro @@ -10,7 +10,7 @@ isEmpty(APP_NAME) { } isEmpty(APP_VERSION) { - APP_VERSION = 2.2 + APP_VERSION = 2.3 } macos: { diff --git a/RedPandaIDE/compiler/projectcompiler.cpp b/RedPandaIDE/compiler/projectcompiler.cpp index 90958395..d1d1d74d 100644 --- a/RedPandaIDE/compiler/projectcompiler.cpp +++ b/RedPandaIDE/compiler/projectcompiler.cpp @@ -210,6 +210,7 @@ void ProjectCompiler::writeMakeDefines(QFile &file) cCompileArguments += " -D__DEBUG__"; cppCompileArguments+= " -D__DEBUG__"; } + writeln(file,"CPP = " + extractFileName(compilerSet()->cppCompiler())); writeln(file,"CC = " + extractFileName(compilerSet()->CCompiler())); #ifdef Q_OS_WIN @@ -407,9 +408,10 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file) } } else if (unit->encoding()==ENCODING_SYSTEM_DEFAULT) { sourceEncoding = defaultSystemEncoding; - } else if (unit->encoding()!=ENCODING_ASCII && !unit->encoding().isEmpty() - && unit->encoding()!=targetEncoding) { + } else if (unit->encoding()!=ENCODING_ASCII && !unit->encoding().isEmpty()) { sourceEncoding = unit->encoding(); + } else { + sourceEncoding = targetEncoding; } if (sourceEncoding!=targetEncoding) { @@ -421,14 +423,14 @@ void ProjectCompiler::writeMakeObjFilesRules(QFile &file) if (mOnlyCheckSyntax) { if (unit->compileCpp()) - writeln(file, "\t$(CPP) -c " + genMakePath1(unit->fileName()) + " $(CXXFLAGS) " + encodingStr); + writeln(file, "\t$(CPP) -c " + genMakePath1(shortFileName) + " $(CXXFLAGS) " + encodingStr); else - writeln(file, "\t(CC) -c " + genMakePath1(unit->fileName()) + " $(CFLAGS) " + encodingStr); + writeln(file, "\t(CC) -c " + genMakePath1(shortFileName) + " $(CFLAGS) " + encodingStr); } else { if (unit->compileCpp()) - writeln(file, "\t$(CPP) -c " + genMakePath1(unit->fileName()) + " -o " + ObjFileName2 + " $(CXXFLAGS) " + encodingStr); + writeln(file, "\t$(CPP) -c " + genMakePath1(shortFileName) + " -o " + ObjFileName2 + " $(CXXFLAGS) " + encodingStr); else - writeln(file, "\t$(CC) -c " + genMakePath1(unit->fileName()) + " -o " + ObjFileName2 + " $(CFLAGS) " + encodingStr); + writeln(file, "\t$(CC) -c " + genMakePath1(shortFileName) + " -o " + ObjFileName2 + " $(CFLAGS) " + encodingStr); } } } @@ -526,16 +528,29 @@ bool ProjectCompiler::prepareForCompile() buildMakeFile(); mCompiler = compilerSet()->make(); + + QString parallelParam; + if (mProject->options().allowParallelBuilding) { + if (mProject->options().parellelBuildingJobs==0) { + parallelParam = " --jobs"; + } else { + parallelParam = QString(" -j%1").arg(mProject->options().parellelBuildingJobs); + } + } + if (mOnlyClean) { - mArguments = QString("-f \"%1\" clean").arg(extractRelativePath( + mArguments = QString(" %1 -f \"%2\" clean").arg(parallelParam, + extractRelativePath( mProject->directory(), mProject->makeFileName())); } else if (mRebuild) { - mArguments = QString("-f \"%1\" clean all").arg(extractRelativePath( + mArguments = QString(" %1 -f \"%2\" clean all").arg(parallelParam, + extractRelativePath( mProject->directory(), mProject->makeFileName())); } else { - mArguments = QString("-f \"%1\" all").arg(extractRelativePath( + mArguments = QString(" %1 -f \"%2\" all").arg(parallelParam, + extractRelativePath( mProject->directory(), mProject->makeFileName())); } diff --git a/RedPandaIDE/editorlist.cpp b/RedPandaIDE/editorlist.cpp index 99c71654..166d2b7c 100644 --- a/RedPandaIDE/editorlist.cpp +++ b/RedPandaIDE/editorlist.cpp @@ -422,6 +422,8 @@ Editor* EditorList::getOpenedEditorByFilename(QString filename) bool EditorList::getContentFromOpenedEditor(const QString &filename, QStringList &buffer) { + if (pMainWindow->isQuitting()) + return false; Editor * e= getOpenedEditorByFilename(filename); if (!e) return false; diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index efbbfeb4..e4bbd7ab 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -6354,7 +6354,7 @@ void MainWindow::on_actionAdd_to_project_triggered() PProjectModelNode folderNode = mProject->pointerToNode(node); foreach (const QString& filename, dialog.selectedFiles()) { PProjectUnit newUnit = mProject->addUnit(filename,folderNode); - mProject->cppParser()->addFileToScan(filename); + mProject->cppParser()->addFileToScan(filename,true); QString branch; if (pSettings->vcs().gitOk() && mProject->model()->iconProvider()->VCSRepository()->hasRepository(branch)) { QString output; @@ -6372,6 +6372,7 @@ void MainWindow::on_actionAdd_to_project_triggered() } } } + mClassBrowserModel.setCurrentFiles(mProject->unitFiles()); mProject->saveAll(); updateProjectView(); parseFileList(mProject->cppParser()); @@ -6399,8 +6400,15 @@ void MainWindow::on_actionRemove_from_project_triggered() if (!folderNode) continue; PProjectUnit unit = folderNode->pUnit.lock(); + if (mProject->cppParser()) { + mProject->cppParser()->invalidateFile(unit->fileName()); + mProject->cppParser()->removeProjectFile(unit->fileName()); + } mProject->removeUnit(unit, true, removeFile); }; + mClassBrowserModel.beginUpdate(); + mClassBrowserModel.setCurrentFiles(mProject->unitFiles()); + mClassBrowserModel.endUpdate(); ui->projectView->selectionModel()->clearSelection(); mProject->saveAll(); updateProjectView(); @@ -6708,6 +6716,9 @@ void MainWindow::newProjectUnitFile() setProjectViewCurrentUnit(newUnit); mProject->saveAll(); + if (mProject->cppParser()) + mProject->cppParser()->addFileToScan(newFileName,true); + mClassBrowserModel.setCurrentFiles(mProject->unitFiles()); Editor * editor = mProject->openUnit(newUnit, false); if (editor) editor->activate(); @@ -6837,6 +6848,7 @@ QString MainWindow::switchHeaderSourceTarget(Editor *editor) void MainWindow::onProjectViewNodeRenamed() { + mClassBrowserModel.setCurrentFiles(mProject->unitFiles()); updateProjectView(); } @@ -7950,8 +7962,11 @@ void MainWindow::on_actionNew_Header_triggered() stringsToFile(header, headerFilename); PProjectUnit newUnit=mProject->addUnit(headerFilename,mProject->rootNode()); - mProject->cppParser()->addFileToScan(headerFilename); mProject->saveAll(); + + mProject->cppParser()->addFileToScan(headerFilename,true); + mClassBrowserModel.setCurrentFiles(mProject->unitFiles()); + parseFileList(mProject->cppParser()); setProjectViewCurrentUnit(newUnit); updateProjectView(); @@ -8024,12 +8039,16 @@ void MainWindow::on_actionNew_Class_triggered() stringsToFile(source, sourceFilename); PProjectUnit newUnit=mProject->addUnit(headerFilename,mProject->rootNode()); - mProject->cppParser()->addFileToScan(headerFilename); + setProjectViewCurrentUnit(newUnit); newUnit=mProject->addUnit(sourceFilename,mProject->rootNode()); - mProject->cppParser()->addFileToScan(sourceFilename); setProjectViewCurrentUnit(newUnit); mProject->saveAll(); + + mProject->cppParser()->addFileToScan(sourceFilename,true); + mProject->cppParser()->addFileToScan(headerFilename,true); + mClassBrowserModel.setCurrentFiles(mProject->unitFiles()); + parseFileList(mProject->cppParser()); updateProjectView(); diff --git a/RedPandaIDE/parser/cppparser.cpp b/RedPandaIDE/parser/cppparser.cpp index 3992c271..ef9d71f6 100644 --- a/RedPandaIDE/parser/cppparser.cpp +++ b/RedPandaIDE/parser/cppparser.cpp @@ -97,6 +97,14 @@ void CppParser::addIncludePath(const QString &value) mPreprocessor.addIncludePath(includeTrailingPathDelimiter(value)); } +void CppParser::removeProjectFile(const QString &value) +{ + QMutexLocker locker(&mMutex); + + mProjectFiles.remove(value); + mFilesToScan.remove(value); +} + void CppParser::addProjectIncludePath(const QString &value) { QMutexLocker locker(&mMutex); @@ -1126,7 +1134,6 @@ void CppParser::addFileToScan(const QString& value, bool inProject) if (!mPreprocessor.scannedFiles().contains(value)) { mFilesToScan.insert(value); } - } PStatement CppParser::addInheritedStatement(const PStatement& derived, const PStatement& inherit, StatementClassScope access) @@ -4719,8 +4726,8 @@ QSet CppParser::calculateFilesToBeReparsed(const QString &fileName) QSet result; result.insert(fileName); foreach (const QString& file, mProjectFiles) { - PFileIncludes fileIncludes = mPreprocessor.includesList()[file]; - if (fileIncludes->includeFiles.contains(fileName)) { + PFileIncludes fileIncludes = mPreprocessor.includesList().value(file,PFileIncludes()); + if (fileIncludes && fileIncludes->includeFiles.contains(fileName)) { result.insert(file); } } diff --git a/RedPandaIDE/parser/cppparser.h b/RedPandaIDE/parser/cppparser.h index 6eb1415d..168342fe 100644 --- a/RedPandaIDE/parser/cppparser.h +++ b/RedPandaIDE/parser/cppparser.h @@ -36,6 +36,7 @@ public: void addHardDefineByLine(const QString& line); void addFileToScan(const QString& value, bool inProject = false); void addIncludePath(const QString& value); + void removeProjectFile(const QString& value); void addProjectIncludePath(const QString& value); void clearIncludePaths(); void clearProjectIncludePaths(); diff --git a/RedPandaIDE/project.cpp b/RedPandaIDE/project.cpp index 53444263..9ecc719d 100644 --- a/RedPandaIDE/project.cpp +++ b/RedPandaIDE/project.cpp @@ -699,13 +699,20 @@ void Project::renameUnit(PProjectUnit& unit, const QString &sFileName) return; if (sFileName.compare(unit->fileName(),PATH_SENSITIVITY)==0) return; - + if (mParser) { + mParser->removeProjectFile(unit->fileName()); + mParser->addFileToScan(sFileName,true); + } Editor * editor=unitEditor(unit); if (editor) { //prevent recurse editor->saveAs(sFileName,true); } else { + if (mParser) + mParser->invalidateFile(unit->fileName()); copyFile(unit->fileName(),sFileName,true); + if (mParser) + mParser->parseFile(sFileName,true); } removeUnit(unit,false,true); PProjectModelNode parentNode = unit->node()->parent.lock(); @@ -1135,6 +1142,10 @@ void Project::saveOptions() ini.SetValue("Project","Encoding",toByteArray(mOptions.encoding)); ini.SetLongValue("Project","ModelType", (int)mOptions.modelType); ini.SetLongValue("Project","ClassBrowserType", (int)mOptions.classBrowserType); + ini.SetBoolValue("Project","AllowParallelBuilding",mOptions.allowParallelBuilding); + ini.SetLongValue("Project","ParellelBuildingJobs",mOptions.parellelBuildingJobs); + + //for Red Panda Dev C++ 6 compatibility ini.SetLongValue("Project","UseUTF8",mOptions.encoding == ENCODING_UTF8); @@ -2056,6 +2067,10 @@ void Project::loadOptions(SimpleIni& ini) mOptions.encoding = fromByteArray(ini.GetValue("Project","Encoding", ENCODING_AUTO_DETECT)); } + mOptions.allowParallelBuilding = ini.GetBoolValue("Project","AllowParallelBuilding"); + mOptions.parellelBuildingJobs = ini.GetLongValue("Project","ParellelBuildingJobs"); + + mOptions.versionInfo.major = ini.GetLongValue("VersionInfo", "Major", 0); mOptions.versionInfo.minor = ini.GetLongValue("VersionInfo", "Minor", 1); mOptions.versionInfo.release = ini.GetLongValue("VersionInfo", "Release", 1); diff --git a/RedPandaIDE/projectoptions.cpp b/RedPandaIDE/projectoptions.cpp index 13a20ff5..7aa1d489 100644 --- a/RedPandaIDE/projectoptions.cpp +++ b/RedPandaIDE/projectoptions.cpp @@ -56,4 +56,6 @@ ProjectOptions::ProjectOptions() modelType = ProjectModelType::FileSystem; classBrowserType = ProjectClassBrowserType::CurrentFile; execEncoding = ENCODING_SYSTEM_DEFAULT; + allowParallelBuilding=false; + parellelBuildingJobs=0; } diff --git a/RedPandaIDE/projectoptions.h b/RedPandaIDE/projectoptions.h index 5ca12683..99ef69b8 100644 --- a/RedPandaIDE/projectoptions.h +++ b/RedPandaIDE/projectoptions.h @@ -99,5 +99,7 @@ struct ProjectOptions{ QString encoding; ProjectModelType modelType; ProjectClassBrowserType classBrowserType; + bool allowParallelBuilding; + int parellelBuildingJobs; }; #endif // PROJECTOPTIONS_H diff --git a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp index 1b9fac0d..4dc708ca 100644 --- a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp +++ b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.cpp @@ -20,6 +20,10 @@ #include "../project.h" #include "../iconsmanager.h" +#ifdef Q_OS_WIN +#include +#endif + #include ProjectCompileParamatersWidget::ProjectCompileParamatersWidget(const QString &name, const QString &group, QWidget *parent) : @@ -27,6 +31,11 @@ ProjectCompileParamatersWidget::ProjectCompileParamatersWidget(const QString &na ui(new Ui::ProjectCompileParamatersWidget) { ui->setupUi(this); +#ifdef Q_OS_WIN + SYSTEM_INFO info; + GetSystemInfo(&info); + ui->spinParallelJobs->setMaximum(info.dwNumberOfProcessors); +#endif } ProjectCompileParamatersWidget::~ProjectCompileParamatersWidget() @@ -39,6 +48,8 @@ void ProjectCompileParamatersWidget::doLoad() ui->txtCCompiler->setPlainText(pMainWindow->project()->options().compilerCmd); ui->txtCPPCompiler->setPlainText(pMainWindow->project()->options().cppCompilerCmd); ui->txtLinker->setPlainText(pMainWindow->project()->options().linkerCmd); + ui->grpAllowParallelBuilding->setChecked(pMainWindow->project()->options().allowParallelBuilding); + ui->spinParallelJobs->setValue(pMainWindow->project()->options().parellelBuildingJobs); } void ProjectCompileParamatersWidget::doSave() @@ -46,6 +57,8 @@ void ProjectCompileParamatersWidget::doSave() pMainWindow->project()->options().compilerCmd = ui->txtCCompiler->toPlainText(); pMainWindow->project()->options().cppCompilerCmd = ui->txtCPPCompiler->toPlainText(); pMainWindow->project()->options().linkerCmd = ui->txtLinker->toPlainText(); + pMainWindow->project()->options().allowParallelBuilding = ui->grpAllowParallelBuilding->isChecked(); + pMainWindow->project()->options().parellelBuildingJobs = ui->spinParallelJobs->value(); pMainWindow->project()->saveOptions(); } diff --git a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui index 282e0dc8..649b9988 100644 --- a/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui +++ b/RedPandaIDE/settingsdialog/projectcompileparamaterswidget.ui @@ -15,10 +15,38 @@ - - - Additional build options: + + + Parallel Build + + true + + + + + + Parallel Jobs(0 means infinite): + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + diff --git a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts index 9fe5fc49..1089c037 100644 --- a/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts +++ b/RedPandaIDE/translations/RedPandaIDE_pt_BR.ts @@ -5103,7 +5103,7 @@ Additional build options: - Opções de montagem adicionais: + Opções de montagem adicionais: C Compiler @@ -5125,6 +5125,14 @@ Library Files Arquivos de bibliotecas + + Parallel Build + + + + Parallel Jobs(0 means infinite): + + ProjectCompiler diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts index 8f4d682e..a5afb112 100644 --- a/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts +++ b/RedPandaIDE/translations/RedPandaIDE_zh_CN.ts @@ -1325,10 +1325,10 @@ Are you really want to continue? - - + + Error 错误 @@ -1347,34 +1347,34 @@ Are you really want to continue? 文件%1已经被打开! - + The text to be copied exceeds count limit! 要复制的内容超过了行数限制! - + The text to be copied exceeds character limit! 要复制的内容超过了字符数限制! - + The text to be cut exceeds count limit! 要剪切的内容超过了行数限制! - + The text to be cut exceeds character limit! 要剪切的内容超过了字符数限制! - + Print Document 打印文档 - - - + + + Ctrl+click for more info Ctrl+单击以获取更多信息 @@ -1383,27 +1383,27 @@ Are you really want to continue? 未找到符号'%1'! - + astyle not found 找不到astyle程序 - + Can't find astyle in "%1". 找不到astyle程序"%1". - + Break point condition 断点条件 - + Enter the condition of the breakpoint: 输入当前断点的生效条件: - + Readonly 只读 @@ -3920,11 +3920,11 @@ Are you really want to continue? - - + - - + + + Issues 编译器 @@ -4362,7 +4362,7 @@ Are you really want to continue? - + New Problem Set 新建试题集 @@ -4381,14 +4381,14 @@ Are you really want to continue? - + Save Problem Set 保存试题集 - + Load Problem Set 载入试题集 @@ -4741,7 +4741,7 @@ Are you really want to continue? - + Clear all breakpoints 删除所有断点 @@ -4978,7 +4978,7 @@ Are you really want to continue? - + Rename Symbol 重命名符号 @@ -4999,13 +4999,13 @@ Are you really want to continue? - + Export As RTF 导出为RTF - + Export As HTML 导出为HTML @@ -5379,22 +5379,22 @@ Are you really want to continue? - - + + Wrong Compiler Settings 错误的编译器设置 - - + + Compiler is set not to generate executable. 编译器被设置为不生成可执行文件。 - + We need the executabe to run problem case. 我们需要可执行文件来运行试题案例。 @@ -5462,7 +5462,7 @@ Are you really want to continue? - + Please correct this before start debugging 请在调试前改正设置。 @@ -5520,22 +5520,22 @@ Are you really want to continue? 全部复制 - + Go to Line 跳转到行 - + Line - + Template Exists 模板已存在 - + Template %1 already exists. Do you want to overwrite? 模板%1已存在。是否覆盖? @@ -5561,7 +5561,7 @@ Are you really want to continue? - + Problem Set %1 试题集%1 @@ -5635,15 +5635,15 @@ Are you really want to continue? - - + + Bookmark Description 书签描述 - - + + Description: 描述: @@ -5789,7 +5789,7 @@ Are you really want to continue? - + Delete 删除 @@ -5872,57 +5872,57 @@ Are you really want to continue? 你真的要删除%1个文件吗? - + Save project 保存项目 - + The project '%1' has modifications. 项目'%1'有改动。 - - + + Do you want to save it? 需要保存吗? - - + + File Changed 文件已发生变化 - + New Project File? 新建项目文件? - + Do you want to add the new file to the project? 您是否要将新建的文件加入项目? - - - + + + Save Error 保存失败 - + Change Project Compiler Set 改变项目编译器配置集 - + Change the project's compiler set will lose all custom compiler set options. 改变项目的编译器配置集会导致所有的自定义编译器选项被重置。 - + Do you really want to do that? 你真的想要那么做吗? @@ -5945,104 +5945,104 @@ Are you really want to continue? 无标题%1 - + Modify Watch 修改监视表达式 - + Watch Expression 监视表达式 - + 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 - + Folder %1 is not empty. 文件夹%1不是空的。 - + Do you really want to delete it? 你真的要删除它吗? - + Change working folder 改变工作文件夹 - + File '%1' is not in the current working folder. File '%1' is not in the current working folder 文件'%1'不在当前工作文件夹中。 - + Do you want to change working folder to '%1'? 是否将工作文件夹改设为'%1'? - + Can't Commit 无法提交 - + Git needs user info to commit. Git需要用信息进行提交。 - + Choose Input Data File 选择输入数据文件 - - + + All files (*.*) 所有文件 (*.*) - + Choose Expected Output Data File Choose Expected Input Data File 选择期望输出文件 @@ -6054,59 +6054,59 @@ Are you really want to continue? - + Choose Working Folder 选择工作文件夹 - - + + Header Exists 头文件已存在 - - + + Header file "%1" already exists! 头文件"%1"已存在! - + Source Exists 源文件已存在! - + Source file "%1" already exists! 源文件"%1"已存在! - + Can't commit! 无法提交! - + The following files are in conflicting: 下列文件处于冲突状态,请解决后重新添加和提交: - + Commit Message 提交信息 - + Commit Message: 提交信息: - + Commit Failed 提交失败 - + Commit message shouldn't be empty! 提交信息不能为空! @@ -6115,22 +6115,22 @@ Are you really want to continue? 小熊猫Dev-C++项目文件 (*.dev) - + New project fail 新建项目失败 - + Can't assign project template 无法使用模板创建项目 - + Remove file 删除文件 - + Remove the file from disk? 同时从硬盘上删除文件? @@ -6139,27 +6139,27 @@ Are you really want to continue? 无标题 - + New Project File Name 新的项目文件名 - + File Name: 文件名: - + File Already Exists! 文件已存在! - + File '%1' already exists! 文件'%1'已经存在! - + Add to project 添加到项目 @@ -6174,75 +6174,75 @@ Are you really want to continue? 本操作会删除此试题的所有案例。 - + Red Panda C++ project file (*.dev) 小熊猫C++项目文件(*.dev) - + 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) - + The current problem set is not empty. 当前的试题集不是空的。 - + Problem %1 试题%1 - - + + Problem Set Files (*.pbs) 试题集文件 (*.pbs) - + Load Error 载入失败 - + Problem Case %1 试题案例%1 @@ -6255,13 +6255,13 @@ Are you really want to continue? - - - - - - - + + + + + + + Error 错误 @@ -6288,79 +6288,79 @@ Are you really want to continue? 版本控制 - + File '%1' was changed. 磁盘文件'%1'已被修改。 - + Reload its content from disk? 是否重新读取它的内容? - + File '%1' was removed. 磁盘文件'%1'已被删除。 - + Keep it open? 是否保持它在小熊猫C++中打开的编辑窗口? - + Open 打开 - + 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个文件) @@ -6387,37 +6387,37 @@ Are you really want to continue? 类名: - + Create 创建 - + Cancel 取消 - + Path: 路径: - + Base Class: 父类: - + ... ... - + Source Name: 源文件名: - + Path 路径 @@ -6709,105 +6709,105 @@ Are you really want to continue? 无法保存文件'%1'. - + Error Load File 载入文件错误 - - + + Error 错误 - + Can't create folder %1 无法创建文件夹%1 - + Warning 警告 - - + + Can't save file %1 无法保存文件%1 - + 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'。 - + Headers 头文件 - + Sources 源文件 - + Others 其他文件 - + Settings need update 设置需要更新 - + The compiler settings format of Red Panda C++ has changed. The compiler settings format of Dev-C++ has changed. 小熊猫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 C++ IDE Developed using the Red Panda Dev-C++ IDE 使用小熊猫C++编辑器开发 @@ -6853,39 +6853,48 @@ Are you really want to continue? 表单 - Additional build options: Add encoding options to compiler - 更多编译选项: + 更多编译选项: Statically link libraries 静态链接所有库 - + + Parallel Build + 并行构建 + + + + Parallel Jobs(0 means infinite): + 并行构建任务数(0表示不限制) + + + C Compiler C编译器 - + C++ Compiler C++编译器 - + Linker 链接器 - - + + Add Library Files 添加库文件 - - + + Library Files 库文件 @@ -6913,32 +6922,32 @@ Are you really want to continue? - 资源文件: %1 - + Compiling project changes... 正在编译项目修改... - + - Project Filename: %1 - 项目文件名: %1 - + - Compiler Set Name: %1 - 编译器配置: %1 - + Processing makefile: 正在处理makefile... - + - makefile processer: %1 - makefile处理器: %1 - + - Command: %1 %2 - 命令: %1 %2 @@ -7098,12 +7107,12 @@ Are you really want to continue? 自定义构建命令 - + Auto detect 自动检测 - + ANSI ANSI @@ -7112,7 +7121,7 @@ Are you really want to continue? ANSI - + UTF-8 @@ -7276,32 +7285,32 @@ 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' - + Rename failed 改名失败 - + Failed to rename file '%1' to '%2' 无法将文件'%1'改名为'%2' @@ -8213,12 +8222,12 @@ Are you really want to continue? 无标题 - + constructor 构造函数 - + destructor 析构函数 @@ -8687,14 +8696,14 @@ Are you really want to continue? 性能 - + Compiler Set 编译器配置集 - + Compiler @@ -8706,7 +8715,7 @@ Are you really want to continue? 自动链接 - + @@ -8782,15 +8791,15 @@ Are you really want to continue? 杂项 - - + + Program Runner 程序运行 - + Problem Set 试题集 diff --git a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts index 679d190c..77e7fbbf 100644 --- a/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts +++ b/RedPandaIDE/translations/RedPandaIDE_zh_TW.ts @@ -4914,10 +4914,6 @@ Form - - Additional build options: - - C Compiler @@ -4938,6 +4934,14 @@ Library Files + + Parallel Build + + + + Parallel Jobs(0 means infinite): + + ProjectCompiler