Fix file dialog filter translations

This commit is contained in:
Edward Jones 2018-03-13 19:55:37 +00:00
parent 46e8e3dbbc
commit e718e9f5e5
2 changed files with 6 additions and 4 deletions

View File

@ -130,9 +130,9 @@ void BrowserOptionDialog::saveSettings()
void BrowserOptionDialog::showProxyLocationFileDialog()
{
#ifdef Q_OS_WIN
QString fileTypeFilter(tr("Executable Files (*.exe);;All Files (*.*)"));
QString fileTypeFilter(QString("%1 (*.exe);;%2 (*.*)").arg(tr("Executable Files"), tr("All Files")));
#else
QString fileTypeFilter(tr("Executable Files (*)"));
QString fileTypeFilter(QString("%1 (*)").arg(tr("Executable Files")));
#endif
auto proxyLocation = QFileDialog::getOpenFileName(this, tr("Select custom proxy location"),
QFileInfo(QCoreApplication::applicationDirPath()).filePath(),

View File

@ -181,8 +181,9 @@ void DatabaseTabWidget::openDatabase(const QString& fileName, const QString& pw,
void DatabaseTabWidget::importCsv()
{
QString filter = QString("%1 (*.csv);;%2 (*)").arg(tr("CSV file"), tr("All files"));
QString fileName = fileDialog()->getOpenFileName(this, tr("Open CSV file"), QString(),
tr("CSV file") + " (*.csv);;" + tr("All files (*)"));
filter);
if (fileName.isEmpty()) {
return;
@ -213,8 +214,9 @@ void DatabaseTabWidget::mergeDatabase(const QString& fileName)
void DatabaseTabWidget::importKeePass1Database()
{
QString filter = QString("%1 (*.kdb);;%2 (*)").arg(tr("KeePass 1 database"), tr("All files"));
QString fileName = fileDialog()->getOpenFileName(this, tr("Open KeePass 1 database"), QString(),
tr("KeePass 1 database") + " (*.kdb);;" + tr("All files (*)"));
filter);
if (fileName.isEmpty()) {
return;