fix: add library files dialog not correctly

This commit is contained in:
Roy Qu 2022-04-18 11:48:51 +08:00
parent 512371a6d4
commit 331a5818c6
4 changed files with 33 additions and 4 deletions

View File

@ -4763,6 +4763,14 @@
<source>Linker</source> <source>Linker</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Add Library Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Library Files</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProjectCompiler</name> <name>ProjectCompiler</name>

View File

@ -6500,6 +6500,18 @@ Are you really want to continue?</oldsource>
<source>Linker</source> <source>Linker</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<location filename="settingsdialog/projectcompileparamaterswidget.ui" line="118"/>
<location filename="settingsdialog/projectcompileparamaterswidget.cpp" line="62"/>
<source>Add Library Files</source>
<translation></translation>
</message>
<message>
<location filename="settingsdialog/projectcompileparamaterswidget.cpp" line="55"/>
<location filename="settingsdialog/projectcompileparamaterswidget.cpp" line="57"/>
<source>Library Files</source>
<translation></translation>
</message>
</context> </context>
<context> <context>
<name>ProjectCompiler</name> <name>ProjectCompiler</name>
@ -8631,12 +8643,12 @@ Are you really want to continue?</oldsource>
<context> <context>
<name>SynEditStringList</name> <name>SynEditStringList</name>
<message> <message>
<location filename="qsynedit/TextBuffer.cpp" line="553"/> <location filename="qsynedit/TextBuffer.cpp" line="557"/>
<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="qsynedit/TextBuffer.cpp" line="680"/> <location filename="qsynedit/TextBuffer.cpp" line="684"/>
<source>Can&apos;t open file &apos;%1&apos; for save!</source> <source>Can&apos;t open file &apos;%1&apos; for save!</source>
<translation>&apos;%2&apos;!</translation> <translation>&apos;%2&apos;!</translation>
</message> </message>

View File

@ -4763,6 +4763,14 @@
<source>Linker</source> <source>Linker</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Add Library Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Library Files</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProjectCompiler</name> <name>ProjectCompiler</name>

View File

@ -52,14 +52,15 @@ void ProjectCompileParamatersWidget::doSave()
void ProjectCompileParamatersWidget::on_btnChooseLib_clicked() void ProjectCompileParamatersWidget::on_btnChooseLib_clicked()
{ {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
QString filter = tr("Library Files (*.a *.lib)"); QString filter = tr("Library Files")+" (*.a *.lib *.o)";
#else #else
QString filter = tr("Library Files (*.a)"); QString filter = tr("Library Files")+" (*.a *.o)";
#endif #endif
QStringList files = QFileDialog::getOpenFileNames( QStringList files = QFileDialog::getOpenFileNames(
this, this,
tr("Add Library Files"), tr("Add Library Files"),
QDir::currentPath(),
filter filter
); );
if (!files.isEmpty()) { if (!files.isEmpty()) {