- enhancement: redesign charset selection in the project options dialog's file widget

- fix: can't correctly load last open files / project with non-asii characters in path
 - fix: can't coorectly load last open project
This commit is contained in:
royqh1979 2021-09-29 19:03:22 +08:00
parent 3f310d81af
commit fac8c10f0c
8 changed files with 201 additions and 151 deletions

View File

@ -7,6 +7,9 @@ Version 0.2.2
- fix: can't correctly get system default encoding name when save file - fix: can't correctly get system default encoding name when save file
- fix: Tokenizer can't correctly handle array parameters - fix: Tokenizer can't correctly handle array parameters
- fix: debug actions enabled states not correct updated when processing debug mouse tooltips - fix: debug actions enabled states not correct updated when processing debug mouse tooltips
- enhancement: redesign charset selection in the project options dialog's file widget
- fix: can't correctly load last open files / project with non-asii characters in path
- fix: can't coorectly load last open project
Version 0.2.1 Version 0.2.1
- fix: crash when load last opens - fix: crash when load last opens

Binary file not shown.

View File

@ -27,17 +27,17 @@
<context> <context>
<name>BacktraceModel</name> <name>BacktraceModel</name>
<message> <message>
<location filename="debugger.cpp" line="1814"/> <location filename="debugger.cpp" line="1815"/>
<source>Function</source> <source>Function</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1816"/> <location filename="debugger.cpp" line="1817"/>
<source>Filename</source> <source>Filename</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1818"/> <location filename="debugger.cpp" line="1819"/>
<source>Line</source> <source>Line</source>
<translation></translation> <translation></translation>
</message> </message>
@ -45,17 +45,17 @@
<context> <context>
<name>BreakpointModel</name> <name>BreakpointModel</name>
<message> <message>
<location filename="debugger.cpp" line="1683"/> <location filename="debugger.cpp" line="1684"/>
<source>Filename</source> <source>Filename</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1685"/> <location filename="debugger.cpp" line="1686"/>
<source>Line</source> <source>Line</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1687"/> <location filename="debugger.cpp" line="1688"/>
<source>Condition</source> <source>Condition</source>
<translation></translation> <translation></translation>
</message> </message>
@ -2304,7 +2304,7 @@ Are you really want to continue?</source>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="300"/> <location filename="mainwindow.ui" line="300"/>
<location filename="mainwindow.cpp" line="2551"/> <location filename="mainwindow.cpp" line="2546"/>
<source>Issues</source> <source>Issues</source>
<translation></translation> <translation></translation>
</message> </message>
@ -2506,10 +2506,10 @@ Are you really want to continue?</source>
<location filename="mainwindow.ui" line="965"/> <location filename="mainwindow.ui" line="965"/>
<location filename="mainwindow.ui" line="1110"/> <location filename="mainwindow.ui" line="1110"/>
<location filename="mainwindow.ui" line="1113"/> <location filename="mainwindow.ui" line="1113"/>
<location filename="mainwindow.cpp" line="1154"/> <location filename="mainwindow.cpp" line="1147"/>
<location filename="mainwindow.cpp" line="1165"/> <location filename="mainwindow.cpp" line="1158"/>
<location filename="mainwindow.cpp" line="2265"/> <location filename="mainwindow.cpp" line="2260"/>
<location filename="mainwindow.cpp" line="2276"/> <location filename="mainwindow.cpp" line="2271"/>
<source>Compile</source> <source>Compile</source>
<translation></translation> <translation></translation>
</message> </message>
@ -2555,7 +2555,7 @@ Are you really want to continue?</source>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="1181"/> <location filename="mainwindow.ui" line="1181"/>
<location filename="mainwindow.cpp" line="1555"/> <location filename="mainwindow.cpp" line="1548"/>
<source>Copy</source> <source>Copy</source>
<translation></translation> <translation></translation>
</message> </message>
@ -2909,7 +2909,7 @@ Are you really want to continue?</source>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="1598"/> <location filename="mainwindow.ui" line="1598"/>
<location filename="mainwindow.cpp" line="3317"/> <location filename="mainwindow.cpp" line="3312"/>
<source>Clear all breakpoints</source> <source>Clear all breakpoints</source>
<translation></translation> <translation></translation>
</message> </message>
@ -3004,7 +3004,7 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1855"/> <location filename="mainwindow.cpp" line="1848"/>
<source>File Encoding</source> <source>File Encoding</source>
<translation></translation> <translation></translation>
</message> </message>
@ -3014,32 +3014,32 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="462"/> <location filename="mainwindow.cpp" line="455"/>
<location filename="mainwindow.cpp" line="464"/> <location filename="mainwindow.cpp" line="457"/>
<location filename="mainwindow.cpp" line="494"/> <location filename="mainwindow.cpp" line="487"/>
<location filename="mainwindow.cpp" line="496"/> <location filename="mainwindow.cpp" line="489"/>
<location filename="mainwindow.cpp" line="523"/> <location filename="mainwindow.cpp" line="516"/>
<location filename="mainwindow.cpp" line="525"/> <location filename="mainwindow.cpp" line="518"/>
<source>Debugging</source> <source>Debugging</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="467"/> <location filename="mainwindow.cpp" line="460"/>
<location filename="mainwindow.cpp" line="469"/> <location filename="mainwindow.cpp" line="462"/>
<location filename="mainwindow.cpp" line="500"/> <location filename="mainwindow.cpp" line="493"/>
<location filename="mainwindow.cpp" line="502"/> <location filename="mainwindow.cpp" line="495"/>
<location filename="mainwindow.cpp" line="528"/> <location filename="mainwindow.cpp" line="521"/>
<location filename="mainwindow.cpp" line="530"/> <location filename="mainwindow.cpp" line="523"/>
<source>Running</source> <source>Running</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="472"/> <location filename="mainwindow.cpp" line="465"/>
<location filename="mainwindow.cpp" line="474"/> <location filename="mainwindow.cpp" line="467"/>
<location filename="mainwindow.cpp" line="506"/> <location filename="mainwindow.cpp" line="499"/>
<location filename="mainwindow.cpp" line="508"/> <location filename="mainwindow.cpp" line="501"/>
<location filename="mainwindow.cpp" line="533"/> <location filename="mainwindow.cpp" line="526"/>
<location filename="mainwindow.cpp" line="535"/> <location filename="mainwindow.cpp" line="528"/>
<source>Compiling</source> <source>Compiling</source>
<translation></translation> <translation></translation>
</message> </message>
@ -3048,349 +3048,349 @@ Are you really want to continue?</source>
<translation type="vanished">:%1 :%2 :%3 :%4 :%5</translation> <translation type="vanished">:%1 :%2 :%3 :%4 :%5</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="667"/> <location filename="mainwindow.cpp" line="660"/>
<source>Line:%1 Col:%2 Selected:%3 Lines:%4 Length:%5</source> <source>Line:%1 Col:%2 Selected:%3 Lines:%4 Length:%5</source>
<translation>:%1 :%2 :%3 :%4 :%5</translation> <translation>:%1 :%2 :%3 :%4 :%5</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="685"/> <location filename="mainwindow.cpp" line="678"/>
<source>Read Only</source> <source>Read Only</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="687"/> <location filename="mainwindow.cpp" line="680"/>
<source>Insert</source> <source>Insert</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="689"/> <location filename="mainwindow.cpp" line="682"/>
<source>Overwrite</source> <source>Overwrite</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="752"/> <location filename="mainwindow.cpp" line="745"/>
<source>Close project</source> <source>Close project</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="753"/> <location filename="mainwindow.cpp" line="746"/>
<source>Are you sure you want to close %1?</source> <source>Are you sure you want to close %1?</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="946"/> <location filename="mainwindow.cpp" line="939"/>
<location filename="mainwindow.cpp" line="961"/> <location filename="mainwindow.cpp" line="954"/>
<source>Confirm</source> <source>Confirm</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="947"/> <location filename="mainwindow.cpp" line="940"/>
<location filename="mainwindow.cpp" line="955"/> <location filename="mainwindow.cpp" line="948"/>
<location filename="mainwindow.cpp" line="1155"/> <location filename="mainwindow.cpp" line="1148"/>
<source>Source file is not compiled.</source> <source>Source file is not compiled.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="948"/> <location filename="mainwindow.cpp" line="941"/>
<location filename="mainwindow.cpp" line="1155"/> <location filename="mainwindow.cpp" line="1148"/>
<source>Compile now?</source> <source>Compile now?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="962"/> <location filename="mainwindow.cpp" line="955"/>
<location filename="mainwindow.cpp" line="1166"/> <location filename="mainwindow.cpp" line="1159"/>
<source>Source file is more recent than executable.</source> <source>Source file is more recent than executable.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="963"/> <location filename="mainwindow.cpp" line="956"/>
<source>Recompile now?</source> <source>Recompile now?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1024"/> <location filename="mainwindow.cpp" line="1017"/>
<source>No compiler set</source> <source>No compiler set</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1025"/> <location filename="mainwindow.cpp" line="1018"/>
<source>No compiler set is configured.</source> <source>No compiler set is configured.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1025"/> <location filename="mainwindow.cpp" line="1018"/>
<source>Can&apos;t start debugging.</source> <source>Can&apos;t start debugging.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1040"/> <location filename="mainwindow.cpp" line="1033"/>
<location filename="mainwindow.cpp" line="1123"/> <location filename="mainwindow.cpp" line="1116"/>
<source>Enable debugging</source> <source>Enable debugging</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1041"/> <location filename="mainwindow.cpp" line="1034"/>
<location filename="mainwindow.cpp" line="1124"/> <location filename="mainwindow.cpp" line="1117"/>
<source>You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.&lt;BR /&gt;&lt;BR /&gt;Do you want to correct this now?</source> <source>You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.&lt;BR /&gt;&lt;BR /&gt;Do you want to correct this now?</source>
<translation>(-g3)(-s)&lt;br /&gt;&lt;br/&gt;</translation> <translation>(-g3)(-s)&lt;br /&gt;&lt;br/&gt;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1060"/> <location filename="mainwindow.cpp" line="1053"/>
<source>Project not built</source> <source>Project not built</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1061"/> <location filename="mainwindow.cpp" line="1054"/>
<source>Project hasn&apos;t been built. Build it now?</source> <source>Project hasn&apos;t been built. Build it now?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1075"/> <location filename="mainwindow.cpp" line="1068"/>
<source>Host applcation missing</source> <source>Host applcation missing</source>
<translation>宿</translation> <translation>宿</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1076"/> <location filename="mainwindow.cpp" line="1069"/>
<source>DLL project needs a host application to run.</source> <source>DLL project needs a host application to run.</source>
<translation>DLL宿</translation> <translation>DLL宿</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1078"/> <location filename="mainwindow.cpp" line="1071"/>
<source>But it&apos;s missing.</source> <source>But it&apos;s missing.</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1083"/> <location filename="mainwindow.cpp" line="1076"/>
<source>Host application not exists</source> <source>Host application not exists</source>
<translation>宿</translation> <translation>宿</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1084"/> <location filename="mainwindow.cpp" line="1077"/>
<source>Host application file &apos;%1&apos; doesn&apos;t exist.</source> <source>Host application file &apos;%1&apos; doesn&apos;t exist.</source>
<translation>宿&apos;%1&apos;</translation> <translation>宿&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1166"/> <location filename="mainwindow.cpp" line="1159"/>
<source>Recompile?</source> <source>Recompile?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1446"/> <location filename="mainwindow.cpp" line="1439"/>
<location filename="mainwindow.cpp" line="1472"/> <location filename="mainwindow.cpp" line="1465"/>
<source>Save last open info error</source> <source>Save last open info error</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1447"/> <location filename="mainwindow.cpp" line="1440"/>
<source>Can&apos;t remove old last open information file &apos;%1&apos;</source> <source>Can&apos;t remove old last open information file &apos;%1&apos;</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1473"/> <location filename="mainwindow.cpp" line="1466"/>
<source>Can&apos;t save last open info file &apos;%1&apos;</source> <source>Can&apos;t save last open info file &apos;%1&apos;</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1488"/> <location filename="mainwindow.cpp" line="1481"/>
<source>Load last open info error</source> <source>Load last open info error</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1489"/> <location filename="mainwindow.cpp" line="1482"/>
<source>Can&apos;t load last open info file &apos;%1&apos;</source> <source>Can&apos;t load last open info file &apos;%1&apos;</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1568"/> <location filename="mainwindow.cpp" line="1561"/>
<source>Copy all</source> <source>Copy all</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1581"/> <location filename="mainwindow.cpp" line="1574"/>
<source>Clear</source> <source>Clear</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1593"/> <location filename="mainwindow.cpp" line="1586"/>
<source>Remove this search</source> <source>Remove this search</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1603"/> <location filename="mainwindow.cpp" line="1596"/>
<source>Clear all searches</source> <source>Clear all searches</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1615"/> <location filename="mainwindow.cpp" line="1608"/>
<source>Breakpoint condition...</source> <source>Breakpoint condition...</source>
<translation>...</translation> <translation>...</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1627"/> <location filename="mainwindow.cpp" line="1620"/>
<source>Break point condition</source> <source>Break point condition</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1628"/> <location filename="mainwindow.cpp" line="1621"/>
<source>Enter the condition of the breakpoint:</source> <source>Enter the condition of the breakpoint:</source>
<translation>:</translation> <translation>:</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1637"/> <location filename="mainwindow.cpp" line="1630"/>
<source>Remove all breakpoints</source> <source>Remove all breakpoints</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1649"/> <location filename="mainwindow.cpp" line="1642"/>
<source>Rename File</source> <source>Rename File</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1657"/> <location filename="mainwindow.cpp" line="1650"/>
<location filename="mainwindow.cpp" line="1676"/> <location filename="mainwindow.cpp" line="1669"/>
<source>Add Folder</source> <source>Add Folder</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1673"/> <location filename="mainwindow.cpp" line="1666"/>
<source>New folder</source> <source>New folder</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1677"/> <location filename="mainwindow.cpp" line="1670"/>
<source>Folder name:</source> <source>Folder name:</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1691"/> <location filename="mainwindow.cpp" line="1684"/>
<source>Rename Folder</source> <source>Rename Folder</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1699"/> <location filename="mainwindow.cpp" line="1692"/>
<source>Remove Folder</source> <source>Remove Folder</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1724"/> <location filename="mainwindow.cpp" line="1717"/>
<source>Sort By Type</source> <source>Sort By Type</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1729"/> <location filename="mainwindow.cpp" line="1722"/>
<source>Sort alphabetically</source> <source>Sort alphabetically</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1734"/> <location filename="mainwindow.cpp" line="1727"/>
<source>Show inherited members</source> <source>Show inherited members</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1739"/> <location filename="mainwindow.cpp" line="1732"/>
<source>Goto declaration</source> <source>Goto declaration</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1742"/> <location filename="mainwindow.cpp" line="1735"/>
<source>Goto definition</source> <source>Goto definition</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1821"/> <location filename="mainwindow.cpp" line="1814"/>
<source>Character sets</source> <source>Character sets</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="1934"/> <location filename="mainwindow.cpp" line="1927"/>
<source>%1 files autosaved</source> <source>%1 files autosaved</source>
<translation>%1</translation> <translation>%1</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2185"/> <location filename="mainwindow.cpp" line="2180"/>
<source>Save project</source> <source>Save project</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2186"/> <location filename="mainwindow.cpp" line="2181"/>
<source>The project &apos;%1&apos; has modifications.</source> <source>The project &apos;%1&apos; has modifications.</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2188"/> <location filename="mainwindow.cpp" line="2183"/>
<source>Do you want to save it?</source> <source>Do you want to save it?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3318"/> <location filename="mainwindow.cpp" line="3313"/>
<source>Do you really want to clear all breakpoints in this file?</source> <source>Do you really want to clear all breakpoints in this file?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3497"/> <location filename="mainwindow.cpp" line="3492"/>
<source>New project</source> <source>New project</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3498"/> <location filename="mainwindow.cpp" line="3493"/>
<source>Close %1 and start new project?</source> <source>Close %1 and start new project?</source>
<translation>&apos;%1&apos;?</translation> <translation>&apos;%1&apos;?</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3510"/> <location filename="mainwindow.cpp" line="3505"/>
<source>Folder not exist</source> <source>Folder not exist</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3511"/> <location filename="mainwindow.cpp" line="3506"/>
<source>Folder &apos;%1&apos; doesn&apos;t exist. Create it now?</source> <source>Folder &apos;%1&apos; doesn&apos;t exist. Create it now?</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3518"/> <location filename="mainwindow.cpp" line="3513"/>
<source>Can&apos;t create folder</source> <source>Can&apos;t create folder</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3519"/> <location filename="mainwindow.cpp" line="3514"/>
<source>Failed to create folder &apos;%1&apos;.</source> <source>Failed to create folder &apos;%1&apos;.</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3534"/> <location filename="mainwindow.cpp" line="3529"/>
<source>Save new project as</source> <source>Save new project as</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3536"/> <location filename="mainwindow.cpp" line="3531"/>
<source>Red panda Dev-C++ project file (*.dev)</source> <source>Red panda Dev-C++ project file (*.dev)</source>
<translation>Dev-C++ (*.dev)</translation> <translation>Dev-C++ (*.dev)</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3547"/> <location filename="mainwindow.cpp" line="3542"/>
<source>New project fail</source> <source>New project fail</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3548"/> <location filename="mainwindow.cpp" line="3543"/>
<source>Can&apos;t assign project template</source> <source>Can&apos;t assign project template</source>
<translation>使</translation> <translation>使</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3605"/> <location filename="mainwindow.cpp" line="3600"/>
<source>Add to project</source> <source>Add to project</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="736"/> <location filename="mainwindow.cpp" line="729"/>
<location filename="mainwindow.cpp" line="1846"/> <location filename="mainwindow.cpp" line="1839"/>
<location filename="mainwindow.cpp" line="2272"/> <location filename="mainwindow.cpp" line="2267"/>
<location filename="mainwindow.cpp" line="2337"/> <location filename="mainwindow.cpp" line="2332"/>
<location filename="mainwindow.cpp" line="2357"/> <location filename="mainwindow.cpp" line="2352"/>
<location filename="mainwindow.cpp" line="2459"/> <location filename="mainwindow.cpp" line="2454"/>
<location filename="mainwindow.cpp" line="2471"/> <location filename="mainwindow.cpp" line="2466"/>
<location filename="mainwindow.cpp" line="2781"/> <location filename="mainwindow.cpp" line="2776"/>
<location filename="mainwindow.cpp" line="2793"/> <location filename="mainwindow.cpp" line="2788"/>
<source>Error</source> <source>Error</source>
<translation></translation> <translation></translation>
</message> </message>
@ -3400,75 +3400,75 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2266"/> <location filename="mainwindow.cpp" line="2261"/>
<source>File &apos;%1&apos; was changed.</source> <source>File &apos;%1&apos; was changed.</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2266"/> <location filename="mainwindow.cpp" line="2261"/>
<source>Reload its content from disk?</source> <source>Reload its content from disk?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2277"/> <location filename="mainwindow.cpp" line="2272"/>
<source>File &apos;%1&apos; was removed.</source> <source>File &apos;%1&apos; was removed.</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2277"/> <location filename="mainwindow.cpp" line="2272"/>
<source>Keep it open?</source> <source>Keep it open?</source>
<translation>C++</translation> <translation>C++</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2353"/> <location filename="mainwindow.cpp" line="2348"/>
<source>Open</source> <source>Open</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2629"/> <location filename="mainwindow.cpp" line="2624"/>
<source>Compile Failed</source> <source>Compile Failed</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2634"/> <location filename="mainwindow.cpp" line="2629"/>
<source>Run Failed</source> <source>Run Failed</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2810"/> <location filename="mainwindow.cpp" line="2805"/>
<location filename="mainwindow.cpp" line="2824"/> <location filename="mainwindow.cpp" line="2819"/>
<source>Confirm Convertion</source> <source>Confirm Convertion</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2811"/> <location filename="mainwindow.cpp" line="2806"/>
<location filename="mainwindow.cpp" line="2825"/> <location filename="mainwindow.cpp" line="2820"/>
<source>The editing file will be saved using %1 encoding. &lt;br /&gt;This operation can&apos;t be reverted. &lt;br /&gt;Are you sure to continue?</source> <source>The editing file will be saved using %1 encoding. &lt;br /&gt;This operation can&apos;t be reverted. &lt;br /&gt;Are you sure to continue?</source>
<translation>使%1&lt;br /&gt;&lt;br /&gt;</translation> <translation>使%1&lt;br /&gt;&lt;br /&gt;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2991"/> <location filename="mainwindow.cpp" line="2986"/>
<source>New Watch Expression</source> <source>New Watch Expression</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="2992"/> <location filename="mainwindow.cpp" line="2987"/>
<source>Enter Watch Expression (it is recommended to use &apos;this-&gt;&apos; for class members):</source> <source>Enter Watch Expression (it is recommended to use &apos;this-&gt;&apos; for class members):</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3038"/> <location filename="mainwindow.cpp" line="3033"/>
<source>Parsing file %1 of %2: &quot;%3&quot;</source> <source>Parsing file %1 of %2: &quot;%3&quot;</source>
<translation>%1/%2&quot;%3&quot;</translation> <translation>%1/%2&quot;%3&quot;</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3060"/> <location filename="mainwindow.cpp" line="3055"/>
<location filename="mainwindow.cpp" line="3066"/> <location filename="mainwindow.cpp" line="3061"/>
<source>Done parsing %1 files in %2 seconds</source> <source>Done parsing %1 files in %2 seconds</source>
<translation>%1,%2</translation> <translation>%1,%2</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="3063"/> <location filename="mainwindow.cpp" line="3058"/>
<source>(%1 files per second)</source> <source>(%1 files per second)</source>
<translation>(%1</translation> <translation>(%1</translation>
</message> </message>
@ -3813,10 +3813,25 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectfileswidget.ui" line="157"/> <location filename="settingsdialog/projectfileswidget.ui" line="160"/>
<source>Override build command:</source> <source>Override build command:</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="settingsdialog/projectfileswidget.cpp" line="213"/>
<source>Auto detect</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/projectfileswidget.cpp" line="214"/>
<source>ANSI(System default)</source>
<translation>ANSI</translation>
</message>
<message>
<location filename="settingsdialog/projectfileswidget.cpp" line="215"/>
<source>UTF-8</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>ProjectGeneralWidget</name> <name>ProjectGeneralWidget</name>
@ -4845,17 +4860,17 @@ Are you really want to continue?</source>
<context> <context>
<name>RegisterModel</name> <name>RegisterModel</name>
<message> <message>
<location filename="debugger.cpp" line="2120"/> <location filename="debugger.cpp" line="2121"/>
<source>Register</source> <source>Register</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2122"/> <location filename="debugger.cpp" line="2123"/>
<source>Value(Hex)</source> <source>Value(Hex)</source>
<translation>(HEX)</translation> <translation>(HEX)</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2124"/> <location filename="debugger.cpp" line="2125"/>
<source>Value(Dec)</source> <source>Value(Dec)</source>
<translation>(DEC)</translation> <translation>(DEC)</translation>
</message> </message>
@ -5430,12 +5445,12 @@ Are you really want to continue?</source>
<context> <context>
<name>WatchModel</name> <name>WatchModel</name>
<message> <message>
<location filename="debugger.cpp" line="2066"/> <location filename="debugger.cpp" line="2067"/>
<source>Expression</source> <source>Expression</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2068"/> <location filename="debugger.cpp" line="2069"/>
<source>Value</source> <source>Value</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -1488,7 +1488,7 @@ void MainWindow::loadLastOpens()
int count = lastOpenIni.GetLongValue("LastOpens","Count",0); int count = lastOpenIni.GetLongValue("LastOpens","Count",0);
for (int i=0;i<count;i++) { for (int i=0;i<count;i++) {
QByteArray sectionName = QString("Editor_%1").arg(i).toLocal8Bit(); QByteArray sectionName = QString("Editor_%1").arg(i).toLocal8Bit();
QString editorFilename = lastOpenIni.GetValue(sectionName,"FileName",""); QString editorFilename = QString::fromLocal8Bit(lastOpenIni.GetValue(sectionName,"FileName",""));
if (!fileExists(editorFilename)) if (!fileExists(editorFilename))
continue; continue;
bool onLeft = lastOpenIni.GetBoolValue(sectionName,"OnLeft",true); bool onLeft = lastOpenIni.GetBoolValue(sectionName,"OnLeft",true);
@ -1513,9 +1513,9 @@ void MainWindow::loadLastOpens()
focusedEditor = editor; focusedEditor = editor;
pSettings->history().removeFile(editorFilename); pSettings->history().removeFile(editorFilename);
} }
QString projectFilename = lastOpenIni.GetValue("LastOpens", "Project",""); QString projectFilename = QString::fromLocal8Bit((lastOpenIni.GetValue("LastOpens", "Project","")));
if (fileExists(projectFilename)) { if (fileExists(projectFilename)) {
openProject(filename); openProject(projectFilename);
} else { } else {
updateEditorActions(); updateEditorActions();
updateForEncodingInfo(); updateForEncodingInfo();
@ -2118,7 +2118,6 @@ void MainWindow::onEditorTabContextMenu(const QPoint &pos)
void MainWindow::disableDebugActions() void MainWindow::disableDebugActions()
{ {
qDebug()<<"disabled";
ui->actionStep_Into->setEnabled(false); ui->actionStep_Into->setEnabled(false);
ui->actionStep_Over->setEnabled(false); ui->actionStep_Over->setEnabled(false);
ui->actionStep_Out->setEnabled(false); ui->actionStep_Out->setEnabled(false);
@ -2129,7 +2128,6 @@ void MainWindow::disableDebugActions()
void MainWindow::enableDebugActions() void MainWindow::enableDebugActions()
{ {
qDebug()<<"enabled";
ui->actionStep_Into->setEnabled(true); ui->actionStep_Into->setEnabled(true);
ui->actionStep_Over->setEnabled(true); ui->actionStep_Over->setEnabled(true);
ui->actionStep_Out->setEnabled(true); ui->actionStep_Out->setEnabled(true);

View File

@ -10,9 +10,6 @@
CharsetInfoManager* pCharsetInfoManager; CharsetInfoManager* pCharsetInfoManager;
static void initmCodePages(){
}
QByteArray CharsetInfoManager::getDefaultSystemEncoding() QByteArray CharsetInfoManager::getDefaultSystemEncoding()
{ {
DWORD acp = GetACP(); DWORD acp = GetACP();

View File

@ -2,6 +2,7 @@
#include "ui_projectfileswidget.h" #include "ui_projectfileswidget.h"
#include "../mainwindow.h" #include "../mainwindow.h"
#include "../systemconsts.h" #include "../systemconsts.h"
#include "../platform.h"
ProjectFilesWidget::ProjectFilesWidget(const QString &name, const QString &group, QWidget *parent) : ProjectFilesWidget::ProjectFilesWidget(const QString &name, const QString &group, QWidget *parent) :
SettingsWidget(name,group,parent), SettingsWidget(name,group,parent),
@ -177,10 +178,24 @@ void ProjectFilesWidget::on_txtBuildCommand_textChanged()
void ProjectFilesWidget::on_cbEncoding_currentTextChanged(const QString &) void ProjectFilesWidget::on_cbEncoding_currentTextChanged(const QString &)
{ {
PProjectUnit unit = currentUnit(); QString userData = ui->cbEncoding->currentData().toString();
if(!unit) if (userData == ENCODING_AUTO_DETECT
return; || userData == ENCODING_SYSTEM_DEFAULT
unit->setEncoding(ui->cbEncoding->currentText().toLocal8Bit()); || userData == ENCODING_UTF8) {
PProjectUnit unit = currentUnit();
if(!unit)
return;
unit->setEncoding(userData.toLocal8Bit());
ui->cbEncodingDetail->setVisible(false);
ui->cbEncodingDetail->clear();
} else {
ui->cbEncodingDetail->setVisible(true);
ui->cbEncodingDetail->clear();
QList<PCharsetInfo> infos = pCharsetInfoManager->findCharsetsByLanguageName(userData);
foreach (const PCharsetInfo& info, infos) {
ui->cbEncodingDetail->addItem(info->name);
}
}
} }
@ -193,8 +208,25 @@ void ProjectFilesWidget::init()
{ {
ui->spinPriority->setMinimum(0); ui->spinPriority->setMinimum(0);
ui->spinPriority->setMaximum(9999); ui->spinPriority->setMaximum(9999);
ui->cbEncodingDetail->setVisible(false);
ui->cbEncoding->clear(); ui->cbEncoding->clear();
ui->cbEncoding->addItems(pSystemConsts->codecNames()); ui->cbEncoding->addItem(tr("Auto detect"),ENCODING_AUTO_DETECT);
ui->cbEncoding->addItem(tr("ANSI"),ENCODING_SYSTEM_DEFAULT);
ui->cbEncoding->addItem(tr("UTF-8"),ENCODING_UTF8);
foreach (const QString& langName, pCharsetInfoManager->languageNames()) {
ui->cbEncoding->addItem(langName,langName);
}
SettingsWidget::init(); SettingsWidget::init();
} }
void ProjectFilesWidget::on_cbEncodingDetail_currentTextChanged(const QString &arg1)
{
PProjectUnit unit = currentUnit();
if(!unit)
return;
unit->setEncoding(ui->cbEncodingDetail->currentText().toLocal8Bit());
ui->cbEncodingDetail->setVisible(false);
ui->cbEncodingDetail->clear();
}

View File

@ -42,6 +42,8 @@ private slots:
void on_treeProject_clicked(const QModelIndex &index); void on_treeProject_clicked(const QModelIndex &index);
// SettingsWidget interface // SettingsWidget interface
void on_cbEncodingDetail_currentTextChanged(const QString &arg1);
public: public:
void init() override; void init() override;
}; };

View File

@ -135,6 +135,9 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QComboBox" name="cbEncodingDetail"/>
</item>
<item> <item>
<spacer name="horizontalSpacer_2"> <spacer name="horizontalSpacer_2">
<property name="orientation"> <property name="orientation">