parent
d14a1be208
commit
c59b9c9283
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -2677,12 +2677,14 @@ void MainWindow::onLstProblemSetContextMenu(const QPoint &pos)
|
||||||
QAction * action = new QAction(tr("select other file..."),menuSetAnswer);
|
QAction * action = new QAction(tr("select other file..."),menuSetAnswer);
|
||||||
connect(action, &QAction::triggered,
|
connect(action, &QAction::triggered,
|
||||||
[problem,this](){
|
[problem,this](){
|
||||||
|
QFileDialog dialog;
|
||||||
QString filename = QFileDialog::getOpenFileName(
|
QString filename = QFileDialog::getOpenFileName(
|
||||||
this,
|
this,
|
||||||
tr("Select Answer Source File"),
|
tr("Select Answer Source File"),
|
||||||
QString(),
|
QString(),
|
||||||
tr("C/C++Source Files (*.c *.cpp *.cc *.cxx)")
|
tr("C/C++Source Files (*.c *.cpp *.cc *.cxx)"),
|
||||||
);
|
nullptr,
|
||||||
|
dialog.options() | QFileDialog::DontUseNativeDialog);
|
||||||
if (!filename.isEmpty()) {
|
if (!filename.isEmpty()) {
|
||||||
QDir::setCurrent(extractFileDir(filename));
|
QDir::setCurrent(extractFileDir(filename));
|
||||||
problem->answerProgram = filename;
|
problem->answerProgram = filename;
|
||||||
|
|
|
@ -99,6 +99,8 @@ PSettingsDialog SettingsDialog::optionDialog()
|
||||||
{
|
{
|
||||||
PSettingsDialog dialog = std::make_shared<SettingsDialog>();
|
PSettingsDialog dialog = std::make_shared<SettingsDialog>();
|
||||||
|
|
||||||
|
dialog->setWindowTitle(tr("Options"));
|
||||||
|
|
||||||
SettingsWidget* widget = new EnvironmentAppearenceWidget(tr("Appearence"),tr("Environment"));
|
SettingsWidget* widget = new EnvironmentAppearenceWidget(tr("Appearence"),tr("Environment"));
|
||||||
widget->init();
|
widget->init();
|
||||||
dialog->addWidget(widget);
|
dialog->addWidget(widget);
|
||||||
|
@ -206,6 +208,8 @@ PSettingsDialog SettingsDialog::projectOptionDialog()
|
||||||
{
|
{
|
||||||
PSettingsDialog dialog = std::make_shared<SettingsDialog>();
|
PSettingsDialog dialog = std::make_shared<SettingsDialog>();
|
||||||
|
|
||||||
|
dialog->setWindowTitle(tr("Project Options"));
|
||||||
|
|
||||||
SettingsWidget* widget = new ProjectGeneralWidget(tr("General"),tr("Project"));
|
SettingsWidget* widget = new ProjectGeneralWidget(tr("General"),tr("Project"));
|
||||||
widget->init();
|
widget->init();
|
||||||
dialog->addWidget(widget);
|
dialog->addWidget(widget);
|
||||||
|
|
Loading…
Reference in New Issue