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>
<translation type="unfinished"></translation>
</message>
<message>
<source>Add Library Files</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Library Files</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProjectCompiler</name>

View File

@ -6500,6 +6500,18 @@ Are you really want to continue?</oldsource>
<source>Linker</source>
<translation></translation>
</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>
<name>ProjectCompiler</name>
@ -8631,12 +8643,12 @@ Are you really want to continue?</oldsource>
<context>
<name>SynEditStringList</name>
<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>
<translation>&apos;%1&apos;!</translation>
</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>
<translation>&apos;%2&apos;!</translation>
</message>

View File

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

View File

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