Skip to content

Commit 2b5bf64

Browse files
committed
Removed lots of old cruft, fixed compiler warnings on g++, removed debug console, permanently fixed finder widget size; replaced Parallax font with generic monospace after various problems with it became clear; made single adjust font size function to replace two duplicates.
1 parent 9d5d018 commit 2b5bf64

File tree

12 files changed

+87
-303
lines changed

12 files changed

+87
-303
lines changed

src/propelleride/StatusDialog.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,8 @@ QString StatusDialog::getMessage()
7979
return messageLabel->text();
8080
}
8181

82-
void StatusDialog::stop(int count)
82+
void StatusDialog::stop()
8383
{
84-
//thread.stop(count);
8584
displayTimer->stop();
8685
hide();
8786
}

src/propelleride/StatusDialog.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class StatusDialog : public QDialog
4040
void setMessage(const QString message);
4141
QString getMessage();
4242

43-
void stop(int count = 0);
43+
void stop();
4444
bool isRunning();
4545

4646
public slots:

src/propelleride/editor.cpp

Lines changed: 1 addition & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void Editor::setLineNumber(int num)
8686
setTextCursor(cur);
8787
}
8888

89-
#undef SPIN_AUTOCON
89+
#define SPIN_AUTOCON
9090

9191
void Editor::keyPressEvent (QKeyEvent *e)
9292
{
@@ -109,13 +109,6 @@ void Editor::keyPressEvent (QKeyEvent *e)
109109
QPlainTextEdit::keyPressEvent(e);
110110
return;
111111
}
112-
#if 0 // highlighting like this causes editor trouble. don't do it.
113-
if(text.length() > 0) {
114-
//qDebug() << "keyPressEvent ctrlPressed " << text;
115-
if(static_cast<MAINWINDOW*>(mainwindow)->isTagged(text))
116-
this->setTextCursor(cur);
117-
}
118-
#endif
119112
QPlainTextEdit::keyPressEvent(e);
120113
return;
121114
}
@@ -437,85 +430,6 @@ void Editor::mouseDoubleClickEvent (QMouseEvent *e)
437430
}
438431

439432
int Editor::autoEnterColumn()
440-
{
441-
if(fileName.endsWith(".spin", Qt::CaseInsensitive)) {
442-
return autoEnterColumnSpin();
443-
}
444-
else if(fileName.endsWith(".c", Qt::CaseInsensitive) ||
445-
fileName.endsWith(".cpp", Qt::CaseInsensitive) ||
446-
fileName.endsWith(".h", Qt::CaseInsensitive)
447-
) {
448-
return autoEnterColumnC();
449-
}
450-
return 0;
451-
}
452-
453-
int Editor::autoEnterColumnC()
454-
{
455-
QTextCursor cur = this->textCursor();
456-
if(cur.selectedText().length() > 0) {
457-
return 0;
458-
}
459-
460-
int line = cur.blockNumber();
461-
int col = cur.columnNumber();
462-
cur.movePosition(QTextCursor::StartOfLine,QTextCursor::MoveAnchor);
463-
cur.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor,col);
464-
QString text = cur.selectedText();
465-
cur.clearSelection();
466-
if(text.length() == 0) return 0;
467-
468-
int stop = -1;
469-
int indent = -1;
470-
int star = -1;
471-
int slcm = text.indexOf("//");
472-
473-
// don't indent under closed comment
474-
if(text.indexOf("*/") > -1) {
475-
return 0;
476-
}
477-
if(isCommentOpen(line)) {
478-
star = stop = text.indexOf("*");
479-
}
480-
if(stop < 0 && slcm > -1) {
481-
stop = slcm;
482-
}
483-
if(stop < 0 && text.lastIndexOf("{") == text.length()-1) {
484-
indent = propDialog->getTabSpaces();
485-
}
486-
487-
qDebug() << text;
488-
/* start a single undo/redo operation */
489-
cur.beginEditBlock();
490-
491-
cur.insertBlock();
492-
493-
for(int n = 0; n <= stop || isspace(text[n].toLatin1()); n++) {
494-
if(n == star) {
495-
cur.insertText("*");
496-
}
497-
else if(n == slcm) {
498-
cur.insertText("// ");
499-
}
500-
else {
501-
cur.insertText(" ");
502-
}
503-
}
504-
505-
if(indent > 0) {
506-
for(int n = 0; n < indent; n++) {
507-
cur.insertText(" ");
508-
}
509-
}
510-
511-
this->setTextCursor(cur);
512-
/* end a single undo/redo operation */
513-
cur.endEditBlock();
514-
515-
return 1;
516-
}
517-
518-
int Editor::autoEnterColumnSpin()
519433
{
520434
QTextCursor cur = this->textCursor();
521435
if(cur.selectedText().length() > 0) {

src/propelleride/editor.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ class Editor : public QPlainTextEdit
4242

4343
private:
4444
int autoEnterColumn();
45-
int autoEnterColumnC();
46-
int autoEnterColumnSpin();
4745
int braceMatchColumn();
4846
bool isCommentOpen(int line);
4947
bool isSpinCommentOpen(int line);
-1.38 MB
Binary file not shown.

src/propelleride/fonts/fonts.qrc

Lines changed: 0 additions & 7 deletions
This file was deleted.
-32.6 KB
Binary file not shown.
-51.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)