fix #342 carsh when click choose executalbe buttons in the options dialog/compiler/compiler set page

This commit is contained in:
Roy Qu 2024-03-30 00:19:36 +08:00
parent bae50693b9
commit 1b8dbf44e9
3 changed files with 14 additions and 14 deletions

View File

@ -393,12 +393,12 @@ void CompilerSetOptionWidget::updateIcons(const QSize& /*size*/)
pIconsManager->setIcon(ui->btnRemoveCompilerSet, IconsManager::ACTION_MISC_REMOVE);
pIconsManager->setIcon(ui->btnRenameCompilerSet, IconsManager::ACTION_MISC_RENAME);
pIconsManager->setIcon(ui->btnChooseCCompiler, IconsManager::ACTION_FILE_OPEN_FOLDER);
pIconsManager->setIcon(ui->btnChooseCppCompiler, IconsManager::ACTION_FILE_OPEN_FOLDER);
pIconsManager->setIcon(ui->btnChooseGDB, IconsManager::ACTION_FILE_OPEN_FOLDER);
pIconsManager->setIcon(ui->btnChooseGDBServer, IconsManager::ACTION_FILE_OPEN_FOLDER);
pIconsManager->setIcon(ui->btnChooseMake, IconsManager::ACTION_FILE_OPEN_FOLDER);
pIconsManager->setIcon(ui->btnChooseResourceCompiler, IconsManager::ACTION_FILE_OPEN_FOLDER);
pIconsManager->setIcon(ui->btnChooseCCompiler, IconsManager::ACTION_FILE_LOCATE);
pIconsManager->setIcon(ui->btnChooseCppCompiler, IconsManager::ACTION_FILE_LOCATE);
pIconsManager->setIcon(ui->btnChooseGDB, IconsManager::ACTION_FILE_LOCATE);
pIconsManager->setIcon(ui->btnChooseGDBServer, IconsManager::ACTION_FILE_LOCATE);
pIconsManager->setIcon(ui->btnChooseMake, IconsManager::ACTION_FILE_LOCATE);
pIconsManager->setIcon(ui->btnChooseResourceCompiler, IconsManager::ACTION_FILE_LOCATE);
}
void CompilerSetOptionWidget::on_cbEncoding_currentTextChanged(const QString &/*arg1*/)

View File

@ -95,22 +95,22 @@ const QStringList &SystemConsts::defaultFileFilters() const noexcept
return mDefaultFileFilters;
}
const QString &SystemConsts::defaultCFileFilter() const noexcept
QString SystemConsts::defaultCFileFilter() const noexcept
{
return mDefaultFileFilters[2];
}
const QString &SystemConsts::defaultCPPFileFilter() const noexcept
QString SystemConsts::defaultCPPFileFilter() const noexcept
{
return mDefaultFileFilters[3];
}
const QString &SystemConsts::defaultAllFileFilter() const noexcept
QString SystemConsts::defaultAllFileFilter() const noexcept
{
return mDefaultFileFilters[0];
}
const QString &SystemConsts::executableFileFilter() const noexcept
QString SystemConsts::executableFileFilter() const noexcept
{
#ifdef Q_OS_WIN
return QObject::tr("Executable files (*.exe)");

View File

@ -130,10 +130,10 @@ class SystemConsts
public:
SystemConsts();
const QStringList& defaultFileFilters() const noexcept;
const QString& defaultCFileFilter() const noexcept;
const QString& defaultCPPFileFilter() const noexcept;
const QString& defaultAllFileFilter() const noexcept;
const QString& executableFileFilter() const noexcept;
QString defaultCFileFilter() const noexcept;
QString defaultCPPFileFilter() const noexcept;
QString defaultAllFileFilter() const noexcept;
QString executableFileFilter() const noexcept;
QString fileFilterFor(const QString& suffix);
void addDefaultFileFilter(const QString& name, const QString& fileExtensions);
const QStringList &iconFileFilters() const;