- enhancement: 3 compare mode for problem cases.
This commit is contained in:
parent
c63d0e7187
commit
4be629727d
1
NEWS.md
1
NEWS.md
|
@ -34,6 +34,7 @@ Red Panda C++ Version 2.24
|
||||||
- enhancement: Better layout for compiler options page.
|
- enhancement: Better layout for compiler options page.
|
||||||
- enhancement: False branches are displayed as comments.
|
- enhancement: False branches are displayed as comments.
|
||||||
- enhancement: Support SDCC Project.
|
- enhancement: Support SDCC Project.
|
||||||
|
- enhancement: 3 compare mode for problem cases.
|
||||||
|
|
||||||
Red Panda C++ Version 2.23
|
Red Panda C++ Version 2.23
|
||||||
|
|
||||||
|
|
|
@ -130,6 +130,11 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->cbProblemCaseValidateType->blockSignals(true);
|
||||||
|
ui->cbProblemCaseValidateType->addItem(tr("Exact"));
|
||||||
|
ui->cbProblemCaseValidateType->addItem(tr("Ignore leading/trailing spaces"));
|
||||||
|
ui->cbProblemCaseValidateType->addItem(tr("Ignore spaces"));
|
||||||
|
ui->cbProblemCaseValidateType->blockSignals(false);
|
||||||
addActions( this->findChildren<QAction *>(QString(), Qt::FindChildrenRecursively));
|
addActions( this->findChildren<QAction *>(QString(), Qt::FindChildrenRecursively));
|
||||||
|
|
||||||
//custom actions
|
//custom actions
|
||||||
|
@ -968,7 +973,7 @@ void MainWindow::applySettings()
|
||||||
showHideMessagesTab(ui->tabProblem, pSettings->ui().showProblem()
|
showHideMessagesTab(ui->tabProblem, pSettings->ui().showProblem()
|
||||||
&& pSettings->executor().enableProblemSet());
|
&& pSettings->executor().enableProblemSet());
|
||||||
|
|
||||||
ui->chkIgnoreSpaces->setChecked(pSettings->executor().ignoreSpacesWhenValidatingCases());
|
ui->cbProblemCaseValidateType->setCurrentIndex((int)(pSettings->executor().problemCaseValidateType()));
|
||||||
ui->actionInterrupt->setVisible(pSettings->debugger().useGDBServer());
|
ui->actionInterrupt->setVisible(pSettings->debugger().useGDBServer());
|
||||||
//icon sets for editors
|
//icon sets for editors
|
||||||
updateEditorSettings();
|
updateEditorSettings();
|
||||||
|
@ -6057,7 +6062,7 @@ void MainWindow::onOJProblemCaseFinished(const QString& id, int current, int tot
|
||||||
if (row>=0) {
|
if (row>=0) {
|
||||||
POJProblemCase problemCase = mOJProblemModel.getCase(row);
|
POJProblemCase problemCase = mOJProblemModel.getCase(row);
|
||||||
ProblemCaseValidator validator;
|
ProblemCaseValidator validator;
|
||||||
problemCase->testState = validator.validate(problemCase,pSettings->executor().ignoreSpacesWhenValidatingCases())?
|
problemCase->testState = validator.validate(problemCase,pSettings->executor().problemCaseValidateType())?
|
||||||
ProblemCaseTestState::Passed:
|
ProblemCaseTestState::Passed:
|
||||||
ProblemCaseTestState::Failed;
|
ProblemCaseTestState::Failed;
|
||||||
mOJProblemModel.update(row);
|
mOJProblemModel.update(row);
|
||||||
|
@ -9623,14 +9628,6 @@ void MainWindow::on_actionToggle_Messages_Panel_triggered()
|
||||||
stretchMessagesPanel(ui->tabMessages->isShrinked());
|
stretchMessagesPanel(ui->tabMessages->isShrinked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_chkIgnoreSpaces_stateChanged(int /*arg1*/)
|
|
||||||
{
|
|
||||||
pSettings->executor().setIgnoreSpacesWhenValidatingCases(ui->chkIgnoreSpaces->isChecked());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void MainWindow::on_actionRaylib_Manual_triggered()
|
void MainWindow::on_actionRaylib_Manual_triggered()
|
||||||
{
|
{
|
||||||
if (pSettings->environment().language()=="zh_CN") {
|
if (pSettings->environment().language()=="zh_CN") {
|
||||||
|
@ -10087,3 +10084,10 @@ bool MainWindow::openingFiles() const
|
||||||
return mOpeningFiles;
|
return mOpeningFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindow::on_cbProblemCaseValidateType_currentIndexChanged(int index)
|
||||||
|
{
|
||||||
|
pSettings->executor().setProblemCaseValidateType((ProblemCaseValidateType)index);
|
||||||
|
pSettings->executor().save();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -767,8 +767,6 @@ private slots:
|
||||||
|
|
||||||
void on_actionToggle_Messages_Panel_triggered();
|
void on_actionToggle_Messages_Panel_triggered();
|
||||||
|
|
||||||
void on_chkIgnoreSpaces_stateChanged(int arg1);
|
|
||||||
|
|
||||||
void on_actionRaylib_Manual_triggered();
|
void on_actionRaylib_Manual_triggered();
|
||||||
|
|
||||||
void on_actionSelect_Word_triggered();
|
void on_actionSelect_Word_triggered();
|
||||||
|
@ -850,6 +848,8 @@ private slots:
|
||||||
|
|
||||||
void on_actionTurtle_Graphics_Manual_triggered();
|
void on_actionTurtle_Graphics_Manual_triggered();
|
||||||
|
|
||||||
|
void on_cbProblemCaseValidateType_currentIndexChanged(int index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
bool mFullInitialized;
|
bool mFullInitialized;
|
||||||
|
|
|
@ -965,7 +965,7 @@
|
||||||
<enum>QTabWidget::South</enum>
|
<enum>QTabWidget::South</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="iconSize">
|
<property name="iconSize">
|
||||||
<size>
|
<size>
|
||||||
|
@ -2060,11 +2060,7 @@
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="chkIgnoreSpaces">
|
<widget class="QComboBox" name="cbProblemCaseValidateType"/>
|
||||||
<property name="text">
|
|
||||||
<string>Ignore Spaces</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -15,14 +15,13 @@
|
||||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "problemcasevalidator.h"
|
#include "problemcasevalidator.h"
|
||||||
#include "../utils.h"
|
|
||||||
|
|
||||||
ProblemCaseValidator::ProblemCaseValidator()
|
ProblemCaseValidator::ProblemCaseValidator()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ProblemCaseValidator::validate(POJProblemCase problemCase, bool ignoreSpaces)
|
bool ProblemCaseValidator::validate(POJProblemCase problemCase, ProblemCaseValidateType type)
|
||||||
{
|
{
|
||||||
if (!problemCase)
|
if (!problemCase)
|
||||||
return false;
|
return false;
|
||||||
|
@ -44,18 +43,31 @@ bool ProblemCaseValidator::validate(POJProblemCase problemCase, bool ignoreSpace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int count=std::min(output.count(), expected.count());
|
int count=std::min(output.count(), expected.count());
|
||||||
|
switch(type) {
|
||||||
|
case ProblemCaseValidateType::Exact:
|
||||||
for (int i=0;i<count;i++) {
|
for (int i=0;i<count;i++) {
|
||||||
if (ignoreSpaces) {
|
|
||||||
if (!equalIgnoringSpaces(output[i],expected[i])) {
|
|
||||||
problemCase->firstDiffLine = i;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (output[i]!=expected[i]) {
|
if (output[i]!=expected[i]) {
|
||||||
problemCase->firstDiffLine = i;
|
problemCase->firstDiffLine = i;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case ProblemCaseValidateType::IgnoreLeadingTrailingSpaces:
|
||||||
|
for (int i=0;i<count;i++) {
|
||||||
|
if (output[i].trimmed()!=expected[i].trimmed()) {
|
||||||
|
problemCase->firstDiffLine = i;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ProblemCaseValidateType::IgnoreSpaces:
|
||||||
|
for (int i=0;i<count;i++) {
|
||||||
|
if (!equalIgnoringSpaces(output[i],expected[i])) {
|
||||||
|
problemCase->firstDiffLine = i;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (output.count()<expected.count()) {
|
if (output.count()<expected.count()) {
|
||||||
problemCase->firstDiffLine=output.count();
|
problemCase->firstDiffLine=output.count();
|
||||||
|
|
|
@ -18,12 +18,13 @@
|
||||||
#define PROBLEMCASEVALIDATOR_H
|
#define PROBLEMCASEVALIDATOR_H
|
||||||
|
|
||||||
#include "ojproblemset.h"
|
#include "ojproblemset.h"
|
||||||
|
#include "../utils.h"
|
||||||
|
|
||||||
class ProblemCaseValidator
|
class ProblemCaseValidator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ProblemCaseValidator();
|
ProblemCaseValidator();
|
||||||
bool validate(POJProblemCase problemCase,bool ignoreSpaces);
|
bool validate(POJProblemCase problemCase, ProblemCaseValidateType type);
|
||||||
private:
|
private:
|
||||||
bool equalIgnoringSpaces(const QString& s1, const QString& s2);
|
bool equalIgnoringSpaces(const QString& s1, const QString& s2);
|
||||||
QStringList split(const QString& s);
|
QStringList split(const QString& s);
|
||||||
|
|
|
@ -2458,31 +2458,6 @@ void Settings::CompilerSet::setExecutables()
|
||||||
mMake = findProgramInBinDirs(MAKE_PROGRAM);
|
mMake = findProgramInBinDirs(MAKE_PROGRAM);
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
mResourceCompiler = findProgramInBinDirs(WINDRES_PROGRAM);
|
mResourceCompiler = findProgramInBinDirs(WINDRES_PROGRAM);
|
||||||
if (mMake.isEmpty()) {
|
|
||||||
mMake = findProgramInBinDirs(MAKE2_PROGRAM);
|
|
||||||
}
|
|
||||||
if (mMake.isEmpty()) {
|
|
||||||
QSet<QString> searched;
|
|
||||||
|
|
||||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
|
||||||
QString path = env.value("PATH");
|
|
||||||
QStringList pathList = path.split(PATH_SEPARATOR);
|
|
||||||
QString folder;
|
|
||||||
for (int i=pathList.count()-1;i>=0;i--) {
|
|
||||||
folder = pathList[i];
|
|
||||||
if (searched.contains(folder))
|
|
||||||
continue;
|
|
||||||
searched.insert(folder);
|
|
||||||
QDir dir(folder);
|
|
||||||
if (dir.exists(MAKE_PROGRAM)) {
|
|
||||||
mMake = dir.absoluteFilePath(MAKE_PROGRAM);
|
|
||||||
break;
|
|
||||||
} else if (dir.exists(MAKE2_PROGRAM)) {
|
|
||||||
mMake = dir.absoluteFilePath(MAKE2_PROGRAM);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3962,16 +3937,6 @@ void Settings::Executor::setCompetivieCompanionPort(int newCompetivieCompanionPo
|
||||||
mCompetivieCompanionPort = newCompetivieCompanionPort;
|
mCompetivieCompanionPort = newCompetivieCompanionPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::Executor::ignoreSpacesWhenValidatingCases() const
|
|
||||||
{
|
|
||||||
return mIgnoreSpacesWhenValidatingCases;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Settings::Executor::setIgnoreSpacesWhenValidatingCases(bool newIgnoreSpacesWhenValidatingCases)
|
|
||||||
{
|
|
||||||
mIgnoreSpacesWhenValidatingCases = newIgnoreSpacesWhenValidatingCases;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Settings::Executor::caseEditorFontOnlyMonospaced() const
|
bool Settings::Executor::caseEditorFontOnlyMonospaced() const
|
||||||
{
|
{
|
||||||
return mCaseEditorFontOnlyMonospaced;
|
return mCaseEditorFontOnlyMonospaced;
|
||||||
|
@ -4022,6 +3987,16 @@ void Settings::Executor::setRedirectStderrToToolLog(bool newRedirectStderrToTool
|
||||||
mRedirectStderrToToolLog = newRedirectStderrToToolLog;
|
mRedirectStderrToToolLog = newRedirectStderrToToolLog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ProblemCaseValidateType Settings::Executor::problemCaseValidateType() const
|
||||||
|
{
|
||||||
|
return mProblemCaseValidateType;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::Executor::setProblemCaseValidateType(ProblemCaseValidateType newProblemCaseValidateType)
|
||||||
|
{
|
||||||
|
mProblemCaseValidateType = newProblemCaseValidateType;
|
||||||
|
}
|
||||||
|
|
||||||
bool Settings::Executor::convertHTMLToTextForInput() const
|
bool Settings::Executor::convertHTMLToTextForInput() const
|
||||||
{
|
{
|
||||||
return mConvertHTMLToTextForInput;
|
return mConvertHTMLToTextForInput;
|
||||||
|
@ -4096,7 +4071,7 @@ void Settings::Executor::doSave()
|
||||||
saveValue("competitive_companion_port", mCompetivieCompanionPort);
|
saveValue("competitive_companion_port", mCompetivieCompanionPort);
|
||||||
saveValue("input_convert_html", mConvertHTMLToTextForInput);
|
saveValue("input_convert_html", mConvertHTMLToTextForInput);
|
||||||
saveValue("expected_convert_html", mConvertHTMLToTextForExpected);
|
saveValue("expected_convert_html", mConvertHTMLToTextForExpected);
|
||||||
saveValue("ignore_spaces_when_validating_cases", mIgnoreSpacesWhenValidatingCases);
|
saveValue("problem_case_validate_type", (int)mProblemCaseValidateType);
|
||||||
saveValue("redirect_stderr_to_toollog", mRedirectStderrToToolLog);
|
saveValue("redirect_stderr_to_toollog", mRedirectStderrToToolLog);
|
||||||
saveValue("case_editor_font_name",mCaseEditorFontName);
|
saveValue("case_editor_font_name",mCaseEditorFontName);
|
||||||
saveValue("case_editor_font_size",mCaseEditorFontSize);
|
saveValue("case_editor_font_size",mCaseEditorFontSize);
|
||||||
|
@ -4131,7 +4106,7 @@ void Settings::Executor::doLoad()
|
||||||
mCompetivieCompanionPort = intValue("competitive_companion_port",10045);
|
mCompetivieCompanionPort = intValue("competitive_companion_port",10045);
|
||||||
mConvertHTMLToTextForInput = boolValue("input_convert_html", false);
|
mConvertHTMLToTextForInput = boolValue("input_convert_html", false);
|
||||||
mConvertHTMLToTextForExpected = boolValue("expected_convert_html", false);
|
mConvertHTMLToTextForExpected = boolValue("expected_convert_html", false);
|
||||||
mIgnoreSpacesWhenValidatingCases = boolValue("ignore_spaces_when_validating_cases",false);
|
mProblemCaseValidateType =(ProblemCaseValidateType)intValue("problem_case_validate_type", (int)ProblemCaseValidateType::Exact);
|
||||||
mRedirectStderrToToolLog = boolValue("redirect_stderr_to_toollog", false);
|
mRedirectStderrToToolLog = boolValue("redirect_stderr_to_toollog", false);
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -904,9 +904,6 @@ public:
|
||||||
int competivieCompanionPort() const;
|
int competivieCompanionPort() const;
|
||||||
void setCompetivieCompanionPort(int newCompetivieCompanionPort);
|
void setCompetivieCompanionPort(int newCompetivieCompanionPort);
|
||||||
|
|
||||||
bool ignoreSpacesWhenValidatingCases() const;
|
|
||||||
void setIgnoreSpacesWhenValidatingCases(bool newIgnoreSpacesWhenValidatingCases);
|
|
||||||
|
|
||||||
const QString &caseEditorFontName() const;
|
const QString &caseEditorFontName() const;
|
||||||
void setCaseEditorFontName(const QString &newCaseEditorFontName);
|
void setCaseEditorFontName(const QString &newCaseEditorFontName);
|
||||||
|
|
||||||
|
@ -934,6 +931,9 @@ public:
|
||||||
bool redirectStderrToToolLog() const;
|
bool redirectStderrToToolLog() const;
|
||||||
void setRedirectStderrToToolLog(bool newRedirectStderrToToolLog);
|
void setRedirectStderrToToolLog(bool newRedirectStderrToToolLog);
|
||||||
|
|
||||||
|
ProblemCaseValidateType problemCaseValidateType() const;
|
||||||
|
void setProblemCaseValidateType(ProblemCaseValidateType newProblemCaseValidateType);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// general
|
// general
|
||||||
bool mPauseConsole;
|
bool mPauseConsole;
|
||||||
|
@ -950,6 +950,7 @@ public:
|
||||||
bool mConvertHTMLToTextForInput;
|
bool mConvertHTMLToTextForInput;
|
||||||
bool mConvertHTMLToTextForExpected;
|
bool mConvertHTMLToTextForExpected;
|
||||||
bool mIgnoreSpacesWhenValidatingCases;
|
bool mIgnoreSpacesWhenValidatingCases;
|
||||||
|
ProblemCaseValidateType mProblemCaseValidateType;
|
||||||
bool mRedirectStderrToToolLog;
|
bool mRedirectStderrToToolLog;
|
||||||
QString mCaseEditorFontName;
|
QString mCaseEditorFontName;
|
||||||
int mCaseEditorFontSize;
|
int mCaseEditorFontSize;
|
||||||
|
|
|
@ -24,6 +24,10 @@ ExecutorProblemSetWidget::ExecutorProblemSetWidget(const QString& name, const QS
|
||||||
ui(new Ui::ExecutorProblemSetWidget)
|
ui(new Ui::ExecutorProblemSetWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
ui->cbProblemCaseValidateType->addItem(tr("Exact"));
|
||||||
|
ui->cbProblemCaseValidateType->addItem(tr("Ignore leading/trailing spaces"));
|
||||||
|
ui->cbProblemCaseValidateType->addItem(tr("Ignore spaces"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ExecutorProblemSetWidget::~ExecutorProblemSetWidget()
|
ExecutorProblemSetWidget::~ExecutorProblemSetWidget()
|
||||||
|
@ -39,7 +43,7 @@ void ExecutorProblemSetWidget::doLoad()
|
||||||
ui->chkConvertInputHTML->setChecked(pSettings->executor().convertHTMLToTextForInput());
|
ui->chkConvertInputHTML->setChecked(pSettings->executor().convertHTMLToTextForInput());
|
||||||
ui->chkConvertExpectedHTML->setChecked(pSettings->executor().convertHTMLToTextForExpected());
|
ui->chkConvertExpectedHTML->setChecked(pSettings->executor().convertHTMLToTextForExpected());
|
||||||
|
|
||||||
ui->chkIgnoreSpacesWhenValidatingCases->setChecked(pSettings->executor().ignoreSpacesWhenValidatingCases());
|
ui->cbProblemCaseValidateType->setCurrentIndex((int)(pSettings->executor().problemCaseValidateType()));
|
||||||
ui->chkRedirectStderr->setChecked(pSettings->executor().redirectStderrToToolLog());
|
ui->chkRedirectStderr->setChecked(pSettings->executor().redirectStderrToToolLog());
|
||||||
|
|
||||||
ui->cbFont->setCurrentFont(QFont(pSettings->executor().caseEditorFontName()));
|
ui->cbFont->setCurrentFont(QFont(pSettings->executor().caseEditorFontName()));
|
||||||
|
@ -58,7 +62,7 @@ void ExecutorProblemSetWidget::doSave()
|
||||||
pSettings->executor().setCompetivieCompanionPort(ui->spinPortNumber->value());
|
pSettings->executor().setCompetivieCompanionPort(ui->spinPortNumber->value());
|
||||||
pSettings->executor().setConvertHTMLToTextForInput(ui->chkConvertInputHTML->isChecked());
|
pSettings->executor().setConvertHTMLToTextForInput(ui->chkConvertInputHTML->isChecked());
|
||||||
pSettings->executor().setConvertHTMLToTextForExpected(ui->chkConvertExpectedHTML->isChecked());
|
pSettings->executor().setConvertHTMLToTextForExpected(ui->chkConvertExpectedHTML->isChecked());
|
||||||
pSettings->executor().setIgnoreSpacesWhenValidatingCases(ui->chkIgnoreSpacesWhenValidatingCases->isChecked());
|
pSettings->executor().setProblemCaseValidateType((ProblemCaseValidateType)(ui->cbProblemCaseValidateType->currentIndex()));
|
||||||
pSettings->executor().setRedirectStderrToToolLog(ui->chkRedirectStderr->isChecked());
|
pSettings->executor().setRedirectStderrToToolLog(ui->chkRedirectStderr->isChecked());
|
||||||
pSettings->executor().setCaseEditorFontName(ui->cbFont->currentFont().family());
|
pSettings->executor().setCaseEditorFontName(ui->cbFont->currentFont().family());
|
||||||
pSettings->executor().setCaseEditorFontOnlyMonospaced(ui->chkOnlyMonospaced->isChecked());
|
pSettings->executor().setCaseEditorFontOnlyMonospaced(ui->chkOnlyMonospaced->isChecked());
|
||||||
|
@ -79,4 +83,3 @@ void ExecutorProblemSetWidget::on_chkOnlyMonospaced_stateChanged(int )
|
||||||
ui->cbFont->setFontFilters(QFontComboBox::FontFilter::AllFonts);
|
ui->cbFont->setFontFilters(QFontComboBox::FontFilter::AllFonts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ protected:
|
||||||
void doSave() override;
|
void doSave() override;
|
||||||
private slots:
|
private slots:
|
||||||
void on_chkOnlyMonospaced_stateChanged(int arg1);
|
void on_chkOnlyMonospaced_stateChanged(int arg1);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EXECUTORPROBLEMSETWIDGET_H
|
#endif // EXECUTORPROBLEMSETWIDGET_H
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>545</width>
|
<width>545</width>
|
||||||
<height>503</height>
|
<height>516</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -125,10 +125,44 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="chkIgnoreSpacesWhenValidatingCases">
|
<widget class="QWidget" name="widget_4" native="true">
|
||||||
<property name="text">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<string>Ignore spaces when validating problem cases</string>
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Problem Case Validate type</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="cbProblemCaseValidateType"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_6">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#define SDCC_PROGRAM "sdcc.exe"
|
#define SDCC_PROGRAM "sdcc.exe"
|
||||||
#define PACKIHX_PROGRAM "packihx.exe"
|
#define PACKIHX_PROGRAM "packihx.exe"
|
||||||
#define MAKEBIN_PROGRAM "makebin.exe"
|
#define MAKEBIN_PROGRAM "makebin.exe"
|
||||||
#define MAKE2_PROGRAM "make.exe"
|
|
||||||
#elif defined(Q_OS_LINUX)
|
#elif defined(Q_OS_LINUX)
|
||||||
#define CONSOLE_PAUSER "consolepauser"
|
#define CONSOLE_PAUSER "consolepauser"
|
||||||
#define ASSEMBLER "nasm"
|
#define ASSEMBLER "nasm"
|
||||||
|
|
|
@ -2079,7 +2079,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Ignore spaces when validating problem cases</source>
|
<source>Ignore spaces when validating problem cases</source>
|
||||||
<translation>Ignorar espaços ao validar casos de problemas</translation>
|
<translation type="vanished">Ignorar espaços ao validar casos de problemas</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Timeout for Case Valdation</source>
|
<source>Timeout for Case Valdation</source>
|
||||||
|
@ -2137,6 +2137,22 @@
|
||||||
<source>Redirect STDERR to Tools output panel</source>
|
<source>Redirect STDERR to Tools output panel</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Problem Case Validate type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Exact</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore leading/trailing spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>FileAssociationModel</name>
|
<name>FileAssociationModel</name>
|
||||||
|
@ -4925,7 +4941,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Ignore Spaces</source>
|
<source>Ignore Spaces</source>
|
||||||
<translation>Ignorar espaços</translation>
|
<translation type="vanished">Ignorar espaços</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Raylib Manual</source>
|
<source>Raylib Manual</source>
|
||||||
|
@ -5319,6 +5335,18 @@
|
||||||
<source>Turtle Graphics Tutorial</source>
|
<source>Turtle Graphics Tutorial</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Exact</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore leading/trailing spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MemoryModel</name>
|
<name>MemoryModel</name>
|
||||||
|
@ -5467,10 +5495,6 @@
|
||||||
<source>Icon Info:</source>
|
<source>Icon Info:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>TextLabel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>NewProjectUnitDialog</name>
|
<name>NewProjectUnitDialog</name>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1910,10 +1910,6 @@
|
||||||
<source>Port Number</source>
|
<source>Port Number</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Ignore spaces when validating problem cases</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Case Editor Font</source>
|
<source>Case Editor Font</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -1966,6 +1962,22 @@
|
||||||
<source>Redirect STDERR to Tools output panel</source>
|
<source>Redirect STDERR to Tools output panel</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Problem Case Validate type</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Exact</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore leading/trailing spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>FileAssociationModel</name>
|
<name>FileAssociationModel</name>
|
||||||
|
@ -4660,10 +4672,6 @@
|
||||||
<source>Rename</source>
|
<source>Rename</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>Ignore Spaces</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
<message>
|
||||||
<source>Raylib Manual</source>
|
<source>Raylib Manual</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
|
@ -5048,6 +5056,18 @@
|
||||||
<source>Turtle Graphics Tutorial</source>
|
<source>Turtle Graphics Tutorial</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Exact</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore leading/trailing spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Ignore spaces</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>MemoryModel</name>
|
<name>MemoryModel</name>
|
||||||
|
@ -5192,10 +5212,6 @@
|
||||||
<source>Icon Info:</source>
|
<source>Icon Info:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
|
||||||
<source>TextLabel</source>
|
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>NewProjectUnitDialog</name>
|
<name>NewProjectUnitDialog</name>
|
||||||
|
|
|
@ -107,6 +107,12 @@ enum class SplitProcessCommandQuoteType {
|
||||||
Double
|
Double
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class ProblemCaseValidateType {
|
||||||
|
Exact,
|
||||||
|
IgnoreLeadingTrailingSpaces,
|
||||||
|
IgnoreSpaces
|
||||||
|
};
|
||||||
|
|
||||||
FileType getFileType(const QString& filename);
|
FileType getFileType(const QString& filename);
|
||||||
QStringList splitProcessCommand(const QString& cmd);
|
QStringList splitProcessCommand(const QString& cmd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue