Console: rename PascalCase named methods to camelCase

This commit is contained in:
bofdahof
2025-03-30 00:50:27 +10:00
committed by Kacper Donat
parent 1dbc0638c3
commit ba2c2ca5ad
497 changed files with 2423 additions and 2425 deletions

View File

@@ -94,7 +94,7 @@ PyMOD_INIT_FUNC(MatGui)
PyObject* matGuiModule = MatGui::initModule();
Base::Console().Log("Loading GUI of Material module... done\n");
Base::Console().log("Loading GUI of Material module... done\n");
MatGui::Workbench ::init();
auto manip = std::make_shared<MatGui::WorkbenchManipulator>();

View File

@@ -58,7 +58,7 @@ Array2D::Array2D(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {

View File

@@ -54,7 +54,7 @@ Array3D::Array3D(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {

View File

@@ -391,7 +391,7 @@ QVariant Array3DModel::data(const QModelIndex& index, int role) const
catch (const Materials::InvalidIndex&) {
}
catch (const std::exception& e) {
Base::Console().Error("The error message is: %s\n", e.what());
Base::Console().error("The error message is: %s\n", e.what());
}
try {
@@ -442,7 +442,7 @@ bool Array3DModel::setData(const QModelIndex& index, const QVariant& value, int
_value->setValue(index.row(), index.column(), value.value<Base::Quantity>());
}
catch (const Materials::InvalidIndex&) {
Base::Console().Error("Array3DModel::setData - InvalidIndex");
Base::Console().error("Array3DModel::setData - InvalidIndex");
}
Q_EMIT dataChanged(index, index);

View File

@@ -421,7 +421,7 @@ void DlgDisplayPropertiesImp::onChangeModeActivated(const QString& s)
void DlgDisplayPropertiesImp::onChangePlotActivated(const QString& s)
{
Base::Console().Log("Plot = %s\n", (const char*)s.toLatin1());
Base::Console().log("Plot = %s\n", (const char*)s.toLatin1());
}
/**

View File

@@ -205,7 +205,7 @@ void DlgInspectMaterial::update(std::vector<Gui::ViewProvider*>& views)
void DlgInspectMaterial::updateMaterialTree(const Materials::Material& material)
{
Base::Console().Log("Material '%s'\n", material.getName().toStdString().c_str());
Base::Console().log("Material '%s'\n", material.getName().toStdString().c_str());
auto tree = ui->treeMaterials;
auto model = qobject_cast<QStandardItemModel*>(tree->model());

View File

@@ -122,7 +122,7 @@ ImageEdit::ImageEdit(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {
@@ -141,7 +141,7 @@ ImageEdit::ImageEdit(const QString& propertyName,
}
}
else {
Base::Console().Log("No value loaded\n");
Base::Console().log("No value loaded\n");
showPixmap();
}

View File

@@ -57,14 +57,14 @@ ListEdit::ListEdit(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {
_value = _property->getList();
}
else {
Base::Console().Log("No value loaded\n");
Base::Console().log("No value loaded\n");
}
setupListView();

View File

@@ -151,7 +151,7 @@ void MaterialDelegate::setValue(QAbstractItemModel* model,
catch (const Base::ValueError& e) {
// Units mismatch
auto quantity = value.value<Base::Quantity>();
Base::Console().Log("Units mismatch '%s' = '%s', "
Base::Console().log("Units mismatch '%s' = '%s', "
"setting to default property units '%s'\n",
propertyName.toStdString().c_str(),
quantity.getUserString().c_str(),

View File

@@ -274,7 +274,7 @@ void MaterialTreeWidget::updateMaterial(const QString& uuid)
material = std::make_shared<Materials::Material>(*getMaterialManager().getMaterial(uuid));
}
catch (Materials::MaterialNotFound const&) {
Base::Console().Log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
Base::Console().log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
}
m_materialDisplay = material->getName();

View File

@@ -144,7 +144,7 @@ public:
}
void setIncludeEmptyLibraries(bool value)
{
Base::Console().Log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
Base::Console().log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
_filterOptions.setIncludeEmptyLibraries(value);
}
@@ -287,4 +287,4 @@ protected:
} // namespace MatGui
#endif // MATGUI_MATERIALTREEWIDGET_H
#endif // MATGUI_MATERIALTREEWIDGET_H

View File

@@ -394,7 +394,7 @@ void MaterialsEditor::onPhysicalAdd(bool checked)
updateMaterial();
}
else {
Base::Console().Log("No model selected\n");
Base::Console().log("No model selected\n");
}
}
@@ -440,7 +440,7 @@ void MaterialsEditor::onAppearanceAdd(bool checked)
updateMaterial();
}
else {
Base::Console().Log("No model selected\n");
Base::Console().log("No model selected\n");
}
}
@@ -590,7 +590,7 @@ void MaterialsEditor::saveMaterial()
void MaterialsEditor::accept()
{
if (_material->isOldFormat()) {
Base::Console().Log("*** Old Format File ***\n");
Base::Console().log("*** Old Format File ***\n");
oldFormatError();
return;
@@ -914,7 +914,7 @@ bool MaterialsEditor::updateTexturePreview() const
try {
auto property = _material->getAppearanceProperty(QStringLiteral("TextureImage"));
if (!property->isNull()) {
// Base::Console().Log("Has 'TextureImage'\n");
// Base::Console().log("Has 'TextureImage'\n");
auto propertyValue = property->getString();
if (!propertyValue.isEmpty()) {
QByteArray by = QByteArray::fromBase64(propertyValue.toUtf8());
@@ -931,10 +931,10 @@ bool MaterialsEditor::updateTexturePreview() const
try {
auto property = _material->getAppearanceProperty(QStringLiteral("TexturePath"));
if (!property->isNull()) {
// Base::Console().Log("Has 'TexturePath'\n");
// Base::Console().log("Has 'TexturePath'\n");
auto filePath = property->getString();
if (!image.load(filePath)) {
Base::Console().Log("Unable to load image '%s'\n",
Base::Console().log("Unable to load image '%s'\n",
filePath.toStdString().c_str());
// return; // ???
}
@@ -950,7 +950,7 @@ bool MaterialsEditor::updateTexturePreview() const
auto property = _material->getAppearanceProperty(QStringLiteral("TextureScaling"));
if (!property->isNull()) {
// scaling = property->getFloat();
// Base::Console().Log("Has 'TextureScaling' = %g\n", scaling);
// Base::Console().log("Has 'TextureScaling' = %g\n", scaling);
}
}
catch (const Materials::PropertyNotFound&) {
@@ -1262,7 +1262,7 @@ void MaterialsEditor::onSelectMaterial(const QItemSelection& selected,
_material = std::make_shared<Materials::Material>(*getMaterialManager().getMaterial(uuid));
}
catch (Materials::ModelNotFound const&) {
Base::Console().Log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
Base::Console().log("*** Unable to load material '%s'\n", uuid.toStdString().c_str());
_material = std::make_shared<Materials::Material>();
}

View File

@@ -218,7 +218,7 @@ private:
}
void setIncludeEmptyLibraries(bool value)
{
Base::Console().Log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
Base::Console().log("setIncludeEmptyLibraries(%s)\n", (value ? "true" : "false"));
_filterOptions.setIncludeEmptyLibraries(value);
}

View File

@@ -54,14 +54,14 @@ TextEdit::TextEdit(const QString& propertyName,
_property = material->getAppearanceProperty(propertyName);
}
else {
Base::Console().Log("Property '%s' not found\n", propertyName.toStdString().c_str());
Base::Console().log("Property '%s' not found\n", propertyName.toStdString().c_str());
_property = nullptr;
}
if (_property) {
_value = _property->getString();
}
else {
Base::Console().Log("No value loaded\n");
Base::Console().log("No value loaded\n");
_value = QString();
}