[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
committed by
WandererFan
parent
a207d11fa4
commit
e92ed45df9
@@ -107,7 +107,7 @@ void RegExpDialog::performRegExp()
|
||||
ui->textLabel4->setText(rx.errorString());
|
||||
if (!rx.isValid()) {
|
||||
rxhilighter->resethighlight();
|
||||
return;// invalid expression
|
||||
return; // invalid expression
|
||||
}
|
||||
|
||||
rxhilighter->highlightMatchedText(rx);
|
||||
@@ -137,7 +137,7 @@ void RegExpSyntaxHighlighter::highlightBlock(const QString& text)
|
||||
setFormat(0, text.length(), regFormat);
|
||||
|
||||
if (regexp.pattern().isEmpty()) {
|
||||
return;// empty regular expression
|
||||
return; // empty regular expression
|
||||
}
|
||||
|
||||
int pos = 0;
|
||||
|
||||
@@ -66,4 +66,4 @@ private:
|
||||
QRegularExpression regexp;
|
||||
};
|
||||
|
||||
#endif// REG_EXP_DIALOG_H
|
||||
#endif // REG_EXP_DIALOG_H
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#if defined(__MINGW32__)
|
||||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif// HAVE_CONFIG_H
|
||||
#endif // HAVE_CONFIG_H
|
||||
#endif
|
||||
#elif defined(__MWERKS__) && defined(__INTEL__)
|
||||
#ifndef FC_OS_WIN32
|
||||
@@ -162,7 +162,7 @@ typedef unsigned __int64 uint64_t;
|
||||
// point at which warnings of overly long specifiers disabled (needed for VC6)
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4251)
|
||||
#pragma warning(disable : 4996)// suppress deprecated warning for e.g. open()
|
||||
#pragma warning(disable : 4996) // suppress deprecated warning for e.g. open()
|
||||
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
|
||||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4267)
|
||||
@@ -170,4 +170,4 @@ typedef unsigned __int64 uint64_t;
|
||||
#endif
|
||||
|
||||
|
||||
#endif// FC_CONFIG_H
|
||||
#endif // FC_CONFIG_H
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
Module()
|
||||
: Py::ExtensionModule<Module>("_TEMPLATE_")
|
||||
{
|
||||
initialize("This module is the _TEMPLATE_ module.");// register with Python
|
||||
initialize("This module is the _TEMPLATE_ module."); // register with Python
|
||||
}
|
||||
|
||||
virtual ~Module()
|
||||
@@ -57,7 +57,7 @@ PyObject* initModule()
|
||||
}
|
||||
|
||||
|
||||
}// namespace _TEMPLATE_
|
||||
} // namespace _TEMPLATE_
|
||||
|
||||
|
||||
/* Python entry */
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
// Exporting of App classes
|
||||
#ifdef FC_OS_WIN32
|
||||
#define _TEMPLATE_AppExport __declspec(dllexport)
|
||||
#else// for Linux
|
||||
#else // for Linux
|
||||
#define _TEMPLATE_AppExport
|
||||
#endif
|
||||
|
||||
@@ -55,6 +55,6 @@
|
||||
// Xerces
|
||||
#include <xercesc/util/XercesDefs.hpp>
|
||||
|
||||
#endif//_PreComp_
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
Module()
|
||||
: Py::ExtensionModule<Module>("_TEMPLATE_Gui")
|
||||
{
|
||||
initialize("This module is the _TEMPLATE_Gui module.");// register with Python
|
||||
initialize("This module is the _TEMPLATE_Gui module."); // register with Python
|
||||
}
|
||||
|
||||
virtual ~Module()
|
||||
@@ -62,7 +62,7 @@ PyObject* initModule()
|
||||
return Base::Interpreter().addModule(new Module);
|
||||
}
|
||||
|
||||
}// namespace _TEMPLATE_Gui
|
||||
} // namespace _TEMPLATE_Gui
|
||||
|
||||
|
||||
/* Python entry */
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#ifdef FC_OS_WIN32
|
||||
#define _TEMPLATE_AppExport __declspec(dllimport)
|
||||
#define _TEMPLATE_GuiExport __declspec(dllexport)
|
||||
#else// for Linux
|
||||
#else // for Linux
|
||||
#define _TEMPLATE_AppExport
|
||||
#define _TEMPLATE_GuiExport
|
||||
#endif
|
||||
@@ -65,6 +65,6 @@
|
||||
#include <Gui/QtAll.h>
|
||||
#endif
|
||||
|
||||
#endif//_PreComp_
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif// GUI_PRECOMPILED_H
|
||||
#endif // GUI_PRECOMPILED_H
|
||||
|
||||
@@ -42,7 +42,7 @@ protected:
|
||||
Gui::ToolBarItem* setupToolBars() const;
|
||||
};
|
||||
|
||||
}// namespace _TEMPLATE_Gui
|
||||
} // namespace _TEMPLATE_Gui
|
||||
|
||||
|
||||
#endif// _TEMPLATE__WORKBENCH_H
|
||||
#endif // _TEMPLATE__WORKBENCH_H
|
||||
|
||||
@@ -44,4 +44,4 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif//_TEMPLATE__GLOBAL_H
|
||||
#endif //_TEMPLATE__GLOBAL_H
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define FC_PLUGIN_EXPORT __declspec(dllimport)
|
||||
#endif
|
||||
#define MeshExport __declspec(dllimport)
|
||||
#else// for Linux
|
||||
#else // for Linux
|
||||
#define FC_PLUGIN_EXPORT
|
||||
#define MeshExport
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@ PyMODINIT_FUNC FreeCAD_init()
|
||||
/* A test function for the plugin to load a mesh and call "getVal()" */
|
||||
PyMODINIT_FUNC FreeCAD_test(const char* path)
|
||||
{
|
||||
try {// Use FreeCADGui here, not Gui
|
||||
try { // Use FreeCADGui here, not Gui
|
||||
Base::Interpreter().runString("FreeCADGui.activateWorkbench(\"MeshWorkbench\")");
|
||||
Base::Interpreter().runString("import Mesh");
|
||||
Base::Interpreter().runStringArg("Mesh.insert(u\"%s\", \"%s\")", path, "Document");
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
// Global Variables:
|
||||
HINSTANCE hInst; // current instance
|
||||
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
|
||||
TCHAR szWindowClass[MAX_LOADSTRING];// the main window class name
|
||||
HINSTANCE hInst; // current instance
|
||||
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
|
||||
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
|
||||
|
||||
// Forward declarations of functions included in this code module:
|
||||
ATOM MyRegisterClass(HINSTANCE hInstance);
|
||||
@@ -106,7 +106,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
{
|
||||
HWND hWnd;
|
||||
|
||||
hInst = hInstance;// Store instance handle in our global variable
|
||||
hInst = hInstance; // Store instance handle in our global variable
|
||||
|
||||
hWnd = CreateWindow(szWindowClass,
|
||||
szTitle,
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "targetver.h"
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN// Exclude rarely-used stuff from Windows headers
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
// Windows Header Files:
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
@@ -7,19 +7,20 @@
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
|
||||
#define WINVER 0x0600// Change this to the appropriate value to target other versions of Windows.
|
||||
#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
|
||||
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT// Specifies that the minimum required platform is Windows Vista.
|
||||
#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
|
||||
#define _WIN32_WINNT \
|
||||
0x0600// Change this to the appropriate value to target other versions of Windows.
|
||||
0x0600 // Change this to the appropriate value to target other versions of Windows.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
|
||||
#define _WIN32_WINDOWS 0x0410// Change this to the appropriate value to target Windows Me or later.
|
||||
#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
|
||||
#define _WIN32_WINDOWS \
|
||||
0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
|
||||
#define _WIN32_IE 0x0700// Change this to the appropriate value to target other versions of IE.
|
||||
#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
|
||||
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
|
||||
#endif
|
||||
|
||||
@@ -95,4 +95,4 @@ Q_EXPORT_PLUGIN2(qsvg, QSvgPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif// !QT_NO_IMAGEFORMATPLUGIN
|
||||
#endif // !QT_NO_IMAGEFORMATPLUGIN
|
||||
|
||||
@@ -153,7 +153,7 @@ bool QSvgIOHandler::canRead() const
|
||||
return false;
|
||||
}
|
||||
if (d->loaded && !d->readDone) {
|
||||
return true;// Will happen if we have been asked for the size
|
||||
return true; // Will happen if we have been asked for the size
|
||||
}
|
||||
|
||||
QByteArray buf = device()->peek(8);
|
||||
@@ -220,7 +220,7 @@ bool QSvgIOHandler::read(QImage* image)
|
||||
p.setRenderHint(QPainter::Antialiasing);
|
||||
p.setRenderHint(QPainter::TextAntialiasing);
|
||||
p.setRenderHint(QPainter::SmoothPixmapTransform);
|
||||
p.setOpacity(0);// important to keep transparent background
|
||||
p.setOpacity(0); // important to keep transparent background
|
||||
d->webView.page()->mainFrame()->render(&p);
|
||||
#endif
|
||||
p.end();
|
||||
@@ -308,4 +308,4 @@ bool QSvgIOHandler::canRead(QIODevice* device)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif// QT_NO_SVGRENDERER
|
||||
#endif // QT_NO_SVGRENDERER
|
||||
|
||||
@@ -73,5 +73,5 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif// QT_NO_SVGRENDERER
|
||||
#endif// QSVGIOHANDLER_H
|
||||
#endif // QT_NO_SVGRENDERER
|
||||
#endif // QSVGIOHANDLER_H
|
||||
|
||||
@@ -290,7 +290,7 @@ void AccelLineEdit::keyPressEvent(QKeyEvent* e)
|
||||
return;
|
||||
}
|
||||
else if (state == Qt::NoModifier && key == Qt::Key_Backspace) {
|
||||
return;// clears the edit field
|
||||
return; // clears the edit field
|
||||
}
|
||||
|
||||
switch (state) {
|
||||
@@ -554,7 +554,7 @@ const QString& Unit::getString() const
|
||||
return unit;
|
||||
}
|
||||
|
||||
int QuantityFormat::defaultDenominator = 8;// for 1/8"
|
||||
int QuantityFormat::defaultDenominator = 8; // for 1/8"
|
||||
|
||||
|
||||
QuantityFormat::QuantityFormat()
|
||||
@@ -639,7 +639,7 @@ QString Quantity::getUserString(double& factor, QString& unitString) const
|
||||
return QString::fromUtf8("%1 %2").arg(Ln, unit.getString());
|
||||
}
|
||||
|
||||
}// namespace Base
|
||||
} // namespace Base
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
@@ -820,8 +820,8 @@ public:
|
||||
state = QValidator::Acceptable;
|
||||
}
|
||||
}
|
||||
else if (max == min) {// when max and min is the same the only non-Invalid input is max
|
||||
// (or min)
|
||||
else if (max == min) { // when max and min is the same the only non-Invalid input is
|
||||
// max (or min)
|
||||
state = QValidator::Invalid;
|
||||
}
|
||||
else {
|
||||
@@ -855,7 +855,7 @@ public:
|
||||
double minimum;
|
||||
double singleStep;
|
||||
};
|
||||
}// namespace Gui
|
||||
} // namespace Gui
|
||||
|
||||
QuantitySpinBox::QuantitySpinBox(QWidget* parent)
|
||||
: QAbstractSpinBox(parent)
|
||||
@@ -1153,7 +1153,7 @@ QSize QuantitySpinBox::sizeHint() const
|
||||
w = fm.width(s);
|
||||
#endif
|
||||
|
||||
w += 2;// cursor blinking space
|
||||
w += 2; // cursor blinking space
|
||||
w += iconHeight;
|
||||
|
||||
QStyleOptionSpinBox opt;
|
||||
@@ -1183,7 +1183,7 @@ QSize QuantitySpinBox::minimumSizeHint() const
|
||||
w = fm.width(s);
|
||||
#endif
|
||||
|
||||
w += 2;// cursor blinking space
|
||||
w += 2; // cursor blinking space
|
||||
w += iconHeight;
|
||||
|
||||
QStyleOptionSpinBox opt;
|
||||
@@ -1487,7 +1487,7 @@ UnsignedValidator::~UnsignedValidator()
|
||||
|
||||
QValidator::State UnsignedValidator::validate(QString& input, int&) const
|
||||
{
|
||||
QString stripped;// = input.stripWhiteSpace();
|
||||
QString stripped; // = input.stripWhiteSpace();
|
||||
if (stripped.isEmpty()) {
|
||||
return Intermediate;
|
||||
}
|
||||
@@ -1573,7 +1573,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
}// namespace Gui
|
||||
} // namespace Gui
|
||||
|
||||
// -------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ struct QuantityFormat
|
||||
|
||||
// Default denominator of minimum fractional inch. Only used in certain
|
||||
// schemas.
|
||||
static int defaultDenominator;// i.e 8 for 1/8"
|
||||
static int defaultDenominator; // i.e 8 for 1/8"
|
||||
|
||||
static inline int getDefaultDenominator()
|
||||
{
|
||||
@@ -162,7 +162,7 @@ private:
|
||||
Unit unit;
|
||||
QuantityFormat format;
|
||||
};
|
||||
}// namespace Base
|
||||
} // namespace Base
|
||||
|
||||
Q_DECLARE_METATYPE(Base::Quantity)
|
||||
|
||||
@@ -888,6 +888,6 @@ private:
|
||||
QByteArray m_sPrefName;
|
||||
QByteArray m_sPrefGrp;
|
||||
};
|
||||
}// namespace Gui
|
||||
} // namespace Gui
|
||||
|
||||
#endif// GUI_CUSTOMWIDGETS_H
|
||||
#endif // GUI_CUSTOMWIDGETS_H
|
||||
|
||||
Reference in New Issue
Block a user