Skip to content

Commit 9b2345f

Browse files
committed
Refactoring: align a pointer and reference to type
1 parent b7848e7 commit 9b2345f

File tree

164 files changed

+1392
-1392
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+1392
-1392
lines changed

addons/include/addons-actions.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class Actions : public QObject
3232
Q_OBJECT
3333

3434
public:
35-
explicit Actions(QObject *parent = nullptr);
35+
explicit Actions(QObject* parent = nullptr);
3636

3737
public slots:
3838
void loadTranslations();
@@ -64,27 +64,27 @@ public slots:
6464
// *INDENT-ON*
6565

6666
protected:
67-
QAction *m_bhc;
68-
QAction *m_blockSkipDecrement;
69-
QAction *m_blockSkipIncrement;
70-
QAction *m_blockSkipRemove;
71-
QAction *m_chamfer;
72-
QAction *m_cleanUp;
73-
QAction *m_paraComment;
74-
QAction *m_semiComment;
75-
QAction *m_compileMacro;
76-
QAction *m_dot;
77-
QAction *m_insertEmptyLines;
78-
QAction *m_removeEmptyLines;
79-
QAction *m_feeds;
80-
QAction *m_i2m;
81-
QAction *m_i2mProg;
82-
QAction *m_renumber;
83-
QAction *m_insertSpaces;
84-
QAction *m_removeSpaces;
85-
QAction *m_splitProgramms;
86-
QAction *m_swapAxes;
87-
QAction *m_triangle;
67+
QAction* m_bhc;
68+
QAction* m_blockSkipDecrement;
69+
QAction* m_blockSkipIncrement;
70+
QAction* m_blockSkipRemove;
71+
QAction* m_chamfer;
72+
QAction* m_cleanUp;
73+
QAction* m_paraComment;
74+
QAction* m_semiComment;
75+
QAction* m_compileMacro;
76+
QAction* m_dot;
77+
QAction* m_insertEmptyLines;
78+
QAction* m_removeEmptyLines;
79+
QAction* m_feeds;
80+
QAction* m_i2m;
81+
QAction* m_i2mProg;
82+
QAction* m_renumber;
83+
QAction* m_insertSpaces;
84+
QAction* m_removeSpaces;
85+
QAction* m_splitProgramms;
86+
QAction* m_swapAxes;
87+
QAction* m_triangle;
8888

8989
protected slots:
9090
void doBhc();

addons/src/addons-actions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include "triangle/addons-triangle.h"
5252

5353

54-
Addons::Actions::Actions(QObject *parent) : QObject(parent),
54+
Addons::Actions::Actions(QObject* parent) : QObject(parent),
5555
m_bhc(new QAction(this)),
5656
m_blockSkipDecrement(new QAction(this)),
5757
m_blockSkipIncrement(new QAction(this)),
@@ -256,14 +256,14 @@ void Addons::Actions::doCompileMacro()
256256
}
257257

258258
Utils::CompileMacro compiler;
259-
EdytorNc *enc = EdytorNc::instance();
259+
EdytorNc* enc = EdytorNc::instance();
260260

261261
if (compiler.compile(ctx.text()) == -1) {
262262
QMessageBox::warning(enc, tr("EdytorNc - compile macro"), compiler.status());
263263
//return;
264264
}
265265

266-
GCoderDocument *gdoc = dynamic_cast<GCoderDocument *>(enc->newFile());
266+
GCoderDocument* gdoc = dynamic_cast<GCoderDocument*>(enc->newFile());
267267

268268
if (gdoc) {
269269
gdoc->insertText(compiler.result());
@@ -409,7 +409,7 @@ void Addons::Actions::doSplitProgramms()
409409
}
410410

411411
for (QString it : list) {
412-
GCoderDocument *gdoc = dynamic_cast<GCoderDocument *>(EdytorNc::instance()->newFile());
412+
GCoderDocument* gdoc = dynamic_cast<GCoderDocument*>(EdytorNc::instance()->newFile());
413413

414414
if (gdoc == nullptr) {
415415
continue;

addons/src/addons-context.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
bool Addons::Context::pull(int mode)
3232
{
33-
GCoderDocument *gdoc = dynamic_cast<GCoderDocument *>(EdytorNc::instance()->activeDocument());
33+
GCoderDocument* gdoc = dynamic_cast<GCoderDocument*>(EdytorNc::instance()->activeDocument());
3434

3535
if (!gdoc) {
3636
return false;
@@ -90,7 +90,7 @@ bool Addons::Context::pull(int mode)
9090
return true;
9191
}
9292

93-
void Addons::Context::push(const QString &text)
93+
void Addons::Context::push(const QString& text)
9494
{
9595
QTextCursor cursor(m_edit->document());
9696
cursor.setPosition(m_fragmentEnd, QTextCursor::MoveAnchor);

addons/src/addons-context.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Context
5555

5656
protected:
5757
int m_mode;
58-
QPlainTextEdit *m_edit;
58+
QPlainTextEdit* m_edit;
5959
int m_selectionStart; // QPlainTextEdit::selectionStart()
6060
int m_selectionEnd; // QPlainTextEdit::selectionEnd()
6161
int m_fragmentStart;

addons/src/bhc/addons-bhc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
#include "bhcoptions.h" // for BHCOptions
2727

2828

29-
void Addons::doBhc(QWidget *parent, QSettings *settings)
29+
void Addons::doBhc(QWidget* parent, QSettings* settings)
3030
{
3131
QString key = "BHCDialog";
32-
BHCDialog *dlg;
33-
dlg = parent->findChild<BHCDialog *>(key);
32+
BHCDialog* dlg;
33+
dlg = parent->findChild<BHCDialog*>(key);
3434

3535
if (!dlg) {
3636
dlg = new BHCDialog(parent, settings);

addons/src/bhc/addons-bhc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class QSettings;
2424
class QWidget;
2525

2626
namespace Addons {
27-
void doBhc(QWidget *parent, QSettings *settings);
27+
void doBhc(QWidget* parent, QSettings* settings);
2828
}
2929

3030
#endif // ADDONS_BHC_H

addons/src/bhc/bhcdialog.cpp

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
#define CFG_KEY_SIZE "Size"
6060

6161

62-
BHCDialog::BHCDialog(QWidget *parent, QSettings *settings) :
62+
BHCDialog::BHCDialog(QWidget* parent, QSettings* settings) :
6363
QDialog(parent)
6464
{
6565
setupUi(this);
@@ -77,10 +77,10 @@ BHCDialog::BHCDialog(QWidget *parent, QSettings *settings) :
7777
tabBar = new QTabWidget(this);
7878
pageLayout->addWidget(tabBar);
7979

80-
BHCTab *page1 = new BHCTab(this);
81-
BHCTab *page2 = new BHCTab(this);
82-
BHCTab *page3 = new BHCTab(this);
83-
BHCTab *page4 = new BHCTab(this);
80+
BHCTab* page1 = new BHCTab(this);
81+
BHCTab* page2 = new BHCTab(this);
82+
BHCTab* page3 = new BHCTab(this);
83+
BHCTab* page4 = new BHCTab(this);
8484

8585
tabBar->addTab(page1, tr("Circle 1 - green"));
8686
tabBar->addTab(page2, tr("Circle 2 - blue"));
@@ -105,11 +105,11 @@ BHCDialog::~BHCDialog()
105105

106106
void BHCDialog::comChk()
107107
{
108-
BHCTab *tab;
108+
BHCTab* tab;
109109
int tabId, roat, activTab;
110110
bool mirX, mirY;
111111

112-
tab = (BHCTab *)tabBar->currentWidget();
112+
tab = (BHCTab*)tabBar->currentWidget();
113113
activTab = tabBar->currentIndex();
114114

115115
if (tab->all->isChecked()) {
@@ -118,7 +118,7 @@ void BHCDialog::comChk()
118118
mirY = tab->mirrorY->isChecked();
119119

120120
for (tabId = 0; tabId < tabBar->count(); tabId++) {
121-
tab = (BHCTab *)tabBar->widget(tabId);
121+
tab = (BHCTab*)tabBar->widget(tabId);
122122

123123
if (tab == nullptr) {
124124
continue;
@@ -142,7 +142,7 @@ void BHCDialog::comChk()
142142
void BHCDialog::clearAll()
143143
{
144144
for (int tabId = 0; tabId < tabBar->count(); tabId++) {
145-
BHCTab *tab = (BHCTab *)tabBar->widget(tabId);
145+
BHCTab* tab = (BHCTab*)tabBar->widget(tabId);
146146

147147
if (tab == nullptr) {
148148
continue;
@@ -168,7 +168,7 @@ void BHCDialog::clearAll()
168168

169169
void BHCDialog::computeButtonClicked()
170170
{
171-
BHCTab *tab;
171+
BHCTab* tab;
172172
QColor col;
173173
int tabId, i, textPosY, textPosX, dir;
174174
bool ok;
@@ -179,7 +179,7 @@ void BHCDialog::computeButtonClicked()
179179
maxDia = 0;
180180

181181
for (tabId = 0; tabId <= tabBar->count(); tabId++) {
182-
tab = (BHCTab *)tabBar->widget(tabId);
182+
tab = (BHCTab*)tabBar->widget(tabId);
183183

184184
if (tab == nullptr) {
185185
continue;
@@ -192,7 +192,7 @@ void BHCDialog::computeButtonClicked()
192192
}
193193

194194
for (tabId = 0; tabId < tabBar->count(); tabId++) {
195-
tab = (BHCTab *)tabBar->widget(tabId);
195+
tab = (BHCTab*)tabBar->widget(tabId);
196196

197197
if (tab == nullptr) {
198198
continue;
@@ -300,10 +300,10 @@ void BHCDialog::computeButtonClicked()
300300
x = xCenter + (dia * cos((M_PI / 180) * ang));
301301
y = yCenter + (dia * sin((M_PI / 180) * ang));
302302

303-
QTableWidgetItem *xItem = new QTableWidgetItem(Utils::removeZeros(QString("%1").arg(x, 0, 'f', 3)));
303+
QTableWidgetItem* xItem = new QTableWidgetItem(Utils::removeZeros(QString("%1").arg(x, 0, 'f', 3)));
304304
xItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
305305

306-
QTableWidgetItem *yItem = new QTableWidgetItem(Utils::removeZeros(QString("%1").arg(y, 0, 'f', 3)));
306+
QTableWidgetItem* yItem = new QTableWidgetItem(Utils::removeZeros(QString("%1").arg(y, 0, 'f', 3)));
307307
yItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
308308

309309
QTableWidgetItem* hdr = new QTableWidgetItem(Utils::removeZeros(QString("%1 - %2 ").arg(i + 1).arg(ang,
@@ -314,7 +314,7 @@ void BHCDialog::computeButtonClicked()
314314
}
315315
}
316316

317-
drawing = (BHCDraw *) findChild<BHCDraw *>();
317+
drawing = (BHCDraw*) findChild<BHCDraw*>();
318318

319319
if (!drawing) {
320320
drawing = new BHCDraw(this);
@@ -329,7 +329,7 @@ void BHCDialog::computeButtonClicked()
329329
drawing->clear();
330330

331331
for (tabId = 0; tabId <= tabBar->count(); tabId++) {
332-
tab = (BHCTab *)tabBar->widget(tabId);
332+
tab = (BHCTab*)tabBar->widget(tabId);
333333

334334
if (tab == 0) {
335335
continue;
@@ -476,37 +476,37 @@ void BHCDialog::computeButtonClicked()
476476
drawing->update();
477477
}
478478

479-
void BHCDialog::setOptions(const BHCOptions &options)
479+
void BHCDialog::setOptions(const BHCOptions& options)
480480
{
481-
BHCTab *tab;
482-
tab = (BHCTab *)tabBar->widget(0); // green
481+
BHCTab* tab;
482+
tab = (BHCTab*)tabBar->widget(0); // green
483483
tab->setOptions(options.green);
484-
tab = (BHCTab *)tabBar->widget(1); // blue
484+
tab = (BHCTab*)tabBar->widget(1); // blue
485485
tab->setOptions(options.blue);
486-
tab = (BHCTab *)tabBar->widget(2); // red
486+
tab = (BHCTab*)tabBar->widget(2); // red
487487
tab->setOptions(options.red);
488-
tab = (BHCTab *)tabBar->widget(3); // yellow
488+
tab = (BHCTab*)tabBar->widget(3); // yellow
489489
tab->setOptions(options.yellow);
490490
}
491491

492492
BHCOptions BHCDialog::options()
493493
{
494494
BHCOptions options;
495-
BHCTab *tab;
495+
BHCTab* tab;
496496

497-
tab = (BHCTab *)tabBar->widget(0); // green
497+
tab = (BHCTab*)tabBar->widget(0); // green
498498
options.green = tab->options();;
499-
tab = (BHCTab *)tabBar->widget(1); // blue
499+
tab = (BHCTab*)tabBar->widget(1); // blue
500500
options.blue = tab->options();;
501-
tab = (BHCTab *)tabBar->widget(2); // red
501+
tab = (BHCTab*)tabBar->widget(2); // red
502502
options.red = tab->options();;
503-
tab = (BHCTab *)tabBar->widget(3); // yellow
503+
tab = (BHCTab*)tabBar->widget(3); // yellow
504504
options.yellow = tab->options();
505505

506506
return options;
507507
}
508508

509-
void BHCDialog::loadSettings(const BHCOptions &defaultOptions)
509+
void BHCDialog::loadSettings(const BHCOptions& defaultOptions)
510510
{
511511
if (mSettings.isNull()) {
512512
return;

addons/src/bhc/bhcdialog.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ class BHCDialog : public QDialog, private Ui::BHCDialog
4444
Q_OBJECT
4545

4646
public:
47-
BHCDialog(QWidget *parent, QSettings *settings);
47+
BHCDialog(QWidget* parent, QSettings* settings);
4848
~BHCDialog();
4949

50-
void setOptions(const BHCOptions &options);
50+
void setOptions(const BHCOptions& options);
5151
BHCOptions options();
5252

53-
void loadSettings(const BHCOptions &defaultOptions);
53+
void loadSettings(const BHCOptions& defaultOptions);
5454
void saveSettings(bool saveOptions = true);
5555

5656
protected:
@@ -63,8 +63,8 @@ private slots:
6363
void onFinished(int result);
6464

6565
private:
66-
QTabWidget *tabBar;
67-
BHCDraw *drawing;
66+
QTabWidget* tabBar;
67+
BHCDraw* drawing;
6868

6969
int parentHeight;
7070
int parentWidth;

0 commit comments

Comments
 (0)