Skip to content

Commit 50b0f0a

Browse files
committed
Renamed highlighter and highlightSpin to Highlighter and SpinHighlighter
1 parent d8d2b8d commit 50b0f0a

File tree

9 files changed

+9
-19
lines changed

9 files changed

+9
-19
lines changed

src/propelleride/highlighter.cpp renamed to src/propelleride/Highlighter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
**
4646
****************************************************************************/
4747

48-
#include "highlighter.h"
48+
#include "Highlighter.h"
4949

5050
#include <QSettings>
5151
#include <QVariant>
File renamed without changes.

src/propelleride/highlightSpin.cpp renamed to src/propelleride/SpinHighlighter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <QString>
88
#include <QStringList>
99

10-
#include "highlightSpin.h"
10+
#include "SpinHighlighter.h"
1111

1212
SpinHighlighter::SpinHighlighter(QTextDocument *parent, Preferences *prop)
1313
: Highlighter(parent, prop)

src/propelleride/highlightSpin.h renamed to src/propelleride/SpinHighlighter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
**
4848
****************************************************************************/
4949

50-
#include "highlighter.h"
50+
#include "Highlighter.h"
5151

5252
#include <QHash>
5353
#include <QTextCharFormat>

src/propelleride/editor.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/* C and Spin highlighters prove more languages can be added easily.
1111
*/
12-
#include "highlightSpin.h"
12+
#include "SpinHighlighter.h"
1313

1414
#include "mainwindow.h"
1515
#define MAINWINDOW MainWindow
@@ -1421,23 +1421,17 @@ void Editor::updateBackgroundColors()
14211421
setExtraSelections(OurExtraSelections);
14221422
}
14231423

1424-
//![extraAreaPaintEvent_0]
14251424

14261425
void Editor::lineNumberAreaPaintEvent(QPaintEvent *event)
14271426
{
14281427
QPainter painter(lineNumberArea);
14291428
painter.fillRect(event->rect(), QColor(Qt::lightGray).lighter(120));
14301429

1431-
//![extraAreaPaintEvent_0]
1432-
1433-
//![extraAreaPaintEvent_1]
14341430
QTextBlock block = firstVisibleBlock();
14351431
int blockNumber = block.blockNumber();
14361432
int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top();
14371433
int bottom = top + (int) blockBoundingRect(block).height();
1438-
//![extraAreaPaintEvent_1]
14391434

1440-
//![extraAreaPaintEvent_2]
14411435
while (block.isValid() && top <= event->rect().bottom()) {
14421436
if (block.isVisible() && bottom >= event->rect().top()) {
14431437
QString number = QString::number(blockNumber + 1);
@@ -1452,4 +1446,3 @@ void Editor::lineNumberAreaPaintEvent(QPaintEvent *event)
14521446
++blockNumber;
14531447
}
14541448
}
1455-
//![extraAreaPaintEvent_2]

src/propelleride/editor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <QTextCursor>
1212

1313

14-
#include "highlighter.h"
14+
#include "Highlighter.h"
1515
#include "SpinParser.h"
1616

1717
class LineNumberArea;

src/propelleride/mainwindow.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,6 @@ Editor *MainWindow::createEditor()
17291729
editor->setTabStopWidth(width);
17301730
connect(editor,SIGNAL(textChanged()),this,SLOT(fileChanged()));
17311731
connect(editor,SIGNAL(cursorPositionChanged()),editor,SLOT(updateBackgroundColors()));
1732-
highlighter = new Highlighter(editor->document(), propDialog);
17331732

17341733
return editor;
17351734
}

src/propelleride/mainwindow.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <QPlainTextEdit>
1212
#include <QTreeView>
1313

14-
#include "highlighter.h"
1514
#include "SpinBuilder.h"
1615
#include "SpinParser.h"
1716
#include "SpinModel.h"
@@ -186,7 +185,6 @@ public slots:
186185
QString spinCompilerPath;
187186
QString spinIncludes;
188187
QString spinLoader;
189-
Highlighter *highlighter;
190188

191189
QToolBar *fileToolBar;
192190
QToolBar *propToolBar;

src/propelleride/propelleride.pro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SOURCES += main.cpp\
2424
mainwindow.cpp \
2525
$$files(mainwindow/*.cpp) \
2626
StatusDialog.cpp \
27-
highlighter.cpp \
27+
Highlighter.cpp \
2828
treemodel.cpp \
2929
treeitem.cpp \
3030
Builder.cpp \
@@ -33,15 +33,15 @@ SOURCES += main.cpp\
3333
Preferences.cpp \
3434
PortConnectionMonitor.cpp \
3535
editor.cpp \
36-
highlightSpin.cpp \
36+
SpinHighlighter.cpp \
3737
SpinParser.cpp \
3838
terminal.cpp \
3939
console.cpp \
4040
termprefs.cpp
4141

4242
HEADERS += mainwindow.h \
4343
StatusDialog.h \
44-
highlighter.h \
44+
Highlighter.h \
4545
treemodel.h \
4646
treeitem.h \
4747
Builder.h \
@@ -50,7 +50,7 @@ HEADERS += mainwindow.h \
5050
Preferences.h \
5151
PortConnectionMonitor.h \
5252
editor.h \
53-
highlightSpin.h \
53+
SpinHighlighter.h \
5454
SpinParser.h \
5555
colors.h \
5656
Sleeper.h \

0 commit comments

Comments
 (0)