- enhancement: "Trim trailing spaces" in code menu

- change: Don't auto disable compile and debug buttons.
  - enhancement: Better error messages for missing compile/debug/make programs.
  - enhancement: "Show special chars" in options / editor / font
  - fix: Lost compiler set settings if a compiler set's bin dirs is empty.
  - enhancement: Better error message when trying to debug with Release compile set.
This commit is contained in:
Roy Qu 2022-12-16 11:10:46 +08:00
parent 7ddc30967d
commit 492345b939
28 changed files with 1388 additions and 1085 deletions

View File

@ -2,7 +2,13 @@ Red Panda C++ Version 2.7
- enhancement: Remove multiple problems in the problem set view - enhancement: Remove multiple problems in the problem set view
- enhancement: Clear the proble view after a new problem set created - enhancement: Clear the proble view after a new problem set created
- enhancement: "Remove trailing spaces" in options / editor / misc - enhancement: "Trim trailing spaces" in options / editor / misc
- enhancement: "Trim trailing spaces" in code menu
- change: Don't auto disable compile and debug buttons.
- enhancement: Better error messages for missing compile/debug/make programs.
- enhancement: "Show special chars" in options / editor / font
- fix: Lost compiler set settings if a compiler set's bin dirs is empty.
- enhancement: Better error message when trying to debug with Release compile set.
Red Panda C++ Version 2.6 Red Panda C++ Version 2.6

View File

@ -112,6 +112,7 @@
"strikeout" : false "strikeout" : false
}, },
"Space" : { "Space" : {
"foreground": "#ff9b9b9b",
"bold" : false, "bold" : false,
"italic" : false, "italic" : false,
"underlined" : false, "underlined" : false,

View File

@ -112,6 +112,7 @@
"strikeout" : false "strikeout" : false
}, },
"Space" : { "Space" : {
"foreground": "#ffbababa",
"bold" : false, "bold" : false,
"italic" : false, "italic" : false,
"underlined" : false, "underlined" : false,

View File

@ -112,6 +112,7 @@
"strikeout" : false "strikeout" : false
}, },
"Space" : { "Space" : {
"foreground": "#ffbababa",
"bold" : false, "bold" : false,
"italic" : false, "italic" : false,
"underlined" : false, "underlined" : false,

View File

@ -191,6 +191,7 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"foreground": "#ff505050",
"bold": false, "bold": false,
"italic": false, "italic": false,
"strikeout": false, "strikeout": false,

View File

@ -198,6 +198,7 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"foreground": "#ffbababa",
"bold": false, "bold": false,
"italic": false, "italic": false,
"strikeout": false, "strikeout": false,

View File

@ -193,6 +193,7 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"foreground": "#ff303030",
"bold": false, "bold": false,
"italic": false, "italic": false,
"strikeout": false, "strikeout": false,

View File

@ -195,6 +195,7 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"foreground": "#ff505050",
"bold": false, "bold": false,
"italic": false, "italic": false,
"strikeout": false, "strikeout": false,

View File

@ -15,7 +15,6 @@
"underlined": false "underlined": false
}, },
"Assembler": { "Assembler": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff79abff", "foreground": "#ff79abff",
"italic": false, "italic": false,
@ -36,7 +35,6 @@
"underlined": false "underlined": false
}, },
"Class": { "Class": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff79abff", "foreground": "#ff79abff",
"italic": false, "italic": false,
@ -44,7 +42,6 @@
"underlined": false "underlined": false
}, },
"Comment": { "Comment": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ffc7dd0c", "foreground": "#ffc7dd0c",
"italic": false, "italic": false,
@ -82,7 +79,6 @@
"underlined": false "underlined": false
}, },
"Float": { "Float": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff7fb347", "foreground": "#ff7fb347",
"italic": false, "italic": false,
@ -126,7 +122,6 @@
"underlined": false "underlined": false
}, },
"Hexadecimal": { "Hexadecimal": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff7fb347", "foreground": "#ff7fb347",
"italic": false, "italic": false,
@ -162,7 +157,6 @@
"underlined": false "underlined": false
}, },
"Number": { "Number": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff7fb347", "foreground": "#ff7fb347",
"italic": false, "italic": false,
@ -170,7 +164,6 @@
"underlined": false "underlined": false
}, },
"Octal": { "Octal": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff7fb347", "foreground": "#ff7fb347",
"italic": false, "italic": false,
@ -178,7 +171,6 @@
"underlined": false "underlined": false
}, },
"Preprocessor": { "Preprocessor": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff79abff", "foreground": "#ff79abff",
"italic": false, "italic": false,
@ -186,7 +178,6 @@
"underlined": false "underlined": false
}, },
"Reserved Word": { "Reserved Word": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ffffffff", "foreground": "#ffffffff",
"italic": false, "italic": false,
@ -202,7 +193,6 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ff505050", "foreground": "#ff505050",
"italic": false, "italic": false,
@ -210,7 +200,6 @@
"underlined": false "underlined": false
}, },
"String": { "String": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ffffc600", "foreground": "#ffffc600",
"italic": false, "italic": false,
@ -218,7 +207,6 @@
"underlined": false "underlined": false
}, },
"Symbol": { "Symbol": {
"background": "#ff1e1e1e",
"bold": false, "bold": false,
"foreground": "#ffd9e577", "foreground": "#ffd9e577",
"italic": false, "italic": false,

View File

@ -195,6 +195,7 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"foreground": "#ff505050",
"bold": false, "bold": false,
"italic": false, "italic": false,
"strikeout": false, "strikeout": false,

View File

@ -194,6 +194,7 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"foreground": "#ff505050",
"bold": false, "bold": false,
"italic": false, "italic": false,
"strikeout": false, "strikeout": false,

View File

@ -190,6 +190,7 @@
"underlined": false "underlined": false
}, },
"Space": { "Space": {
"foreground": "#ffbababa",
"bold": false, "bold": false,
"italic": false, "italic": false,
"strikeout": false, "strikeout": false,

View File

@ -113,7 +113,10 @@ bool FileCompiler::prepareForCompile()
mArguments += getLibraryArguments(fileType); mArguments += getLibraryArguments(fileType);
if (!fileExists(mCompiler)) { if (!fileExists(mCompiler)) {
throw CompileError(tr("The Compiler '%1' doesn't exists!").arg(mCompiler)); throw CompileError(
tr("The Compiler '%1' doesn't exists!").arg(mCompiler)
+"<br />"
+tr("Please check the \"program\" page of compiler settings."));
} }
log(tr("Processing %1 source file:").arg(strFileType)); log(tr("Processing %1 source file:").arg(strFileType));

View File

@ -530,7 +530,10 @@ bool ProjectCompiler::prepareForCompile()
mCompiler = compilerSet()->make(); mCompiler = compilerSet()->make();
if (!fileExists(mCompiler)) { if (!fileExists(mCompiler)) {
throw CompileError(tr("Make program '%1' doesn't exists!").arg(mCompiler)); throw CompileError(
tr("Make program '%1' doesn't exists!").arg(mCompiler)
+"<br />"
+tr("Please check the \"program\" page of compiler settings."));
} }
QString parallelParam; QString parallelParam;

View File

@ -101,7 +101,9 @@ bool Debugger::start(int compilerSetIndex, const QString& inferior, const QStrin
mExecuting = false; mExecuting = false;
QMessageBox::critical(pMainWindow, QMessageBox::critical(pMainWindow,
tr("Debugger not exists"), tr("Debugger not exists"),
tr("Can''t find debugger in : \"%1\"").arg(debuggerPath)); tr("Can''t find debugger (gdb) in : \"%1\"").arg(debuggerPath)
+"<br />"
+tr("Please check the \"program\" page of compiler settings."));
return false; return false;
} }
if (pSettings->debugger().useGDBServer()) { if (pSettings->debugger().useGDBServer()) {

View File

@ -4705,7 +4705,7 @@ void Editor::applySettings()
QSynedit::eoRightMouseMovesCursor | QSynedit::eoScrollByOneLess | QSynedit::eoTabIndent | QSynedit::eoHideShowScrollbars | QSynedit::eoGroupUndo QSynedit::eoRightMouseMovesCursor | QSynedit::eoScrollByOneLess | QSynedit::eoTabIndent | QSynedit::eoHideShowScrollbars | QSynedit::eoGroupUndo
| QSynedit::eoSelectWordByDblClick; | QSynedit::eoSelectWordByDblClick;
options.setFlag(QSynedit::eoShowSpecialChars, false); options.setFlag(QSynedit::eoShowSpecialChars, pSettings->editor().showSpecialChars());
//options //options
options.setFlag(QSynedit::eoAutoIndent,pSettings->editor().autoIndent()); options.setFlag(QSynedit::eoAutoIndent,pSettings->editor().autoIndent());

View File

@ -241,8 +241,8 @@ MainWindow::MainWindow(QWidget *parent)
mMenuInsertCodeSnippet = new QMenu(); mMenuInsertCodeSnippet = new QMenu();
mMenuInsertCodeSnippet->setTitle(tr("Insert Snippet")); mMenuInsertCodeSnippet->setTitle(tr("Insert Snippet"));
ui->menuCode->insertMenu(ui->actionReformat_Code,mMenuInsertCodeSnippet); ui->menuCode->insertMenu(ui->actionTrim_trailing_spaces,mMenuInsertCodeSnippet);
ui->menuCode->insertSeparator(ui->actionReformat_Code); ui->menuCode->insertSeparator(ui->actionTrim_trailing_spaces);
connect(mMenuInsertCodeSnippet,&QMenu::aboutToShow, connect(mMenuInsertCodeSnippet,&QMenu::aboutToShow,
this, &MainWindow::onShowInsertCodeSnippetMenu); this, &MainWindow::onShowInsertCodeSnippetMenu);
@ -647,49 +647,7 @@ void MainWindow::updateProjectActions()
void MainWindow::updateCompileActions() void MainWindow::updateCompileActions()
{ {
bool forProject=false; if (mCompilerManager->compiling() || mCompilerManager->running() || mDebugger->executing()) {
bool canCompile = false;
bool canRun = false;
bool canDebug = false;
Editor * e = mEditorList->getEditor();
if (e) {
if (!e->inProject()) {
FileType fileType = getFileType(e->filename());
if (fileType == FileType::CSource
|| fileType == FileType::CppSource || e->isNew()) {
canRun = true;
Settings::PCompilerSet set = pSettings->compilerSets().defaultSet();
if (set) {
canDebug = set->canDebug();
switch(fileType) {
case FileType::CSource:
canCompile = set->canCompileC();
break;
case FileType::CppSource:
canCompile = set->canCompileCPP();
break;
default:
break;
}
}
}
} else {
forProject = (mProject!=nullptr);
}
} else {
forProject = (mProject!=nullptr);
}
if (forProject) {
canRun = (mProject->options().type !=ProjectType::DynamicLib)
&& (mProject->options().type !=ProjectType::StaticLib);
Settings::PCompilerSet set = pSettings->compilerSets().getSet(mProject->options().compilerSet);
if (set) {
canDebug = set->canDebug();
canCompile = set->canMake();
}
}
if (mCompilerManager->compiling() || mCompilerManager->running() || mDebugger->executing()
|| (!canCompile)) {
ui->actionCompile->setEnabled(false); ui->actionCompile->setEnabled(false);
ui->actionCompile_Run->setEnabled(false); ui->actionCompile_Run->setEnabled(false);
ui->actionRun->setEnabled(false); ui->actionRun->setEnabled(false);
@ -698,12 +656,32 @@ void MainWindow::updateCompileActions()
ui->actionDebug->setEnabled(false); ui->actionDebug->setEnabled(false);
ui->btnRunAllProblemCases->setEnabled(false); ui->btnRunAllProblemCases->setEnabled(false);
} else { } else {
bool forProject=false;
bool canRun = false;
Editor * e = mEditorList->getEditor();
if (e) {
if (!e->inProject()) {
FileType fileType = getFileType(e->filename());
if (fileType == FileType::CSource
|| fileType == FileType::CppSource || e->isNew()) {
canRun = true;
}
} else {
forProject = (mProject!=nullptr);
}
} else {
forProject = (mProject!=nullptr);
}
if (forProject) {
canRun = (mProject->options().type !=ProjectType::DynamicLib)
&& (mProject->options().type !=ProjectType::StaticLib);
}
ui->actionCompile->setEnabled(true); ui->actionCompile->setEnabled(true);
ui->actionCompile_Run->setEnabled(canRun && canCompile); ui->actionCompile_Run->setEnabled(canRun);
ui->actionRun->setEnabled(canRun); ui->actionRun->setEnabled(canRun);
ui->actionRebuild->setEnabled(true); ui->actionRebuild->setEnabled(true);
ui->actionGenerate_Assembly->setEnabled(!forProject); ui->actionGenerate_Assembly->setEnabled(!forProject);
ui->actionDebug->setEnabled(canDebug); ui->actionDebug->setEnabled(canRun);
ui->btnRunAllProblemCases->setEnabled(canRun); ui->btnRunAllProblemCases->setEnabled(canRun);
} }
if (!mDebugger->executing()) { if (!mDebugger->executing()) {
@ -2055,25 +2033,20 @@ void MainWindow::debug()
debugEnabled = mProject->getCompileOption(CC_CMD_OPT_DEBUG_INFO) == COMPILER_OPTION_ON; debugEnabled = mProject->getCompileOption(CC_CMD_OPT_DEBUG_INFO) == COMPILER_OPTION_ON;
stripEnabled = mProject->getCompileOption(LINK_CMD_OPT_STRIP_EXE) == COMPILER_OPTION_ON; stripEnabled = mProject->getCompileOption(LINK_CMD_OPT_STRIP_EXE) == COMPILER_OPTION_ON;
// Ask the user if he wants to enable debugging... // Ask the user if he wants to enable debugging...
if (((!debugEnabled) || stripEnabled) && if ((!debugEnabled) || stripEnabled) {
(QMessageBox::question(this, if (QMessageBox::question(this,
tr("Enable debugging"), tr("Enable debugging"),
tr("You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.<BR /><BR />Do you want to correct this now?") tr("You are not using a Debug compiler setting.")
) == QMessageBox::Yes)) { +"<BR /><BR />"
// Enable debugging, disable stripping +tr("Please use a Debug compiler set, or enable the \"generate debugging info (-g3)\" and disable the \"strip additional info (-s)\" options in the compiler settings.")
mProject->setCompileOption(CC_CMD_OPT_DEBUG_INFO,COMPILER_OPTION_ON); +"<BR /><BR />"
mProject->setCompileOption(LINK_CMD_OPT_STRIP_EXE,""); +tr("Do you want to set it now?")
) == QMessageBox::Yes) {
// Save changes to compiler set changeOptions(
mProject->saveOptions(); SettingsDialog::tr("Compiler Set"),
SettingsDialog::tr("Compiler")
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>(); );
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug; }
mCompileSuccessionTask->execName = mProject->executable();
mCompileSuccessionTask->isExecutable = true;
mCompileSuccessionTask->binDirs = binDirs;
compile();
return; return;
} }
// Did we compile? // Did we compile?
@ -2155,25 +2128,22 @@ void MainWindow::debug()
debugEnabled = compilerSet->getCompileOptionValue(CC_CMD_OPT_DEBUG_INFO) == COMPILER_OPTION_ON; debugEnabled = compilerSet->getCompileOptionValue(CC_CMD_OPT_DEBUG_INFO) == COMPILER_OPTION_ON;
stripEnabled = compilerSet->getCompileOptionValue(LINK_CMD_OPT_STRIP_EXE) == COMPILER_OPTION_ON; stripEnabled = compilerSet->getCompileOptionValue(LINK_CMD_OPT_STRIP_EXE) == COMPILER_OPTION_ON;
// Ask the user if he wants to enable debugging... // Ask the user if he wants to enable debugging...
if (((!debugEnabled) || stripEnabled) && if ((!debugEnabled) || stripEnabled) {
(QMessageBox::question(this, if (QMessageBox::question(this,
tr("Enable debugging"), tr("Enable debugging"),
tr("You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.<BR /><BR />Do you want to correct this now?") tr("You are not using a Debug compiler setting.")
) == QMessageBox::Yes)) { +"<BR /><BR />"
// Enable debugging, disable stripping +tr("Please choose a Debug compiler set in the toolbar, or enable the \"generate debugging info (-g3)\" and disable the \"strip additional info (-s)\" options in the compiler set settings's \"settings\" page.")
compilerSet->setCompileOption(CC_CMD_OPT_DEBUG_INFO,COMPILER_OPTION_ON); +"<BR /><BR />"
compilerSet->unsetCompileOption(LINK_CMD_OPT_STRIP_EXE); +tr("Do you want to set it now?")
) == QMessageBox::Yes) {
// Save changes to compiler set changeOptions(
pSettings->compilerSets().saveSet(pSettings->compilerSets().defaultIndex()); SettingsDialog::tr("Compiler Set"),
SettingsDialog::tr("Compiler")
mCompileSuccessionTask=std::make_shared<CompileSuccessionTask>(); );
mCompileSuccessionTask->type = CompileSuccessionTaskType::Debug; }
mCompileSuccessionTask->binDirs = binDirs;
compile();
return; return;
} }
Editor* e = mEditorList->getEditor(); Editor* e = mEditorList->getEditor();
if (e!=nullptr) { if (e!=nullptr) {
// Did we saved? // Did we saved?
@ -4572,6 +4542,7 @@ void MainWindow::onEditorContextMenu(const QPoint& pos)
menu.addAction(ui->actionOpen_Terminal); menu.addAction(ui->actionOpen_Terminal);
menu.addAction(ui->actionLocate_in_Files_View); menu.addAction(ui->actionLocate_in_Files_View);
menu.addSeparator(); menu.addSeparator();
menu.addAction(ui->actionTrim_trailing_spaces);
menu.addAction(ui->actionReformat_Code); menu.addAction(ui->actionReformat_Code);
menu.addSeparator(); menu.addSeparator();
menu.addAction(ui->actionCut); menu.addAction(ui->actionCut);
@ -8997,3 +8968,12 @@ void MainWindow::on_btnImportFPS_clicked()
} }
void MainWindow::on_actionTrim_trailing_spaces_triggered()
{
Editor * e = mEditorList->getEditor();
if (e) {
e->trimTrailingSpaces();
}
}

View File

@ -753,6 +753,8 @@ private slots:
void on_btnImportFPS_clicked(); void on_btnImportFPS_clicked();
void on_actionTrim_trailing_spaces_triggered();
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
EditorList *mEditorList; EditorList *mEditorList;

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>945</width> <width>955</width>
<height>619</height> <height>619</height>
</rect> </rect>
</property> </property>
@ -119,8 +119,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>945</width> <width>955</width>
<height>25</height> <height>29</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
@ -229,6 +229,7 @@
<addaction name="actionRemove_Bookmark"/> <addaction name="actionRemove_Bookmark"/>
<addaction name="actionModify_Bookmark_Description"/> <addaction name="actionModify_Bookmark_Description"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionTrim_trailing_spaces"/>
<addaction name="actionReformat_Code"/> <addaction name="actionReformat_Code"/>
</widget> </widget>
<widget class="QMenu" name="menuWindow"> <widget class="QMenu" name="menuWindow">
@ -3283,6 +3284,11 @@
<string>Generate Assembly</string> <string>Generate Assembly</string>
</property> </property>
</action> </action>
<action name="actionTrim_trailing_spaces">
<property name="text">
<string>Trim trailing spaces</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

View File

@ -730,6 +730,16 @@ void Settings::Editor::setRemoveTrailingSpacesWhenSaved(bool newRemoveTrailingSp
mRemoveTrailingSpacesWhenSaved = newRemoveTrailingSpacesWhenSaved; mRemoveTrailingSpacesWhenSaved = newRemoveTrailingSpacesWhenSaved;
} }
bool Settings::Editor::showSpecialChars() const
{
return mShowSpecialChars;
}
void Settings::Editor::setShowSpecialChars(bool newShowSpecialChars)
{
mShowSpecialChars = newShowSpecialChars;
}
bool Settings::Editor::highlightCurrentWord() const bool Settings::Editor::highlightCurrentWord() const
{ {
return mHighlightCurrentWord; return mHighlightCurrentWord;
@ -1220,6 +1230,8 @@ void Settings::Editor::doSave()
saveValue("caret_use_text_color",mCaretUseTextColor); saveValue("caret_use_text_color",mCaretUseTextColor);
saveValue("caret_color",mCaretColor); saveValue("caret_color",mCaretColor);
saveValue("show_special_chars",mShowSpecialChars);
//highlight //highlight
saveValue("highlight_matching_braces",mHighlightMathingBraces); saveValue("highlight_matching_braces",mHighlightMathingBraces);
saveValue("highlight_current_word",mHighlightCurrentWord); saveValue("highlight_current_word",mHighlightCurrentWord);
@ -1345,6 +1357,9 @@ void Settings::Editor::doLoad()
mCaretUseTextColor = boolValue("caret_use_text_color",true); mCaretUseTextColor = boolValue("caret_use_text_color",true);
mCaretColor = colorValue("caret_color",Qt::yellow); mCaretColor = colorValue("caret_color",Qt::yellow);
mShowSpecialChars = boolValue("show_special_chars",false);
//highlight //highlight
mHighlightMathingBraces = boolValue("highlight_matching_braces",true); mHighlightMathingBraces = boolValue("highlight_matching_braces",true);
mHighlightCurrentWord = boolValue("highlight_current_word",true); mHighlightCurrentWord = boolValue("highlight_current_word",true);
@ -1581,8 +1596,10 @@ Settings::CompilerSet::CompilerSet(const QString& compilerFolder, const QString&
mExecutableSuffix(DEFAULT_EXECUTABLE_SUFFIX), mExecutableSuffix(DEFAULT_EXECUTABLE_SUFFIX),
mCompilationStage(Settings::CompilerSet::CompilationStage::GenerateExecutable) mCompilationStage(Settings::CompilerSet::CompilationStage::GenerateExecutable)
{ {
if (QDir(compilerFolder).exists()) { QDir dir(compilerFolder);
setProperties(compilerFolder, c_prog); if (dir.exists(c_prog)) {
setProperties(dir.absoluteFilePath(c_prog));
//manually set the directories //manually set the directories
setDirectories(compilerFolder, mCompilerType); setDirectories(compilerFolder, mCompilerType);
@ -1717,72 +1734,72 @@ static void checkDirs(const QStringList& dirlist, QString& gooddirs, QString& ba
} }
bool Settings::CompilerSet::dirsValid(QString &msg) //bool Settings::CompilerSet::dirsValid(QString &msg)
{ //{
QString goodbin, badbin, goodlib, badlib, goodinc, badinc, goodinccpp, badinccpp; // QString goodbin, badbin, goodlib, badlib, goodinc, badinc, goodinccpp, badinccpp;
msg = ""; // msg = "";
if (mBinDirs.count()>0) {// we need some bin dir, so treat count=0 as an error too // if (mBinDirs.count()>0) {// we need some bin dir, so treat count=0 as an error too
checkDirs(mBinDirs,goodbin,badbin); // checkDirs(mBinDirs,goodbin,badbin);
if (!badbin.isEmpty()) { // if (!badbin.isEmpty()) {
msg += QObject::tr("The following %1 directories don't exist:").arg( // msg += QObject::tr("The following %1 directories don't exist:").arg(
QObject::tr("binary") // QObject::tr("binary")
); // );
msg += "<br />"; // msg += "<br />";
msg += badbin.replace(';',"<br />"); // msg += badbin.replace(';',"<br />");
msg += "<br />"; // msg += "<br />";
msg += "<br />"; // msg += "<br />";
return false; // return false;
} // }
} else { // } else {
msg += QObject::tr("No %1 directories have been specified.").arg( // msg += QObject::tr("No %1 directories have been specified.").arg(
QObject::tr("binary") // QObject::tr("binary")
); // );
msg += "<br />"; // msg += "<br />";
msg += "<br />"; // msg += "<br />";
return false; // return false;
} // }
checkDirs(mCIncludeDirs,goodbin,badbin); // checkDirs(mCIncludeDirs,goodbin,badbin);
if (!badbin.isEmpty()) { // if (!badbin.isEmpty()) {
msg += QObject::tr("The following %1 directories don't exist:").arg( // msg += QObject::tr("The following %1 directories don't exist:").arg(
QObject::tr("C include") // QObject::tr("C include")
); // );
msg += "<br />"; // msg += "<br />";
msg += badbin.replace(';',"<br />"); // msg += badbin.replace(';',"<br />");
msg += "<br />"; // msg += "<br />";
msg += "<br />"; // msg += "<br />";
return false; // return false;
} // }
checkDirs(mCppIncludeDirs,goodbin,badbin); // checkDirs(mCppIncludeDirs,goodbin,badbin);
if (!badbin.isEmpty()) { // if (!badbin.isEmpty()) {
msg += QObject::tr("The following %1 directories don't exist:").arg( // msg += QObject::tr("The following %1 directories don't exist:").arg(
QObject::tr("C++ include") // QObject::tr("C++ include")
); // );
msg += "<br />"; // msg += "<br />";
msg += badbin.replace(';',"<br />"); // msg += badbin.replace(';',"<br />");
msg += "<br />"; // msg += "<br />";
msg += "<br />"; // msg += "<br />";
return false; // return false;
} // }
checkDirs(mLibDirs,goodbin,badbin); // checkDirs(mLibDirs,goodbin,badbin);
if (!badbin.isEmpty()) { // if (!badbin.isEmpty()) {
msg += QObject::tr("The following %1 directories don't exist:").arg( // msg += QObject::tr("The following %1 directories don't exist:").arg(
QObject::tr("C++ include") // QObject::tr("C++ include")
); // );
msg += "<br />"; // msg += "<br />";
msg += badbin.replace(';',"<br />"); // msg += badbin.replace(';',"<br />");
msg += "<br />"; // msg += "<br />";
msg += "<br />"; // msg += "<br />";
return false; // return false;
} // }
if (!msg.isEmpty()) // if (!msg.isEmpty())
return false; // return false;
else // else
return true; // return true;
} //}
//bool Settings::CompilerSet::validateExes(QString &msg) //bool Settings::CompilerSet::validateExes(QString &msg)
//{ //{
@ -2075,11 +2092,11 @@ static void addExistingDirectory(QStringList& dirs, const QString& directory) {
dirs.append(dirPath); dirs.append(dirPath);
} }
void Settings::CompilerSet::setProperties(const QString &binDir, const QString& c_prog) void Settings::CompilerSet::setProperties(const QString& c_prog)
{ {
if (c_prog.isEmpty()) if (!fileExists(c_prog))
return; return;
QString binDir=extractFileDir(c_prog);
// Obtain version number and compiler distro etc // Obtain version number and compiler distro etc
QStringList arguments; QStringList arguments;
arguments.append("-v"); arguments.append("-v");
@ -2844,37 +2861,36 @@ void Settings::CompilerSets::loadSets()
PCompilerSet pCurrentSet = defaultSet(); PCompilerSet pCurrentSet = defaultSet();
if (pCurrentSet) { if (pCurrentSet) {
QString msg; QString msg;
if (!pCurrentSet->dirsValid(msg)) { // if (!pCurrentSet->dirsValid(msg)) {
if (QMessageBox::warning(nullptr,QObject::tr("Confirm"), // if (QMessageBox::warning(nullptr,QObject::tr("Confirm"),
QObject::tr("The following problems were found during validation of compiler set \"%1\":") // QObject::tr("The following problems were found during validation of compiler set \"%1\":")
.arg(pCurrentSet->name()) // .arg(pCurrentSet->name())
+"<br /><br />" // +"<br /><br />"
+msg // +msg
+"<br /><br />" // +"<br /><br />"
+QObject::tr("Leaving those directories will lead to problems during compilation.") // +QObject::tr("Leaving those directories will lead to problems during compilation.")
+"<br /><br />" // +"<br /><br />"
+QObject::tr("Would you like Red Panda C++ to remove them for you and add the default paths to the valid paths?") // +QObject::tr("Would you like Red Panda C++ to remove them for you and add the default paths to the valid paths?")
, // ,
QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { // QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) {
return; // return;
} // }
findSets(); // findSets();
if ( (int)mList.size() <= mDefaultIndex) // if ( (int)mList.size() <= mDefaultIndex)
mDefaultIndex = mList.size()-1; // mDefaultIndex = mList.size()-1;
pCurrentSet = defaultSet(); // pCurrentSet = defaultSet();
if (!pCurrentSet) { // if (!pCurrentSet) {
mList.clear(); // mList.clear();
mDefaultIndex = -1; // mDefaultIndex = -1;
saveSets(); // saveSets();
return; // return;
} // }
saveSets(); // saveSets();
if (pCurrentSet->binDirs().count()>0) { // pCurrentSet->setProperties(pCurrentSet->CCompiler());
pCurrentSet->setProperties(pCurrentSet->binDirs()[0],pCurrentSet->CCompiler()); // } else {
} // return;
} else { // }
return; return;
}
} else { } else {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
QString msg = QObject::tr("Compiler set not configuared.") QString msg = QObject::tr("Compiler set not configuared.")
@ -3137,8 +3153,8 @@ Settings::PCompilerSet Settings::CompilerSets::loadSet(int index)
mSettings->mSettings.endGroup(); mSettings->mSettings.endGroup();
if (pSet->binDirs().isEmpty()) // if (pSet->binDirs().isEmpty())
return PCompilerSet(); // return PCompilerSet();
return pSet; return pSet;
} }

View File

@ -382,6 +382,9 @@ public:
bool removeTrailingSpacesWhenSaved() const; bool removeTrailingSpacesWhenSaved() const;
void setRemoveTrailingSpacesWhenSaved(bool newRemoveTrailingSpacesWhenSaved); void setRemoveTrailingSpacesWhenSaved(bool newRemoveTrailingSpacesWhenSaved);
bool showSpecialChars() const;
void setShowSpecialChars(bool newShowSpecialChars);
private: private:
//General //General
// indents // indents
@ -399,6 +402,8 @@ public:
QSynedit::EditCaretType mCaretForOverwrite; QSynedit::EditCaretType mCaretForOverwrite;
bool mCaretUseTextColor; bool mCaretUseTextColor;
QColor mCaretColor; QColor mCaretColor;
//
bool mShowSpecialChars;
//highlights //highlights
bool mHighlightCurrentWord; bool mHighlightCurrentWord;
@ -1241,7 +1246,7 @@ public:
CompilerSet& operator= (const CompilerSet&& ) = delete; CompilerSet& operator= (const CompilerSet&& ) = delete;
// Initialization // Initialization
void setProperties(const QString& binDir, const QString& c_prog); void setProperties(const QString& c_prog);
void resetCompileOptionts(); void resetCompileOptionts();
bool setCompileOption(const QString& key, int valIndex); bool setCompileOption(const QString& key, int valIndex);
@ -1257,7 +1262,7 @@ public:
bool canCompileCPP(); bool canCompileCPP();
bool canMake(); bool canMake();
bool canDebug(); bool canDebug();
bool dirsValid(QString& msg); // bool dirsValid(QString& msg);
// bool validateExes(QString& msg); // bool validateExes(QString& msg);
//properties //properties
const QString& CCompiler() const; const QString& CCompiler() const;

View File

@ -59,7 +59,7 @@ void EditorFontWidget::doLoad()
ui->cbNonAsciiFont->setCurrentFont(QFont(pSettings->editor().nonAsciiFontName())); ui->cbNonAsciiFont->setCurrentFont(QFont(pSettings->editor().nonAsciiFontName()));
ui->spinFontSize->setValue(pSettings->editor().fontSize()); ui->spinFontSize->setValue(pSettings->editor().fontSize());
ui->chkLigature->setChecked(pSettings->editor().enableLigaturesSupport()); ui->chkLigature->setChecked(pSettings->editor().enableLigaturesSupport());
ui->chkShowSpecialChars->setChecked(pSettings->editor().showSpecialChars());
//gutter //gutter
ui->chkGutterVisible->setChecked(pSettings->editor().gutterVisible()); ui->chkGutterVisible->setChecked(pSettings->editor().gutterVisible());
ui->chkAutoSizeGutter->setChecked(pSettings->editor().gutterAutoSize()); ui->chkAutoSizeGutter->setChecked(pSettings->editor().gutterAutoSize());
@ -83,7 +83,7 @@ void EditorFontWidget::doSave()
pSettings->editor().setNonAsciiFontName(ui->cbNonAsciiFont->currentFont().family()); pSettings->editor().setNonAsciiFontName(ui->cbNonAsciiFont->currentFont().family());
pSettings->editor().setFontSize(ui->spinFontSize->value()); pSettings->editor().setFontSize(ui->spinFontSize->value());
pSettings->editor().setEnableLigaturesSupport(ui->chkLigature->isChecked()); pSettings->editor().setEnableLigaturesSupport(ui->chkLigature->isChecked());
pSettings->editor().setShowSpecialChars(ui->chkShowSpecialChars->isChecked());
//gutter //gutter
pSettings->editor().setGutterVisible(ui->chkGutterVisible->isChecked()); pSettings->editor().setGutterVisible(ui->chkGutterVisible->isChecked());
pSettings->editor().setGutterAutoSize(ui->chkAutoSizeGutter->isChecked()); pSettings->editor().setGutterAutoSize(ui->chkAutoSizeGutter->isChecked());

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>737</width> <width>876</width>
<height>569</height> <height>643</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -30,44 +30,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1">
<widget class="QWidget" name="widget_3" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</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="QSpinBox" name="spinFontSize">
<property name="minimum">
<number>2</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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>
</item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QWidget" name="widget_2" native="true"> <widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
@ -119,11 +81,42 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="3" column="0" colspan="2"> <item row="2" column="1">
<widget class="QCheckBox" name="chkLigature"> <widget class="QWidget" name="widget_3" native="true">
<property name="text"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<string>Enable Ligatures Support</string> <property name="leftMargin">
</property> <number>0</number>
</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="QSpinBox" name="spinFontSize">
<property name="minimum">
<number>2</number>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<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 row="2" column="0"> <item row="2" column="0">
@ -174,6 +167,20 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="4" column="0" colspan="2">
<widget class="QCheckBox" name="chkShowSpecialChars">
<property name="text">
<string>Show special chars</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QCheckBox" name="chkLigature">
<property name="text">
<string>Enable ligatures support</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -183,6 +190,21 @@
<string>Gutter</string> <string>Gutter</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<item> <item>
<widget class="QCheckBox" name="chkGutterVisible"> <widget class="QCheckBox" name="chkGutterVisible">
<property name="text"> <property name="text">
@ -264,6 +286,21 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<item> <item>
<widget class="QCheckBox" name="chkAddLeadingZeros"> <widget class="QCheckBox" name="chkAddLeadingZeros">
<property name="text"> <property name="text">
@ -345,6 +382,21 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_4">
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<property name="horizontalSpacing">
<number>7</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="label_5"> <widget class="QLabel" name="label_5">
<property name="text"> <property name="text">

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>721</width> <width>795</width>
<height>982</height> <height>1211</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -20,6 +20,21 @@
<string>Indents</string> <string>Indents</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<item> <item>
<widget class="QCheckBox" name="chkAutoIndent"> <widget class="QCheckBox" name="chkAutoIndent">
<property name="text"> <property name="text">
@ -37,6 +52,21 @@
<item> <item>
<widget class="QWidget" name="widget_2" native="true"> <widget class="QWidget" name="widget_2" native="true">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QLabel" name="lbCaretColor_2"> <widget class="QLabel" name="lbCaretColor_2">
<property name="text"> <property name="text">
@ -79,8 +109,37 @@
</item> </item>
<item> <item>
<widget class="QWidget" name="widget_3" native="true"> <widget class="QWidget" name="widget_3" native="true">
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_5">
<item row="0" column="2"> <property name="leftMargin">
<number>0</number>
</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="lbIndentLineColor">
<property name="text">
<string>Indent Line Color</string>
</property>
</widget>
</item>
<item>
<widget class="ColorEdit" name="colorIndentLine">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4"> <spacer name="horizontalSpacer_4">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -93,23 +152,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="0">
<widget class="QLabel" name="lbIndentLineColor">
<property name="text">
<string>Indent Line Color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="ColorEdit" name="colorIndentLine">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -129,6 +171,21 @@
<string>Caret</string> <string>Caret</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_3"> <layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<item> <item>
<widget class="QCheckBox" name="chkEnhanceHome"> <widget class="QCheckBox" name="chkEnhanceHome">
<property name="text"> <property name="text">
@ -162,13 +219,20 @@
<property name="rightMargin"> <property name="rightMargin">
<number>0</number> <number>0</number>
</property> </property>
<property name="bottomMargin">
<number>0</number>
</property>
<property name="spacing"> <property name="spacing">
<number>7</number> <number>7</number>
</property> </property>
<item row="1" column="1"> <item row="1" column="0">
<widget class="QComboBox" name="cbCaretForOverwrite"/> <widget class="QLabel" name="lbCaretForOverwrite">
<property name="text">
<string>Caret for overwriting mode</string>
</property>
</widget>
</item> </item>
<item row="3" column="1"> <item row="4" column="1">
<widget class="ColorEdit" name="colorCaret"> <widget class="ColorEdit" name="colorCaret">
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
@ -178,6 +242,16 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="0">
<widget class="QLabel" name="lbCaretColor">
<property name="text">
<string>Caret Color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="cbCaretForOverwrite"/>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="lbCaretForInsert"> <widget class="QLabel" name="lbCaretForInsert">
<property name="text"> <property name="text">
@ -188,13 +262,6 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="cbCaretForInsert"/> <widget class="QComboBox" name="cbCaretForInsert"/>
</item> </item>
<item row="3" column="0">
<widget class="QLabel" name="lbCaretColor">
<property name="text">
<string>Caret Color</string>
</property>
</widget>
</item>
<item row="0" column="2"> <item row="0" column="2">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
@ -208,13 +275,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="1" column="0">
<widget class="QLabel" name="lbCaretForOverwrite">
<property name="text">
<string>Caret for overwriting mode</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3"> <item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="chkCaretUseTextColor"> <widget class="QCheckBox" name="chkCaretUseTextColor">
<property name="text"> <property name="text">
@ -234,6 +294,21 @@
<string>Highlight</string> <string>Highlight</string>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_6"> <layout class="QVBoxLayout" name="verticalLayout_6">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<item> <item>
<widget class="QCheckBox" name="chkHighlightMatchingBraces"> <widget class="QCheckBox" name="chkHighlightMatchingBraces">
<property name="text"> <property name="text">
@ -400,9 +475,36 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_5"> <layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>11</number>
</property>
<property name="topMargin">
<number>11</number>
</property>
<property name="rightMargin">
<number>11</number>
</property>
<property name="bottomMargin">
<number>11</number>
</property>
<item> <item>
<widget class="QWidget" name="widget_4" native="true"> <widget class="QWidget" name="widget_4" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item> <item>
<widget class="QLabel" name="lbCaretColor_3"> <widget class="QLabel" name="lbCaretColor_3">
<property name="text"> <property name="text">
@ -441,8 +543,37 @@
</item> </item>
<item> <item>
<widget class="QWidget" name="widget_5" native="true"> <widget class="QWidget" name="widget_5" native="true">
<layout class="QGridLayout" name="gridLayout_5"> <layout class="QHBoxLayout" name="horizontalLayout_6">
<item row="0" column="2"> <property name="leftMargin">
<number>0</number>
</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="lbCaretColor_5">
<property name="text">
<string>Right edge line color</string>
</property>
</widget>
</item>
<item>
<widget class="ColorEdit" name="colorRightEdgeLine">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_5"> <spacer name="horizontalSpacer_5">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -455,23 +586,6 @@
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="0">
<widget class="QLabel" name="lbCaretColor_5">
<property name="text">
<string>Right edge line color</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="ColorEdit" name="colorRightEdgeLine">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>515</width> <width>583</width>
<height>510</height> <height>528</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -132,14 +132,14 @@
<item row="0" column="1"> <item row="0" column="1">
<widget class="QRadioButton" name="rbAutoReformat"> <widget class="QRadioButton" name="rbAutoReformat">
<property name="text"> <property name="text">
<string>Reformat Code</string> <string>Reformat</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QRadioButton" name="rbRemoveTrailingSpaces"> <widget class="QRadioButton" name="rbRemoveTrailingSpaces">
<property name="text"> <property name="text">
<string>Remove Trailing Spaces</string> <string>Trim trailing spaces</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -905,7 +905,7 @@
</message> </message>
<message> <message>
<source>Can&apos;&apos;t find debugger in : &quot;%1&quot;</source> <source>Can&apos;&apos;t find debugger in : &quot;%1&quot;</source>
<translation>Impossível encontrar depurador em &quot;%1&quot;</translation> <translation type="vanished">Impossível encontrar depurador em &quot;%1&quot;</translation>
</message> </message>
<message> <message>
<source>GDB Server path error</source> <source>GDB Server path error</source>
@ -963,6 +963,14 @@
<source>Can&apos;t open file &apos;%1&apos; for read.</source> <source>Can&apos;t open file &apos;%1&apos; for read.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Can&apos;&apos;t find debugger (gdb) in : &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please check the &quot;program&quot; page of compiler settings.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>Editor</name> <name>Editor</name>
@ -1343,7 +1351,7 @@
</message> </message>
<message> <message>
<source>Enable Ligatures Support</source> <source>Enable Ligatures Support</source>
<translation>Habilitar suporte a ligaduras</translation> <translation type="vanished">Habilitar suporte a ligaduras</translation>
</message> </message>
<message> <message>
<source>Size:</source> <source>Size:</source>
@ -1393,6 +1401,14 @@
<source>Use Custom Font</source> <source>Use Custom Font</source>
<translation>Usar fonte personalizada</translation> <translation>Usar fonte personalizada</translation>
</message> </message>
<message>
<source>Show special chars</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable ligatures support</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditorGeneralWidget</name> <name>EditorGeneralWidget</name>
@ -1485,11 +1501,7 @@
</message> </message>
<message> <message>
<source>Reformat Code</source> <source>Reformat Code</source>
<translation type="unfinished">Reformatar código</translation> <translation type="obsolete">Reformatar código</translation>
</message>
<message>
<source>Remove Trailing Spaces</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>None</source> <source>None</source>
@ -1499,6 +1511,14 @@
<source>Limits for Undo</source> <source>Limits for Undo</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Reformat</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Trim trailing spaces</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditorSnippetWidget</name> <name>EditorSnippetWidget</name>
@ -2012,6 +2032,10 @@
<source>Command: %1 %2</source> <source>Command: %1 %2</source>
<translation>Comando: %1 %2</translation> <translation>Comando: %1 %2</translation>
</message> </message>
<message>
<source>Please check the &quot;program&quot; page of compiler settings.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FilePropertiesDialog</name> <name>FilePropertiesDialog</name>
@ -4050,7 +4074,7 @@
</message> </message>
<message> <message>
<source>You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.&lt;BR /&gt;&lt;BR /&gt;Do you want to correct this now?</source> <source>You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.&lt;BR /&gt;&lt;BR /&gt;Do you want to correct this now?</source>
<translation>Informação para depuração não ativada (-g3) e/or removida do executável (-s) nas opções do compilador.&lt;BR /&gt;&lt;BR /&gt;Quer alterar isso agora?</translation> <translation type="vanished">Informação para depuração não ativada (-g3) e/or removida do executável (-s) nas opções do compilador.&lt;BR /&gt;&lt;BR /&gt;Quer alterar isso agora?</translation>
</message> </message>
<message> <message>
<source>Project not built</source> <source>Project not built</source>
@ -4816,6 +4840,26 @@
<source>FPS Problem Set Files (*.fps;*.xml)</source> <source>FPS Problem Set Files (*.fps;*.xml)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Do you want to set it now?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You are not using a Debug compiler setting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please use a Debug compiler set, or enable the &quot;generate debugging info (-g3)&quot; and disable the &quot;strip additional info (-s)&quot; options in the compiler settings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose a Debug compiler set in the toolbar, or enable the &quot;generate debugging info (-g3)&quot; and disable the &quot;strip additional info (-s)&quot; options in the compiler set settings&apos;s &quot;settings&quot; page.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Trim trailing spaces</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>NewClassDialog</name> <name>NewClassDialog</name>
@ -5308,6 +5352,14 @@
<source>- Command: %1 %2</source> <source>- Command: %1 %2</source>
<translation>- Comando: %1 %2</translation> <translation>- Comando: %1 %2</translation>
</message> </message>
<message>
<source>Make program &apos;%1&apos; doesn&apos;t exists!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please check the &quot;program&quot; page of compiler settings.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProjectCompilerWidget</name> <name>ProjectCompilerWidget</name>
@ -6009,23 +6061,23 @@
</message> </message>
<message> <message>
<source>The following %1 directories don&apos;t exist:</source> <source>The following %1 directories don&apos;t exist:</source>
<translation>As seguintes pastas não existem:</translation> <translation type="vanished">As seguintes pastas não existem:</translation>
</message> </message>
<message> <message>
<source>binary</source> <source>binary</source>
<translation>binário</translation> <translation type="vanished">binário</translation>
</message> </message>
<message> <message>
<source>No %1 directories have been specified.</source> <source>No %1 directories have been specified.</source>
<translation>%1 pastas não foram especificadas</translation> <translation type="vanished">%1 pastas não foram especificadas</translation>
</message> </message>
<message> <message>
<source>C include</source> <source>C include</source>
<translation>include C</translation> <translation type="vanished">include C</translation>
</message> </message>
<message> <message>
<source>C++ include</source> <source>C++ include</source>
<translation>include C++</translation> <translation type="vanished">include C++</translation>
</message> </message>
<message> <message>
<source>Cannot find the %1 &quot;%2&quot;</source> <source>Cannot find the %1 &quot;%2&quot;</source>
@ -6173,11 +6225,11 @@
</message> </message>
<message> <message>
<source>The following problems were found during validation of compiler set &quot;%1&quot;:</source> <source>The following problems were found during validation of compiler set &quot;%1&quot;:</source>
<translation>Os seguintes problemas foram encontrados durante a validação do compilador &quot;%1&quot;:</translation> <translation type="vanished">Os seguintes problemas foram encontrados durante a validação do compilador &quot;%1&quot;:</translation>
</message> </message>
<message> <message>
<source>Would you like Red Panda C++ to remove them for you and add the default paths to the valid paths?</source> <source>Would you like Red Panda C++ to remove them for you and add the default paths to the valid paths?</source>
<translation>Gostaria que o Red Panda C++ os removesse e acrescentasse caminhos padrões para validar?</translation> <translation type="vanished">Gostaria que o Red Panda C++ os removesse e acrescentasse caminhos padrões para validar?</translation>
</message> </message>
<message> <message>
<source>Compiler set not configured.</source> <source>Compiler set not configured.</source>
@ -6269,7 +6321,7 @@
</message> </message>
<message> <message>
<source>Leaving those directories will lead to problems during compilation.</source> <source>Leaving those directories will lead to problems during compilation.</source>
<translation>Deixar essas pastas resultará em problemas durante a compilação.</translation> <translation type="vanished">Deixar essas pastas resultará em problemas durante a compilação.</translation>
</message> </message>
<message> <message>
<source>Gloabal Variable</source> <source>Gloabal Variable</source>

File diff suppressed because it is too large Load Diff

View File

@ -804,10 +804,6 @@
<source>Debugger not exists</source> <source>Debugger not exists</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Can&apos;&apos;t find debugger in : &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>GDB Server path error</source> <source>GDB Server path error</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -864,6 +860,14 @@
<source>Can&apos;t open file &apos;%1&apos; for read.</source> <source>Can&apos;t open file &apos;%1&apos; for read.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Can&apos;&apos;t find debugger (gdb) in : &quot;%1&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please check the &quot;program&quot; page of compiler settings.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>Editor</name> <name>Editor</name>
@ -1234,10 +1238,6 @@
<source>Show only monospaced fonts</source> <source>Show only monospaced fonts</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Enable Ligatures Support</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Size:</source> <source>Size:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -1286,6 +1286,14 @@
<source>Use Custom Font</source> <source>Use Custom Font</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Show special chars</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Enable ligatures support</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditorGeneralWidget</name> <name>EditorGeneralWidget</name>
@ -1372,14 +1380,6 @@
<source>Action before saving files</source> <source>Action before saving files</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Reformat Code</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Remove Trailing Spaces</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>None</source> <source>None</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -1388,6 +1388,14 @@
<source>Limits for Undo</source> <source>Limits for Undo</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Reformat</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Trim trailing spaces</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>EditorSnippetWidget</name> <name>EditorSnippetWidget</name>
@ -1893,6 +1901,10 @@
<source>Command: %1 %2</source> <source>Command: %1 %2</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Please check the &quot;program&quot; page of compiler settings.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FilePropertiesDialog</name> <name>FilePropertiesDialog</name>
@ -3905,10 +3917,6 @@
<source>Enable debugging</source> <source>Enable debugging</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>You have not enabled debugging info (-g3) and/or stripped it from the executable (-s) in Compiler Options.&lt;BR /&gt;&lt;BR /&gt;Do you want to correct this now?</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Project not built</source> <source>Project not built</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -4649,6 +4657,26 @@
<source>FPS Problem Set Files (*.fps;*.xml)</source> <source>FPS Problem Set Files (*.fps;*.xml)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Do you want to set it now?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>You are not using a Debug compiler setting.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please use a Debug compiler set, or enable the &quot;generate debugging info (-g3)&quot; and disable the &quot;strip additional info (-s)&quot; options in the compiler settings.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please choose a Debug compiler set in the toolbar, or enable the &quot;generate debugging info (-g3)&quot; and disable the &quot;strip additional info (-s)&quot; options in the compiler set settings&apos;s &quot;settings&quot; page.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Trim trailing spaces</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>NewClassDialog</name> <name>NewClassDialog</name>
@ -5105,6 +5133,14 @@
<source>- Command: %1 %2</source> <source>- Command: %1 %2</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Make program &apos;%1&apos; doesn&apos;t exists!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please check the &quot;program&quot; page of compiler settings.</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>ProjectCompilerWidget</name> <name>ProjectCompilerWidget</name>
@ -5780,26 +5816,6 @@
<source>destructor</source> <source>destructor</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>The following %1 directories don&apos;t exist:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>binary</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No %1 directories have been specified.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>C include</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>C++ include</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>C options</source> <source>C options</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -5896,14 +5912,6 @@
<source>Confirm</source> <source>Confirm</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>The following problems were found during validation of compiler set &quot;%1&quot;:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Would you like Red Panda C++ to remove them for you and add the default paths to the valid paths?</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>Compiler set not configuared.</source> <source>Compiler set not configuared.</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
@ -5980,10 +5988,6 @@
<source>Can&apos;t parse problem set file &apos;%1&apos;:%2</source> <source>Can&apos;t parse problem set file &apos;%1&apos;:%2</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Leaving those directories will lead to problems during compilation.</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<source>C++ Language standard (-std)</source> <source>C++ Language standard (-std)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>