- fix: can't reformat code

- enhancement: add option for setting astyle path
 - fix: wrong file wildcard (*.*) in linux
This commit is contained in:
Roy Qu 2021-12-27 22:46:54 +08:00
parent fe8d3e9663
commit 63e1b44fa5
19 changed files with 393 additions and 133 deletions

View File

@ -1,6 +1,9 @@
Version 0.12.5 For Dev-C++ 7 Beta Version 0.12.5 For Dev-C++ 7 Beta
- fix: compile error in linux - fix: compile error in linux
- fix: can't receive gdb async output for commands - fix: can't receive gdb async output for commands
- fix: can't reformat code
- enhancement: add option for setting astyle path
- fix: wrong file wildcard (*.*) in linux
Version 0.12.4 For Dev-C++ 7 Beta Version 0.12.4 For Dev-C++ 7 Beta
- change: add copyright infos to each source file - change: add copyright infos to each source file

View File

@ -322,12 +322,15 @@ win32: {
unix { unix {
HEADERS += \ HEADERS += \
settingsdialog/formatterpathwidget.h \
settingsdialog/environmentprogramswidget.h settingsdialog/environmentprogramswidget.h
SOURCES += \ SOURCES += \
settingsdialog/formatterpathwidget.cpp \
settingsdialog/environmentprogramswidget.cpp settingsdialog/environmentprogramswidget.cpp
FORMS += \ FORMS += \
settingsdialog/formatterpathwidget.ui \
settingsdialog/environmentprogramswidget.ui settingsdialog/environmentprogramswidget.ui
} }

Binary file not shown.

View File

@ -15,16 +15,31 @@
</message> </message>
<message> <message>
<location filename="widgets/aboutdialog.ui" line="36"/> <location filename="widgets/aboutdialog.ui" line="36"/>
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Based on Qt %1 (%2)&lt;/p&gt;&lt;p&gt;Build time: %3 %4&lt;/p&gt;&lt;p&gt;Copyright 2020-2021 royqh1979@gmail.com&lt;/p&gt;&lt;p&gt;Homepage: &lt;a href=&quot;https://sourceforge.net/projects/dev-cpp-2020/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://sourceforge.net/projects/dev-cpp-2020/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source> <source>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt; Qt %1 (%2)&lt;/p&gt;&lt;p&gt; %3 %4&lt;/p&gt;&lt;p&gt;Copyright 2020-2021 royqh1979@gmail.com&lt;/p&gt;&lt;p&gt; &lt;a href=&quot;https://royqh.net/devcpp/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://royqh.net/devcpp/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation> &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;meta charset=&quot;utf-8&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:&apos;Microsoft YaHei UI&apos;; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Based on Qt %1 (%2)&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Build time: %3 %4&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (C) 2021-2022 royqh1979@gmail.com&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Old Delphi Version:&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (c) 2004 Bloodshed Software&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (c) 2011-2015 orwell devcpp &lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright (c) 2020-2021 royqh1979@gmail.com&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Homepage: &lt;a href=&quot;https://sourceforge.net/projects/dev-cpp-2020/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://sourceforge.net/projects/dev-cpp-2020/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation></translation>
</message> </message>
<message> <message>
<location filename="widgets/aboutdialog.ui" line="52"/> <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Based on Qt %1 (%2)&lt;/p&gt;&lt;p&gt;Build time: %3 %4&lt;/p&gt;&lt;p&gt;Copyright 2020-2021 royqh1979@gmail.com&lt;/p&gt;&lt;p&gt;Homepage: &lt;a href=&quot;https://sourceforge.net/projects/dev-cpp-2020/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://sourceforge.net/projects/dev-cpp-2020/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="vanished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt; Qt %1 (%2)&lt;/p&gt;&lt;p&gt; %3 %4&lt;/p&gt;&lt;p&gt;Copyright 2020-2021 royqh1979@gmail.com&lt;/p&gt;&lt;p&gt; &lt;a href=&quot;https://royqh.net/devcpp/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#007af4;&quot;&gt;https://royqh.net/devcpp/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<location filename="widgets/aboutdialog.ui" line="63"/>
<source>GNU General Public License</source> <source>GNU General Public License</source>
<translation>GNU通用公共许可</translation> <translation>GNU通用公共许可</translation>
</message> </message>
<message> <message>
<location filename="widgets/aboutdialog.ui" line="61"/> <location filename="widgets/aboutdialog.ui" line="72"/>
<source> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. <source> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@ -93,17 +108,17 @@
<context> <context>
<name>BacktraceModel</name> <name>BacktraceModel</name>
<message> <message>
<location filename="debugger.cpp" line="1662"/> <location filename="debugger.cpp" line="1670"/>
<source>Function</source> <source>Function</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1664"/> <location filename="debugger.cpp" line="1672"/>
<source>Filename</source> <source>Filename</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1666"/> <location filename="debugger.cpp" line="1674"/>
<source>Line</source> <source>Line</source>
<translation></translation> <translation></translation>
</message> </message>
@ -149,37 +164,37 @@
<context> <context>
<name>BreakpointModel</name> <name>BreakpointModel</name>
<message> <message>
<location filename="debugger.cpp" line="1456"/> <location filename="debugger.cpp" line="1464"/>
<source>Filename</source> <source>Filename</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1458"/> <location filename="debugger.cpp" line="1466"/>
<source>Line</source> <source>Line</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1460"/> <location filename="debugger.cpp" line="1468"/>
<source>Condition</source> <source>Condition</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1531"/> <location filename="debugger.cpp" line="1539"/>
<source>Save file &apos;%1&apos; failed.</source> <source>Save file &apos;%1&apos; failed.</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1535"/> <location filename="debugger.cpp" line="1543"/>
<source>Can&apos;t open file &apos;%1&apos; for write.</source> <source>Can&apos;t open file &apos;%1&apos; for write.</source>
<translation>&apos;%1&apos;.</translation> <translation>&apos;%1&apos;.</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1551"/> <location filename="debugger.cpp" line="1559"/>
<source>Error in json file &apos;%1&apos;:%2 : %3</source> <source>Error in json file &apos;%1&apos;:%2 : %3</source>
<translation>JSON文件&apos;%1&apos;:%2%3</translation> <translation>JSON文件&apos;%1&apos;:%2%3</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1569"/> <location filename="debugger.cpp" line="1577"/>
<source>Can&apos;t open file &apos;%1&apos; for read.</source> <source>Can&apos;t open file &apos;%1&apos; for read.</source>
<translation>&apos;%1&apos;.</translation> <translation>&apos;%1&apos;.</translation>
</message> </message>
@ -1082,7 +1097,7 @@ Are you really want to continue?</source>
<translation>&quot;%1&quot;gdb server</translation> <translation>&quot;%1&quot;gdb server</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="362"/> <location filename="debugger.cpp" line="360"/>
<source>Execute to evaluate</source> <source>Execute to evaluate</source>
<translation></translation> <translation></translation>
</message> </message>
@ -1091,22 +1106,22 @@ Are you really want to continue?</source>
<translation type="vanished"></translation> <translation type="vanished"></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="515"/> <location filename="debugger.cpp" line="508"/>
<source>Compile</source> <source>Compile</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="516"/> <location filename="debugger.cpp" line="509"/>
<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="debugger.cpp" line="516"/> <location filename="debugger.cpp" line="509"/>
<source>Recompile?</source> <source>Recompile?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="561"/> <location filename="debugger.cpp" line="554"/>
<source>Signal &quot;%1&quot; Received: </source> <source>Signal &quot;%1&quot; Received: </source>
<translation>&quot;%1&quot;:</translation> <translation>&quot;%1&quot;:</translation>
</message> </message>
@ -1184,17 +1199,27 @@ Are you really want to continue?</source>
<translation>&apos;%1&apos;!</translation> <translation>&apos;%1&apos;!</translation>
</message> </message>
<message> <message>
<location filename="editor.cpp" line="4001"/> <location filename="editor.cpp" line="3870"/>
<source>astyle not found</source>
<translation>astyle程序</translation>
</message>
<message>
<location filename="editor.cpp" line="3871"/>
<source>Can&apos;t find astyle in &quot;%1&quot;.</source>
<translation>astyle程序&quot;%1&quot;.</translation>
</message>
<message>
<location filename="editor.cpp" line="4016"/>
<source>Break point condition</source> <source>Break point condition</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="editor.cpp" line="4002"/> <location filename="editor.cpp" line="4017"/>
<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="editor.cpp" line="4209"/> <location filename="editor.cpp" line="4224"/>
<source>Readonly</source> <source>Readonly</source>
<translation></translation> <translation></translation>
</message> </message>
@ -2001,14 +2026,18 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/environmentprogramswidget.cpp" line="56"/> <location filename="settingsdialog/environmentprogramswidget.cpp" line="57"/>
<source>Choose Terminal Program</source> <source>Choose Terminal Program</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/environmentprogramswidget.cpp" line="58"/> <location filename="settingsdialog/environmentprogramswidget.cpp" line="59"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
<message>
<source>All files (*.*)</source> <source>All files (*.*)</source>
<translation> (*.*)</translation> <translation type="vanished"> (*.*)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -2103,14 +2132,18 @@ Are you really want to continue?</source>
<translation>注意:由于gdb的bug</translation> <translation>注意:由于gdb的bug</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/executorgeneralwidget.cpp" line="62"/> <location filename="settingsdialog/executorgeneralwidget.cpp" line="63"/>
<source>Choose input file</source> <source>Choose input file</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/executorgeneralwidget.cpp" line="64"/> <location filename="settingsdialog/executorgeneralwidget.cpp" line="65"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
<message>
<source>All files (*.*)</source> <source>All files (*.*)</source>
<translation> (*.*)</translation> <translation type="vanished"> (*.*)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -2693,6 +2726,30 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
</context> </context>
<context>
<name>FormatterPathWidget</name>
<message>
<location filename="settingsdialog/formatterpathwidget.ui" line="14"/>
<source>Form</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/formatterpathwidget.ui" line="20"/>
<location filename="settingsdialog/formatterpathwidget.cpp" line="40"/>
<source>Path to astyle</source>
<translation>astyle程序</translation>
</message>
<message>
<location filename="settingsdialog/formatterpathwidget.ui" line="27"/>
<source>...</source>
<translation>...</translation>
</message>
<message>
<location filename="settingsdialog/formatterpathwidget.cpp" line="42"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
</context>
<context> <context>
<name>FormatterStyleModel</name> <name>FormatterStyleModel</name>
<message> <message>
@ -5225,14 +5282,18 @@ Are you really want to continue?</source>
<translation>DLL文件的宿主程序</translation> <translation>DLL文件的宿主程序</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectdllhostwidget.cpp" line="51"/> <location filename="settingsdialog/projectdllhostwidget.cpp" line="52"/>
<source>Choose host application</source> <source>Choose host application</source>
<translation>宿</translation> <translation>宿</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectdllhostwidget.cpp" line="53"/> <location filename="settingsdialog/projectdllhostwidget.cpp" line="54"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
<message>
<source>All files (*.*)</source> <source>All files (*.*)</source>
<translation> (*.*)</translation> <translation type="vanished"> (*.*)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -5462,14 +5523,18 @@ Are you really want to continue?</source>
<translation>Makefile中包含下列文件:</translation> <translation>Makefile中包含下列文件:</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectmakefilewidget.cpp" line="62"/> <location filename="settingsdialog/projectmakefilewidget.cpp" line="63"/>
<source>Custom makefile</source> <source>Custom makefile</source>
<translation>Makefile</translation> <translation>Makefile</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectmakefilewidget.cpp" line="64"/> <location filename="settingsdialog/projectmakefilewidget.cpp" line="65"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
<message>
<source>All files (*.*)</source> <source>All files (*.*)</source>
<translation> (*.*)</translation> <translation type="vanished"> (*.*)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -5506,7 +5571,7 @@ Are you really want to continue?</source>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectoutputwidget.ui" line="20"/> <location filename="settingsdialog/projectoutputwidget.ui" line="20"/>
<location filename="settingsdialog/projectoutputwidget.cpp" line="63"/> <location filename="settingsdialog/projectoutputwidget.cpp" line="64"/>
<source>Executable output directory</source> <source>Executable output directory</source>
<translation></translation> <translation></translation>
</message> </message>
@ -5533,19 +5598,23 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectoutputwidget.cpp" line="74"/> <location filename="settingsdialog/projectoutputwidget.cpp" line="75"/>
<source>Object files output directory</source> <source>Object files output directory</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectoutputwidget.cpp" line="85"/> <location filename="settingsdialog/projectoutputwidget.cpp" line="86"/>
<source>Log file</source> <source>Log file</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/projectoutputwidget.cpp" line="87"/> <location filename="settingsdialog/projectoutputwidget.cpp" line="88"/>
<source>All files (%1)</source>
<translation> (%1)</translation>
</message>
<message>
<source>All files (*.*)</source> <source>All files (*.*)</source>
<translation> (*.*)</translation> <translation type="vanished"> (*.*)</translation>
</message> </message>
</context> </context>
<context> <context>
@ -6394,12 +6463,12 @@ Are you really want to continue?</source>
<context> <context>
<name>RegisterModel</name> <name>RegisterModel</name>
<message> <message>
<location filename="debugger.cpp" line="2185"/> <location filename="debugger.cpp" line="2193"/>
<source>Register</source> <source>Register</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2187"/> <location filename="debugger.cpp" line="2195"/>
<source>Value</source> <source>Value</source>
<translation></translation> <translation></translation>
</message> </message>
@ -6730,7 +6799,7 @@ Are you really want to continue?</source>
<name>SettingsDialog</name> <name>SettingsDialog</name>
<message> <message>
<location filename="settingsdialog/settingsdialog.ui" line="14"/> <location filename="settingsdialog/settingsdialog.ui" line="14"/>
<location filename="settingsdialog/settingsdialog.cpp" line="131"/> <location filename="settingsdialog/settingsdialog.cpp" line="132"/>
<source>Options</source> <source>Options</source>
<translation></translation> <translation></translation>
</message> </message>
@ -6756,233 +6825,239 @@ Are you really want to continue?</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="133"/> <location filename="settingsdialog/settingsdialog.cpp" line="134"/>
<source>Appearence</source> <source>Appearence</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="133"/> <location filename="settingsdialog/settingsdialog.cpp" line="134"/>
<location filename="settingsdialog/settingsdialog.cpp" line="138"/> <location filename="settingsdialog/settingsdialog.cpp" line="139"/>
<location filename="settingsdialog/settingsdialog.cpp" line="143"/> <location filename="settingsdialog/settingsdialog.cpp" line="144"/>
<location filename="settingsdialog/settingsdialog.cpp" line="147"/> <location filename="settingsdialog/settingsdialog.cpp" line="148"/>
<location filename="settingsdialog/settingsdialog.cpp" line="152"/> <location filename="settingsdialog/settingsdialog.cpp" line="153"/>
<location filename="settingsdialog/settingsdialog.cpp" line="157"/> <location filename="settingsdialog/settingsdialog.cpp" line="158"/>
<source>Environment</source> <source>Environment</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="138"/> <location filename="settingsdialog/settingsdialog.cpp" line="139"/>
<source>File Association</source> <source>File Association</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="143"/> <location filename="settingsdialog/settingsdialog.cpp" line="144"/>
<source>Shortcuts</source> <source>Shortcuts</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="147"/> <location filename="settingsdialog/settingsdialog.cpp" line="148"/>
<source>Folders</source> <source>Folders</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="152"/> <location filename="settingsdialog/settingsdialog.cpp" line="153"/>
<source>Terminal</source> <source>Terminal</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="157"/> <location filename="settingsdialog/settingsdialog.cpp" line="158"/>
<source>Performance</source> <source>Performance</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="167"/> <location filename="settingsdialog/settingsdialog.cpp" line="168"/>
<location filename="settingsdialog/settingsdialog.cpp" line="258"/> <location filename="settingsdialog/settingsdialog.cpp" line="265"/>
<source>Compiler Set</source> <source>Compiler Set</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="167"/> <location filename="settingsdialog/settingsdialog.cpp" line="168"/>
<location filename="settingsdialog/settingsdialog.cpp" line="171"/> <location filename="settingsdialog/settingsdialog.cpp" line="172"/>
<source>Compiler</source> <source>Compiler</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="171"/> <location filename="settingsdialog/settingsdialog.cpp" line="172"/>
<source>Auto Link</source> <source>Auto Link</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="5726"/> <location filename="mainwindow.cpp" line="5726"/>
<location filename="settingsdialog/settingsdialog.cpp" line="175"/> <location filename="settingsdialog/settingsdialog.cpp" line="176"/>
<location filename="settingsdialog/settingsdialog.cpp" line="219"/> <location filename="settingsdialog/settingsdialog.cpp" line="220"/>
<location filename="settingsdialog/settingsdialog.cpp" line="227"/> <location filename="settingsdialog/settingsdialog.cpp" line="228"/>
<location filename="settingsdialog/settingsdialog.cpp" line="231"/> <location filename="settingsdialog/settingsdialog.cpp" line="232"/>
<location filename="settingsdialog/settingsdialog.cpp" line="235"/> <location filename="settingsdialog/settingsdialog.cpp" line="242"/>
<location filename="settingsdialog/settingsdialog.cpp" line="250"/> <location filename="settingsdialog/settingsdialog.cpp" line="257"/>
<source>General</source> <source>General</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="175"/> <location filename="settingsdialog/settingsdialog.cpp" line="176"/>
<location filename="settingsdialog/settingsdialog.cpp" line="179"/> <location filename="settingsdialog/settingsdialog.cpp" line="180"/>
<location filename="settingsdialog/settingsdialog.cpp" line="183"/> <location filename="settingsdialog/settingsdialog.cpp" line="184"/>
<location filename="settingsdialog/settingsdialog.cpp" line="187"/> <location filename="settingsdialog/settingsdialog.cpp" line="188"/>
<location filename="settingsdialog/settingsdialog.cpp" line="191"/> <location filename="settingsdialog/settingsdialog.cpp" line="192"/>
<location filename="settingsdialog/settingsdialog.cpp" line="195"/> <location filename="settingsdialog/settingsdialog.cpp" line="196"/>
<location filename="settingsdialog/settingsdialog.cpp" line="199"/> <location filename="settingsdialog/settingsdialog.cpp" line="200"/>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/> <location filename="settingsdialog/settingsdialog.cpp" line="204"/>
<location filename="settingsdialog/settingsdialog.cpp" line="207"/> <location filename="settingsdialog/settingsdialog.cpp" line="208"/>
<location filename="settingsdialog/settingsdialog.cpp" line="211"/> <location filename="settingsdialog/settingsdialog.cpp" line="212"/>
<location filename="settingsdialog/settingsdialog.cpp" line="215"/> <location filename="settingsdialog/settingsdialog.cpp" line="216"/>
<source>Editor</source> <source>Editor</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="179"/> <location filename="settingsdialog/settingsdialog.cpp" line="180"/>
<source>Font</source> <source>Font</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="183"/> <location filename="settingsdialog/settingsdialog.cpp" line="184"/>
<source>Copy &amp; Export</source> <source>Copy &amp; Export</source>
<translation>/</translation> <translation>/</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="187"/> <location filename="settingsdialog/settingsdialog.cpp" line="188"/>
<source>Color</source> <source>Color</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="191"/> <location filename="settingsdialog/settingsdialog.cpp" line="192"/>
<source>Code Completion</source> <source>Code Completion</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="195"/> <location filename="settingsdialog/settingsdialog.cpp" line="196"/>
<source>Symbol Completion</source> <source>Symbol Completion</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="199"/> <location filename="settingsdialog/settingsdialog.cpp" line="200"/>
<source>Snippet</source> <source>Snippet</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="203"/> <location filename="settingsdialog/settingsdialog.cpp" line="204"/>
<source>Auto Syntax Checking</source> <source>Auto Syntax Checking</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="207"/> <location filename="settingsdialog/settingsdialog.cpp" line="208"/>
<source>Tooltips</source> <source>Tooltips</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="211"/> <location filename="settingsdialog/settingsdialog.cpp" line="212"/>
<source>Auto save</source> <source>Auto save</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="215"/> <location filename="settingsdialog/settingsdialog.cpp" line="216"/>
<source>Misc</source> <source>Misc</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="5727"/> <location filename="mainwindow.cpp" line="5727"/>
<location filename="mainwindow.cpp" line="6036"/> <location filename="mainwindow.cpp" line="6036"/>
<location filename="settingsdialog/settingsdialog.cpp" line="219"/> <location filename="settingsdialog/settingsdialog.cpp" line="220"/>
<location filename="settingsdialog/settingsdialog.cpp" line="223"/> <location filename="settingsdialog/settingsdialog.cpp" line="224"/>
<source>Program Runner</source> <source>Program Runner</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="6035"/> <location filename="mainwindow.cpp" line="6035"/>
<location filename="settingsdialog/settingsdialog.cpp" line="223"/> <location filename="settingsdialog/settingsdialog.cpp" line="224"/>
<source>Problem Set</source> <source>Problem Set</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="227"/> <location filename="settingsdialog/settingsdialog.cpp" line="228"/>
<source>Debugger</source> <source>Debugger</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="231"/> <location filename="settingsdialog/settingsdialog.cpp" line="232"/>
<location filename="settingsdialog/settingsdialog.cpp" line="237"/>
<source>Code Formatter</source> <source>Code Formatter</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="235"/> <location filename="settingsdialog/settingsdialog.cpp" line="237"/>
<source>Program</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/settingsdialog.cpp" line="242"/>
<source>Tools</source> <source>Tools</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="248"/> <location filename="settingsdialog/settingsdialog.cpp" line="255"/>
<source>Project Options</source> <source>Project Options</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="250"/> <location filename="settingsdialog/settingsdialog.cpp" line="257"/>
<location filename="settingsdialog/settingsdialog.cpp" line="254"/> <location filename="settingsdialog/settingsdialog.cpp" line="261"/>
<location filename="settingsdialog/settingsdialog.cpp" line="258"/> <location filename="settingsdialog/settingsdialog.cpp" line="265"/>
<location filename="settingsdialog/settingsdialog.cpp" line="262"/> <location filename="settingsdialog/settingsdialog.cpp" line="269"/>
<location filename="settingsdialog/settingsdialog.cpp" line="266"/> <location filename="settingsdialog/settingsdialog.cpp" line="273"/>
<location filename="settingsdialog/settingsdialog.cpp" line="270"/> <location filename="settingsdialog/settingsdialog.cpp" line="277"/>
<location filename="settingsdialog/settingsdialog.cpp" line="274"/> <location filename="settingsdialog/settingsdialog.cpp" line="281"/>
<location filename="settingsdialog/settingsdialog.cpp" line="278"/> <location filename="settingsdialog/settingsdialog.cpp" line="285"/>
<location filename="settingsdialog/settingsdialog.cpp" line="282"/> <location filename="settingsdialog/settingsdialog.cpp" line="289"/>
<location filename="settingsdialog/settingsdialog.cpp" line="287"/> <location filename="settingsdialog/settingsdialog.cpp" line="294"/>
<source>Project</source> <source>Project</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="254"/> <location filename="settingsdialog/settingsdialog.cpp" line="261"/>
<source>Files</source> <source>Files</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="262"/> <location filename="settingsdialog/settingsdialog.cpp" line="269"/>
<source>Custom Compile options</source> <source>Custom Compile options</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="266"/> <location filename="settingsdialog/settingsdialog.cpp" line="273"/>
<source>Directories</source> <source>Directories</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="270"/> <location filename="settingsdialog/settingsdialog.cpp" line="277"/>
<source>Precompiled Header</source> <source>Precompiled Header</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="274"/> <location filename="settingsdialog/settingsdialog.cpp" line="281"/>
<source>Makefile</source> <source>Makefile</source>
<translation>Makefile</translation> <translation>Makefile</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="278"/> <location filename="settingsdialog/settingsdialog.cpp" line="285"/>
<source>Output</source> <source>Output</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="282"/> <location filename="settingsdialog/settingsdialog.cpp" line="289"/>
<source>DLL host</source> <source>DLL host</source>
<translation>DLL宿主</translation> <translation>DLL宿主</translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="287"/> <location filename="settingsdialog/settingsdialog.cpp" line="294"/>
<source>Version info</source> <source>Version info</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="367"/> <location filename="settingsdialog/settingsdialog.cpp" line="374"/>
<source>Save Changes</source> <source>Save Changes</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="settingsdialog/settingsdialog.cpp" line="368"/> <location filename="settingsdialog/settingsdialog.cpp" line="375"/>
<source>There are changes in the settings, do you want to save them before swtich to other page?</source> <source>There are changes in the settings, do you want to save them before swtich to other page?</source>
<translation></translation> <translation></translation>
</message> </message>
@ -7309,49 +7384,49 @@ Are you really want to continue?</source>
<context> <context>
<name>WatchModel</name> <name>WatchModel</name>
<message> <message>
<location filename="debugger.cpp" line="2019"/> <location filename="debugger.cpp" line="2027"/>
<source>Save file &apos;%1&apos; failed.</source> <source>Save file &apos;%1&apos; failed.</source>
<translation>&apos;%1&apos;</translation> <translation>&apos;%1&apos;</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2023"/> <location filename="debugger.cpp" line="2031"/>
<source>Can&apos;t open file &apos;%1&apos; for write.</source> <source>Can&apos;t open file &apos;%1&apos; for write.</source>
<translation>&apos;%1&apos;.</translation> <translation>&apos;%1&apos;.</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2039"/> <location filename="debugger.cpp" line="2047"/>
<source>Error in json file &apos;%1&apos;:%2 : %3</source> <source>Error in json file &apos;%1&apos;:%2 : %3</source>
<translation>JSON文件&apos;%1&apos;:%2%3</translation> <translation>JSON文件&apos;%1&apos;:%2%3</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1964"/> <location filename="debugger.cpp" line="1972"/>
<location filename="debugger.cpp" line="2051"/> <location filename="debugger.cpp" line="2059"/>
<source>Execute to evaluate</source> <source>Execute to evaluate</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="1871"/> <location filename="debugger.cpp" line="1879"/>
<location filename="debugger.cpp" line="1941"/> <location filename="debugger.cpp" line="1949"/>
<source>Not Valid</source> <source>Not Valid</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2059"/> <location filename="debugger.cpp" line="2067"/>
<source>Can&apos;t open file &apos;%1&apos; for read.</source> <source>Can&apos;t open file &apos;%1&apos; for read.</source>
<translation>&apos;%1&apos;.</translation> <translation>&apos;%1&apos;.</translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2105"/> <location filename="debugger.cpp" line="2113"/>
<source>Expression</source> <source>Expression</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2107"/> <location filename="debugger.cpp" line="2115"/>
<source>Type</source> <source>Type</source>
<translation></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="debugger.cpp" line="2109"/> <location filename="debugger.cpp" line="2117"/>
<source>Value</source> <source>Value</source>
<translation></translation> <translation></translation>
</message> </message>

View File

@ -3864,14 +3864,29 @@ void Editor::reformat()
{ {
if (readOnly()) if (readOnly())
return; return;
#ifndef Q_OS_WIN
if (!fileExists(pSettings->environment().AStylePath())) {
QMessageBox::critical(this,
tr("astyle not found"),
tr("Can't find astyle in \"%1\".").arg(pSettings->environment().AStylePath()));
return;
}
#endif
//we must remove all breakpoints and syntax issues //we must remove all breakpoints and syntax issues
onLinesDeleted(1,lines()->count()); onLinesDeleted(1,lines()->count());
QByteArray content = text().toUtf8(); QByteArray content = text().toUtf8();
QStringList args = pSettings->codeFormatter().getArguments(); QStringList args = pSettings->codeFormatter().getArguments();
#ifdef Q_OS_WIN
QByteArray newContent = runAndGetOutput("astyle.exe", QByteArray newContent = runAndGetOutput("astyle.exe",
pSettings->dirs().appDir(), pSettings->dirs().appDir(),
args, args,
content); content);
#else
QByteArray newContent = runAndGetOutput(pSettings->environment().AStylePath(),
extractFileDir(pSettings->environment().AStylePath()),
args,
content);
#endif
int oldTopLine = topLine(); int oldTopLine = topLine();
BufferCoord mOldCaret = caretXY(); BufferCoord mOldCaret = caretXY();

View File

@ -2833,6 +2833,7 @@ void Settings::Environment::doLoad()
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
mTerminalPath = stringValue("terminal_path","/usr/bin/x-terminal-emulator"); mTerminalPath = stringValue("terminal_path","/usr/bin/x-terminal-emulator");
mAStylePath = stringValue("asyle_path","/usr/bin/astyle");
#endif #endif
} }
@ -2896,6 +2897,16 @@ void Settings::Environment::setTerminalPath(const QString &terminalPath)
mTerminalPath = terminalPath; mTerminalPath = terminalPath;
} }
QString Settings::Environment::AStylePath() const
{
return mAStylePath;
}
void Settings::Environment::setAStylePath(const QString &aStylePath)
{
mAStylePath = aStylePath;
}
void Settings::Environment::doSave() void Settings::Environment::doSave()
{ {
//Appearence //Appearence
@ -2909,6 +2920,7 @@ void Settings::Environment::doSave()
saveValue("default_open_folder",mDefaultOpenFolder); saveValue("default_open_folder",mDefaultOpenFolder);
#ifndef Q_OS_WIN #ifndef Q_OS_WIN
saveValue("terminal_path",mTerminalPath); saveValue("terminal_path",mTerminalPath);
saveValue("asyle_path",mAStylePath);
#endif #endif
} }

View File

@ -507,6 +507,9 @@ public:
QString terminalPath() const; QString terminalPath() const;
void setTerminalPath(const QString &terminalPath); void setTerminalPath(const QString &terminalPath);
QString AStylePath() const;
void setAStylePath(const QString &aStylePath);
private: private:
//Appearence //Appearence
@ -519,6 +522,7 @@ public:
QString mDefaultOpenFolder; QString mDefaultOpenFolder;
QString mTerminalPath; QString mTerminalPath;
QString mAStylePath;
// _Base interface // _Base interface
protected: protected:
void doSave() override; void doSave() override;

View File

@ -18,6 +18,7 @@
#include "ui_environmentprogramswidget.h" #include "ui_environmentprogramswidget.h"
#include "../settings.h" #include "../settings.h"
#include "../iconsmanager.h" #include "../iconsmanager.h"
#include "../systemconsts.h"
#include <QFileDialog> #include <QFileDialog>
@ -55,7 +56,7 @@ void EnvironmentProgramsWidget::on_btnChooseTerminal_clicked()
this, this,
tr("Choose Terminal Program"), tr("Choose Terminal Program"),
QString(), QString(),
tr("All files (*.*)")); tr("All files (%1)").arg(ALL_FILE_WILDCARD));
if (!filename.isEmpty() && fileExists(filename) ) { if (!filename.isEmpty() && fileExists(filename) ) {
ui->txtTerminal->setText(filename); ui->txtTerminal->setText(filename);
} }

View File

@ -36,9 +36,9 @@ private:
// SettingsWidget interface // SettingsWidget interface
protected: protected:
void doLoad(); void doLoad() override;
void doSave(); void doSave() override;
void updateIcons(const QSize &size); void updateIcons(const QSize &size) override;
private slots: private slots:
void on_btnChooseTerminal_clicked(); void on_btnChooseTerminal_clicked();
}; };

View File

@ -18,6 +18,7 @@
#include "ui_executorgeneralwidget.h" #include "ui_executorgeneralwidget.h"
#include "../settings.h" #include "../settings.h"
#include "../iconsmanager.h" #include "../iconsmanager.h"
#include "../systemconsts.h"
#include <QFileDialog> #include <QFileDialog>
@ -61,7 +62,7 @@ void ExecutorGeneralWidget::on_btnBrowse_clicked()
this, this,
tr("Choose input file"), tr("Choose input file"),
QString(), QString(),
tr("All files (*.*)")); tr("All files (%1)").arg(ALL_FILE_WILDCARD));
if (!filename.isEmpty() && fileExists(filename)) { if (!filename.isEmpty() && fileExists(filename)) {
ui->txtRedirectInputFile->setText(filename); ui->txtRedirectInputFile->setText(filename);
} }

View File

@ -0,0 +1,46 @@
#include "formatterpathwidget.h"
#include "ui_formatterpathwidget.h"
#include "../iconsmanager.h"
#include "../settings.h"
#include "../systemconsts.h"
#include <QFileDialog>
FormatterPathWidget::FormatterPathWidget(const QString &name, const QString &group, QWidget *parent) :
SettingsWidget(name,group,parent),
ui(new Ui::FormatterPathWidget)
{
ui->setupUi(this);
}
FormatterPathWidget::~FormatterPathWidget()
{
delete ui;
}
void FormatterPathWidget::doLoad()
{
ui->txtAstyle->setText(pSettings->environment().AStylePath());
}
void FormatterPathWidget::doSave()
{
pSettings->environment().setAStylePath(ui->txtAstyle->text());
}
void FormatterPathWidget::updateIcons(const QSize &size)
{
pIconsManager->setIcon(ui->btnChooseAstyle, IconsManager::ACTION_FILE_OPEN_FOLDER);
}
void FormatterPathWidget::on_btnChooseAstyle_triggered(QAction *arg1)
{
QString fileName = QFileDialog::getOpenFileName(
this,
tr("Path to astyle"),
QString(),
tr("All files (%1)").arg(ALL_FILE_WILDCARD));
if (!fileName.isEmpty() ) {
ui->txtAstyle->setText(fileName);
}
}

View File

@ -0,0 +1,31 @@
#ifndef FORMATTERPATHWIDGET_H
#define FORMATTERPATHWIDGET_H
#include "settingswidget.h"
#include <QWidget>
namespace Ui {
class FormatterPathWidget;
}
class FormatterPathWidget : public SettingsWidget
{
Q_OBJECT
public:
explicit FormatterPathWidget(const QString& name, const QString& group, QWidget *parent = nullptr);
~FormatterPathWidget();
private:
Ui::FormatterPathWidget *ui;
// SettingsWidget interface
protected:
void doLoad() override;
void doSave() override;
void updateIcons(const QSize &size) override;
private slots:
void on_btnChooseAstyle_triggered(QAction *arg1);
};
#endif // FORMATTERPATHWIDGET_H

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FormatterPathWidget</class>
<widget class="QWidget" name="FormatterPathWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>834</width>
<height>520</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>Path to astyle</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="btnChooseAstyle">
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/images/newlook/actions/01File-09Open_Folder.svg</normaloff>:/icons/images/newlook/actions/01File-09Open_Folder.svg</iconset>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="txtAstyle"/>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -19,6 +19,7 @@
#include "../project.h" #include "../project.h"
#include "../mainwindow.h" #include "../mainwindow.h"
#include "../iconsmanager.h" #include "../iconsmanager.h"
#include "../systemconsts.h"
#include <QFileDialog> #include <QFileDialog>
@ -50,7 +51,7 @@ void ProjectDLLHostWidget::on_btnBrowse_clicked()
this, this,
tr("Choose host application"), tr("Choose host application"),
pMainWindow->project()->directory(), pMainWindow->project()->directory(),
tr("All files (*.*)")); tr("All files (%1)").arg(ALL_FILE_WILDCARD));
if (!filename.isEmpty() && fileExists(filename)) { if (!filename.isEmpty() && fileExists(filename)) {
ui->txtHost->setText(filename); ui->txtHost->setText(filename);
} }

View File

@ -21,6 +21,7 @@
#include "../project.h" #include "../project.h"
#include "../widgets/custommakefileinfodialog.h" #include "../widgets/custommakefileinfodialog.h"
#include "../iconsmanager.h" #include "../iconsmanager.h"
#include "../systemconsts.h"
#include <QFileDialog> #include <QFileDialog>
@ -61,7 +62,7 @@ void ProjectMakefileWidget::on_btnBrowse_clicked()
this, this,
tr("Custom makefile"), tr("Custom makefile"),
pMainWindow->project()->directory(), pMainWindow->project()->directory(),
tr("All files (*.*)")); tr("All files (%1)").arg(ALL_FILE_WILDCARD));
if (!fileName.isEmpty() && QFileInfo(fileName).exists()) { if (!fileName.isEmpty() && QFileInfo(fileName).exists()) {
ui->txtCustomMakefile->setText(fileName); ui->txtCustomMakefile->setText(fileName);
} }

View File

@ -19,6 +19,7 @@
#include "../mainwindow.h" #include "../mainwindow.h"
#include "../project.h" #include "../project.h"
#include "../iconsmanager.h" #include "../iconsmanager.h"
#include "../systemconsts.h"
#include <QFileDialog> #include <QFileDialog>
@ -84,7 +85,7 @@ void ProjectOutputWidget::on_btnCompileLog_triggered(QAction *)
this, this,
tr("Log file"), tr("Log file"),
pMainWindow->project()->directory(), pMainWindow->project()->directory(),
tr("All files (*.*)")); tr("All files (%1)").arg(ALL_FILE_WILDCARD));
if (!fileName.isEmpty() ) { if (!fileName.isEmpty() ) {
ui->txtCompileLog->setText(fileName); ui->txtCompileLog->setText(fileName);
} }

View File

@ -54,6 +54,7 @@
#endif #endif
#ifdef Q_OS_LINUX #ifdef Q_OS_LINUX
#include "environmentprogramswidget.h" #include "environmentprogramswidget.h"
#include "formatterpathwidget.h"
#endif #endif
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>
@ -232,6 +233,12 @@ PSettingsDialog SettingsDialog::optionDialog()
widget->init(); widget->init();
dialog->addWidget(widget); dialog->addWidget(widget);
#ifdef Q_OS_LINUX
widget = new FormatterPathWidget(tr("Program"),tr("Code Formatter"));
widget->init();
dialog->addWidget(widget);
#endif
widget = new ToolsGeneralWidget(tr("General"),tr("Tools")); widget = new ToolsGeneralWidget(tr("General"),tr("Tools"));
widget->init(); widget->init();
dialog->addWidget(widget); dialog->addWidget(widget);

View File

@ -81,6 +81,7 @@
# define STATIC_LIB_EXT "a" # define STATIC_LIB_EXT "a"
# define DYNAMIC_LIB_EXT "dll" # define DYNAMIC_LIB_EXT "dll"
# define MAKEFILE_NAME "makefile.win" # define MAKEFILE_NAME "makefile.win"
# define ALL_FILE_WILDCARD "*.*"
#elif defined(Q_OS_LINUX) #elif defined(Q_OS_LINUX)
# define PATH_SENSITIVITY Qt::CaseSensitive # define PATH_SENSITIVITY Qt::CaseSensitive
# define PATH_SEPARATOR ":" # define PATH_SEPARATOR ":"
@ -90,6 +91,7 @@
# define STATIC_LIB_EXT "a" # define STATIC_LIB_EXT "a"
# define DYNAMIC_LIB_EXT "d" # define DYNAMIC_LIB_EXT "d"
# define MAKEFILE_NAME "makefile" # define MAKEFILE_NAME "makefile"
# define ALL_FILE_WILDCARD "*"
#else #else
#error "Only support windows and linux now!" #error "Only support windows and linux now!"
#endif #endif

View File

@ -19,6 +19,6 @@
#include <QObject> #include <QObject>
#define DEVCPP_VERSION "beta.0.12.4" #define DEVCPP_VERSION "beta.0.12.5"
#endif // VERSION_H #endif // VERSION_H