Skip to content

Commit 5c08a48

Browse files
committed
Update Astyle config and format sources
1 parent a51d215 commit 5c08a48

File tree

9 files changed

+26
-16
lines changed

9 files changed

+26
-16
lines changed

addons/src/bhc/bhcdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ void BHCDialog::computeButtonClicked()
306306
yItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
307307

308308
QTableWidgetItem* hdr = new QTableWidgetItem(Utils::removeZeros(QString("%1 - %2 ").arg(i + 1).arg(ang,
309-
0, 'f', 3)));
309+
0, 'f', 3)));
310310
tab->resultTable->setVerticalHeaderItem(i, hdr);
311311
tab->resultTable->setItem(i, 0, xItem);
312312
tab->resultTable->setItem(i, 1, yItem);

addons/src/i2mprog/utils-i2mprog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int Utils::i2mprog(QString tx, const QString& addr, bool toInch, int prec)
3232

3333
regex.setPatternOptions(QRegularExpression::CaseInsensitiveOption);
3434
regex.setPattern(
35-
QString("[%1]{1,1}([+-]?\\d*\\.?\\d*)|\\([^\\n\\r]*\\)|\'[^\\n\\r]*\'|;[^\\n\\r]*$").arg(addr));
35+
QString("[%1]{1,1}([+-]?\\d*\\.?\\d*)|\\([^\\n\\r]*\\)|\'[^\\n\\r]*\'|;[^\\n\\r]*$").arg(addr));
3636
auto match = regex.match(tx);
3737

3838
while (match.hasMatch()) {

gcodefileserver/gcodefileserver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ void GCodeFileServer::loadSettings()
183183
SerialTransmissionDialog* GCodeFileServer::createSerialPortServer(QString __config)
184184
{
185185
SerialTransmissionDialog* spServer = new SerialTransmissionDialog(this, Qt::SubWindow,
186-
true); // Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowTitleHint
186+
true); // Qt::Tool | Qt::CustomizeWindowHint | Qt::WindowTitleHint
187187
spServer->setAttribute(Qt::WA_DeleteOnClose);
188188
ui->mdiArea->addSubWindow(spServer);
189189

@@ -324,7 +324,7 @@ void GCodeFileServer::createActions()
324324
void GCodeFileServer::serialConfig()
325325
{
326326
SerialPortConfigDialog* serialConfigDialog = new SerialPortConfigDialog(this,
327-
configBox->currentText());
327+
configBox->currentText());
328328

329329
if (serialConfigDialog->exec() == QDialog::Accepted) {
330330
loadSerialConfignames();

gcodeshared/include/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define VERSION_H
2222

2323
#ifndef GCODEWORKSHOP_VERSION
24-
#define GCODEWORKSHOP_VERSION "2024.10"
24+
#define GCODEWORKSHOP_VERSION "2024.10"
2525
#endif
2626

2727
#endif // VERSION_H

gcodeshared/serialporttestdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void SerialPortTestDialog::updateLeds()
359359
void SerialPortTestDialog::configButtonClicked()
360360
{
361361
SerialPortConfigDialog* serialConfigDialog = new SerialPortConfigDialog(this,
362-
configBox->currentText());
362+
configBox->currentText());
363363

364364
if (serialConfigDialog->exec() == QDialog::Accepted) {
365365
changeSettings();

gcodeshared/serialtransmissiondialog.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,6 @@ void SerialTransmissionDialog::serialPortBytesWritten(qint64 bytes)
523523
// serialPortReadBuffer.append(buf);
524524

525525

526-
527-
528526
// setLabelText(tr("Receiving byte %1").arg(serialPortReadBuffer.size() - 1));
529527

530528
// //qDebug() << "Data read" << buff << "xoffReceived" << xoffReceived;
@@ -1339,7 +1337,7 @@ void SerialTransmissionDialog::fileServerProcessData()
13391337

13401338
if (!fileName.isEmpty()) {
13411339
path = portSettings.searchPath1 + "/" + fileName + (ext.isEmpty() ? portSettings.searchExt1 :
1342-
ext);
1340+
ext);
13431341
fileInfo.setFile(path);
13441342

13451343
if (!fileInfo.exists()) {
@@ -1348,7 +1346,7 @@ void SerialTransmissionDialog::fileServerProcessData()
13481346
}
13491347

13501348
path = portSettings.searchPath2 + "/" + fileName + (ext.isEmpty() ? portSettings.searchExt2 :
1351-
ext);
1349+
ext);
13521350
fileInfo.setFile(path);
13531351

13541352
if (!fileInfo.exists()) {
@@ -1357,7 +1355,7 @@ void SerialTransmissionDialog::fileServerProcessData()
13571355
}
13581356

13591357
path = portSettings.searchPath3 + "/" + fileName + (ext.isEmpty() ? portSettings.searchExt3 :
1360-
ext);
1358+
ext);
13611359
fileInfo.setFile(path);
13621360

13631361
if (!fileInfo.exists()) {

gcodeworkshop/src/findinf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ bool FindInFiles::findFiles(const QString startDir, QString mainDir, bool notFou
356356
}
357357

358358
QTableWidgetItem* fileNameItem = new QTableWidgetItem(QDir::toNativeSeparators(
359-
subDir) + files[i]);
359+
subDir) + files[i]);
360360
fileNameItem->setTextAlignment(Qt::AlignLeft | Qt::AlignVCenter);
361361

362362
QTableWidgetItem* infoNameItem = new QTableWidgetItem(comment_tx);

gcodeworkshop/src/highlighter.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,6 @@ void Highlighter::highlightBlockToolTipsRule(const QString& tx)
17311731
highlightRules.append(ruleP);
17321732

17331733

1734-
17351734
keywordFormat.setForeground(QColor(highlightColors.mColor));
17361735
keywordFormat.setFontWeight(QFont::Normal);
17371736
ruleP.pattern = QRegularExpression("(<b>|<i>)[a-zA-Z0-9_.@=\\[\\]\\s]{1,30}(</b>|</i>)");

tools/astyle.cfg

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# astyle version 3.1
2-
# astyle --project=tools/astyle.cfg -r -I 'src/*.cpp' 'src/*.h'
1+
# astyle version 3.4
2+
# astyle --project=tools/astyle.cfg -r -I '*.cpp' '*.h'
33

4+
--style=kr
5+
6+
--squeeze-lines=2
47
--max-code-length=120
58

69
# Indents
@@ -11,7 +14,6 @@
1114
--indent-preproc-define
1215

1316
# Brace Style Options
14-
--style=kr
1517
--attach-namespaces
1618
--attach-closing-while # not present in astyle v2.5
1719
--break-one-line-headers # not present in astyle v2.5
@@ -31,3 +33,14 @@
3133
--align-reference=type
3234

3335
--suffix=none
36+
37+
--ignore-exclude-errors-x
38+
--exclude=3rdparty
39+
--exclude=bin
40+
--exclude=build
41+
--exclude=doc
42+
--exclude=examples
43+
--exclude=install
44+
--exclude=lang
45+
--exclude=template
46+
--exclude=tools

0 commit comments

Comments
 (0)