- enhancement: create file in files view
This commit is contained in:
parent
8e00d50d1e
commit
5d6bf0dbb5
1
NEWS.md
1
NEWS.md
|
@ -33,6 +33,7 @@ Red Panda C++ Version 1.0.0
|
|||
- fix: switch disassembly mode doesn't update contents
|
||||
- fix: if there is a Red Panda C++ process running program, other Red Panda C++ processes can't run program correctly.
|
||||
- enhancement: ctrl+enter insert a new line at the end of current line
|
||||
- enhancement: create file in files view
|
||||
|
||||
Red Panda C++ Version 0.14.5
|
||||
- fix: the "gnu c++ 20" option in compiler set options is wrong
|
||||
|
|
|
@ -689,54 +689,54 @@ p, li { white-space: pre-wrap; }
|
|||
<context>
|
||||
<name>CompilerManager</name>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="72"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="113"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="143"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="175"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="194"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="73"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="114"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="144"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="176"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="195"/>
|
||||
<source>No compiler set</source>
|
||||
<translation>无编译器设置</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="73"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="114"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="144"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="176"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="195"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="74"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="115"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="145"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="177"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="196"/>
|
||||
<source>No compiler set is configured.</source>
|
||||
<translation>没有配置编译器设置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="73"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="114"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="144"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="176"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="195"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="74"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="115"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="145"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="177"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="196"/>
|
||||
<source>Can't start debugging.</source>
|
||||
<translation>无法启动调试器</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="83"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="84"/>
|
||||
<source>Encoding not support</source>
|
||||
<translation>不支持字符编码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="84"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="85"/>
|
||||
<source>Clang only support utf-8 encoding.</source>
|
||||
<translation>Clang只支持UTF-8编码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="86"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="87"/>
|
||||
<source>Strings in the program might be wrongly processed.</source>
|
||||
<translation>程序中的文字内容可能无法被正确处理和显示。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="254"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="258"/>
|
||||
<source>Can't find Console Pauser</source>
|
||||
<translation>找不到Console Pauser程序</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/compilermanager.cpp" line="255"/>
|
||||
<location filename="compiler/compilermanager.cpp" line="259"/>
|
||||
<source>Console Pauser "%1" doesn't exists!</source>
|
||||
<translation>找不到Console Pauser程序"%1"!</translation>
|
||||
</message>
|
||||
|
@ -2282,7 +2282,7 @@ Are you really want to continue?</oldsource>
|
|||
<context>
|
||||
<name>ExecutableRunner</name>
|
||||
<message>
|
||||
<location filename="compiler/executablerunner.cpp" line="241"/>
|
||||
<location filename="compiler/executablerunner.cpp" line="252"/>
|
||||
<source>The runner process '%1' failed to start.</source>
|
||||
<oldsource>The runner process failed to start.</oldsource>
|
||||
<translation>无法启动程序运行进程'%1'。</translation>
|
||||
|
@ -2292,17 +2292,17 @@ Are you really want to continue?</oldsource>
|
|||
<translation type="vanished">程序运行进程启动后崩溃。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/executablerunner.cpp" line="248"/>
|
||||
<location filename="compiler/executablerunner.cpp" line="259"/>
|
||||
<source>The last waitFor...() function timed out.</source>
|
||||
<translation>waitFor()函数等待超时。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/executablerunner.cpp" line="251"/>
|
||||
<location filename="compiler/executablerunner.cpp" line="262"/>
|
||||
<source>An error occurred when attempting to write to the runner process.</source>
|
||||
<translation>在向程序运行进程写入内容时出错。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="compiler/executablerunner.cpp" line="254"/>
|
||||
<location filename="compiler/executablerunner.cpp" line="265"/>
|
||||
<source>An error occurred when attempting to read from the runner process.</source>
|
||||
<translation>在从程序运行进程读取内容时出错。</translation>
|
||||
</message>
|
||||
|
@ -3788,11 +3788,11 @@ Are you really want to continue?</oldsource>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="560"/>
|
||||
<location filename="mainwindow.ui" line="2640"/>
|
||||
<location filename="mainwindow.cpp" line="4336"/>
|
||||
<location filename="mainwindow.cpp" line="4339"/>
|
||||
<location filename="mainwindow.cpp" line="4343"/>
|
||||
<location filename="mainwindow.cpp" line="4346"/>
|
||||
<location filename="mainwindow.cpp" line="5989"/>
|
||||
<location filename="mainwindow.cpp" line="4374"/>
|
||||
<location filename="mainwindow.cpp" line="4377"/>
|
||||
<location filename="mainwindow.cpp" line="4381"/>
|
||||
<location filename="mainwindow.cpp" line="4384"/>
|
||||
<location filename="mainwindow.cpp" line="6027"/>
|
||||
<source>Issues</source>
|
||||
<translation>编译器</translation>
|
||||
</message>
|
||||
|
@ -4065,7 +4065,7 @@ Are you really want to continue?</oldsource>
|
|||
<location filename="mainwindow.ui" line="1892"/>
|
||||
<location filename="mainwindow.cpp" line="2373"/>
|
||||
<location filename="mainwindow.cpp" line="2423"/>
|
||||
<location filename="mainwindow.cpp" line="2847"/>
|
||||
<location filename="mainwindow.cpp" line="2854"/>
|
||||
<source>Copy</source>
|
||||
<translation>复制</translation>
|
||||
</message>
|
||||
|
@ -4088,7 +4088,7 @@ Are you really want to continue?</oldsource>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="1913"/>
|
||||
<location filename="mainwindow.cpp" line="2389"/>
|
||||
<location filename="mainwindow.cpp" line="2853"/>
|
||||
<location filename="mainwindow.cpp" line="2860"/>
|
||||
<source>Select All</source>
|
||||
<translation>选择全部</translation>
|
||||
</message>
|
||||
|
@ -4215,7 +4215,7 @@ Are you really want to continue?</oldsource>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="359"/>
|
||||
<location filename="mainwindow.ui" line="362"/>
|
||||
<location filename="mainwindow.cpp" line="6324"/>
|
||||
<location filename="mainwindow.cpp" line="6362"/>
|
||||
<source>New Problem Set</source>
|
||||
<translation>新建试题集</translation>
|
||||
</message>
|
||||
|
@ -4234,14 +4234,14 @@ Are you really want to continue?</oldsource>
|
|||
<message>
|
||||
<location filename="mainwindow.ui" line="401"/>
|
||||
<location filename="mainwindow.ui" line="404"/>
|
||||
<location filename="mainwindow.cpp" line="6367"/>
|
||||
<location filename="mainwindow.cpp" line="6405"/>
|
||||
<source>Save Problem Set</source>
|
||||
<translation>保存试题集</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="415"/>
|
||||
<location filename="mainwindow.ui" line="418"/>
|
||||
<location filename="mainwindow.cpp" line="6391"/>
|
||||
<location filename="mainwindow.cpp" line="6429"/>
|
||||
<source>Load Problem Set</source>
|
||||
<translation>载入试题集</translation>
|
||||
</message>
|
||||
|
@ -4580,7 +4580,7 @@ Are you really want to continue?</oldsource>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2315"/>
|
||||
<location filename="mainwindow.cpp" line="5205"/>
|
||||
<location filename="mainwindow.cpp" line="5243"/>
|
||||
<source>Clear all breakpoints</source>
|
||||
<translation>删除所有断点</translation>
|
||||
</message>
|
||||
|
@ -4641,6 +4641,7 @@ Are you really want to continue?</oldsource>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2405"/>
|
||||
<location filename="mainwindow.cpp" line="2749"/>
|
||||
<source>New File</source>
|
||||
<translation>新建项目文件</translation>
|
||||
</message>
|
||||
|
@ -4681,7 +4682,7 @@ Are you really want to continue?</oldsource>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2469"/>
|
||||
<location filename="mainwindow.cpp" line="5929"/>
|
||||
<location filename="mainwindow.cpp" line="5967"/>
|
||||
<source>Rename Symbol</source>
|
||||
<translation>重命名符号</translation>
|
||||
</message>
|
||||
|
@ -4702,13 +4703,13 @@ Are you really want to continue?</oldsource>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2489"/>
|
||||
<location filename="mainwindow.cpp" line="6120"/>
|
||||
<location filename="mainwindow.cpp" line="6158"/>
|
||||
<source>Export As RTF</source>
|
||||
<translation>导出为RTF</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2494"/>
|
||||
<location filename="mainwindow.cpp" line="6142"/>
|
||||
<location filename="mainwindow.cpp" line="6180"/>
|
||||
<source>Export As HTML</source>
|
||||
<translation>导出为HTML</translation>
|
||||
</message>
|
||||
|
@ -4977,7 +4978,7 @@ Are you really want to continue?</oldsource>
|
|||
<translation>运行参数...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2896"/>
|
||||
<location filename="mainwindow.cpp" line="2903"/>
|
||||
<source>File Encoding</source>
|
||||
<translation>文件编码</translation>
|
||||
</message>
|
||||
|
@ -5192,7 +5193,7 @@ Are you really want to continue?</oldsource>
|
|||
<message>
|
||||
<location filename="mainwindow.cpp" line="2396"/>
|
||||
<location filename="mainwindow.cpp" line="2449"/>
|
||||
<location filename="mainwindow.cpp" line="2842"/>
|
||||
<location filename="mainwindow.cpp" line="2849"/>
|
||||
<source>Clear</source>
|
||||
<translation>清除</translation>
|
||||
</message>
|
||||
|
@ -5208,7 +5209,7 @@ Are you really want to continue?</oldsource>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="277"/>
|
||||
<location filename="mainwindow.cpp" line="6333"/>
|
||||
<location filename="mainwindow.cpp" line="6371"/>
|
||||
<source>Problem Set %1</source>
|
||||
<translation>试题集%1</translation>
|
||||
</message>
|
||||
|
@ -5282,15 +5283,15 @@ Are you really want to continue?</oldsource>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2350"/>
|
||||
<location filename="mainwindow.cpp" line="6201"/>
|
||||
<location filename="mainwindow.cpp" line="6241"/>
|
||||
<location filename="mainwindow.cpp" line="6239"/>
|
||||
<location filename="mainwindow.cpp" line="6279"/>
|
||||
<source>Bookmark Description</source>
|
||||
<translation>书签描述</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2351"/>
|
||||
<location filename="mainwindow.cpp" line="6202"/>
|
||||
<location filename="mainwindow.cpp" line="6242"/>
|
||||
<location filename="mainwindow.cpp" line="6240"/>
|
||||
<location filename="mainwindow.cpp" line="6280"/>
|
||||
<source>Description:</source>
|
||||
<translation>描述:</translation>
|
||||
</message>
|
||||
|
@ -5402,276 +5403,286 @@ Are you really want to continue?</oldsource>
|
|||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2743"/>
|
||||
<location filename="mainwindow.cpp" line="3608"/>
|
||||
<location filename="mainwindow.cpp" line="3616"/>
|
||||
<source>New Folder</source>
|
||||
<translation>新建文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2748"/>
|
||||
<location filename="mainwindow.cpp" line="3622"/>
|
||||
<location filename="mainwindow.cpp" line="3628"/>
|
||||
<location filename="mainwindow.cpp" line="5790"/>
|
||||
<location filename="mainwindow.cpp" line="2755"/>
|
||||
<location filename="mainwindow.cpp" line="3660"/>
|
||||
<location filename="mainwindow.cpp" line="3666"/>
|
||||
<location filename="mainwindow.cpp" line="5828"/>
|
||||
<source>Delete</source>
|
||||
<translation>删除</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2754"/>
|
||||
<location filename="mainwindow.cpp" line="2761"/>
|
||||
<source>Open in Editor</source>
|
||||
<translation>在编辑器中打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2766"/>
|
||||
<location filename="mainwindow.cpp" line="2773"/>
|
||||
<source>Open in External Program</source>
|
||||
<translation>使用外部程序打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2776"/>
|
||||
<location filename="mainwindow.cpp" line="2783"/>
|
||||
<source>Open in Terminal</source>
|
||||
<translation>在终端中打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2792"/>
|
||||
<location filename="mainwindow.cpp" line="2799"/>
|
||||
<source>Open in Windows Explorer</source>
|
||||
<translation>在Windows浏览器中打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2862"/>
|
||||
<location filename="mainwindow.cpp" line="2869"/>
|
||||
<source>Character sets</source>
|
||||
<translation>字符集</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2910"/>
|
||||
<location filename="mainwindow.cpp" line="2917"/>
|
||||
<source>Convert to %1</source>
|
||||
<translation>转换为%1编码</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3008"/>
|
||||
<location filename="mainwindow.cpp" line="3015"/>
|
||||
<source>%1 files autosaved</source>
|
||||
<translation>已自动保存%1个文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3317"/>
|
||||
<location filename="mainwindow.cpp" line="3325"/>
|
||||
<source>Set answer to...</source>
|
||||
<translation>设置答案源代码...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3349"/>
|
||||
<location filename="mainwindow.cpp" line="3357"/>
|
||||
<source>select other file...</source>
|
||||
<translation>选择其他文件...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3355"/>
|
||||
<location filename="mainwindow.cpp" line="3363"/>
|
||||
<source>Select Answer Source File</source>
|
||||
<translation>选择答案源代码文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3357"/>
|
||||
<location filename="mainwindow.cpp" line="3365"/>
|
||||
<source>C/C++Source Files (*.c *.cpp *.cc *.cxx)</source>
|
||||
<oldsource>C/C++Source Files (*.c *.cpp *.cc *.cxx</oldsource>
|
||||
<translation>C/C++源代码文件 (*.c *.cpp *.cc *.cxx)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3612"/>
|
||||
<location filename="mainwindow.cpp" line="3620"/>
|
||||
<source>New Folder %1</source>
|
||||
<translation>新建文件夹%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3623"/>
|
||||
<location filename="mainwindow.cpp" line="3644"/>
|
||||
<source>Untitled</source>
|
||||
<translation>无标题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3648"/>
|
||||
<source>Untitled %1</source>
|
||||
<translation>无标题%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3661"/>
|
||||
<source>Do you really want to delete %1?</source>
|
||||
<translation>你真的要删除%1吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3629"/>
|
||||
<location filename="mainwindow.cpp" line="3667"/>
|
||||
<source>Do you really want to delete %1 files?</source>
|
||||
<translation>你真的要删除%1个文件吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3832"/>
|
||||
<location filename="mainwindow.cpp" line="3870"/>
|
||||
<source>Save project</source>
|
||||
<translation>保存项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3833"/>
|
||||
<location filename="mainwindow.cpp" line="3871"/>
|
||||
<source>The project '%1' has modifications.</source>
|
||||
<translation>项目'%1'有改动。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3835"/>
|
||||
<location filename="mainwindow.cpp" line="6327"/>
|
||||
<location filename="mainwindow.cpp" line="3873"/>
|
||||
<location filename="mainwindow.cpp" line="6365"/>
|
||||
<source>Do you want to save it?</source>
|
||||
<translation>需要保存吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3922"/>
|
||||
<location filename="mainwindow.cpp" line="3933"/>
|
||||
<location filename="mainwindow.cpp" line="3960"/>
|
||||
<location filename="mainwindow.cpp" line="3971"/>
|
||||
<source>File Changed</source>
|
||||
<translation>文件已发生变化</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4005"/>
|
||||
<location filename="mainwindow.cpp" line="4043"/>
|
||||
<source>New Project File?</source>
|
||||
<translation>新建项目文件?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4006"/>
|
||||
<location filename="mainwindow.cpp" line="4044"/>
|
||||
<source>Do you want to add the new file to the project?</source>
|
||||
<translation>您是否要将新建的文件加入项目?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4082"/>
|
||||
<location filename="mainwindow.cpp" line="4092"/>
|
||||
<location filename="mainwindow.cpp" line="4104"/>
|
||||
<location filename="mainwindow.cpp" line="6380"/>
|
||||
<location filename="mainwindow.cpp" line="4120"/>
|
||||
<location filename="mainwindow.cpp" line="4130"/>
|
||||
<location filename="mainwindow.cpp" line="4142"/>
|
||||
<location filename="mainwindow.cpp" line="6418"/>
|
||||
<source>Save Error</source>
|
||||
<translation>保存失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4264"/>
|
||||
<location filename="mainwindow.cpp" line="4302"/>
|
||||
<source>Change Project Compiler Set</source>
|
||||
<translation>改变项目编译器配置集</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4265"/>
|
||||
<location filename="mainwindow.cpp" line="4303"/>
|
||||
<source>Change the project's compiler set will lose all custom compiler set options.</source>
|
||||
<translation>改变项目的编译器配置集会导致所有的自定义编译器选项被重置。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4267"/>
|
||||
<location filename="mainwindow.cpp" line="4305"/>
|
||||
<source>Do you really want to do that?</source>
|
||||
<translation>你真的想要做那些吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5206"/>
|
||||
<location filename="mainwindow.cpp" line="5244"/>
|
||||
<source>Do you really want to clear all breakpoints in this file?</source>
|
||||
<translation>您真的要清除该文件的所有断点吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5404"/>
|
||||
<location filename="mainwindow.cpp" line="5442"/>
|
||||
<source>New project</source>
|
||||
<translation>新建项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5405"/>
|
||||
<location filename="mainwindow.cpp" line="5443"/>
|
||||
<source>Close %1 and start new project?</source>
|
||||
<translation>关闭'%1'以打开新项目?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5418"/>
|
||||
<location filename="mainwindow.cpp" line="5456"/>
|
||||
<source>Folder not exist</source>
|
||||
<translation>文件夹不存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5419"/>
|
||||
<location filename="mainwindow.cpp" line="5457"/>
|
||||
<source>Folder '%1' doesn't exist. Create it now?</source>
|
||||
<translation>文件夹'%1'不存在。是否创建?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5426"/>
|
||||
<location filename="mainwindow.cpp" line="5464"/>
|
||||
<source>Can't create folder</source>
|
||||
<translation>无法创建文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5427"/>
|
||||
<location filename="mainwindow.cpp" line="5465"/>
|
||||
<source>Failed to create folder '%1'.</source>
|
||||
<translation>创建文件夹'%1'失败。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5442"/>
|
||||
<location filename="mainwindow.cpp" line="5480"/>
|
||||
<source>Save new project as</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5791"/>
|
||||
<location filename="mainwindow.cpp" line="5829"/>
|
||||
<source>Folder %1 is not empty.</source>
|
||||
<translation>文件夹%1不是空的。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5792"/>
|
||||
<location filename="mainwindow.cpp" line="5830"/>
|
||||
<source>Do you really want to delete it?</source>
|
||||
<translation>你真的要删除它吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6262"/>
|
||||
<location filename="mainwindow.cpp" line="6300"/>
|
||||
<source>Change working folder</source>
|
||||
<translation>改变工作文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6263"/>
|
||||
<location filename="mainwindow.cpp" line="6301"/>
|
||||
<source>File '%1' is not in the current working folder.</source>
|
||||
<oldsource>File '%1' is not in the current working folder</oldsource>
|
||||
<translation>文件'%1'不在当前工作文件夹中。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6266"/>
|
||||
<location filename="mainwindow.cpp" line="6304"/>
|
||||
<source>Do you want to change working folder to '%1'?</source>
|
||||
<translation>是否将工作文件夹改设为'%1'?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6905"/>
|
||||
<location filename="mainwindow.cpp" line="6943"/>
|
||||
<source>Can't Commit</source>
|
||||
<translation>无法提交</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6906"/>
|
||||
<location filename="mainwindow.cpp" line="6944"/>
|
||||
<source>Git needs user info to commit.</source>
|
||||
<translation>Git需要用信息进行提交。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.ui" line="2559"/>
|
||||
<location filename="mainwindow.ui" line="2562"/>
|
||||
<location filename="mainwindow.cpp" line="6303"/>
|
||||
<location filename="mainwindow.cpp" line="6341"/>
|
||||
<source>Choose Working Folder</source>
|
||||
<translation>选择工作文件夹</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6673"/>
|
||||
<location filename="mainwindow.cpp" line="6725"/>
|
||||
<location filename="mainwindow.cpp" line="6711"/>
|
||||
<location filename="mainwindow.cpp" line="6763"/>
|
||||
<source>Header Exists</source>
|
||||
<translation>头文件已存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6674"/>
|
||||
<location filename="mainwindow.cpp" line="6726"/>
|
||||
<location filename="mainwindow.cpp" line="6712"/>
|
||||
<location filename="mainwindow.cpp" line="6764"/>
|
||||
<source>Header file "%1" already exists!</source>
|
||||
<translation>头文件"%1"已存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6731"/>
|
||||
<location filename="mainwindow.cpp" line="6769"/>
|
||||
<source>Source Exists</source>
|
||||
<translation>源文件已存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6732"/>
|
||||
<location filename="mainwindow.cpp" line="6770"/>
|
||||
<source>Source file "%1" already exists!</source>
|
||||
<translation>源文件"%1"已存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6884"/>
|
||||
<location filename="mainwindow.cpp" line="6922"/>
|
||||
<source>Can't commit!</source>
|
||||
<translation>无法提交!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6885"/>
|
||||
<location filename="mainwindow.cpp" line="6923"/>
|
||||
<source>The following files are in conflicting:</source>
|
||||
<translation>下列文件处于冲突状态,请解决后重新添加和提交:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6890"/>
|
||||
<location filename="mainwindow.cpp" line="6928"/>
|
||||
<source>Commit Message</source>
|
||||
<translation>提交信息</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6890"/>
|
||||
<location filename="mainwindow.cpp" line="6928"/>
|
||||
<source>Commit Message:</source>
|
||||
<translation>提交信息:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6893"/>
|
||||
<location filename="mainwindow.cpp" line="6931"/>
|
||||
<source>Commit Failed</source>
|
||||
<translation>提交失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6894"/>
|
||||
<location filename="mainwindow.cpp" line="6932"/>
|
||||
<source>Commit message shouldn't be empty!</source>
|
||||
<translation>提交信息不能为空!</translation>
|
||||
</message>
|
||||
|
@ -5680,125 +5691,125 @@ Are you really want to continue?</oldsource>
|
|||
<translation type="vanished">小熊猫Dev-C++项目文件 (*.dev)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5455"/>
|
||||
<location filename="mainwindow.cpp" line="5493"/>
|
||||
<source>New project fail</source>
|
||||
<translation>新建项目失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5456"/>
|
||||
<location filename="mainwindow.cpp" line="5494"/>
|
||||
<source>Can't assign project template</source>
|
||||
<translation>无法使用模板创建项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5551"/>
|
||||
<location filename="mainwindow.cpp" line="5589"/>
|
||||
<source>Remove file</source>
|
||||
<translation>删除文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5552"/>
|
||||
<location filename="mainwindow.cpp" line="5590"/>
|
||||
<source>Remove the file from disk?</source>
|
||||
<translation>同时从硬盘上删除文件?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5741"/>
|
||||
<location filename="mainwindow.cpp" line="5779"/>
|
||||
<source>untitled</source>
|
||||
<translation>无标题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5751"/>
|
||||
<location filename="mainwindow.cpp" line="5789"/>
|
||||
<source>New Project File Name</source>
|
||||
<translation>新的项目文件名</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5752"/>
|
||||
<location filename="mainwindow.cpp" line="5790"/>
|
||||
<source>File Name:</source>
|
||||
<translation>文件名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5758"/>
|
||||
<location filename="mainwindow.cpp" line="5796"/>
|
||||
<source>File Already Exists!</source>
|
||||
<translation>文件已存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5759"/>
|
||||
<location filename="mainwindow.cpp" line="5797"/>
|
||||
<source>File '%1' already exists!</source>
|
||||
<translation>文件'%1'已经存在!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5500"/>
|
||||
<location filename="mainwindow.cpp" line="5538"/>
|
||||
<source>Add to project</source>
|
||||
<translation>添加到项目</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5444"/>
|
||||
<location filename="mainwindow.cpp" line="5482"/>
|
||||
<source>Red Panda C++ project file (*.dev)</source>
|
||||
<translation>小熊猫C++项目文件(*.dev)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5915"/>
|
||||
<location filename="mainwindow.cpp" line="5953"/>
|
||||
<source>Rename Error</source>
|
||||
<translation>重命名出错</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5916"/>
|
||||
<location filename="mainwindow.cpp" line="5954"/>
|
||||
<source>Symbol '%1' is defined in system header.</source>
|
||||
<translation>符号'%1'在系统头文件中定义,无法修改。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="5930"/>
|
||||
<location filename="mainwindow.cpp" line="5968"/>
|
||||
<source>New Name</source>
|
||||
<translation>新名称</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6063"/>
|
||||
<location filename="mainwindow.cpp" line="6075"/>
|
||||
<location filename="mainwindow.cpp" line="6101"/>
|
||||
<location filename="mainwindow.cpp" line="6113"/>
|
||||
<source>Replace Error</source>
|
||||
<translation>替换出错</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6064"/>
|
||||
<location filename="mainwindow.cpp" line="6102"/>
|
||||
<source>Can't open file '%1' for replace!</source>
|
||||
<translation>无法打开文件'%1'进行替换!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6076"/>
|
||||
<location filename="mainwindow.cpp" line="6114"/>
|
||||
<source>Contents has changed since last search!</source>
|
||||
<translation>内容和上次查找时不一致。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6122"/>
|
||||
<location filename="mainwindow.cpp" line="6160"/>
|
||||
<source>Rich Text Format Files (*.rtf)</source>
|
||||
<translation>RTF格式文件 (*.rtf)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6144"/>
|
||||
<location filename="mainwindow.cpp" line="6182"/>
|
||||
<source>HTML Files (*.html)</source>
|
||||
<translation>HTML文件 (*.html)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6325"/>
|
||||
<location filename="mainwindow.cpp" line="6363"/>
|
||||
<source>The current problem set is not empty.</source>
|
||||
<translation>当前的试题集不是空的。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6343"/>
|
||||
<location filename="mainwindow.cpp" line="6381"/>
|
||||
<source>Problem %1</source>
|
||||
<translation>试题%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6369"/>
|
||||
<location filename="mainwindow.cpp" line="6393"/>
|
||||
<location filename="mainwindow.cpp" line="6407"/>
|
||||
<location filename="mainwindow.cpp" line="6431"/>
|
||||
<source>Problem Set Files (*.pbs)</source>
|
||||
<translation>试题集文件 (*.pbs)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6399"/>
|
||||
<location filename="mainwindow.cpp" line="6437"/>
|
||||
<source>Load Error</source>
|
||||
<translation>载入失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3509"/>
|
||||
<location filename="mainwindow.cpp" line="6413"/>
|
||||
<location filename="mainwindow.cpp" line="3517"/>
|
||||
<location filename="mainwindow.cpp" line="6451"/>
|
||||
<source>Problem Case %1</source>
|
||||
<translation>试题案例%1</translation>
|
||||
</message>
|
||||
|
@ -5811,13 +5822,13 @@ Are you really want to continue?</oldsource>
|
|||
<location filename="mainwindow.cpp" line="257"/>
|
||||
<location filename="mainwindow.cpp" line="1108"/>
|
||||
<location filename="mainwindow.cpp" line="2231"/>
|
||||
<location filename="mainwindow.cpp" line="2887"/>
|
||||
<location filename="mainwindow.cpp" line="3929"/>
|
||||
<location filename="mainwindow.cpp" line="4040"/>
|
||||
<location filename="mainwindow.cpp" line="4233"/>
|
||||
<location filename="mainwindow.cpp" line="4245"/>
|
||||
<location filename="mainwindow.cpp" line="4653"/>
|
||||
<location filename="mainwindow.cpp" line="4665"/>
|
||||
<location filename="mainwindow.cpp" line="2894"/>
|
||||
<location filename="mainwindow.cpp" line="3967"/>
|
||||
<location filename="mainwindow.cpp" line="4078"/>
|
||||
<location filename="mainwindow.cpp" line="4271"/>
|
||||
<location filename="mainwindow.cpp" line="4283"/>
|
||||
<location filename="mainwindow.cpp" line="4691"/>
|
||||
<location filename="mainwindow.cpp" line="4703"/>
|
||||
<source>Error</source>
|
||||
<translation>错误</translation>
|
||||
</message>
|
||||
|
@ -5838,83 +5849,83 @@ Are you really want to continue?</oldsource>
|
|||
<translation>清除历史</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3128"/>
|
||||
<location filename="mainwindow.cpp" line="3265"/>
|
||||
<location filename="mainwindow.cpp" line="3135"/>
|
||||
<location filename="mainwindow.cpp" line="3273"/>
|
||||
<source>Version Control</source>
|
||||
<translation>版本控制</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3923"/>
|
||||
<location filename="mainwindow.cpp" line="3961"/>
|
||||
<source>File '%1' was changed.</source>
|
||||
<translation>磁盘文件'%1'已被修改。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3923"/>
|
||||
<location filename="mainwindow.cpp" line="3961"/>
|
||||
<source>Reload its content from disk?</source>
|
||||
<translation>是否重新读取它的内容?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3934"/>
|
||||
<location filename="mainwindow.cpp" line="3972"/>
|
||||
<source>File '%1' was removed.</source>
|
||||
<translation>磁盘文件'%1'已被删除。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="3934"/>
|
||||
<location filename="mainwindow.cpp" line="3972"/>
|
||||
<source>Keep it open?</source>
|
||||
<translation>是否保持它在小熊猫C++中打开的编辑窗口?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4033"/>
|
||||
<location filename="mainwindow.cpp" line="4071"/>
|
||||
<source>Open</source>
|
||||
<translation>打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4429"/>
|
||||
<location filename="mainwindow.cpp" line="4467"/>
|
||||
<source>Compile Failed</source>
|
||||
<translation>编译失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4435"/>
|
||||
<location filename="mainwindow.cpp" line="4473"/>
|
||||
<source>Run Failed</source>
|
||||
<translation>运行失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2916"/>
|
||||
<location filename="mainwindow.cpp" line="4682"/>
|
||||
<location filename="mainwindow.cpp" line="4696"/>
|
||||
<location filename="mainwindow.cpp" line="2923"/>
|
||||
<location filename="mainwindow.cpp" line="4720"/>
|
||||
<location filename="mainwindow.cpp" line="4734"/>
|
||||
<source>Confirm Convertion</source>
|
||||
<translation>确认转换</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="2917"/>
|
||||
<location filename="mainwindow.cpp" line="4683"/>
|
||||
<location filename="mainwindow.cpp" line="4697"/>
|
||||
<location filename="mainwindow.cpp" line="2924"/>
|
||||
<location filename="mainwindow.cpp" line="4721"/>
|
||||
<location filename="mainwindow.cpp" line="4735"/>
|
||||
<source>The editing file will be saved using %1 encoding. <br />This operation can't be reverted. <br />Are you sure to continue?</source>
|
||||
<translation>当前编辑器中的文件将会使用%1编码保存。<br />这项操作无法被撤回。<br />你确定要继续吗?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4847"/>
|
||||
<location filename="mainwindow.cpp" line="4885"/>
|
||||
<source>New Watch Expression</source>
|
||||
<translation>新监视表达式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4848"/>
|
||||
<location filename="mainwindow.cpp" line="4886"/>
|
||||
<source>Enter Watch Expression (it is recommended to use 'this->' for class members):</source>
|
||||
<translation>输入监视表达式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4901"/>
|
||||
<location filename="mainwindow.cpp" line="4939"/>
|
||||
<source>Parsing file %1 of %2: "%3"</source>
|
||||
<translation>(%1/%2)正在解析文件"%3"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4923"/>
|
||||
<location filename="mainwindow.cpp" line="4929"/>
|
||||
<location filename="mainwindow.cpp" line="4961"/>
|
||||
<location filename="mainwindow.cpp" line="4967"/>
|
||||
<source>Done parsing %1 files in %2 seconds</source>
|
||||
<translation>完成%1个文件的解析,用时%2秒</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="4926"/>
|
||||
<location filename="mainwindow.cpp" line="4964"/>
|
||||
<source>(%1 files per second)</source>
|
||||
<translation>(每秒%1个文件)</translation>
|
||||
</message>
|
||||
|
@ -7577,12 +7588,12 @@ Are you really want to continue?</oldsource>
|
|||
<translation>无标题</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parser/cppparser.cpp" line="991"/>
|
||||
<location filename="parser/cppparser.cpp" line="1004"/>
|
||||
<source>constructor</source>
|
||||
<translation>构造函数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="parser/cppparser.cpp" line="998"/>
|
||||
<location filename="parser/cppparser.cpp" line="1011"/>
|
||||
<source>destructor</source>
|
||||
<translation>析构函数</translation>
|
||||
</message>
|
||||
|
@ -8065,7 +8076,7 @@ Are you really want to continue?</oldsource>
|
|||
<translation>自动链接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6314"/>
|
||||
<location filename="mainwindow.cpp" line="6352"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="170"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="209"/>
|
||||
|
@ -8141,15 +8152,15 @@ Are you really want to continue?</oldsource>
|
|||
<translation>杂项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6315"/>
|
||||
<location filename="mainwindow.cpp" line="6628"/>
|
||||
<location filename="mainwindow.cpp" line="6353"/>
|
||||
<location filename="mainwindow.cpp" line="6666"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="203"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="206"/>
|
||||
<source>Program Runner</source>
|
||||
<translation>程序运行</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="6627"/>
|
||||
<location filename="mainwindow.cpp" line="6665"/>
|
||||
<location filename="settingsdialog/settingsdialog.cpp" line="206"/>
|
||||
<source>Problem Set</source>
|
||||
<translation>试题集</translation>
|
||||
|
|
|
@ -2744,6 +2744,13 @@ void MainWindow::buildContextMenus()
|
|||
ui->treeFiles);
|
||||
connect(mFilesView_CreateFolder, &QAction::triggered,
|
||||
this, &MainWindow::onFilesViewCreateFolder);
|
||||
|
||||
mFilesView_CreateFile = createActionFor(
|
||||
tr("New File"),
|
||||
ui->treeFiles);
|
||||
connect(mFilesView_CreateFile, &QAction::triggered,
|
||||
this, &MainWindow::onFilesViewCreateFile);
|
||||
|
||||
mFilesView_RemoveFile = createActionFor(
|
||||
tr("Delete"),
|
||||
ui->treeFiles);
|
||||
|
@ -3236,6 +3243,7 @@ void MainWindow::onFilesViewContextMenu(const QPoint &pos)
|
|||
menu.addAction(ui->actionOpen_Folder);
|
||||
menu.addSeparator();
|
||||
menu.addAction(mFilesView_CreateFolder);
|
||||
menu.addAction(mFilesView_CreateFile);
|
||||
menu.addSeparator();
|
||||
if (pSettings->vcs().gitOk()) {
|
||||
if (hasRepository) {
|
||||
|
@ -3614,6 +3622,38 @@ void MainWindow::onFilesViewCreateFolder()
|
|||
dir.mkdir(dir.filePath(folderName));
|
||||
}
|
||||
|
||||
void MainWindow::onFilesViewCreateFile()
|
||||
{
|
||||
QModelIndex index = ui->treeFiles->currentIndex();
|
||||
QDir dir;
|
||||
if (index.isValid()
|
||||
&& ui->treeFiles->selectionModel()->isSelected(index)) {
|
||||
if (mFileSystemModel.isDir(index))
|
||||
dir = QDir(mFileSystemModel.fileInfo(index).absoluteFilePath());
|
||||
else
|
||||
dir = mFileSystemModel.fileInfo(index).absoluteDir();
|
||||
ui->treeFiles->expand(index);
|
||||
} else {
|
||||
dir = mFileSystemModel.rootDirectory();
|
||||
}
|
||||
QString suffix;
|
||||
if (pSettings->editor().defaultFileCpp())
|
||||
suffix=".cpp";
|
||||
else
|
||||
suffix=".c";
|
||||
QString fileName = tr("Untitled")+suffix;
|
||||
int count = 0;
|
||||
while (dir.exists(fileName)) {
|
||||
count++;
|
||||
fileName = tr("Untitled %1").arg(count)+suffix;
|
||||
}
|
||||
QFile file(dir.filePath(fileName));
|
||||
file.open(QFile::NewOnly);
|
||||
QModelIndex newIndex = mFileSystemModel.index(fileName);
|
||||
ui->treeFiles->selectionModel()->select(newIndex, QItemSelectionModel::SelectionFlag::Rows);
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::onFilesViewRemoveFiles()
|
||||
{
|
||||
QModelIndexList indexList = ui->treeFiles->selectionModel()->selectedRows();
|
||||
|
|
|
@ -290,6 +290,7 @@ private slots:
|
|||
void onShowInsertCodeSnippetMenu();
|
||||
|
||||
void onFilesViewCreateFolder();
|
||||
void onFilesViewCreateFile();
|
||||
void onFilesViewRemoveFiles();
|
||||
|
||||
void on_actionNew_triggered();
|
||||
|
@ -716,6 +717,7 @@ private:
|
|||
QAction * mFilesView_OpenInTerminal;
|
||||
QAction * mFilesView_OpenInExplorer;
|
||||
QAction * mFilesView_CreateFolder;
|
||||
QAction * mFilesView_CreateFile;
|
||||
QAction * mFilesView_RemoveFile;
|
||||
|
||||
//action for debug console
|
||||
|
|
Loading…
Reference in New Issue