diff --git a/src/App/Application.cpp b/src/App/Application.cpp index 68461ae856..94ca4236a2 100644 --- a/src/App/Application.cpp +++ b/src/App/Application.cpp @@ -662,7 +662,7 @@ public: } catch (const boost::exception&) { // reported by code analyzers - Base::Console().Warning("~DocOpenGuard: Unexpected boost exception\n"); + Base::Console().warning("~DocOpenGuard: Unexpected boost exception\n"); } } } @@ -799,7 +799,7 @@ std::vector Application::openDocuments(const std::vector if (errs && isMainDoc) (*errs)[count] = e.what(); else - Base::Console().Error("Exception opening file: %s [%s]\n", name.c_str(), e.what()); + Base::Console().error("Exception opening file: %s [%s]\n", name.c_str(), e.what()); } catch (const std::exception &e) { if (!errs && isMainDoc) @@ -807,7 +807,7 @@ std::vector Application::openDocuments(const std::vector if (errs && isMainDoc) (*errs)[count] = e.what(); else - Base::Console().Error("Exception opening file: %s [%s]\n", name.c_str(), e.what()); + Base::Console().error("Exception opening file: %s [%s]\n", name.c_str(), e.what()); } catch (...) { if (errs) { @@ -1091,7 +1091,7 @@ Application::TransactionSignaller::~TransactionSignaller() { } catch (const boost::exception&) { // reported by code analyzers - Base::Console().Warning("~TransactionSignaller: Unexpected boost exception\n"); + Base::Console().warning("~TransactionSignaller: Unexpected boost exception\n"); } } } @@ -1701,21 +1701,21 @@ void Application::destruct() { // saving system parameter if (_pcSysParamMngr->IgnoreSave()) { - Base::Console().Warning("Discard system parameter\n"); + Base::Console().warning("Discard system parameter\n"); } else { - Base::Console().Log("Saving system parameter...\n"); + Base::Console().log("Saving system parameter...\n"); _pcSysParamMngr->SaveDocument(); - Base::Console().Log("Saving system parameter...done\n"); + Base::Console().log("Saving system parameter...done\n"); } // saving the User parameter if (_pcUserParamMngr->IgnoreSave()) { - Base::Console().Warning("Discard user parameter\n"); + Base::Console().warning("Discard user parameter\n"); } else { - Base::Console().Log("Saving user parameter...\n"); + Base::Console().log("Saving user parameter...\n"); _pcUserParamMngr->SaveDocument(); - Base::Console().Log("Saving user parameter...done\n"); + Base::Console().log("Saving user parameter...done\n"); } // now save all other parameter files @@ -1723,9 +1723,9 @@ void Application::destruct() for (const auto &it : paramMgr) { if ((it.second != _pcSysParamMngr) && (it.second != _pcUserParamMngr)) { if (it.second->HasSerializer() && !it.second->IgnoreSave()) { - Base::Console().Log("Saving %s...\n", it.first.c_str()); + Base::Console().log("Saving %s...\n", it.first.c_str()); it.second->SaveDocument(); - Base::Console().Log("Saving %s...done\n", it.first.c_str()); + Base::Console().log("Saving %s...done\n", it.first.c_str()); } } } @@ -1760,12 +1760,12 @@ void Application::destruct() void Application::destructObserver() { if ( _pConsoleObserverFile ) { - Base::Console().DetachObserver(_pConsoleObserverFile); + Base::Console().detachObserver(_pConsoleObserverFile); delete _pConsoleObserverFile; _pConsoleObserverFile = nullptr; } if ( _pConsoleObserverStd ) { - Base::Console().DetachObserver(_pConsoleObserverStd); + Base::Console().detachObserver(_pConsoleObserverStd); delete _pConsoleObserverStd; _pConsoleObserverStd = nullptr; } @@ -1902,7 +1902,7 @@ void my_se_translator_filter(unsigned int code, EXCEPTION_POINTERS* pExp) throw Base::AccessViolation(); case EXCEPTION_FLT_DIVIDE_BY_ZERO: case EXCEPTION_INT_DIVIDE_BY_ZERO: - Base::Console().Error("SEH exception (%u): Division by zero\n", code); + Base::Console().error("SEH exception (%u): Division by zero\n", code); return; } @@ -2365,7 +2365,7 @@ void parseProgramOptions(int ac, char ** av, const std::string& exe, boost::prog // Load the file and tokenize it std::ifstream ifs(vm["response-file"].as().c_str()); if (!ifs) { - Base::Console().Error("Could no open the response file\n"); + Base::Console().error("Could no open the response file\n"); std::stringstream str; str << "Could no open the response file: '" << vm["response-file"].as() << "'" << '\n'; @@ -2629,7 +2629,7 @@ void Application::initConfig(int argc, char ** argv) if (!pythonpath.empty()) mConfig["PythonSearchPath"] = pythonpath; else - Base::Console().Warning("Encoding of Python paths failed\n"); + Base::Console().warning("Encoding of Python paths failed\n"); // Handle the options that have impact on the init process processProgramOptions(vm, mConfig); @@ -2637,7 +2637,7 @@ void Application::initConfig(int argc, char ** argv) // Init console =========================================================== Base::PyGILStateLocker lock; _pConsoleObserverStd = new Base::ConsoleObserverStd(); - Base::Console().AttachObserver(_pConsoleObserverStd); + Base::Console().attachObserver(_pConsoleObserverStd); if (mConfig["LoggingConsole"] != "1") { _pConsoleObserverStd->bMsg = false; _pConsoleObserverStd->bLog = false; @@ -2648,7 +2648,7 @@ void Application::initConfig(int argc, char ** argv) // file logging Init =========================================================== if (mConfig["LoggingFile"] == "1") { _pConsoleObserverFile = new Base::ConsoleObserverFile(mConfig["LoggingFileName"].c_str()); - Base::Console().AttachObserver(_pConsoleObserverFile); + Base::Console().attachObserver(_pConsoleObserverFile); } else _pConsoleObserverFile = nullptr; @@ -2658,7 +2658,7 @@ void Application::initConfig(int argc, char ** argv) // Remove banner if FreeCAD is invoked via the -c command as regular // Python interpreter if (mConfig["Verbose"] != "Strict") - Base::Console().Message("%s %s, Libs: %s.%s.%s%sR%s\n%s", + Base::Console().message("%s %s, Libs: %s.%s.%s%sR%s\n%s", mConfig["ExeName"].c_str(), mConfig["ExeVersion"].c_str(), mConfig["BuildVersionMajor"].c_str(), @@ -2668,7 +2668,7 @@ void Application::initConfig(int argc, char ** argv) mConfig["BuildRevision"].c_str(), mConfig["CopyrightInfo"].c_str()); else - Base::Console().Message("%s %s, Libs: %s.%s.%s%sR%s\n", + Base::Console().message("%s %s, Libs: %s.%s.%s%sR%s\n", mConfig["ExeName"].c_str(), mConfig["ExeVersion"].c_str(), mConfig["BuildVersionMajor"].c_str(), @@ -2678,7 +2678,7 @@ void Application::initConfig(int argc, char ** argv) mConfig["BuildRevision"].c_str()); if (SafeMode::SafeModeEnabled()) { - Base::Console().Message("FreeCAD is running in _SAFE_MODE_.\n" + Base::Console().message("FreeCAD is running in _SAFE_MODE_.\n" "Safe mode temporarily disables your configurations and " "addons. Restart the application to exit safe mode.\n\n"); } @@ -2693,7 +2693,7 @@ void Application::initConfig(int argc, char ** argv) #ifndef FC_DEBUG if (v.second>=0) { hasDefault = true; - Base::Console().SetDefaultLogLevel(v.second); + Base::Console().setDefaultLogLevel(v.second); } #endif } @@ -2701,20 +2701,20 @@ void Application::initConfig(int argc, char ** argv) #ifdef FC_DEBUG if (v.second>=0) { hasDefault = true; - Base::Console().SetDefaultLogLevel(static_cast(v.second)); + Base::Console().setDefaultLogLevel(static_cast(v.second)); } #endif } else { - *Base::Console().GetLogLevel(v.first.c_str()) = static_cast(v.second); + *Base::Console().getLogLevel(v.first.c_str()) = static_cast(v.second); } } if (!hasDefault) { #ifdef FC_DEBUG - loglevelParam->SetInt("DebugDefault", Base::Console().LogLevel(-1)); + loglevelParam->SetInt("DebugDefault", Base::Console().logLevel(-1)); #else - loglevelParam->SetInt("Default", Base::Console().LogLevel(-1)); + loglevelParam->SetInt("Default", Base::Console().logLevel(-1)); #endif } @@ -2789,7 +2789,7 @@ void Application::initApplication() // creating the application if (mConfig["Verbose"] != "Strict") - Base::Console().Log("Create Application\n"); + Base::Console().log("Create Application\n"); Application::_pcSingleton = new Application(mConfig); // set up Unit system default @@ -2801,11 +2801,11 @@ void Application::initApplication() hGrp->GetInt("FracInch", Base::QuantityFormat::getDefaultDenominator())); #if defined (_DEBUG) - Base::Console().Log("Application is built with debug information\n"); + Base::Console().log("Application is built with debug information\n"); #endif // starting the init script - Base::Console().Log("Run App init script\n"); + Base::Console().log("Run App init script\n"); try { Base::Interpreter().runString(Base::ScriptFactory().ProduceScript("CMakeVariables")); Base::Interpreter().runString(Base::ScriptFactory().ProduceScript("FreeCADInit")); @@ -2840,11 +2840,11 @@ std::list Application::getCmdLineFiles() std::list Application::processFiles(const std::list& files) { std::list processed; - Base::Console().Log("Init: Processing command line files\n"); + Base::Console().log("Init: Processing command line files\n"); for (const auto & it : files) { Base::FileInfo file(it); - Base::Console().Log("Init: Processing file: %s\n",file.filePath().c_str()); + Base::Console().log("Init: Processing file: %s\n",file.filePath().c_str()); try { if (file.hasExtension("fcstd") || file.hasExtension("std")) { @@ -2880,10 +2880,10 @@ std::list Application::processFiles(const std::list& f Base::Interpreter().runStringArg("%s.open(u\"%s\")",mods.front().c_str(), escapedstr.c_str()); processed.push_back(it); - Base::Console().Log("Command line open: %s.open(u\"%s\")\n",mods.front().c_str(),escapedstr.c_str()); + Base::Console().log("Command line open: %s.open(u\"%s\")\n",mods.front().c_str(),escapedstr.c_str()); } else if (file.exists()) { - Base::Console().Warning("File format not supported: %s \n", file.filePath().c_str()); + Base::Console().warning("File format not supported: %s \n", file.filePath().c_str()); } } } @@ -2891,10 +2891,10 @@ std::list Application::processFiles(const std::list& f throw; // re-throw to main() function } catch (const Base::Exception& e) { - Base::Console().Error("Exception while processing file: %s [%s]\n", file.filePath().c_str(), e.what()); + Base::Console().error("Exception while processing file: %s [%s]\n", file.filePath().c_str(), e.what()); } catch (...) { - Base::Console().Error("Unknown exception while processing file: %s \n", file.filePath().c_str()); + Base::Console().error("Unknown exception while processing file: %s \n", file.filePath().c_str()); } } @@ -2938,14 +2938,14 @@ void Application::processCmdLineFiles() ,mods.front().c_str(),output.c_str()); } else { - Base::Console().Warning("File format not supported: %s \n", output.c_str()); + Base::Console().warning("File format not supported: %s \n", output.c_str()); } } catch (const Base::Exception& e) { - Base::Console().Error("Exception while saving to file: %s [%s]\n", output.c_str(), e.what()); + Base::Console().error("Exception while saving to file: %s [%s]\n", output.c_str(), e.what()); } catch (...) { - Base::Console().Error("Unknown exception while saving to file: %s \n", output.c_str()); + Base::Console().error("Unknown exception while saving to file: %s \n", output.c_str()); } } } @@ -2961,15 +2961,15 @@ void Application::runApplication() } else if (mConfig["RunMode"] == "Internal") { // run internal script - Base::Console().Log("Running internal script:\n"); + Base::Console().log("Running internal script:\n"); Base::Interpreter().runString(Base::ScriptFactory().ProduceScript(mConfig["ScriptFileName"].c_str())); } else if (mConfig["RunMode"] == "Exit") { // getting out - Base::Console().Log("Exiting on purpose\n"); + Base::Console().log("Exiting on purpose\n"); } else { - Base::Console().Log("Unknown Run mode (%d) in main()?!?\n\n", mConfig["RunMode"].c_str()); + Base::Console().log("Unknown Run mode (%d) in main()?!?\n\n", mConfig["RunMode"].c_str()); } } @@ -2977,10 +2977,10 @@ void Application::logStatus() { const std::string time_str = boost::posix_time::to_simple_string( boost::posix_time::second_clock::local_time()); - Base::Console().Log("Time = %s\n", time_str.c_str()); + Base::Console().log("Time = %s\n", time_str.c_str()); for (const auto & It : mConfig) { - Base::Console().Log("%s = %s\n", It.first.c_str(), It.second.c_str()); + Base::Console().log("%s = %s\n", It.first.c_str(), It.second.c_str()); } } @@ -3004,8 +3004,8 @@ void Application::LoadParameters() if (_pcSysParamMngr->LoadOrCreateDocument() && mConfig["Verbose"] != "Strict") { // Configuration file optional when using as Python module if (!Py_IsInitialized()) { - Base::Console().Warning(" Parameter does not exist, writing initial one\n"); - Base::Console().Message(" This warning normally means that FreeCAD is running for the first time\n" + Base::Console().warning(" Parameter does not exist, writing initial one\n"); + Base::Console().message(" This warning normally means that FreeCAD is running for the first time\n" " or the configuration was deleted or moved. FreeCAD is generating the standard\n" " configuration.\n"); } @@ -3013,7 +3013,7 @@ void Application::LoadParameters() } catch (const Base::Exception& e) { // try to proceed with an empty XML document - Base::Console().Error("%s in file %s.\n" + Base::Console().error("%s in file %s.\n" "Continue with an empty configuration.\n", e.what(), mConfig["SystemParameter"].c_str()); _pcSysParamMngr->CreateDocument(); @@ -3038,8 +3038,8 @@ void Application::LoadParameters() // Configuration file optional when using as Python module if (!Py_IsInitialized()) { - Base::Console().Warning(" User settings do not exist, writing initial one\n"); - Base::Console().Message(" This warning normally means that FreeCAD is running for the first time\n" + Base::Console().warning(" User settings do not exist, writing initial one\n"); + Base::Console().message(" This warning normally means that FreeCAD is running for the first time\n" " or your configuration was deleted or moved. The system defaults\n" " will be automatically generated for you.\n"); } @@ -3047,7 +3047,7 @@ void Application::LoadParameters() } catch (const Base::Exception& e) { // try to proceed with an empty XML document - Base::Console().Error("%s in file %s.\n" + Base::Console().error("%s in file %s.\n" "Continue with an empty configuration.\n", e.what(), mConfig["UserParameter"].c_str()); _pcUserParamMngr->CreateDocument(); @@ -3733,7 +3733,7 @@ void Application::getVerboseCommonInfo(QTextStream& str, const std::map= 0) { - Base::Console().SetDefaultLogLevel(l); + Base::Console().setDefaultLogLevel(l); } #endif } else if (strcmp(tag, "DebugDefault") == 0) { #ifdef FC_DEBUG if (l >= 0) { - Base::Console().SetDefaultLogLevel(l); + Base::Console().setDefaultLogLevel(l); } #endif } else { - *Base::Console().GetLogLevel(tag) = l; + *Base::Console().getLogLevel(tag) = l; } Py_INCREF(Py_None); return Py_None; @@ -1025,11 +1025,11 @@ PyObject* Application::sGetLogLevel(PyObject* /*self*/, PyObject* args) #endif } else { - int* pl = Base::Console().GetLogLevel(tag, false); + int* pl = Base::Console().getLogLevel(tag, false); l = pl ? *pl : -1; } // For performance reason, we only output integer value - return Py_BuildValue("i", Base::Console().LogLevel(l)); + return Py_BuildValue("i", Base::Console().logLevel(l)); } PY_CATCH; } diff --git a/src/App/Document.cpp b/src/App/Document.cpp index a32e88180f..594977da1c 100644 --- a/src/App/Document.cpp +++ b/src/App/Document.cpp @@ -765,7 +765,7 @@ void Document::onChanged(const Property* prop) if (!TransDirNew.exists()) { if (TransDirOld.exists()) { if (!TransDirOld.renameFile(new_dir.c_str())) { - Base::Console().Warning("Failed to rename '%s' to '%s'\n", + Base::Console().warning("Failed to rename '%s' to '%s'\n", old_dir.c_str(), new_dir.c_str()); } @@ -775,7 +775,7 @@ void Document::onChanged(const Property* prop) } else { if (!TransDirNew.createDirectories()) { - Base::Console().Warning("Failed to create '%s'\n", new_dir.c_str()); + Base::Console().warning("Failed to create '%s'\n", new_dir.c_str()); } else { this->TransientDir.setValue(new_dir); @@ -788,7 +788,7 @@ void Document::onChanged(const Property* prop) // make sure that the uuid is unique std::string uuid = this->Uid.getValueStr(); Base::Uuid id; - Base::Console().Warning("Document with the UUID '%s' already exists, change to '%s'\n", + Base::Console().warning("Document with the UUID '%s' already exists, change to '%s'\n", uuid.c_str(), id.getValue().c_str()); // recursive call of onChanged() @@ -846,7 +846,7 @@ Document::Document(const char* documentName) d->DocumentPythonObject = Py::Object(new DocumentPy(this), true); #ifdef FC_LOGUPDATECHAIN - Console().Log("+App::Document: %p\n", this); + Console().log("+App::Document: %p\n", this); #endif std::string CreationDateString = Base::Tools::currentDateTimeString(); std::string Author = App::GetApplication() @@ -942,7 +942,7 @@ Document::Document(const char* documentName) Document::~Document() { #ifdef FC_LOGUPDATECHAIN - Console().Log("-App::Document: %s %p\n", getName(), this); + Console().log("-App::Document: %s %p\n", getName(), this); #endif try { @@ -952,7 +952,7 @@ Document::~Document() } #ifdef FC_LOGUPDATECHAIN - Console().Log("-Delete Features of %s \n", getName()); + Console().log("-Delete Features of %s \n", getName()); #endif d->clearDocument(); @@ -1092,7 +1092,7 @@ void Document::Restore(Base::XMLReader& reader) addObject(type.c_str(), name.c_str(), /*isNew=*/false); } catch (Base::Exception&) { - Base::Console().Message("Cannot create object '%s'\n", name.c_str()); + Base::Console().message("Cannot create object '%s'\n", name.c_str()); } } reader.readEndElement("Features"); @@ -1128,7 +1128,7 @@ void Document::Restore(Base::XMLReader& reader) void DocumentP::checkStringHasher(const Base::XMLReader& reader) { if (reader.hasReadFailed("StringHasher.Table.txt")) { - Base::Console().Error(QT_TRANSLATE_NOOP( + Base::Console().error(QT_TRANSLATE_NOOP( "Notifications", "\nIt is recommended that the user right-click the root of " "the document and select Mark to recompute.\n" @@ -1528,7 +1528,7 @@ std::vector Document::readObjects(Base::XMLReader& reader) } } catch (const Base::Exception& e) { - Base::Console().Error("Cannot create object '%s': (%s)\n", name.c_str(), e.what()); + Base::Console().error("Cannot create object '%s': (%s)\n", name.c_str(), e.what()); } } if (!testStatus(Status::Importing)) { @@ -1575,7 +1575,7 @@ std::vector Document::readObjects(Base::XMLReader& reader) pObj->setStatus(ObjectStatus::Restore, false); if (reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInDocumentObject)) { - Base::Console().Error("Object \"%s\" was subject to a partial restore. As a result " + Base::Console().error("Object \"%s\" was subject to a partial restore. As a result " "geometry may have changed or be incomplete.\n", name.c_str()); reader.clearPartialRestoreDocumentObject(); @@ -1861,7 +1861,7 @@ private: } if (!fi.renameFile(fn.c_str())) { - Base::Console().Warning("Cannot rename project file to backup file\n"); + Base::Console().warning("Cannot rename project file to backup file\n"); } } else { @@ -1941,13 +1941,13 @@ private: try { if (!it.deleteFile()) { backupManagementError = true; - Base::Console().Warning("Cannot remove backup file : %s\n", + Base::Console().warning("Cannot remove backup file : %s\n", it.fileName().c_str()); } } catch (...) { backupManagementError = true; - Base::Console().Warning("Cannot remove backup file : %s\n", + Base::Console().warning("Cannot remove backup file : %s\n", it.fileName().c_str()); } } @@ -2009,7 +2009,7 @@ private: } if (ext >= numberOfFiles + 10) { - Base::Console().Error( + Base::Console().error( "File not saved: Cannot rename project file to backup file\n"); // throw Base::FileException("File not saved: Cannot rename project file to // backup file", fi); @@ -2021,7 +2021,7 @@ private: fi.deleteFile(); } catch (...) { - Base::Console().Warning("Cannot remove backup file: %s\n", + Base::Console().warning("Cannot remove backup file: %s\n", fi.fileName().c_str()); backupManagementError = true; } @@ -2320,7 +2320,7 @@ void Document::restore(const char* filename, Document::Restore(reader); } catch (const Base::Exception& e) { - Base::Console().Error("Invalid Document.xml: %s\n", e.what()); + Base::Console().error("Invalid Document.xml: %s\n", e.what()); setStatus(Document::RestoreError, true); } @@ -2338,7 +2338,7 @@ void Document::restore(const char* filename, if (reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestore)) { setStatus(Document::PartialRestore, true); - Base::Console().Error("There were errors while loading the file. Some data might have been " + Base::Console().error("There were errors while loading the file. Some data might have been " "modified or not recovered at all. Look above for more specific " "information about the objects involved.\n"); } @@ -3100,7 +3100,7 @@ int Document::recompute(const std::vector& objs, if (it->isError()) { const char* text = getErrorDescription(it); if (text) { - Base::Console().Error("%s: %s\n", it->Label.getValue(), text); + Base::Console().error("%s: %s\n", it->Label.getValue(), text); } } } diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index 700b9642af..f8d1228372 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -140,7 +140,7 @@ void DocumentObject::printInvalidLinks() const scopenames.pop_back(); } - Base::Console().Warning("%s: Link(s) to object(s) '%s' go out of the allowed scope '%s'. " + Base::Console().warning("%s: Link(s) to object(s) '%s' go out of the allowed scope '%s'. " "Instead, the linked object(s) reside within '%s'.\n", getTypeId().getName(), objnames.c_str(), diff --git a/src/App/ExtensionContainer.cpp b/src/App/ExtensionContainer.cpp index 9a002e576b..0068b16aed 100644 --- a/src/App/ExtensionContainer.cpp +++ b/src/App/ExtensionContainer.cpp @@ -397,17 +397,17 @@ void ExtensionContainer::saveExtensions(Base::Writer& writer) const ext->extensionSave(writer); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const std::exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const char* e) { - Base::Console().Error("%s\n", e); + Base::Console().error("%s\n", e); } #ifndef FC_DEBUG catch (...) { - Base::Console().Error( + Base::Console().error( "ExtensionContainer::Save: Unknown C++ exception thrown. Try to continue...\n"); } #endif @@ -469,17 +469,17 @@ void ExtensionContainer::restoreExtensions(Base::XMLReader& reader) throw; // re-throw } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const std::exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const char* e) { - Base::Console().Error("%s\n", e); + Base::Console().error("%s\n", e); } #ifndef FC_DEBUG catch (...) { - Base::Console().Error("ExtensionContainer::Restore: Unknown C++ exception thrown\n"); + Base::Console().error("ExtensionContainer::Restore: Unknown C++ exception thrown\n"); } #endif diff --git a/src/App/FeatureTest.cpp b/src/App/FeatureTest.cpp index 1a2ab12c21..e645193844 100644 --- a/src/App/FeatureTest.cpp +++ b/src/App/FeatureTest.cpp @@ -346,7 +346,7 @@ FeatureTestAttribute::~FeatureTestAttribute() } catch (Py::Exception& e) { e.clear(); - Base::Console().Error("Unexpected exception in ~FeatureTestRemoval()\n"); + Base::Console().error("Unexpected exception in ~FeatureTestRemoval()\n"); } } diff --git a/src/App/PropertyContainer.cpp b/src/App/PropertyContainer.cpp index c61c42f400..0171148efc 100644 --- a/src/App/PropertyContainer.cpp +++ b/src/App/PropertyContainer.cpp @@ -290,17 +290,17 @@ void PropertyContainer::Save (Base::Writer &writer) const it.second->Save(writer); } catch (const Base::Exception &e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const std::exception &e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const char* e) { - Base::Console().Error("%s\n", e); + Base::Console().error("%s\n", e); } #ifndef FC_DEBUG catch (...) { - Base::Console().Error("PropertyContainer::Save: Unknown C++ exception thrown. Try to continue...\n"); + Base::Console().error("PropertyContainer::Save: Unknown C++ exception thrown. Try to continue...\n"); } #endif writer.decInd(); // indentation for the actual property @@ -373,7 +373,7 @@ void PropertyContainer::Restore(Base::XMLReader &reader) } if (reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInProperty)) { - Base::Console().Error("Property %s of type %s was subject to a partial restore.\n",PropName.c_str(),TypeName.c_str()); + Base::Console().error("Property %s of type %s was subject to a partial restore.\n",PropName.c_str(),TypeName.c_str()); reader.clearPartialRestoreProperty(); } } @@ -383,20 +383,20 @@ void PropertyContainer::Restore(Base::XMLReader &reader) catch (const Base::RestoreError &) { reader.setPartialRestore(true); reader.clearPartialRestoreProperty(); - Base::Console().Error("Property %s of type %s was subject to a partial restore.\n",PropName.c_str(),TypeName.c_str()); + Base::Console().error("Property %s of type %s was subject to a partial restore.\n",PropName.c_str(),TypeName.c_str()); } catch (const Base::Exception &e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const std::exception &e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (const char* e) { - Base::Console().Error("%s\n", e); + Base::Console().error("%s\n", e); } #ifndef FC_DEBUG catch (...) { - Base::Console().Error("PropertyContainer::Restore: Unknown C++ exception thrown\n"); + Base::Console().error("PropertyContainer::Restore: Unknown C++ exception thrown\n"); } #endif reader.readEndElement("Property"); diff --git a/src/App/PropertyFile.cpp b/src/App/PropertyFile.cpp index 1652cb4652..0392c4db9f 100644 --- a/src/App/PropertyFile.cpp +++ b/src/App/PropertyFile.cpp @@ -509,7 +509,7 @@ Property* PropertyFileIncluded::Copy() const } // remember the new name for the Undo - Base::Console().Log("Copy '%s' to '%s'\n", _cValue.c_str(), newName.filePath().c_str()); + Base::Console().log("Copy '%s' to '%s'\n", _cValue.c_str(), newName.filePath().c_str()); prop->_cValue = newName.filePath().c_str(); // make backup files writable to avoid copying them again on undo/redo diff --git a/src/App/PropertyLinks.cpp b/src/App/PropertyLinks.cpp index dd501271cb..3a1d4f8133 100644 --- a/src/App/PropertyLinks.cpp +++ b/src/App/PropertyLinks.cpp @@ -788,14 +788,14 @@ void PropertyLink::Restore(Base::XMLReader& reader) DocumentObject* object = document ? document->getObject(name.c_str()) : nullptr; if (!object) { if (reader.isVerbose()) { - Base::Console().Warning("Lost link to '%s' while loading, maybe " + Base::Console().warning("Lost link to '%s' while loading, maybe " "an object was not loaded correctly\n", name.c_str()); } } else if (parent == object) { if (reader.isVerbose()) { - Base::Console().Warning("Object '%s' links to itself, nullify it\n", name.c_str()); + Base::Console().warning("Object '%s' links to itself, nullify it\n", name.c_str()); } object = nullptr; } @@ -2878,7 +2878,7 @@ void PropertyLinkSubList::Restore(Base::XMLReader& reader) } } else if (reader.isVerbose()) { - Base::Console().Warning("Lost link to '%s' while loading, maybe " + Base::Console().warning("Lost link to '%s' while loading, maybe " "an object was not loaded correctly\n", name.c_str()); } diff --git a/src/App/PropertyPythonObject.cpp b/src/App/PropertyPythonObject.cpp index 8b33b253da..144903f93b 100644 --- a/src/App/PropertyPythonObject.cpp +++ b/src/App/PropertyPythonObject.cpp @@ -51,7 +51,7 @@ PropertyPythonObject::~PropertyPythonObject() try { this->object = Py::Object(); } catch (Py::TypeError &) { - Base::Console().Warning("Py::TypeError Exception caught while destroying PropertyPythonObject\n"); + Base::Console().warning("Py::TypeError Exception caught while destroying PropertyPythonObject\n"); } } @@ -122,7 +122,7 @@ std::string PropertyPythonObject::toString() const } catch (Py::Exception&) { Py::String typestr(this->object.type().str()); - Base::Console().Error("PropertyPythonObject::toString(): failed for %s\n", + Base::Console().error("PropertyPythonObject::toString(): failed for %s\n", typestr.as_string().c_str()); Base::PyException e; // extract the Python error text e.reportException(); @@ -293,10 +293,10 @@ void PropertyPythonObject::restoreObject(Base::XMLReader& reader) e.clear(); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (...) { - Base::Console().Error("Critical error in PropertyPythonObject::restoreObject\n"); + Base::Console().error("Critical error in PropertyPythonObject::restoreObject\n"); } } @@ -407,7 +407,7 @@ void PropertyPythonObject::Restore(Base::XMLReader& reader) this->loadPickle(buffer); } else if (!load_failed) { - Base::Console().Warning( + Base::Console().warning( "PropertyPythonObject::Restore: unsupported serialisation: %s\n", buffer.c_str()); } diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index 385277d621..d14bf0bd06 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -442,7 +442,7 @@ void PropertyEnumeration::Restore(Base::XMLReader& reader) if (val < 0) { // If the enum is empty at this stage do not print a warning if (_enum.hasEnums()) { - Base::Console().DeveloperWarning(std::string("PropertyEnumeration"), + Base::Console().developerWarning(std::string("PropertyEnumeration"), "Enumeration index %d is out of range, ignore it\n", val); } diff --git a/src/Base/Builder3D.cpp b/src/Base/Builder3D.cpp index e356faf093..2ab928cc1c 100644 --- a/src/Base/Builder3D.cpp +++ b/src/Base/Builder3D.cpp @@ -1002,7 +1002,7 @@ void Builder3D::clear() } /** - * Save the resulting inventor 3D representation to the Console().Log() facility. + * Save the resulting inventor 3D representation to the Console().log() facility. * In DEBUG mode the Gui (if running) will trigger on that and show the representation in * the active Viewer/Document. It shows only one representation on time. If you need to * show more then one representation use saveToFile() instead. @@ -1010,9 +1010,9 @@ void Builder3D::clear() */ void Builder3D::saveToLog() { - ILogger* obs = Base::Console().Get("StatusBar"); + ILogger* obs = Base::Console().get("StatusBar"); if (obs) { - obs->SendLog("Builder3D", + obs->sendLog("Builder3D", result.str(), Base::LogStyle::Log, Base::IntendedRecipient::Developer, diff --git a/src/Base/Console.cpp b/src/Base/Console.cpp index 2bfe93b442..b8cfd89561 100644 --- a/src/Base/Console.cpp +++ b/src/Base/Console.cpp @@ -185,11 +185,11 @@ ConsoleSingleton::~ConsoleSingleton() * switches off warnings and error messages and restore the state before the modification. * If the observer \a sObs doesn't exist then nothing happens. */ -ConsoleMsgFlags ConsoleSingleton::SetEnabledMsgType(const char* sObs, +ConsoleMsgFlags ConsoleSingleton::setEnabledMsgType(const char* sObs, const ConsoleMsgFlags type, const bool on) const { - if (ILogger* pObs = Get(sObs)) { + if (ILogger* pObs = get(sObs)) { ConsoleMsgFlags flags = 0; if (type & MsgType_Err) { @@ -235,9 +235,9 @@ ConsoleMsgFlags ConsoleSingleton::SetEnabledMsgType(const char* sObs, return 0; } -bool ConsoleSingleton::IsMsgTypeEnabled(const char* sObs, const FreeCAD_ConsoleMsgType type) const +bool ConsoleSingleton::isMsgTypeEnabled(const char* sObs, const FreeCAD_ConsoleMsgType type) const { - if (const ILogger* pObs = Get(sObs)) { + if (const ILogger* pObs = get(sObs)) { switch (type) { case MsgType_Txt: return pObs->bMsg; @@ -259,7 +259,7 @@ bool ConsoleSingleton::IsMsgTypeEnabled(const char* sObs, const FreeCAD_ConsoleM return false; } -void ConsoleSingleton::SetConnectionMode(const ConnectionMode mode) +void ConsoleSingleton::setConnectionMode(const ConnectionMode mode) { connectionMode = mode; @@ -278,7 +278,7 @@ void ConsoleSingleton::SetConnectionMode(const ConnectionMode mode) * be forwarded to it. * @see ILogger */ -void ConsoleSingleton::AttachObserver(ILogger* pcObserver) +void ConsoleSingleton::attachObserver(ILogger* pcObserver) { // double insert !! assert(!_aclObservers.contains(pcObserver)); @@ -291,7 +291,7 @@ void ConsoleSingleton::AttachObserver(ILogger* pcObserver) * After detaching you can destruct the Observer or reinsert it later. * @see ILogger */ -void ConsoleSingleton::DetachObserver(ILogger* pcObserver) +void ConsoleSingleton::detachObserver(ILogger* pcObserver) { _aclObservers.erase(pcObserver); } @@ -304,7 +304,7 @@ void ConsoleSingleton::notifyPrivate(const LogStyle category, { for (ILogger* Iter : _aclObservers) { if (Iter->isActive(category)) { - Iter->SendLog(notifiername, + Iter->sendLog(notifiername, msg, category, recipient, @@ -323,11 +323,11 @@ void ConsoleSingleton::postEvent(const FreeCAD_ConsoleMsgType type, new ConsoleEvent(type, recipient, content, notifiername, msg)); } -ILogger* ConsoleSingleton::Get(const char* Name) const +ILogger* ConsoleSingleton::get(const char* Name) const { const char* OName {}; for (ILogger* Iter : _aclObservers) { - OName = Iter->Name(); // get the name + OName = Iter->name(); // get the name if (OName && strcmp(OName, Name) == 0) { return Iter; } @@ -335,7 +335,7 @@ ILogger* ConsoleSingleton::Get(const char* Name) const return nullptr; } -int* ConsoleSingleton::GetLogLevel(const char* tag, const bool create) +int* ConsoleSingleton::getLogLevel(const char* tag, const bool create) { if (!tag) { tag = ""; @@ -351,14 +351,14 @@ int* ConsoleSingleton::GetLogLevel(const char* tag, const bool create) return &ret; } -void ConsoleSingleton::Refresh() const +void ConsoleSingleton::refresh() const { if (_bCanRefresh) { qApp->processEvents(QEventLoop::ExcludeUserInputEvents); } } -void ConsoleSingleton::EnableRefresh(const bool enable) +void ConsoleSingleton::enableRefresh(const bool enable) { _bCanRefresh = enable; } @@ -376,7 +376,7 @@ void ConsoleSingleton::Destruct() _pcSingleton = nullptr; } -ConsoleSingleton& ConsoleSingleton::Instance() +ConsoleSingleton& ConsoleSingleton::instance() { // not initialized? if (!_pcSingleton) { @@ -552,8 +552,8 @@ PyObject* ConsoleSingleton::sPyMessage(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance() - .Send( + instance() + .send( notifier, "%s", msg); @@ -565,7 +565,7 @@ PyObject* ConsoleSingleton::sPyWarning(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance().Warning(notifier, "%s", msg); + instance().warning(notifier, "%s", msg); }, args); } @@ -574,8 +574,8 @@ PyObject* ConsoleSingleton::sPyDeveloperWarning(PyObject* /*self*/, PyObject* ar { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance() - .Send( + instance() + .send( notifier, "%s", msg); @@ -587,7 +587,7 @@ PyObject* ConsoleSingleton::sPyUserWarning(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance().Send( + instance().send( notifier, "%s", msg); @@ -599,7 +599,7 @@ PyObject* ConsoleSingleton::sPyTranslatedUserWarning(PyObject* /*self*/, PyObjec { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance().Send( + instance().send( notifier, "%s", msg); @@ -611,7 +611,7 @@ PyObject* ConsoleSingleton::sPyError(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance().Send( + instance().send( notifier, "%s", msg); @@ -623,8 +623,8 @@ PyObject* ConsoleSingleton::sPyDeveloperError(PyObject* /*self*/, PyObject* args { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance() - .Send( + instance() + .send( notifier, "%s", msg); @@ -636,7 +636,7 @@ PyObject* ConsoleSingleton::sPyUserError(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance().Send( + instance().send( notifier, "%s", msg); @@ -648,7 +648,7 @@ PyObject* ConsoleSingleton::sPyTranslatedUserError(PyObject* /*self*/, PyObject* { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance().Send( + instance().send( notifier, "%s", msg); @@ -660,8 +660,8 @@ PyObject* ConsoleSingleton::sPyLog(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance() - .Send( + instance() + .send( notifier, "%s", msg); @@ -673,7 +673,7 @@ PyObject* ConsoleSingleton::sPyCritical(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance().Send( + instance().send( notifier, "%s", msg); @@ -685,8 +685,8 @@ PyObject* ConsoleSingleton::sPyNotification(PyObject* /*self*/, PyObject* args) { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance() - .Send( + instance() + .send( notifier, "%s", msg); @@ -698,8 +698,8 @@ PyObject* ConsoleSingleton::sPyTranslatedNotification(PyObject* /*self*/, PyObje { return FC_PYCONSOLE_MSG( [](const std::string& notifier, const char* msg) { - Instance() - .Send( + instance() + .send( notifier, "%s", msg); @@ -718,7 +718,7 @@ PyObject* ConsoleSingleton::sPyGetStatus(PyObject* /*self*/, PyObject* args) PY_TRY { bool b = false; - const ILogger* pObs = Instance().Get(pstr1); + const ILogger* pObs = instance().get(pstr1); if (!pObs) { Py_Return; } @@ -764,7 +764,7 @@ PyObject* ConsoleSingleton::sPySetStatus(PyObject* /*self*/, PyObject* args) PY_TRY { const bool status = asBoolean(pyStatus); - if (ILogger* pObs = Instance().get(pstr1)) { + if (ILogger* pObs = instance().get(pstr1)) { if (strcmp(pstr2, "Log") == 0) { pObs->bLog = status; } @@ -806,8 +806,8 @@ PyObject* ConsoleSingleton::sPyGetObservers(PyObject* /*self*/, PyObject* args) PY_TRY { Py::List list; - for (const auto i : Instance()._aclObservers) { - list.append(Py::String(i->Name() ? i->Name() : "")); + for (const auto i : instance()._aclObservers) { + list.append(Py::String(i->name() ? i->name() : "")); } return new_reference_to(list); diff --git a/src/Base/Console.h b/src/Base/Console.h index 3e3540a4dc..619f6b3d6a 100644 --- a/src/Base/Console.h +++ b/src/Base/Console.h @@ -368,29 +368,29 @@ using PyMethodDef = struct PyMethodDef; _str << '\n'; \ Base::Console()._func(_notifier, _str.str().c_str()); \ if (_instance.refresh) \ - Base::Console().Refresh(); \ + Base::Console().refresh(); \ } \ } while (0) #define _FC_PRINT(_instance, _l, _func, _msg) \ __FC_PRINT(_instance, _l, _func, std::string(), _msg, __FILE__, __LINE__) -#define FC_MSG(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_MSG, Message, _msg) -#define FC_WARN(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_WARN, DeveloperWarning, _msg) -#define FC_ERR(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_ERR, DeveloperError, _msg) -#define FC_LOG(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_LOG, Log, _msg) -#define FC_TRACE(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_TRACE, Log, _msg) +#define FC_MSG(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_MSG, message, _msg) +#define FC_WARN(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_WARN, developerWarning, _msg) +#define FC_ERR(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_ERR, developerError, _msg) +#define FC_LOG(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_LOG, log, _msg) +#define FC_TRACE(_msg) _FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_TRACE, log, _msg) #define _FC_MSG(_file, _line, _msg) \ - __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_MSG, Message, std::string(), _msg, _file, _line) + __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_MSG, message, std::string(), _msg, _file, _line) #define _FC_WARN(_file, _line, _msg) \ - __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_WARN, DeveloperWarning, std::string(), _msg, _file, _line) + __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_WARN, developerWarning, std::string(), _msg, _file, _line) #define _FC_ERR(_file, _line, _msg) \ - __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_ERR, DeveloperError, std::string(), _msg, _file, _line) + __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_ERR, developerError, std::string(), _msg, _file, _line) #define _FC_LOG(_file, _line, _msg) \ - __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_LOG, Log, std::string(), _msg, _file, _line) + __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_LOG, log, std::string(), _msg, _file, _line) #define _FC_TRACE(_file, _line, _msg) \ - __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_TRACE, Log, std::string(), _msg, _file, _line) + __FC_PRINT(FC_LOG_INSTANCE, FC_LOGLEVEL_TRACE, log, std::string(), _msg, _file, _line) #define FC_XYZ(_pt) '(' << (_pt).X() << ", " << (_pt).Y() << ", " << (_pt).Z() << ')' #define FC_xy(_pt) '(' << (_pt).x << ", " << (_pt).y << ')' @@ -570,7 +570,7 @@ public: * translated (are untranslatable). Or conversely, may decide not to process already translated * notifications. It is up to the intended behaviour of the observer. */ - virtual void SendLog(const std::string& notifiername, + virtual void sendLog(const std::string& notifiername, const std::string& msg, LogStyle level, IntendedRecipient recipient, @@ -599,7 +599,7 @@ public: return false; } - virtual const char* Name() + virtual const char* name() { return nullptr; } @@ -622,7 +622,7 @@ public: * instance of the class from every where in c++ by simply using: * \code * #include - * Base::Console().Log("Stage: %d",i); + * Base::Console().log("Stage: %d",i); * \endcode * \par * ConsoleSingleton is able to switch between several modes to, e.g. switch @@ -654,10 +654,10 @@ public: * \endcode * * These convenience functions cover most common cases: - * - Unqualified convenience functions, such as Error() and Warning(), produce messages intended to + * - Unqualified convenience functions, such as error() and warning(), produce messages intended to * both User and Developer with an untranslated message. * - Functions qualified with Developer, such as DeveloperError are intended for a Developer and - * are untranslatable. Functions qualified with User, such as UserError are intended only for the + * are untranslatable. Functions qualified with User, such as userError are intended only for the * User and a untranslated (leaving the responsibility to the observer to find the translation). * - Functions qualified with Translated, such as TranslatedError, are intended for the User and * the message is already translated. @@ -680,7 +680,7 @@ public: * * Example: * \code - * Base::Console().UserError(this->getFullName(), QT_TRANSLATE_NOOP("Notifications", + * Base::Console().userError(this->getFullName(), QT_TRANSLATE_NOOP("Notifications", * "Impossible to migrate Parabolas!!\n")); * \endcode * @@ -688,7 +688,7 @@ public: * often the case in legacy UI code, where localized strings are already available. For these * cases the solution is to indicate the translated status. For example: * \code - * Base::Console().TranslatedUserError( + * Base::Console().translatedUserError( * this->getFullName(), * QObject::tr("The selected edge already has a Block constraint!")); * \endcode @@ -715,79 +715,79 @@ public: IntendedRecipient = IntendedRecipient::All, ContentType = ContentType::Untranslated, typename... Args> - void Send(const std::string& notifiername, const char* pMsg, Args&&... args); + void send(const std::string& notifiername, const char* pMsg, Args&&... args); /// Prints a Message template - void Message(const char* pMsg, Args&&... args); + void message(const char* pMsg, Args&&... args); /// Prints a warning Message template - void Warning(const char* pMsg, Args&&... args); + void warning(const char* pMsg, Args&&... args); /// Prints a error Message template - void Error(const char* pMsg, Args&&... args); + void error(const char* pMsg, Args&&... args); /// Prints a log Message template - void Log(const char* pMsg, Args&&... args); + void log(const char* pMsg, Args&&... args); /// Prints a Critical Message template - void Critical(const char* pMsg, Args&&... args); + void critical(const char* pMsg, Args&&... args); /// Sends a User Notification template - void UserNotification(const char* pMsg, Args&&... args); + void userNotification(const char* pMsg, Args&&... args); /// Sends an already translated User Notification template - void UserTranslatedNotification(const char* pMsg, Args&&... args); + void userTranslatedNotification(const char* pMsg, Args&&... args); /// Prints a Message with source indication template - void Message(const std::string& notifier, const char* pMsg, Args&&... args); + void message(const std::string& notifier, const char* pMsg, Args&&... args); /// Prints a warning Message with source indication template - void Warning(const std::string& notifier, const char* pMsg, Args&&... args); + void warning(const std::string& notifier, const char* pMsg, Args&&... args); template - void DeveloperWarning(const std::string& notifier, const char* pMsg, Args&&... args); + void developerWarning(const std::string& notifier, const char* pMsg, Args&&... args); template - void UserWarning(const std::string& notifier, const char* pMsg, Args&&... args); + void userWarning(const std::string& notifier, const char* pMsg, Args&&... args); template - void TranslatedUserWarning(const std::string& notifier, const char* pMsg, Args&&... args); + void translatedUserWarning(const std::string& notifier, const char* pMsg, Args&&... args); /// Prints a error Message with source indication template - void Error(const std::string& notifier, const char* pMsg, Args&&... args); + void error(const std::string& notifier, const char* pMsg, Args&&... args); template - void DeveloperError(const std::string& notifier, const char* pMsg, Args&&... args); + void developerError(const std::string& notifier, const char* pMsg, Args&&... args); template /// A noexcept DeveloperError for use in destructors. When compiled in debug, terminates via an /// assert. In release, the exception is silently caught and dropped. - void DestructorError(const std::string& notifier, const char* pMsg, Args&&... args) noexcept; + void destructorError(const std::string& notifier, const char* pMsg, Args&&... args) noexcept; template - void UserError(const std::string& notifier, const char* pMsg, Args&&... args); + void userError(const std::string& notifier, const char* pMsg, Args&&... args); template - void TranslatedUserError(const std::string& notifier, const char* pMsg, Args&&... args); + void translatedUserError(const std::string& notifier, const char* pMsg, Args&&... args); /// Prints a log Message with source indication template - void Log(const std::string& notifier, const char* pMsg, Args&&... args); + void log(const std::string& notifier, const char* pMsg, Args&&... args); /// Prints a Critical Message with source indication template - void Critical(const std::string& notifier, const char* pMsg, Args&&... args); + void critical(const std::string& notifier, const char* pMsg, Args&&... args); /// Sends a User Notification with source indication template - void UserNotification(const std::string& notifier, const char* pMsg, Args&&... args); + void userNotification(const std::string& notifier, const char* pMsg, Args&&... args); /// Sends an already translated User Notification with source indication template - void UserTranslatedNotification(const std::string& notifier, const char* pMsg, Args&&... args); + void userTranslatedNotification(const std::string& notifier, const char* pMsg, Args&&... args); // Notify a message directly to observers template - void Notify(const std::string& notifiername, const std::string& msg); + void notify(const std::string& notifiername, const std::string& msg); /// Attaches an Observer to FCConsole - void AttachObserver(ILogger* pcObserver); + void attachObserver(ILogger* pcObserver); /// Detaches an Observer from FCConsole - void DetachObserver(ILogger* pcObserver); + void detachObserver(ILogger* pcObserver); /// enumeration for the console modes enum ConsoleMode @@ -811,33 +811,33 @@ public: }; /// Enables or disables message types of a certain console observer - ConsoleMsgFlags SetEnabledMsgType(const char* sObs, ConsoleMsgFlags type, bool on) const; + ConsoleMsgFlags setEnabledMsgType(const char* sObs, ConsoleMsgFlags type, bool on) const; /// Checks if message types of a certain console observer are enabled - bool IsMsgTypeEnabled(const char* sObs, FreeCAD_ConsoleMsgType type) const; - void SetConnectionMode(ConnectionMode mode); + bool isMsgTypeEnabled(const char* sObs, FreeCAD_ConsoleMsgType type) const; + void setConnectionMode(ConnectionMode mode); - int* GetLogLevel(const char* tag, bool create = true); + int* getLogLevel(const char* tag, bool create = true); - void SetDefaultLogLevel(const int level) + void setDefaultLogLevel(const int level) { _defaultLogLevel = level; } - int LogLevel(const int level) const + int logLevel(const int level) const { return level < 0 ? _defaultLogLevel : level; } /// singleton - static ConsoleSingleton& Instance(); + static ConsoleSingleton& instance(); // retrieval of an observer by name - ILogger* Get(const char* Name) const; + ILogger* get(const char* Name) const; static PyMethodDef Methods[]; - void Refresh() const; - void EnableRefresh(bool enable); + void refresh() const; + void enableRefresh(bool enable); constexpr FreeCAD_ConsoleMsgType getConsoleMsg(LogStyle style); @@ -905,7 +905,7 @@ private: */ inline ConsoleSingleton& Console() { - return ConsoleSingleton::Instance(); + return ConsoleSingleton::instance(); } constexpr ConsoleSingleton::FreeCAD_ConsoleMsgType ConsoleSingleton::getConsoleMsg(LogStyle style) @@ -926,12 +926,12 @@ class BaseExport ConsoleRefreshDisabler public: ConsoleRefreshDisabler() { - Console().EnableRefresh(false); + Console().enableRefresh(false); } ~ConsoleRefreshDisabler() { - Console().EnableRefresh(true); + Console().enableRefresh(true); } ConsoleRefreshDisabler(const ConsoleRefreshDisabler&) = delete; @@ -960,7 +960,7 @@ public: const bool add_eol = true, const bool refresh = false) : tag(tag) - , lvl(*Console().GetLogLevel(tag)) + , lvl(*Console().getLogLevel(tag)) , print_tag(print_tag) , print_src(print_src) , print_time(print_time) @@ -975,7 +975,7 @@ public: int level() const { - return Console().LogLevel(lvl); + return Console().logLevel(lvl); } std::stringstream& prefix(std::stringstream& str, const char* src, int line); @@ -1000,92 +1000,92 @@ public: * @see UserTranslatedNotification */ template -void Base::ConsoleSingleton::Message(const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::message(const char* pMsg, Args&&... args) { - Message(std::string(""), pMsg, std::forward(args)...); + message(std::string(""), pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Message(const std::string& notifier, const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::message(const std::string& notifier, const char* pMsg, Args&&... args) { - Send(notifier, pMsg, std::forward(args)...); + send(notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Warning(const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::warning(const char* pMsg, Args&&... args) { - Warning(std::string(""), pMsg, std::forward(args)...); + warning(std::string(""), pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Warning(const std::string& notifier, const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::warning(const std::string& notifier, const char* pMsg, Args&&... args) { - Send(notifier, pMsg, std::forward(args)...); + send(notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::DeveloperWarning(const std::string& notifier, +void Base::ConsoleSingleton::developerWarning(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::UserWarning(const std::string& notifier, +void Base::ConsoleSingleton::userWarning(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::TranslatedUserWarning(const std::string& notifier, +void Base::ConsoleSingleton::translatedUserWarning(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Error(const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::error(const char* pMsg, Args&&... args) { - Error(std::string(""), pMsg, std::forward(args)...); + error(std::string(""), pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Error(const std::string& notifier, const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::error(const std::string& notifier, const char* pMsg, Args&&... args) { - Send(notifier, pMsg, std::forward(args)...); + send(notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::DeveloperError(const std::string& notifier, +void Base::ConsoleSingleton::developerError(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::DestructorError(const std::string& notifier, +void Base::ConsoleSingleton::destructorError(const std::string& notifier, const char* pMsg, Args&&... args) noexcept { try { - Send( + send( notifier, pMsg, std::forward(args)...); @@ -1096,90 +1096,90 @@ void Base::ConsoleSingleton::DestructorError(const std::string& notifier, } template -void Base::ConsoleSingleton::UserError(const std::string& notifier, +void Base::ConsoleSingleton::userError(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::TranslatedUserError(const std::string& notifier, +void Base::ConsoleSingleton::translatedUserError(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Critical(const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::critical(const char* pMsg, Args&&... args) { - Critical(std::string(""), pMsg, std::forward(args)...); + critical(std::string(""), pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Critical(const std::string& notifier, const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::critical(const std::string& notifier, const char* pMsg, Args&&... args) { - Send(notifier, pMsg, std::forward(args)...); + send(notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::UserNotification(const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::userNotification(const char* pMsg, Args&&... args) { - UserNotification(std::string(""), pMsg, std::forward(args)...); + userNotification(std::string(""), pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::UserNotification(const std::string& notifier, +void Base::ConsoleSingleton::userNotification(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::UserTranslatedNotification(const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::userTranslatedNotification(const char* pMsg, Args&&... args) { - UserTranslatedNotification(std::string(""), pMsg, std::forward(args)...); + userTranslatedNotification(std::string(""), pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::UserTranslatedNotification(const std::string& notifier, +void Base::ConsoleSingleton::userTranslatedNotification(const std::string& notifier, const char* pMsg, Args&&... args) { - Send( + send( notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Log(const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::log(const char* pMsg, Args&&... args) { - Log(std::string(""), pMsg, std::forward(args)...); + log(std::string(""), pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Log(const std::string& notifier, const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::log(const std::string& notifier, const char* pMsg, Args&&... args) { - Send(notifier, pMsg, std::forward(args)...); + send(notifier, pMsg, std::forward(args)...); } template -void Base::ConsoleSingleton::Send(const std::string& notifiername, const char* pMsg, Args&&... args) +void Base::ConsoleSingleton::send(const std::string& notifiername, const char* pMsg, Args&&... args) { std::string format; try { @@ -1194,7 +1194,7 @@ void Base::ConsoleSingleton::Send(const std::string& notifiername, const char* p } if (connectionMode == Direct) { - Notify(notifiername, format); + notify(notifiername, format); } else { @@ -1207,7 +1207,7 @@ void Base::ConsoleSingleton::Send(const std::string& notifiername, const char* p template -void Base::ConsoleSingleton::Notify(const std::string& notifiername, const std::string& msg) +void Base::ConsoleSingleton::notify(const std::string& notifiername, const std::string& msg) { notifyPrivate(category, recipient, contenttype, notifiername, msg); } diff --git a/src/Base/ConsoleObserver.cpp b/src/Base/ConsoleObserver.cpp index 8b862991ba..4b50fc70fb 100644 --- a/src/Base/ConsoleObserver.cpp +++ b/src/Base/ConsoleObserver.cpp @@ -48,7 +48,7 @@ ConsoleObserverFile::ConsoleObserverFile(const char* sFileName) : cFileStream(Base::FileInfo(sFileName)) // can be in UTF8 { if (!cFileStream.is_open()) { - Console().Warning("Cannot open log file '%s'.\n", sFileName); + Console().warning("Cannot open log file '%s'.\n", sFileName); } // mark the file as a UTF-8 encoded file unsigned char bom[3] = {0xef, 0xbb, 0xbf}; @@ -60,7 +60,7 @@ ConsoleObserverFile::~ConsoleObserverFile() cFileStream.close(); } -void ConsoleObserverFile::SendLog(const std::string& notifiername, +void ConsoleObserverFile::sendLog(const std::string& notifiername, const std::string& msg, LogStyle level, IntendedRecipient recipient, @@ -113,7 +113,7 @@ ConsoleObserverStd::ConsoleObserverStd() ConsoleObserverStd::~ConsoleObserverStd() = default; -void ConsoleObserverStd::SendLog(const std::string& notifiername, +void ConsoleObserverStd::sendLog(const std::string& notifiername, const std::string& msg, LogStyle level, IntendedRecipient recipient, @@ -261,7 +261,7 @@ int RedirectStdOutput::sync() { // Print as log as this might be verbose if (!buffer.empty() && buffer.back() == '\n') { - Base::Console().Log("%s", buffer.c_str()); + Base::Console().log("%s", buffer.c_str()); buffer.clear(); } return 0; @@ -284,7 +284,7 @@ int RedirectStdLog::sync() { // Print as log as this might be verbose if (!buffer.empty() && buffer.back() == '\n') { - Base::Console().Log("%s", buffer.c_str()); + Base::Console().log("%s", buffer.c_str()); buffer.clear(); } return 0; @@ -306,7 +306,7 @@ int RedirectStdError::overflow(int ch) int RedirectStdError::sync() { if (!buffer.empty() && buffer.back() == '\n') { - Base::Console().Error("%s", buffer.c_str()); + Base::Console().error("%s", buffer.c_str()); buffer.clear(); } return 0; diff --git a/src/Base/ConsoleObserver.h b/src/Base/ConsoleObserver.h index cdf37cc2e6..1392e5f92d 100644 --- a/src/Base/ConsoleObserver.h +++ b/src/Base/ConsoleObserver.h @@ -43,12 +43,12 @@ public: explicit ConsoleObserverFile(const char* sFileName); ~ConsoleObserverFile() override; - void SendLog(const std::string& notifiername, + void sendLog(const std::string& notifiername, const std::string& msg, LogStyle level, IntendedRecipient recipient, ContentType content) override; - const char* Name() override + const char* name() override { return "File"; } @@ -70,12 +70,12 @@ class BaseExport ConsoleObserverStd: public ILogger public: ConsoleObserverStd(); ~ConsoleObserverStd() override; - void SendLog(const std::string& notifiername, + void sendLog(const std::string& notifiername, const std::string& msg, LogStyle level, IntendedRecipient recipient, ContentType content) override; - const char* Name() override + const char* name() override { return "Console"; } @@ -127,20 +127,20 @@ private: ILoggerBlocker::ILoggerBlocker(const char* co, ConsoleMsgFlags msgTypes) : conObs(co) { - msgTypesBlocked = Console().SetEnabledMsgType(conObs, msgTypes, false); + msgTypesBlocked = Console().setEnabledMsgType(conObs, msgTypes, false); } ILoggerBlocker::~ILoggerBlocker() { try { #ifdef FC_DEBUG - auto debug = Console().SetEnabledMsgType(conObs, msgTypesBlocked, true); + auto debug = Console().setEnabledMsgType(conObs, msgTypesBlocked, true); if (debug != msgTypesBlocked) { - Console().Warning( + Console().warning( "Enabled message types have been changed while ILoggerBlocker was set\n"); } #else - Console().SetEnabledMsgType(conObs, msgTypesBlocked, true); + Console().setEnabledMsgType(conObs, msgTypesBlocked, true); #endif } catch (...) { diff --git a/src/Base/Debugger.cpp b/src/Base/Debugger.cpp index 302b4f9311..99c1573d48 100644 --- a/src/Base/Debugger.cpp +++ b/src/Base/Debugger.cpp @@ -66,7 +66,7 @@ bool Debugger::eventFilter(QObject* /*watched*/, QEvent* event) int Debugger::exec() { if (isAttached) { - Base::Console().Message("TO CONTINUE PRESS ANY KEY...\n"); + Base::Console().message("TO CONTINUE PRESS ANY KEY...\n"); } return loop.exec(); } diff --git a/src/Base/DualQuaternion.h b/src/Base/DualQuaternion.h index cef6394663..37d09c24c5 100644 --- a/src/Base/DualQuaternion.h +++ b/src/Base/DualQuaternion.h @@ -130,7 +130,7 @@ public: // DEBUG // void print() const { - // Console().Log("%f, %f, %f, %f; %f, %f, %f, %f", x.re,y.re,z.re,w.re, x.du,y.du,z.du, + // Console().log("%f, %f, %f, %f; %f, %f, %f, %f", x.re,y.re,z.re,w.re, x.du,y.du,z.du, // w.du); // } }; diff --git a/src/Base/Factory.cpp b/src/Base/Factory.cpp index c3967f43f2..35717b1110 100644 --- a/src/Base/Factory.cpp +++ b/src/Base/Factory.cpp @@ -99,7 +99,7 @@ const char* ScriptFactorySingleton::ProduceScript(const char* sScriptName) const if (!script) { #ifdef FC_DEBUG - Console().Warning("\"%s\" is not registered\n", sScriptName); + Console().warning("\"%s\" is not registered\n", sScriptName); #endif return ""; // no data } diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp index 8538d395f4..6a27225b36 100644 --- a/src/Base/Interpreter.cpp +++ b/src/Base/Interpreter.cpp @@ -130,7 +130,7 @@ void PyException::reportException() const // set sys.last_vars to make post-mortem debugging work PyGILStateLocker locker; PySys_SetObject("last_traceback", PP_last_traceback); - Console().DeveloperError("pyException", + Console().developerError("pyException", "%s%s: %s\n", _stackTrace.c_str(), _errorType.c_str(), diff --git a/src/Base/Observer.h b/src/Base/Observer.h index ba94365bd0..f6ced06289 100644 --- a/src/Base/Observer.h +++ b/src/Base/Observer.h @@ -85,7 +85,7 @@ public: * and returns the name of the observer. Needed to use the Get * Method of the Subject. */ - virtual const char* Name() + virtual const char* name() { return nullptr; } @@ -122,7 +122,7 @@ public: virtual ~Subject() { if (_ObserverSet.size() > 0) { - Base::Console().DeveloperWarning(std::string("~Subject()"), + Base::Console().developerWarning(std::string("~Subject()"), "Not detached all observers yet\n"); } } @@ -139,7 +139,7 @@ public: size_t count = _ObserverSet.size(); _ObserverSet.insert(ToObserv); if (_ObserverSet.size() == count) { - Base::Console().DeveloperWarning(std::string("Subject::Attach"), + Base::Console().developerWarning(std::string("Subject::Attach"), "Observer %p already attached\n", static_cast(ToObserv)); } @@ -160,7 +160,7 @@ public: size_t count = _ObserverSet.size(); _ObserverSet.erase(ToObserv); if (_ObserverSet.size() == count) { - Base::Console().DeveloperWarning(std::string("Subject::Detach"), + Base::Console().developerWarning(std::string("Subject::Detach"), "Observer %p already detached\n", static_cast(ToObserv)); } @@ -184,17 +184,17 @@ public: (*Iter)->OnChange(*this, rcReason); // send OnChange-signal } catch (Base::Exception& e) { - Base::Console().Error("Unhandled Base::Exception caught when notifying observer.\n" + Base::Console().error("Unhandled Base::Exception caught when notifying observer.\n" "The error message is: %s\n", e.what()); } catch (std::exception& e) { - Base::Console().Error("Unhandled std::exception caught when notifying observer\n" + Base::Console().error("Unhandled std::exception caught when notifying observer\n" "The error message is: %s\n", e.what()); } catch (...) { - Base::Console().Error( + Base::Console().error( "Unhandled unknown exception caught in when notifying observer.\n"); } } @@ -210,7 +210,7 @@ public: for (typename std::set*>::iterator Iter = _ObserverSet.begin(); Iter != _ObserverSet.end(); ++Iter) { - OName = (*Iter)->Name(); // get the name + OName = (*Iter)->name(); // get the name if (OName && strcmp(OName, Name) == 0) { return *Iter; } diff --git a/src/Base/Parameter.cpp b/src/Base/Parameter.cpp index 9a7ca96709..980e0bd776 100644 --- a/src/Base/Parameter.cpp +++ b/src/Base/Parameter.cpp @@ -366,7 +366,7 @@ ParameterGrp::CreateElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* Start, != 0 && XMLString::compareString(Start->getNodeName(), XStrLiteral("FCParameters").unicodeForm()) != 0) { - Base::Console().Warning("CreateElement: %s cannot have the element %s of type %s\n", + Base::Console().warning("CreateElement: %s cannot have the element %s of type %s\n", StrX(Start->getNodeName()).c_str(), Name, Type); @@ -1447,7 +1447,7 @@ ParameterGrp::FindElement(XERCES_CPP_NAMESPACE_QUALIFIER DOMElement* Start, != 0 && XMLString::compareString(Start->getNodeName(), XStrLiteral("FCParameters").unicodeForm()) != 0) { - Base::Console().Warning("FindElement: %s cannot have the element %s of type %s\n", + Base::Console().warning("FindElement: %s cannot have the element %s of type %s\n", StrX(Start->getNodeName()).c_str(), Name, Type); @@ -2082,7 +2082,7 @@ void ParameterManager::CheckDocument() const XercesDOMParser parser; Grammar* grammar = parser.loadGrammar(xsdFile, Grammar::SchemaGrammarType, true); if (!grammar) { - Base::Console().Error("Grammar file cannot be loaded.\n"); + Base::Console().error("Grammar file cannot be loaded.\n"); return; } @@ -2099,7 +2099,7 @@ void ParameterManager::CheckDocument() const parser.parse(xmlFile); if (parser.getErrorCount() > 0) { - Base::Console().Error("Unexpected XML structure detected: %zu errors\n", + Base::Console().error("Unexpected XML structure detected: %zu errors\n", parser.getErrorCount()); } } diff --git a/src/Base/PyObjectBase.cpp b/src/Base/PyObjectBase.cpp index a90ac36e88..daf17e75a8 100644 --- a/src/Base/PyObjectBase.cpp +++ b/src/Base/PyObjectBase.cpp @@ -68,7 +68,7 @@ PyObjectBase::PyObjectBase(void* voidp, PyTypeObject *T) #endif _Py_NewReference(this); #ifdef FC_LOGPYOBJECTS - Base::Console().Log("PyO+: %s (%p)\n",T->tp_name, this); + Base::Console().log("PyO+: %s (%p)\n",T->tp_name, this); #endif StatusBits.set(Valid); // valid, the second bit is NOT set, i.e. it's mutable StatusBits.set(Notify); @@ -79,7 +79,7 @@ PyObjectBase::~PyObjectBase() { PyGILStateLocker lock; #ifdef FC_LOGPYOBJECTS - Base::Console().Log("PyO-: %s (%p)\n",Py_TYPE(this)->tp_name, this); + Base::Console().log("PyO-: %s (%p)\n",Py_TYPE(this)->tp_name, this); #endif // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast) if (baseProxy && reinterpret_cast(baseProxy)->baseobject == this) { @@ -462,7 +462,7 @@ PyObject *PyObjectBase::_repr() std::stringstream a; a << ""; # ifdef FCDebug - Console().Log("PyObjectBase::_repr() not overwritten representation!"); + Console().log("PyObjectBase::_repr() not overwritten representation!"); # endif return Py_BuildValue("s", a.str().c_str()); } diff --git a/src/Base/Reader.cpp b/src/Base/Reader.cpp index f9765d32e9..f2632e0664 100644 --- a/src/Base/Reader.cpp +++ b/src/Base/Reader.cpp @@ -440,7 +440,7 @@ void Base::XMLReader::readFiles(zipios::ZipInputStream& zipstream) const // less data than the file size would allow. // All what we need to do is to notify the user about the // failure. - Base::Console().Error("Reading failed from embedded file: %s\n", + Base::Console().error("Reading failed from embedded file: %s\n", entry->toString().c_str()); FailedFiles.push_back(jt->FileName); } diff --git a/src/Base/Type.cpp b/src/Base/Type.cpp index 63eb34245a..c86ed6a687 100644 --- a/src/Base/Type.cpp +++ b/src/Base/Type.cpp @@ -125,7 +125,7 @@ void Type::importModule(const char* typeName) // lets load the module Interpreter().loadModule(mod.c_str()); #ifdef FC_LOGLOADMODULE - Console().Log("Act: Module %s loaded through class %s \n", Mod.c_str(), typeName); + Console().log("Act: Module %s loaded through class %s \n", Mod.c_str(), typeName); #endif loadModuleSet.insert(mod); } diff --git a/src/Base/Type.h b/src/Base/Type.h index 0527a493c8..ed7599c83b 100644 --- a/src/Base/Type.h +++ b/src/Base/Type.h @@ -63,7 +63,7 @@ struct TypeData; // do something.. } else { - Base::Console().Warning("getRightFeature", "Unknown feature type %s!\n", + Base::Console().warning("getRightFeature", "Unknown feature type %s!\n", anode->getTypeId().getName()); } } diff --git a/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp b/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp index 4ad1006204..6cec21e5d0 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventLinux.cpp @@ -40,18 +40,18 @@ Gui::GuiNativeEvent::GuiNativeEvent(Gui::GUIApplicationNativeEventAware *app) Gui::GuiNativeEvent::~GuiNativeEvent() { if (spnav_close()) - Base::Console().Log("Couldn't disconnect from spacenav daemon\n"); + Base::Console().log("Couldn't disconnect from spacenav daemon\n"); else - Base::Console().Log("Disconnected from spacenav daemon\n"); + Base::Console().log("Disconnected from spacenav daemon\n"); } void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) { Q_UNUSED(window) if (spnav_open() == -1) { - Base::Console().Log("Couldn't connect to spacenav daemon. Please ignore if you don't have a spacemouse.\n"); + Base::Console().log("Couldn't connect to spacenav daemon. Please ignore if you don't have a spacemouse.\n"); } else { - Base::Console().Log("Connected to spacenav daemon\n"); + Base::Console().log("Connected to spacenav daemon\n"); QSocketNotifier* SpacenavNotifier = new QSocketNotifier(spnav_fd(), QSocketNotifier::Read, this); connect(SpacenavNotifier, SIGNAL(activated(int)), this, SLOT(pollSpacenav())); mainApp->setSpaceballPresent(true); diff --git a/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp b/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp index f6bd8a955f..97d2cbb153 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventLinuxX11.cpp @@ -58,21 +58,21 @@ Gui::GuiNativeEvent::GuiNativeEvent(Gui::GUIApplicationNativeEventAware *app) Gui::GuiNativeEvent::~GuiNativeEvent() { if (spnav_close()) - Base::Console().Log("Couldn't disconnect from spacenav daemon\n"); + Base::Console().log("Couldn't disconnect from spacenav daemon\n"); else - Base::Console().Log("Disconnected from spacenav daemon\n"); + Base::Console().log("Disconnected from spacenav daemon\n"); } void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) { if (!QX11Info::isPlatformX11()) { - Base::Console().Log("Application is not running on X11\n"); + Base::Console().log("Application is not running on X11\n"); return; } if (spnav_x11_open(QX11Info::display(), window->winId()) == -1) { - Base::Console().Log("Couldn't connect to spacenav daemon on X11. Please ignore if you don't have a spacemouse.\n"); + Base::Console().log("Couldn't connect to spacenav daemon on X11. Please ignore if you don't have a spacemouse.\n"); } else { - Base::Console().Log("Connected to spacenav daemon on X11\n"); + Base::Console().log("Connected to spacenav daemon on X11\n"); mainApp->setSpaceballPresent(true); mainApp->installNativeEventFilter(new Gui::RawInputEventFilter(&xcbEventFilter)); } @@ -138,7 +138,7 @@ bool Gui::GuiNativeEvent::xcbEventFilter(void *xcb_void, long* result) return true; } default: - Base::Console().Log("Unknown spaceball event\n"); + Base::Console().log("Unknown spaceball event\n"); return true; } // end switch (navEvent.type) { } diff --git a/src/Gui/3Dconnexion/GuiNativeEventMac.cpp b/src/Gui/3Dconnexion/GuiNativeEventMac.cpp index c64462646f..776a05b9c3 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventMac.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventMac.cpp @@ -59,7 +59,7 @@ Gui::GuiNativeEvent::tdx_drv_handler(io_connect_t connection, static bool firstTime = true; if (firstTime) { firstTime = false; - Base::Console().Log("Call connexion handler\n"); + Base::Console().log("Call connexion handler\n"); } Q_UNUSED(connection) //printf("tdx_drv_handler\n"); @@ -75,7 +75,7 @@ Gui::GuiNativeEvent::tdx_drv_handler(io_connect_t connection, * assigned id when the connection to the driver was established. */ //printf("msg->client: %d, tdxClientID: %d\n", msg->client, tdxClientID); - Base::Console().Log("msg->client: %d, msg->command: %d\n", msg->client, msg->command); + Base::Console().log("msg->client: %d, msg->command: %d\n", msg->client, msg->command); if (msg->client == tdxClientID) { switch (msg->command) { @@ -139,7 +139,7 @@ Gui::GuiNativeEvent::~GuiNativeEvent() if (tdxClientID) UnregisterConnexionClient(tdxClientID); CleanupConnexionHandlers(); - Base::Console().Log("Disconnected from 3Dconnexion driver\n"); + Base::Console().log("Disconnected from 3Dconnexion driver\n"); } } @@ -150,7 +150,7 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) /* make sure the framework is installed */ if (SetConnexionHandlers == NULL) { - Base::Console().Log("3Dconnexion framework not found!\n"); + Base::Console().log("3Dconnexion framework not found!\n"); return; } /* install 3dx message handler in order to receive driver events */ @@ -158,7 +158,7 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) assert(err == 0); if (err) { - Base::Console().Log("Error installing 3Dconnexion handler\n"); + Base::Console().log("Error installing 3Dconnexion handler\n"); return; } /* register our app with the driver */ @@ -169,7 +169,7 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) kConnexionMaskAll ); if (tdxClientID == 0) { - Base::Console().Log("Couldn't connect to 3Dconnexion driver\n"); + Base::Console().log("Couldn't connect to 3Dconnexion driver\n"); return; } @@ -177,7 +177,7 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow *window) SetConnexionClientMask(tdxClientID, kConnexionMaskAll); SetConnexionClientButtonMask(tdxClientID, kConnexionMaskAllButtons); - Base::Console().Log("3Dconnexion driver initialized. Client ID: %d\n", tdxClientID); + Base::Console().log("3Dconnexion driver initialized. Client ID: %d\n", tdxClientID); mainApp->setSpaceballPresent(true); } diff --git a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp index fab331926a..8ab68da1e9 100644 --- a/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp +++ b/src/Gui/3Dconnexion/GuiNativeEventWin32.cpp @@ -262,7 +262,7 @@ Gui::GuiNativeEvent::~GuiNativeEvent() { if (gMouseInput == this) { gMouseInput = 0; - Base::Console().Log("3Dconnexion device detached.\n"); + Base::Console().log("3Dconnexion device detached.\n"); } } @@ -277,14 +277,14 @@ void Gui::GuiNativeEvent::initSpaceball(QMainWindow *mainWindow) gMouseInput = this; qApp->installNativeEventFilter( new Gui::RawInputEventFilter(Gui::GuiNativeEvent::RawInputEventFilter)); - Base::Console().Log("3Dconnexion device initialized.\n"); + Base::Console().log("3Dconnexion device initialized.\n"); } else { - Base::Console().Log("3Dconnexion device is attached, but not initialized.\n"); + Base::Console().log("3Dconnexion device is attached, but not initialized.\n"); } } else { - Base::Console().Log("3Dconnexion device not attached.\n"); + Base::Console().log("3Dconnexion device not attached.\n"); } } diff --git a/src/Gui/Action.cpp b/src/Gui/Action.cpp index c9b9705cb8..395095c408 100644 --- a/src/Gui/Action.cpp +++ b/src/Gui/Action.cpp @@ -553,7 +553,7 @@ QList ActionGroup::actions() const int ActionGroup::checkedAction() const { auto checked = groupAction()->checkedAction(); - + return actions().indexOf(checked); } @@ -680,7 +680,7 @@ void WorkbenchGroup::refreshWorkbenchList() QString tip = Application::Instance->workbenchToolTip(wbName); QAction* action = getOrCreateAction(wbName); - + groupAction()->addAction(action); action->setText(name); @@ -1083,7 +1083,7 @@ void RecentMacrosAction::setFiles(const QStringList& files) " Recent Macros menu -> Keyboard Modifiers this should be Ctrl+Shift+" " by default, if this is now blank then you should revert it back to" " Ctrl+Shift+ by pressing both keys at the same time."); - Base::Console().Warning("%s\n", qPrintable(msgMain)); + Base::Console().warning("%s\n", qPrintable(msgMain)); } } diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 7e0367fda8..1fbef607ed 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -586,7 +586,7 @@ Application::Application(bool GUIenabled) Application::~Application() { - Base::Console().Log("Destruct Gui::Application\n"); + Base::Console().log("Destruct Gui::Application\n"); #ifdef USE_3DCONNEXION_NAVLIB delete pNavlibInterface; #endif @@ -917,7 +917,7 @@ void Application::slotDeleteDocument(const App::Document& Doc) { std::map::iterator doc = d->documents.find(&Doc); if (doc == d->documents.end()) { - Base::Console().Log("GUI document '%s' already deleted\n", Doc.getName()); + Base::Console().log("GUI document '%s' already deleted\n", Doc.getName()); return; } @@ -1166,13 +1166,13 @@ void Application::onLastWindowClosed(Gui::Document* pcDoc) e.reportException(); } catch (const std::exception& e) { - Base::Console().Error( + Base::Console().error( "Unhandled std::exception caught in Application::onLastWindowClosed.\n" "The error message is: %s\n", e.what()); } catch (...) { - Base::Console().Error( + Base::Console().error( "Unhandled unknown exception caught in Application::onLastWindowClosed.\n"); } } @@ -1339,7 +1339,7 @@ void Application::setActiveDocument(Gui::Document* pcDocument) Base::Interpreter().runString(nameGui.c_str()); } catch (const Base::Exception& e) { - Base::Console().Warning(e.what()); + Base::Console().warning(e.what()); return; } @@ -1347,12 +1347,12 @@ void Application::setActiveDocument(Gui::Document* pcDocument) // May be useful for error detection if (d->activeDocument) { App::Document* doc = d->activeDocument->getDocument(); - Base::Console().Log("Active document is %s (at %p)\n", + Base::Console().log("Active document is %s (at %p)\n", doc->getName(), static_cast(doc)); } else { - Base::Console().Log("No active document\n"); + Base::Console().log("No active document\n"); } #endif @@ -1435,7 +1435,7 @@ void Application::viewActivated(MDIView* pcView) { #ifdef FC_DEBUG // May be useful for error detection - Base::Console().Log("Active view is %s (at %p)\n", + Base::Console().log("Active view is %s (at %p)\n", (const char*)pcView->windowTitle().toUtf8(), static_cast(pcView)); #endif @@ -1683,12 +1683,12 @@ bool Application::activateWorkbench(const char* name) match = rx.match(msg); } - Base::Console().Error("%s\n", (const char*)msg.toUtf8()); + Base::Console().error("%s\n", (const char*)msg.toUtf8()); if (!d->startingUp) { - Base::Console().Error("%s\n", e.getStackTrace().c_str()); + Base::Console().error("%s\n", e.getStackTrace().c_str()); } else { - Base::Console().Log("%s\n", e.getStackTrace().c_str()); + Base::Console().log("%s\n", e.getStackTrace().c_str()); } if (!d->startingUp) { @@ -1979,20 +1979,20 @@ void messageHandler(QtMsgType type, const QMessageLogContext& context, const QSt case QtInfoMsg: case QtDebugMsg: #ifdef FC_DEBUG - Base::Console().Message("%s\n", output.constData()); + Base::Console().message("%s\n", output.constData()); #else // do not stress user with Qt internals but write to log file if enabled - Base::Console().Log("%s\n", output.constData()); + Base::Console().log("%s\n", output.constData()); #endif break; case QtWarningMsg: - Base::Console().Warning("%s\n", output.constData()); + Base::Console().warning("%s\n", output.constData()); break; case QtCriticalMsg: - Base::Console().Error("%s\n", output.constData()); + Base::Console().error("%s\n", output.constData()); break; case QtFatalMsg: - Base::Console().Error("%s\n", output.constData()); + Base::Console().error("%s\n", output.constData()); abort(); // deliberately core dump } #ifdef FC_OS_WIN32 @@ -2010,13 +2010,13 @@ void messageHandlerCoin(const SoError* error, void* /*userdata*/) const char* msg = error->getDebugString().getString(); switch (dbg->getSeverity()) { case SoDebugError::INFO: - Base::Console().Message("%s\n", msg); + Base::Console().message("%s\n", msg); break; case SoDebugError::WARNING: - Base::Console().Warning("%s\n", msg); + Base::Console().warning("%s\n", msg); break; default: // error - Base::Console().Error("%s\n", msg); + Base::Console().error("%s\n", msg); break; } #ifdef FC_OS_WIN32 @@ -2027,7 +2027,7 @@ void messageHandlerCoin(const SoError* error, void* /*userdata*/) } else if (error) { const char* msg = error->getDebugString().getString(); - Base::Console().Log(msg); + Base::Console().log(msg); } } @@ -2046,7 +2046,7 @@ void Application::initApplication() { static bool init = false; if (init) { - Base::Console().Error("Tried to run Gui::Application::initApplication() twice!\n"); + Base::Console().error("Tried to run Gui::Application::initApplication() twice!\n"); return; } @@ -2230,7 +2230,7 @@ void tryRunEventLoop(GUISingleApplication& mainApp) try { boost::interprocess::file_lock flock(filename.c_str()); if (flock.try_lock()) { - Base::Console().Log("Init: Executing event loop...\n"); + Base::Console().log("Init: Executing event loop...\n"); QApplication::exec(); // Qt can't handle exceptions thrown from event handlers, so we need @@ -2246,13 +2246,13 @@ void tryRunEventLoop(GUISingleApplication& mainApp) fi.deleteFile(); } else { - Base::Console().Warning("Failed to create a file lock for the IPC.\n" + Base::Console().warning("Failed to create a file lock for the IPC.\n" "The application will be terminated\n"); } } catch (const boost::interprocess::interprocess_exception& e) { QString msg = QString::fromLocal8Bit(e.what()); - Base::Console().Warning("Failed to create a file lock for the IPC: %s\n", + Base::Console().warning("Failed to create a file lock for the IPC: %s\n", msg.toUtf8().constData()); } } @@ -2263,18 +2263,18 @@ void runEventLoop(GUISingleApplication& mainApp) tryRunEventLoop(mainApp); } catch (const Base::SystemExitException&) { - Base::Console().Message("System exit\n"); + Base::Console().message("System exit\n"); throw; } catch (const std::exception& e) { // catching nasty stuff coming out of the event loop - Base::Console().Error("Event loop left through unhandled exception: %s\n", e.what()); + Base::Console().error("Event loop left through unhandled exception: %s\n", e.what()); App::Application::destructObserver(); throw; } catch (...) { // catching nasty stuff coming out of the event loop - Base::Console().Error("Event loop left through unknown unhandled exception\n"); + Base::Console().error("Event loop left through unknown unhandled exception\n"); App::Application::destructObserver(); throw; } @@ -2286,7 +2286,7 @@ void Application::runApplication() StartupProcess::setupApplication(); // A new QApplication - Base::Console().Log("Init: Creating Gui::Application and QApplication\n"); + Base::Console().log("Init: Creating Gui::Application and QApplication\n"); int argc = App::Application::GetARGC(); GUISingleApplication mainApp(argc, App::Application::GetARGV()); @@ -2328,7 +2328,7 @@ void Application::runApplication() QTimer::singleShot(0, &mw, SLOT(delayedStartup())); // run the Application event loop - Base::Console().Log("Init: Entering event loop\n"); + Base::Console().log("Init: Entering event loop\n"); // boot phase reference point // https://forum.freecad.org/viewtopic.php?f=10&t=21665 @@ -2342,7 +2342,7 @@ void Application::runApplication() runEventLoop(mainApp); - Base::Console().Log("Finish: Event loop left\n"); + Base::Console().log("Finish: Event loop left\n"); } bool Application::hiddenMainWindow() @@ -2502,7 +2502,7 @@ QString Application::replaceVariablesInQss(QString qssText) qssText = qssText.replace(QStringLiteral("@ThemeAccentColor2"), accentColor2); qssText = qssText.replace(QStringLiteral("@ThemeAccentColor3"), accentColor3); - // Base::Console().Warning("%s\n", qssText.toStdString()); + // Base::Console().warning("%s\n", qssText.toStdString()); return qssText; } @@ -2519,7 +2519,7 @@ void Application::checkForDeprecatedSettings() ->GetBool("UseFCBakExtension", true); if (!useFCBakExtension) { // TODO: This should be translated - Base::Console().Warning("The `.FCStd#` backup format is deprecated and may " + Base::Console().warning("The `.FCStd#` backup format is deprecated and may " "be removed in future versions.\n" "To update, check the 'Preferences->General->Document->Use " "date and FCBak extension' option.\n"); @@ -2544,7 +2544,7 @@ void Application::checkForPreviousCrashes() } catch (const boost::interprocess::interprocess_exception& e) { QString msg = QString::fromLocal8Bit(e.what()); - Base::Console().Warning("Failed check for previous crashes because of IPC error: %s\n", + Base::Console().warning("Failed check for previous crashes because of IPC error: %s\n", msg.toUtf8().constData()); } } diff --git a/src/Gui/ApplicationPy.cpp b/src/Gui/ApplicationPy.cpp index 6384187a62..f198251d75 100644 --- a/src/Gui/ApplicationPy.cpp +++ b/src/Gui/ApplicationPy.cpp @@ -661,7 +661,7 @@ PyObject* ApplicationPy::sOpen(PyObject * /*self*/, PyObject *args) FileHandler handler(fileName); if (!handler.openFile()) { QString ext = handler.extension(); - Base::Console().Error("File type '%s' not supported\n", ext.toLatin1().constData()); + Base::Console().error("File type '%s' not supported\n", ext.toLatin1().constData()); } } PY_CATCH; @@ -685,7 +685,7 @@ PyObject* ApplicationPy::sInsert(PyObject * /*self*/, PyObject *args) FileHandler handler(fileName); if (!handler.importFile(std::string(DocName ? DocName : ""))) { QString ext = handler.extension(); - Base::Console().Error("File type '%s' not supported\n", ext.toLatin1().constData()); + Base::Console().error("File type '%s' not supported\n", ext.toLatin1().constData()); } } PY_CATCH; @@ -787,7 +787,7 @@ PyObject* ApplicationPy::sExport(PyObject * /*self*/, PyObject *args) } } else { - Base::Console().Error("File type '%s' not supported\n", ext.toLatin1().constData()); + Base::Console().error("File type '%s' not supported\n", ext.toLatin1().constData()); } } PY_CATCH; @@ -806,7 +806,7 @@ PyObject* ApplicationPy::sSendActiveView(PyObject * /*self*/, PyObject *args) const char* ppReturn = nullptr; if (!Application::Instance->sendMsgToActiveView(psCommandStr,&ppReturn)) { if (!Base::asBoolean(suppress)) { - Base::Console().Warning("Unknown view command: %s\n",psCommandStr); + Base::Console().warning("Unknown view command: %s\n",psCommandStr); } } @@ -830,7 +830,7 @@ PyObject* ApplicationPy::sSendFocusView(PyObject * /*self*/, PyObject *args) const char* ppReturn = nullptr; if (!Application::Instance->sendMsgToFocusView(psCommandStr,&ppReturn)) { if (!Base::asBoolean(suppress)) { - Base::Console().Warning("Unknown view command: %s\n",psCommandStr); + Base::Console().warning("Unknown view command: %s\n",psCommandStr); } } diff --git a/src/Gui/Assistant.cpp b/src/Gui/Assistant.cpp index 947d40c6c0..d4f577da8d 100644 --- a/src/Gui/Assistant.cpp +++ b/src/Gui/Assistant.cpp @@ -106,7 +106,7 @@ bool Assistant::startAssistant() static bool first = true; if (first) { - Base::Console().Log("Help file at %s\n", (const char*)qhc.toUtf8()); + Base::Console().log("Help file at %s\n", (const char*)qhc.toUtf8()); first = false; } @@ -175,13 +175,13 @@ bool Assistant::startAssistant() void Assistant::readyReadStandardOutput() { QByteArray data = proc->readAllStandardOutput(); - Base::Console().Log("Help view: %s\n", data.constData()); + Base::Console().log("Help view: %s\n", data.constData()); } void Assistant::readyReadStandardError() { QByteArray data = proc->readAllStandardError(); - Base::Console().Log("Help view: %s\n", data.constData()); + Base::Console().log("Help view: %s\n", data.constData()); } #include "moc_Assistant.cpp" diff --git a/src/Gui/AutoSaver.cpp b/src/Gui/AutoSaver.cpp index e3c2d18408..6228221486 100644 --- a/src/Gui/AutoSaver.cpp +++ b/src/Gui/AutoSaver.cpp @@ -222,7 +222,7 @@ void AutoSaver::saveDocument(const std::string& name, AutoSaveProperty& saver) } } - Base::Console().Log("Save AutoRecovery file in %fs\n", Base::TimeElapsed::diffTimeF(startTime,Base::TimeElapsed())); + Base::Console().log("Save AutoRecovery file in %fs\n", Base::TimeElapsed::diffTimeF(startTime,Base::TimeElapsed())); hGrp->SetBool("SaveThumbnail",save); } } @@ -238,7 +238,7 @@ void AutoSaver::timerEvent(QTimerEvent * event) break; } catch (...) { - Base::Console().Error("Failed to auto-save document '%s'\n", it.first.c_str()); + Base::Console().error("Failed to auto-save document '%s'\n", it.first.c_str()); } } } diff --git a/src/Gui/BitmapFactory.cpp b/src/Gui/BitmapFactory.cpp index 0bb4f6c5eb..dfbe670102 100644 --- a/src/Gui/BitmapFactory.cpp +++ b/src/Gui/BitmapFactory.cpp @@ -271,7 +271,7 @@ QPixmap BitmapFactoryInst::pixmap(const char* name) const return icon; } - Base::Console().Warning("Cannot find icon: %s\n", name); + Base::Console().warning("Cannot find icon: %s\n", name); return QPixmap(Gui::BitmapFactory().pixmapFromSvg("help-browser", QSize(16, 16))); } diff --git a/src/Gui/CallTips.cpp b/src/Gui/CallTips.cpp index 44e2599489..159d16d4bc 100644 --- a/src/Gui/CallTips.cpp +++ b/src/Gui/CallTips.cpp @@ -392,7 +392,7 @@ void CallTipsList::extractTipsFromObject(Py::Object& obj, Py::List& list, QMapposition.setValue(basePosition - viewAdjust + riftPosition); - //Base::Console().Log("Eye(%d) Pos: %f, %f, %f ViewAdjust: %f, %f, %f \n",eye, eyePose[eye].Position.x, + //Base::Console().log("Eye(%d) Pos: %f, %f, %f ViewAdjust: %f, %f, %f \n",eye, eyePose[eye].Position.x, // eyePose[eye].Position.y, // eyePose[eye].Position.z, // eyeRenderDesc[eye].ViewAdjust.x, diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 550b5fa2f3..4c01a4040c 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -402,7 +402,7 @@ void Command::invoke(int i, TriggerSource trigger) // Do not query _pcAction since it isn't created necessarily #ifdef FC_LOGUSERACTION - Base::Console().Log("CmdG: %s\n",sName); + Base::Console().log("CmdG: %s\n",sName); #endif _invoke(i, bCanLog && !_busy); @@ -488,14 +488,14 @@ void Command::_invoke(int id, bool disablelog) QMessageBox::critical(Gui::getMainWindow(), QObject::tr("Exception"), QLatin1String(e.what())); } catch (std::exception &e) { - Base::Console().Error("C++ exception thrown (%s)\n", e.what()); + Base::Console().error("C++ exception thrown (%s)\n", e.what()); } catch (const char* e) { - Base::Console().Error("%s\n", e); + Base::Console().error("%s\n", e); } #ifndef FC_DEBUG catch (...) { - Base::Console().Error("Gui::Command::activated(%d): Unknown C++ exception thrown\n", id); + Base::Console().error("Gui::Command::activated(%d): Unknown C++ exception thrown\n", id); } #endif } @@ -667,7 +667,7 @@ void Command::_doCommand(const char *file, int line, DoCmd_Type eType, const cha QByteArray format = cmd.toUtf8(); #ifdef FC_LOGUSERACTION - Base::Console().Log("CmdC: %s\n", format.constData()); + Base::Console().log("CmdC: %s\n", format.constData()); #endif _runCommand(file,line,eType,format.constData()); @@ -955,7 +955,7 @@ void Command::printConflictingAccelerators() const { auto cmd = Application::Instance->commandManager().checkAcceleratorForConflicts(sAccel, this); if (cmd) - Base::Console().Warning("Accelerator conflict between %s (%s) and %s (%s)\n", sName, sAccel, cmd->sName, cmd->sAccel); + Base::Console().warning("Accelerator conflict between %s (%s) and %s (%s)\n", sName, sAccel, cmd->sName, cmd->sAccel); } Action * Command::createAction() @@ -1322,11 +1322,11 @@ void PythonCommand::activated(int iMsg) } } catch (const Base::PyException& e) { - Base::Console().Error("Running the Python command '%s' failed:\n%s\n%s", + Base::Console().error("Running the Python command '%s' failed:\n%s\n%s", sName, e.getStackTrace().c_str(), e.what()); } catch (const Base::Exception&) { - Base::Console().Error("Running the Python command '%s' failed, try to resume",sName); + Base::Console().error("Running the Python command '%s' failed, try to resume",sName); } } else { @@ -1395,7 +1395,7 @@ Action * PythonCommand::createAction() } } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } return pcAction; @@ -1559,7 +1559,7 @@ void PythonGroupCommand::activated(int iMsg) catch(Py::Exception&) { Base::PyGILStateLocker lock; Base::PyException e; - Base::Console().Error("Running the Python command '%s' failed:\n%s\n%s", + Base::Console().error("Running the Python command '%s' failed:\n%s\n%s", sName, e.getStackTrace().c_str(), e.what()); } } @@ -1645,7 +1645,7 @@ Action * PythonGroupCommand::createAction() catch(Py::Exception&) { Base::PyGILStateLocker lock; Base::PyException e; - Base::Console().Error("createAction() of the Python command '%s' failed:\n%s\n%s", + Base::Console().error("createAction() of the Python command '%s' failed:\n%s\n%s", sName, e.getStackTrace().c_str(), e.what()); } @@ -1878,9 +1878,9 @@ bool CommandManager::addTo(const char* Name, QWidget *pcWidget) if (_sCommands.find(Name) == _sCommands.end()) { // Print in release mode only a log message instead of an error message to avoid to annoy the user #ifdef FC_DEBUG - Base::Console().Error("CommandManager::addTo() try to add an unknown command (%s) to a widget!\n",Name); + Base::Console().error("CommandManager::addTo() try to add an unknown command (%s) to a widget!\n",Name); #else - Base::Console().Warning("Unknown command '%s'\n",Name); + Base::Console().warning("Unknown command '%s'\n",Name); #endif return false; } diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index a4e810e020..3fc5199174 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -1365,7 +1365,7 @@ void StdCmdDelete::activated(int iMsg) for(auto &sel : sels) { auto obj = sel.getObject(); if (obj == nullptr){ - Base::Console().DeveloperWarning("StdCmdDelete::activated", + Base::Console().developerWarning("StdCmdDelete::activated", "App::DocumentObject pointer is nullptr\n"); continue; } diff --git a/src/Gui/CommandT.h b/src/Gui/CommandT.h index 6294f32702..5715c48dfb 100644 --- a/src/Gui/CommandT.h +++ b/src/Gui/CommandT.h @@ -262,10 +262,10 @@ void cmdAppDocumentArgs(const App::Document* doc, const std::string& cmd, Args&& doc->getName(), _cmd.c_str()); } catch (const std::exception& e) { - Base::Console().DeveloperError(doc->Label.getStrValue(),"%s: %s\n", e.what(), cmd.c_str()); + Base::Console().developerError(doc->Label.getStrValue(),"%s: %s\n", e.what(), cmd.c_str()); } catch (const Base::Exception&) { - Base::Console().DeveloperError(doc->Label.getStrValue(),"App.getDocument('%s').%s\n", + Base::Console().developerError(doc->Label.getStrValue(),"App.getDocument('%s').%s\n", doc->getName(), _cmd.c_str()); throw; } @@ -385,10 +385,10 @@ void cmdAppObjectArgs(const App::DocumentObject* obj, const std::string& cmd, Ar obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str()); } catch (const std::exception& e) { - Base::Console().DeveloperError(obj->getFullLabel(),"%s: %s\n", e.what(), cmd.c_str()); + Base::Console().developerError(obj->getFullLabel(),"%s: %s\n", e.what(), cmd.c_str()); } catch (const Base::Exception&) { - Base::Console().DeveloperError(obj->getFullLabel(),"App.getDocument('%s').getObject('%s').%s\n", + Base::Console().developerError(obj->getFullLabel(),"App.getDocument('%s').getObject('%s').%s\n", obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str()); throw; } @@ -410,10 +410,10 @@ void cmdGuiObjectArgs(const App::DocumentObject* obj, const std::string& cmd, Ar obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str()); } catch (const std::exception& e) { - Base::Console().DeveloperError(obj->getFullLabel(),"%s: %s\n", e.what(), cmd.c_str()); + Base::Console().developerError(obj->getFullLabel(),"%s: %s\n", e.what(), cmd.c_str()); } catch (const Base::Exception&) { - Base::Console().DeveloperError(obj->getFullLabel(),"Gui.getDocument('%s').getObject('%s').%s\n", + Base::Console().developerError(obj->getFullLabel(),"Gui.getDocument('%s').getObject('%s').%s\n", obj->getDocument()->getName(), obj->getNameInDocument(), _cmd.c_str()); throw; } @@ -443,10 +443,10 @@ void doCommandT(Gui::Command::DoCmd_Type cmdType, const std::string& cmd, Args&& Gui::Command::doCommand(cmdType,"%s", _cmd.c_str()); } catch (const std::exception& e) { - Base::Console().DeveloperError("doCommandT","%s: %s\n", e.what(), cmd.c_str()); + Base::Console().developerError("doCommandT","%s: %s\n", e.what(), cmd.c_str()); } catch (const Base::Exception&) { - Base::Console().DeveloperError("doCommandT","%s\n", _cmd.c_str()); + Base::Console().developerError("doCommandT","%s\n", _cmd.c_str()); throw; } } diff --git a/src/Gui/CommandTest.cpp b/src/Gui/CommandTest.cpp index 00f3888803..1828080a13 100644 --- a/src/Gui/CommandTest.cpp +++ b/src/Gui/CommandTest.cpp @@ -588,7 +588,7 @@ public: } this->deleteLater(); - Base::Console().Message("Thread with %d steps finished\n",this->steps); + Base::Console().message("Thread with %d steps finished\n",this->steps); } private: @@ -728,7 +728,7 @@ public: int matchLog{0}; int matchCritical{0}; TestConsoleObserver() = default; - void SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, + void sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) override{ (void) notifiername; @@ -765,7 +765,7 @@ public: void run() override { for (int i=0; i<10; i++) - Base::Console().Message("Write a message to the console output.\n"); + Base::Console().message("Write a message to the console output.\n"); } }; @@ -775,7 +775,7 @@ public: void run() override { for (int i=0; i<10; i++) - Base::Console().Warning("Write a warning to the console output.\n"); + Base::Console().warning("Write a warning to the console output.\n"); } }; @@ -785,7 +785,7 @@ public: void run() override { for (int i=0; i<10; i++) - Base::Console().Error("Write an error to the console output.\n"); + Base::Console().error("Write an error to the console output.\n"); } }; @@ -795,7 +795,7 @@ public: void run() override { for (int i=0; i<10; i++) - Base::Console().Log("Write a log to the console output.\n"); + Base::Console().log("Write a log to the console output.\n"); } }; @@ -805,7 +805,7 @@ public: void run() override { for (int i=0; i<10; i++) - Base::Console().Critical("Write a critical message to the console output.\n"); + Base::Console().critical("Write a critical message to the console output.\n"); } }; @@ -815,17 +815,17 @@ void CmdTestConsoleOutput::activated(int iMsg) { Q_UNUSED(iMsg); TestConsoleObserver obs; - Base::Console().AttachObserver(&obs); + Base::Console().attachObserver(&obs); QThreadPool::globalInstance()->start(new ConsoleMessageTask); QThreadPool::globalInstance()->start(new ConsoleWarningTask); QThreadPool::globalInstance()->start(new ConsoleErrorTask); QThreadPool::globalInstance()->start(new ConsoleLogTask); QThreadPool::globalInstance()->start(new ConsoleCriticalTask); QThreadPool::globalInstance()->waitForDone(); - Base::Console().DetachObserver(&obs); + Base::Console().detachObserver(&obs); if (obs.matchMsg > 0 || obs.matchWrn > 0 || obs.matchErr > 0 || obs.matchLog > 0 || obs.matchCritical > 0) { - Base::Console().Error("Race condition in Console class\n"); + Base::Console().error("Race condition in Console class\n"); } } diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 42d6fcd2cd..c2498240ad 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -2523,7 +2523,7 @@ void StdCmdViewIvIssueCamPos::activated(int iMsg) Temp += Temp2; Temp += "\")"; - Base::Console().Message("%s\n",Temp2.c_str()); + Base::Console().message("%s\n",Temp2.c_str()); getGuiApplication()->macroManager()->addLine(MacroManager::Gui,Temp.c_str()); } @@ -2612,7 +2612,7 @@ public: { if (currentSelectionHandler) { - Base::Console().Message("SelectionCallbackHandler: A selection handler already active."); + Base::Console().message("SelectionCallbackHandler: A selection handler already active."); return; } diff --git a/src/Gui/DAGView/DAGModel.cpp b/src/Gui/DAGView/DAGModel.cpp index d608194d58..f27aa085b0 100644 --- a/src/Gui/DAGView/DAGModel.cpp +++ b/src/Gui/DAGView/DAGModel.cpp @@ -546,7 +546,7 @@ void Model::updateSlot() } catch(const boost::not_a_dag &) { - Base::Console().Error("not a dag exception in DAGView::Model::updateSlot()\n"); + Base::Console().error("not a dag exception in DAGView::Model::updateSlot()\n"); //do not continuously report an error for cyclic graphs graphDirty = false; return; diff --git a/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp b/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp index 5336840d02..70a92a304a 100644 --- a/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp +++ b/src/Gui/Dialogs/DlgCustomizeSpaceball.cpp @@ -186,7 +186,7 @@ void ButtonModel::load3DConnexionButtons(const char *RequiredDeviceName) catch (const std::exception& e) { // We don't mind not finding the file to be opened - Base::Console().Warning("%s\n", e.what()); + Base::Console().warning("%s\n", e.what()); } } @@ -201,7 +201,7 @@ QVariant ButtonModel::data (const QModelIndex &index, int role) const GroupVector groupVector = spaceballButtonGroup()->GetGroups(); if (index.row() >= (int)groupVector.size()) { - Base::Console().Log("index error in ButtonModel::data\n"); + Base::Console().log("index error in ButtonModel::data\n"); return {}; } if (role == Qt::DisplayRole) @@ -913,7 +913,7 @@ QStringList DlgCustomizeSpaceball::getModels() catch (const std::exception& e) { // We don't mind not finding the file to be opened - Base::Console().Warning("%s\n", e.what()); + Base::Console().warning("%s\n", e.what()); } return modelList; diff --git a/src/Gui/Dialogs/DlgMacroExecuteImp.cpp b/src/Gui/Dialogs/DlgMacroExecuteImp.cpp index 16647db174..cf90e85acd 100644 --- a/src/Gui/Dialogs/DlgMacroExecuteImp.cpp +++ b/src/Gui/Dialogs/DlgMacroExecuteImp.cpp @@ -645,7 +645,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto groupBox7 = setupCustomMacrosPage->findChild(QStringLiteral("GroupBox7")); if (!groupBox7) { - Base::Console().Warning("Toolbar walkthrough: Unable to find groupBox7\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find groupBox7\n"); // just warn when not a fatal error } else { @@ -658,7 +658,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto buttonAddAction = setupCustomMacrosPage->findChild(QStringLiteral("buttonAddAction")); if (!buttonAddAction) { - Base::Console().Warning("Toolbar walkthrough: Unable to find buttonAddAction\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find buttonAddAction\n"); } else { buttonAddAction->setStyleSheet(QStringLiteral("color:red")); @@ -667,7 +667,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto macroListBox = setupCustomMacrosPage->findChild(QStringLiteral("actionMacros")); if (!macroListBox) { - Base::Console().Warning("Toolbar walkthrough: Unable to find actionMacros combo box\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find actionMacros combo box\n"); } else { int macroIndex = macroListBox->findText(fn); // fn is the macro filename @@ -678,7 +678,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto menuText = setupCustomMacrosPage->findChild(QStringLiteral("actionMenu")); if (!menuText) { - Base::Console().Warning("Toolbar walkthrough: Unable to find actionMenu menuText\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find actionMenu menuText\n"); } else { menuText->setText(bareFileName); // user can fill in other fields, e.g. tooltip @@ -714,7 +714,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto moveActionRightButton = setupToolbarPage->findChild(QStringLiteral("moveActionRightButton")); if (!moveActionRightButton) { - Base::Console().Warning("Toolbar walkthrough: Unable to find moveActionRightButton\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find moveActionRightButton\n"); } else { moveActionRightButton->setStyleSheet(QStringLiteral("background-color: red")); @@ -728,7 +728,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto workbenchBox = setupToolbarPage->findChild(QStringLiteral("workbenchBox")); if (!workbenchBox) { - Base::Console().Warning("Toolbar walkthrough: Unable to find workbenchBox\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find workbenchBox\n"); } else { /** find the Global workbench and select it for the user **/ @@ -739,14 +739,14 @@ Note: your changes will be applied when you next switch workbenches\n")); setupToolbarPage->activateWorkbenchBox(globalIdx); } else { - Base::Console().Warning("Toolbar walkthrough: Unable to find Global workbench\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find Global workbench\n"); } if (!hasCustomToolbar) { auto newButton = setupToolbarPage->findChild(QStringLiteral("newButton")); if (!newButton) { - Base::Console().Warning("Toolbar walkthrough: Unable to find newButton\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find newButton\n"); } else { newButton->setStyleSheet(QStringLiteral("color:red")); @@ -760,7 +760,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto label = setupToolbarPage->findChild(QStringLiteral("label")); if (!label) { - Base::Console().Warning("Toolbar walkthrough: Unable to find label\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find label\n"); } else { label->setText(instructions2); @@ -770,7 +770,7 @@ Note: your changes will be applied when you next switch workbenches\n")); /** find Macros category and select it for the user **/ auto categoryBox = setupToolbarPage->findChild(QStringLiteral("categoryBox")); if (!categoryBox) { - Base::Console().Warning("Toolbar walkthrough: Unable to find categoryBox\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find categoryBox\n"); } else { int macrosIdx = categoryBox->findText(tr("Macros")); @@ -778,7 +778,7 @@ Note: your changes will be applied when you next switch workbenches\n")); categoryBox->setCurrentIndex(macrosIdx); } else { - Base::Console().Warning("Toolbar walkthrough: Unable to find Macros in categoryBox\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find Macros in categoryBox\n"); } } @@ -786,7 +786,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto toolbarTreeWidget = setupToolbarPage->findChild(QStringLiteral("toolbarTreeWidget")); if (!toolbarTreeWidget) { - Base::Console().Warning("Toolbar walkthrough: Unable to find toolbarTreeWidget\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find toolbarTreeWidget\n"); } else { toolbarTreeWidget->expandAll(); @@ -799,7 +799,7 @@ Note: your changes will be applied when you next switch workbenches\n")); auto commandTreeWidget = setupToolbarPage->findChild(QStringLiteral("commandTreeWidget")); if (!commandTreeWidget) { - Base::Console().Warning("Toolbar walkthrough: Unable to find commandTreeWidget\n"); + Base::Console().warning("Toolbar walkthrough: Unable to find commandTreeWidget\n"); } else { if (!hasMacroCommand) { // will be the last in the list, the one just created diff --git a/src/Gui/Dialogs/DlgPreferencesImp.cpp b/src/Gui/Dialogs/DlgPreferencesImp.cpp index 9929302b5c..d451d534e1 100644 --- a/src/Gui/Dialogs/DlgPreferencesImp.cpp +++ b/src/Gui/Dialogs/DlgPreferencesImp.cpp @@ -317,8 +317,7 @@ void DlgPreferencesImp::createPageInGroup(PreferencesPageItem *groupItem, const PreferencePage* page = createPreferencePage(pageName, groupItem->data(GroupNameRole).toString().toStdString()); if (!page) { - Base::Console().Warning("%s is not a preference page\n", pageName.c_str()); - + Base::Console().warning("%s is not a preference page\n", pageName.c_str()); return; } @@ -344,11 +343,11 @@ void DlgPreferencesImp::createPageInGroup(PreferencesPageItem *groupItem, const addSizeHint(page); } catch (const Base::Exception& e) { - Base::Console().Error("Base exception thrown for '%s'\n", pageName.c_str()); + Base::Console().error("Base exception thrown for '%s'\n", pageName.c_str()); e.reportException(); } catch (const std::exception& e) { - Base::Console().Error("C++ exception thrown for '%s' (%s)\n", pageName.c_str(), e.what()); + Base::Console().error("C++ exception thrown for '%s' (%s)\n", pageName.c_str(), e.what()); } } diff --git a/src/Gui/Dialogs/DlgRevertToBackupConfigImp.cpp b/src/Gui/Dialogs/DlgRevertToBackupConfigImp.cpp index 5f9df07c99..10e9f9f375 100644 --- a/src/Gui/Dialogs/DlgRevertToBackupConfigImp.cpp +++ b/src/Gui/Dialogs/DlgRevertToBackupConfigImp.cpp @@ -99,7 +99,7 @@ void DlgRevertToBackupConfigImp::accept() { auto items = ui->listWidget->selectedItems(); if (items.count() != 1) { - Base::Console().Error(tr("No selection in dialog, cannot load backup file").toStdString().c_str()); + Base::Console().error(tr("No selection in dialog, cannot load backup file").toStdString().c_str()); return; } auto item = items[0]; @@ -111,7 +111,7 @@ void DlgRevertToBackupConfigImp::accept() newParameters->GetGroup("BaseApp")->copyTo(baseAppGroup); } else { - Base::Console().Error("Preference Pack Internal Error: Invalid backup file location"); + Base::Console().error("Preference Pack Internal Error: Invalid backup file location"); } QDialog::accept(); diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index b31b1f520c..41b1311c98 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -1722,7 +1722,7 @@ void Document::RestoreDocFile(Base::Reader &reader) } } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } } @@ -2181,7 +2181,7 @@ void Document::detachView(Gui::BaseView* pcView, bool bPassiv) void Document::onUpdate() { #ifdef FC_LOGUPDATECHAIN - Base::Console().Log("Acti: Gui::Document::onUpdate()"); + Base::Console().log("Acti: Gui::Document::onUpdate()"); #endif std::list::iterator it; @@ -2198,7 +2198,7 @@ void Document::onUpdate() void Document::onRelabel() { #ifdef FC_LOGUPDATECHAIN - Base::Console().Log("Acti: Gui::Document::onRelabel()"); + Base::Console().log("Acti: Gui::Document::onRelabel()"); #endif std::list::iterator it; diff --git a/src/Gui/DocumentRecovery.cpp b/src/Gui/DocumentRecovery.cpp index 4af53f9bb4..539cddecbe 100644 --- a/src/Gui/DocumentRecovery.cpp +++ b/src/Gui/DocumentRecovery.cpp @@ -677,7 +677,7 @@ void DocumentRecoveryHandler::checkForPreviousCrashes(const std::functionhasFocus()) { diff --git a/src/Gui/GuiApplication.cpp b/src/Gui/GuiApplication.cpp index df39c0baf9..1df75a274f 100644 --- a/src/Gui/GuiApplication.cpp +++ b/src/Gui/GuiApplication.cpp @@ -71,7 +71,7 @@ GUIApplication::~GUIApplication() = default; bool GUIApplication::notify (QObject * receiver, QEvent * event) { if (!receiver) { - Base::Console().Log("GUIApplication::notify: Unexpected null receiver, event type: %d\n", + Base::Console().log("GUIApplication::notify: Unexpected null receiver, event type: %d\n", (int)event->type()); return false; } @@ -98,15 +98,15 @@ bool GUIApplication::notify (QObject * receiver, QEvent * event) return true; } catch (const Base::Exception& e) { - Base::Console().Error("Unhandled Base::Exception caught in GUIApplication::notify.\n" + Base::Console().error("Unhandled Base::Exception caught in GUIApplication::notify.\n" "The error message is: %s\n%s", e.what(), exceptionWarning); } catch (const std::exception& e) { - Base::Console().Error("Unhandled std::exception caught in GUIApplication::notify.\n" + Base::Console().error("Unhandled std::exception caught in GUIApplication::notify.\n" "The error message is: %s\n%s", e.what(), exceptionWarning); } catch (...) { - Base::Console().Error("Unhandled unknown exception caught in GUIApplication::notify.\n%s", + Base::Console().error("Unhandled unknown exception caught in GUIApplication::notify.\n%s", exceptionWarning); } @@ -129,11 +129,11 @@ bool GUIApplication::notify (QObject * receiver, QEvent * event) dump << " is child of\n"; } std::string str = dump.str(); - Base::Console().Log("%s",str.c_str()); + Base::Console().log("%s",str.c_str()); } } catch (...) { - Base::Console().Log("Invalid recipient and/or event in GUIApplication::notify\n"); + Base::Console().log("Invalid recipient and/or event in GUIApplication::notify\n"); } return true; @@ -232,10 +232,10 @@ public: } } if (server->isListening()) { - Base::Console().Log("Local server '%s' started\n", qPrintable(serverName)); + Base::Console().log("Local server '%s' started\n", qPrintable(serverName)); } else { - Base::Console().Log("Local server '%s' failed to start\n", qPrintable(serverName)); + Base::Console().log("Local server '%s' failed to start\n", qPrintable(serverName)); } } @@ -311,7 +311,7 @@ void GUISingleApplication::readFromSocket() while (socket->canReadLine()) { d_ptr->timer->stop(); QString message = in.readLine(); - Base::Console().Log("Received message: %s\n", message.toStdString()); + Base::Console().log("Received message: %s\n", message.toStdString()); d_ptr->messages.push_back(message); d_ptr->timer->start(1000); } diff --git a/src/Gui/GuiConsole.cpp b/src/Gui/GuiConsole.cpp index d9f073d3d3..72c15a8721 100644 --- a/src/Gui/GuiConsole.cpp +++ b/src/Gui/GuiConsole.cpp @@ -81,7 +81,7 @@ GUIConsole::~GUIConsole (void) FreeConsole(); } -void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, +void GUIConsole::sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) { (void) notifiername; @@ -121,7 +121,7 @@ void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg // safely ignore GUIConsole::s_nMaxLines and GUIConsole::s_nRefCount GUIConsole::GUIConsole () = default; GUIConsole::~GUIConsole () = default; -void GUIConsole::SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, +void GUIConsole::sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) { (void) notifiername; diff --git a/src/Gui/GuiConsole.h b/src/Gui/GuiConsole.h index 1e27d437cd..6cb0d1fda7 100644 --- a/src/Gui/GuiConsole.h +++ b/src/Gui/GuiConsole.h @@ -47,9 +47,9 @@ public: GUIConsole(); /// Destructor ~GUIConsole() override; - void SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, + void sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) override; - const char* Name() override {return "GUIConsole";} + const char* name() override {return "GUIConsole";} protected: static const unsigned int s_nMaxLines; diff --git a/src/Gui/Language/Translator.cpp b/src/Gui/Language/Translator.cpp index dff0d3d2a2..db05155a78 100644 --- a/src/Gui/Language/Translator.cpp +++ b/src/Gui/Language/Translator.cpp @@ -277,7 +277,7 @@ void Translator::setLocale(const std::string& language) const updateLocaleChange(); #ifdef FC_DEBUG - Base::Console().Log("Locale changed to %s => %s\n", qPrintable(loc.bcp47Name()), qPrintable(loc.name())); + Base::Console().log("Locale changed to %s => %s\n", qPrintable(loc.bcp47Name()), qPrintable(loc.name())); #endif } @@ -409,7 +409,7 @@ void Translator::enableDecimalPointConversion(bool on) } #if FC_DEBUG if (on && decimalPointConverter) { - Base::Console().Instance().Warning("Translator: decimal point converter is already installed\n"); + Base::Console().instance().warning("Translator: decimal point converter is already installed\n"); } #endif if (on && !decimalPointConverter) { diff --git a/src/Gui/Macro.cpp b/src/Gui/Macro.cpp index fdb9199130..be04fd18da 100644 --- a/src/Gui/Macro.cpp +++ b/src/Gui/Macro.cpp @@ -239,17 +239,17 @@ void MacroManager::open(MacroType eType, const char *sName) #endif macroFile.open(sName); - Base::Console().Log("CmdM: Open macro: %s\n", sName); + Base::Console().log("CmdM: Open macro: %s\n", sName); } void MacroManager::commit() { QString macroName = macroFile.fileName(); if (macroFile.commit()) { - Base::Console().Log("Commit macro: %s\n", (const char*)macroName.toUtf8()); + Base::Console().log("Commit macro: %s\n", (const char*)macroName.toUtf8()); } else { - Base::Console().Error("Cannot open file to write macro: %s\n", + Base::Console().error("Cannot open file to write macro: %s\n", (const char*)macroName.toUtf8()); cancel(); } @@ -258,7 +258,7 @@ void MacroManager::commit() void MacroManager::cancel() { QString macroName = macroFile.fileName(); - Base::Console().Log("Cancel macro: %s\n",(const char*)macroName.toUtf8()); + Base::Console().log("Cancel macro: %s\n",(const char*)macroName.toUtf8()); macroFile.cancel(); } diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index 0ac0f4b9da..ed793818b0 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -1795,10 +1795,10 @@ void MainWindowP::restoreWindowState(const QByteArray &windowState) Base::StateLocker guard(_restoring); // tmp. disable the report window to suppress some bothering warnings - if (Base::Console().IsMsgTypeEnabled("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn)) { - Base::Console().SetEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, false); + if (Base::Console().isMsgTypeEnabled("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn)) { + Base::Console().setEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, false); getMainWindow()->restoreState(windowState); - Base::Console().SetEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, true); + Base::Console().setEnabledMsgType("ReportOutput", Base::ConsoleSingleton::MsgType_Wrn, true); } else getMainWindow()->restoreState(windowState); @@ -2099,7 +2099,7 @@ void MainWindow::loadUrls(App::Document* doc, const QList& urls) files << info.absoluteFilePath(); } else { - Base::Console().Message("No support to load file '%s'\n", + Base::Console().message("No support to load file '%s'\n", (const char*)info.absoluteFilePath().toUtf8()); } } @@ -2338,7 +2338,7 @@ void MainWindow::setWindowTitle(const QString& string) msg = QStringLiteral("#statusBar{color: #000000}"); // black wrn = QStringLiteral("#statusBar{color: #ffaa00}"); // orange err = QStringLiteral("#statusBar{color: #ff0000}"); // red - Base::Console().AttachObserver(this); + Base::Console().attachObserver(this); getWindowParameter()->Attach(this); getWindowParameter()->NotifyAll(); } @@ -2346,7 +2346,7 @@ void MainWindow::setWindowTitle(const QString& string) StatusBarObserver::~StatusBarObserver() { getWindowParameter()->Detach(this); - Base::Console().DetachObserver(this); + Base::Console().detachObserver(this); } void StatusBarObserver::OnChange(Base::Subject & rCaller, const char* sReason) @@ -2372,7 +2372,7 @@ void MainWindow::setWindowTitle(const QString& string) } } - void StatusBarObserver::SendLog(const std::string& notifiername, + void StatusBarObserver::sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, diff --git a/src/Gui/MainWindow.h b/src/Gui/MainWindow.h index 9dfcf4cfdf..fafaea0560 100644 --- a/src/Gui/MainWindow.h +++ b/src/Gui/MainWindow.h @@ -388,11 +388,11 @@ public: /** Observes its parameter group. */ void OnChange(Base::Subject &rCaller, const char * sReason) override; - void SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, + void sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) override; /// name of the observer - const char *Name() override {return "StatusBar";} + const char *name() override {return "StatusBar";} friend class MainWindow; private: diff --git a/src/Gui/Navigation/GestureNavigationStyle.cpp b/src/Gui/Navigation/GestureNavigationStyle.cpp index b31f0c73fb..7c5fcf8dac 100644 --- a/src/Gui/Navigation/GestureNavigationStyle.cpp +++ b/src/Gui/Navigation/GestureNavigationStyle.cpp @@ -98,39 +98,39 @@ public: void log() const { if (isPress(1)) - Base::Console().Log("button1 press "); + Base::Console().log("button1 press "); if (isPress(2)) - Base::Console().Log("button2 press "); + Base::Console().log("button2 press "); if (isPress(3)) - Base::Console().Log("button3 press "); + Base::Console().log("button3 press "); if (isRelease(1)) - Base::Console().Log("button1 release "); + Base::Console().log("button1 release "); if (isRelease(2)) - Base::Console().Log("button2 release "); + Base::Console().log("button2 release "); if (isRelease(3)) - Base::Console().Log("button3 release "); + Base::Console().log("button3 release "); if (isMouseButtonEvent()) - Base::Console().Log("%x", modifiers); + Base::Console().log("%x", modifiers); if (isGestureEvent()){ - Base::Console().Log("Gesture "); + Base::Console().log("Gesture "); switch(asGestureEvent()->state){ case SoGestureEvent::SbGSStart: - Base::Console().Log("start "); + Base::Console().log("start "); break; case SoGestureEvent::SbGSEnd: - Base::Console().Log("end "); + Base::Console().log("end "); break; case SoGestureEvent::SbGSUpdate: - Base::Console().Log("data "); + Base::Console().log("data "); break; default: - Base::Console().Log("??? "); + Base::Console().log("??? "); } - Base::Console().Log(inventor_event->getTypeId().getName().getString()); + Base::Console().log(inventor_event->getTypeId().getName().getString()); } if (isMouseButtonEvent() || isGestureEvent()){ - Base::Console().Log("(%i,%i)\n", inventor_event->getPosition()[0],inventor_event->getPosition()[1]); + Base::Console().log("(%i,%i)\n", inventor_event->getPosition()[0],inventor_event->getPosition()[1]); } } @@ -243,7 +243,7 @@ public: auto &ns = this->outermost_context().ns; ns.setViewingMode(NavigationStyle::IDLE); if (ns.logging) - Base::Console().Log(" -> IdleState\n"); + Base::Console().log(" -> IdleState\n"); } virtual ~IdleState() = default; @@ -355,7 +355,7 @@ public: { auto &ns = this->outermost_context().ns; if (ns.logging) - Base::Console().Log(" -> AwaitingMoveState\n"); + Base::Console().log(" -> AwaitingMoveState\n"); ns.setViewingMode(NavigationStyle::IDLE); this->base_pos = static_cast(this->triggering_event())->inventor_event->getPosition(); this->since = static_cast(this->triggering_event())->inventor_event->getTime(); @@ -498,7 +498,7 @@ public: ns.setViewingMode(NavigationStyle::DRAGGING); this->base_pos = inventorEvent->getPosition(); if (ns.logging) - Base::Console().Log(" -> RotateState\n"); + Base::Console().log(" -> RotateState\n"); } virtual ~RotateState() = default; @@ -540,7 +540,7 @@ public: ns.setViewingMode(NavigationStyle::PANNING); this->base_pos = static_cast(this->triggering_event())->inventor_event->getPosition(); if (ns.logging) - Base::Console().Log(" -> PanState\n"); + Base::Console().log(" -> PanState\n"); this->ratio = ns.viewer->getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); ns.setupPanningPlane(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } @@ -587,7 +587,7 @@ public: ns.setViewingMode(NavigationStyle::PANNING); this->base_pos = static_cast(this->triggering_event())->inventor_event->getPosition(); if (ns.logging) - Base::Console().Log(" -> StickyPanState\n"); + Base::Console().log(" -> StickyPanState\n"); this->ratio = ns.viewer->getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); ns.setupPanningPlane(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } @@ -634,7 +634,7 @@ public: ns.setViewingMode(NavigationStyle::DRAGGING); this->base_pos = static_cast(this->triggering_event())->inventor_event->getPosition(); if (ns.logging) - Base::Console().Log(" -> TiltState\n"); + Base::Console().log(" -> TiltState\n"); ns.setupPanningPlane(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane } virtual ~TiltState() = default; @@ -684,7 +684,7 @@ public: ns.setViewingMode(NavigationStyle::PANNING); this->base_pos = static_cast(this->triggering_event())->inventor_event->getPosition(); if (ns.logging) - Base::Console().Log(" -> GestureState\n"); + Base::Console().log(" -> GestureState\n"); ns.setupPanningPlane(ns.viewer->getSoRenderManager()->getCamera());//set up panningplane this->ratio = ns.viewer->getSoRenderManager()->getViewportRegion().getViewportAspectRatio(); enableTilt = !(App::GetApplication().GetParameterGroupByPath @@ -703,7 +703,7 @@ public: ev.flags->processed = true; if (ev.mbstate() == 0){ //a fail-safe: if gesture end event doesn't arrive, a mouse click should be able to stop this mode. - Base::Console().Warning("leaving gesture state by mouse-click (fail-safe)\n"); + Base::Console().warning("leaving gesture state by mouse-click (fail-safe)\n"); return transit(); } } @@ -763,7 +763,7 @@ public: { auto &ns = this->outermost_context().ns; if (ns.logging) - Base::Console().Log(" -> AwaitingReleaseState\n"); + Base::Console().log(" -> AwaitingReleaseState\n"); } virtual ~AwaitingReleaseState() = default; @@ -814,7 +814,7 @@ public: auto &ns = this->outermost_context().ns; ns.setViewingMode(NavigationStyle::INTERACT); if (ns.logging) - Base::Console().Log(" -> InteractState\n"); + Base::Console().log(" -> InteractState\n"); } virtual ~InteractState() = default; @@ -988,12 +988,12 @@ void GestureNavigationStyle::onRollGesture(int direction) std::string cmd; if (direction == +1){ if (logging) - Base::Console().Log("Roll forward gesture\n"); + Base::Console().log("Roll forward gesture\n"); cmd = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/View")->GetASCII("GestureRollFwdCommand"); } else if (direction == -1) { if (logging) - Base::Console().Log("Roll backward gesture\n"); + Base::Console().log("Roll backward gesture\n"); cmd = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/View")->GetASCII("GestureRollBackCommand"); } @@ -1006,7 +1006,7 @@ void GestureNavigationStyle::onRollGesture(int direction) } catch (Base::PyException& exc) { exc.reportException(); } catch (...) { - Base::Console().Error("GestureNavigationStyle::onRollGesture: unknown C++ exception when invoking command %s\n", cmd.c_str()); + Base::Console().error("GestureNavigationStyle::onRollGesture: unknown C++ exception when invoking command %s\n", cmd.c_str()); } } @@ -1016,7 +1016,7 @@ void GestureNavigationStyle::EventQueue::post(const NS::Event& ev) ev.flags->processed = true; this->push(*ev.asMouseButtonEvent()); if (ns.logging){ - Base::Console().Log("postponed: "); + Base::Console().log("postponed: "); ev.log(); } } diff --git a/src/Gui/NetworkRetriever.cpp b/src/Gui/NetworkRetriever.cpp index 989f1856fd..d46ccecbf8 100644 --- a/src/Gui/NetworkRetriever.cpp +++ b/src/Gui/NetworkRetriever.cpp @@ -119,7 +119,7 @@ void NetworkRetriever::testFailure() { d->fail = false; QString msg = tr("Download started..."); - Base::Console().Message("%s\n", msg.toUtf8().constData()); + Base::Console().message("%s\n", msg.toUtf8().constData()); } } @@ -265,7 +265,7 @@ bool NetworkRetriever::startDownload( const QString& startUrl ) { if (!dir.mkdir(d->dir)) { - Base::Console().Error("Directory '%s' could not be created.", (const char*)d->dir.toLatin1()); + Base::Console().error("Directory '%s' could not be created.", (const char*)d->dir.toLatin1()); return true; // please, no error message } } @@ -362,7 +362,7 @@ void NetworkRetriever::wgetFinished(int exitCode, QProcess::ExitStatus status) wget->setReadChannel(QProcess::StandardError); if (wget->canReadLine()) { QByteArray data = wget->readAll(); - Base::Console().Warning(data); + Base::Console().warning(data); } Q_EMIT wgetExited(); } @@ -535,7 +535,7 @@ void StdCmdDownloadOnlineHelp::activated(int iMsg) if (canStart) { bool ok = wget->startDownload(QString::fromLatin1(url.c_str())); if (!ok) - Base::Console().Error("The tool 'wget' couldn't be found. Please check your installation."); + Base::Console().error("The tool 'wget' couldn't be found. Please check your installation."); else if ( wget->isDownloading() && _pcAction ) _pcAction->setText(tr("Stop downloading")); } diff --git a/src/Gui/NotificationArea.cpp b/src/Gui/NotificationArea.cpp index 0925013a70..5a529e3de0 100644 --- a/src/Gui/NotificationArea.cpp +++ b/src/Gui/NotificationArea.cpp @@ -234,11 +234,11 @@ public: /// Function that is called by the console interface for this observer with the message /// information - void SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, + void sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) override; /// Name of the observer - const char* Name() override + const char* name() override { return "NotificationAreaObserver"; } @@ -250,7 +250,7 @@ private: NotificationAreaObserver::NotificationAreaObserver(NotificationArea* notificationarea) : notificationArea(notificationarea) { - Base::Console().AttachObserver(this); + Base::Console().attachObserver(this); bLog = false; // ignore log messages bMsg = false; // ignore messages bNotification = true;// activate user notifications @@ -258,10 +258,10 @@ NotificationAreaObserver::NotificationAreaObserver(NotificationArea* notificatio NotificationAreaObserver::~NotificationAreaObserver() { - Base::Console().DetachObserver(this); + Base::Console().detachObserver(this); } -void NotificationAreaObserver::SendLog(const std::string& notifiername, const std::string& msg, +void NotificationAreaObserver::sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) { @@ -1063,7 +1063,7 @@ void NotificationArea::pushNotification(const QString& notifiername, const QStri // // But I want my message from my thread to appear in the notification area. Fine, then configure // Console not to use the direct connection mode, but the Queued one: - // Base::Console().SetConnectionMode(ConnectionMode::Queued); + // Base::Console().setConnectionMode(ConnectionMode::Queued); auto timer_thread = pImp->inhibitTimer.thread(); auto current_thread = QThread::currentThread(); diff --git a/src/Gui/Notifications.h b/src/Gui/Notifications.h index 39bd54cb98..20e2bcf156 100644 --- a/src/Gui/Notifications.h +++ b/src/Gui/Notifications.h @@ -164,27 +164,27 @@ inline void Gui::Notify(TNotifier && notifier, TCaption && caption, TMessage && auto msg = std::string(message).append("\n"); // use untranslated message if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getFullLabel(), msg.c_str()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getObject()->getFullLabel(), msg.c_str()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getDocument()->Label.getStrValue(), msg.c_str()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->Label.getStrValue(), msg.c_str()); } else { - Base::Console().Send(notifier, msg.c_str()); } @@ -234,19 +234,19 @@ inline void Gui::Notify(TNotifier && notifier, TCaption && caption, TMessage && auto msg = QStringLiteral("%1. %2").arg(caption).arg(message); // QString if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getFullLabel(), msg.toUtf8()); + Base::Console().send(notifier->getFullLabel(), msg.toUtf8()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getObject()->getFullLabel(), msg.toUtf8()); + Base::Console().send(notifier->getObject()->getFullLabel(), msg.toUtf8()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getDocument()->Label.getStrValue(), msg.toUtf8()); + Base::Console().send(notifier->getDocument()->Label.getStrValue(), msg.toUtf8()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->Label.getStrValue(), msg.toUtf8()); + Base::Console().send(notifier->Label.getStrValue(), msg.toUtf8()); } else { - Base::Console().Send(notifier, msg.toUtf8()); + Base::Console().send(notifier, msg.toUtf8()); } } else { @@ -254,19 +254,19 @@ inline void Gui::Notify(TNotifier && notifier, TCaption && caption, TMessage && auto msg = std::string(message).append("\n"); if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getFullLabel(), msg.c_str()); + Base::Console().send(notifier->getFullLabel(), msg.c_str()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getObject()->getFullLabel(), msg.c_str()); + Base::Console().send(notifier->getObject()->getFullLabel(), msg.c_str()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->getDocument()->Label.getStrValue(), msg.c_str()); + Base::Console().send(notifier->getDocument()->Label.getStrValue(), msg.c_str()); } else if constexpr( std::is_base_of_v::type>> ) { - Base::Console().Send(notifier->Label.getStrValue(), msg.c_str()); + Base::Console().send(notifier->Label.getStrValue(), msg.c_str()); } else { - Base::Console().Send(notifier, msg.c_str()); + Base::Console().send(notifier, msg.c_str()); } } } diff --git a/src/Gui/Placement.cpp b/src/Gui/Placement.cpp index 0a2e1a7a01..66411e8a1a 100644 --- a/src/Gui/Placement.cpp +++ b/src/Gui/Placement.cpp @@ -264,7 +264,7 @@ void PlacementHandler::applyPlacement(const Base::Placement& p, bool incremental } } else { - Base::Console().Warning("No object selected.\n"); + Base::Console().warning("No object selected.\n"); } } @@ -315,7 +315,7 @@ void PlacementHandler::applyPlacement(const QString& data, bool incremental) tryRecompute(document); } else { - Base::Console().Warning("No object selected.\n"); + Base::Console().warning("No object selected.\n"); } } } @@ -630,13 +630,13 @@ void Placement::onSelectedVertexClicked() axis = Base::Vector3d(picked[0] - picked[1]); } double length = axis.Length(); - Base::Console().Message("Distance: %.8f\n",length); + Base::Console().message("Distance: %.8f\n",length); if (QApplication::keyboardModifiers() == Qt::ShiftModifier){ //copy to clipboard on Shift+click QLocale loc; QApplication::clipboard()->setText(loc.toString(length,'g',8)); } else { - Base::Console().Message("(Shift + click Selected points button to copy distance to clipboard)\n"); + Base::Console().message("(Shift + click Selected points button to copy distance to clipboard)\n"); } axis.Normalize(); rot.setValue(axis, angle); @@ -678,20 +678,20 @@ void Placement::onSelectedVertexClicked() double angle; rot.getRawValue(tmp, angle); double length = (a-c).Length(); - Base::Console().Message("Distance: %.8f\n",length); + Base::Console().message("Distance: %.8f\n",length); Base::Vector3d v1(a-b); Base::Vector3d v2(c-b); v1.Normalize(); v2.Normalize(); double targetAngle = Base::toDegrees(v2.GetAngle(v1)); - Base::Console().Message("Target angle: %.8f degrees, complementary: %.8f degrees\n",targetAngle, 90.0-targetAngle); + Base::Console().message("Target angle: %.8f degrees, complementary: %.8f degrees\n",targetAngle, 90.0-targetAngle); if (QApplication::keyboardModifiers() == Qt::ShiftModifier){ //copy to clipboard on Shift+click QLocale loc; QApplication::clipboard()->setText(loc.toString(targetAngle,'g',8)); - Base::Console().Message("(Angle copied to clipboard, but you might need to use a negative (-) angle sometimes.)\n"); + Base::Console().message("(Angle copied to clipboard, but you might need to use a negative (-) angle sometimes.)\n"); } else { - Base::Console().Message("(Shift + click Selected points button to copy angle to clipboard)\n"); + Base::Console().message("(Shift + click Selected points button to copy angle to clipboard)\n"); } rot.setValue(norm, angle); plm.setRotation(rot); @@ -707,7 +707,7 @@ void Placement::onSelectedVertexClicked() ui->zCnt->setValue(center.z); if (!success) { - Base::Console().Warning("Placement selection error. Select either 1 or 2 points.\n"); + Base::Console().warning("Placement selection error. Select either 1 or 2 points.\n"); QMessageBox msgBox(this); msgBox.setText(tr("Please select 1, 2, or 3 points before clicking this button. A point may be on a vertex, \ face, or edge. If on a face or edge the point used will be the point at the mouse position along \ diff --git a/src/Gui/PrefWidgets.cpp b/src/Gui/PrefWidgets.cpp index f43a7650da..66dbeaa839 100644 --- a/src/Gui/PrefWidgets.cpp +++ b/src/Gui/PrefWidgets.cpp @@ -79,7 +79,7 @@ void PrefWidget::setParamGrpPath( const QByteArray& path ) if (getWindowParameter().isValid()) { if ( paramGrpPath() != path ) - Base::Console().Warning("Widget already attached\n"); + Base::Console().warning("Widget already attached\n"); } #endif @@ -153,7 +153,7 @@ void PrefWidget::failedToSave(const QString& name) const QByteArray objname = name.toLatin1(); if (objname.isEmpty()) objname = "Undefined"; - Console().Warning("Cannot save %s (%s)\n", typeid(*this).name(), objname.constData()); + Console().warning("Cannot save %s (%s)\n", typeid(*this).name(), objname.constData()); } void PrefWidget::failedToRestore(const QString& name) const @@ -161,7 +161,7 @@ void PrefWidget::failedToRestore(const QString& name) const QByteArray objname = name.toLatin1(); if (objname.isEmpty()) objname = "Undefined"; - Console().Warning("Cannot restore %s (%s)\n", typeid(*this).name(), objname.constData()); + Console().warning("Cannot restore %s (%s)\n", typeid(*this).name(), objname.constData()); } // -------------------------------------------------------------------- diff --git a/src/Gui/PreferencePackManager.cpp b/src/Gui/PreferencePackManager.cpp index 56581e9a4d..2bac18b0e2 100644 --- a/src/Gui/PreferencePackManager.cpp +++ b/src/Gui/PreferencePackManager.cpp @@ -96,7 +96,7 @@ bool PreferencePack::apply() const Base::Interpreter().runFile(Base::FileInfo::pathToString(preMacroPath).c_str(), false); } catch (...) { - Base::Console().Message("PreferencePack application aborted by the preferencePack's pre.FCMacro"); + Base::Console().message("PreferencePack application aborted by the preferencePack's pre.FCMacro"); return false; } } @@ -120,7 +120,7 @@ bool PreferencePack::apply() const Base::Interpreter().runFile(Base::FileInfo::pathToString(postMacroPath).c_str(), false); } catch (...) { - Base::Console().Message("PreferencePack application reverted by the preferencePack's post.FCMacro"); + Base::Console().message("PreferencePack application reverted by the preferencePack's post.FCMacro"); App::GetApplication().GetUserParameter().LoadDocument(Base::FileInfo::pathToString(backupFile).c_str()); return false; } @@ -284,7 +284,7 @@ std::vector Gui::PreferencePackManager::getPacksFromDirectory(const } catch (...) { // Failed to read the metadata, or to create the preferencePack based on it... - Base::Console().Error(("Failed to read " + packageMetadataFile.string()).c_str()); + Base::Console().error(("Failed to read " + packageMetadataFile.string()).c_str()); } } return results; @@ -296,12 +296,12 @@ void Gui::PreferencePackManager::FindPreferencePacksInPackage(const fs::path &mo TryFindPreferencePacksInPackage(mod); } catch (const std::exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } catch (...) { // Failed to read the metadata, or to create the preferencePack based on it... auto packageMetadataFile = mod / "package.xml"; - Base::Console().Error("Failed to read %s\n", Base::FileInfo::pathToString(packageMetadataFile).c_str()); + Base::Console().error("Failed to read %s\n", Base::FileInfo::pathToString(packageMetadataFile).c_str()); } } diff --git a/src/Gui/PreferencePages/DlgSettingsPDF.cpp b/src/Gui/PreferencePages/DlgSettingsPDF.cpp index b43bdbe130..97cfbfb9d8 100644 --- a/src/Gui/PreferencePages/DlgSettingsPDF.cpp +++ b/src/Gui/PreferencePages/DlgSettingsPDF.cpp @@ -36,7 +36,7 @@ void DlgSettingsPDF::loadSettings() int currentIndex = ui->comboBox->currentIndex(); #if QT_VERSION < QT_VERSION_CHECK(6,8,0) if (currentIndex == 3) { - Base::Console().Warning("When using another copy of FreeCAD you had set the PDF version to X4, but this build of FreeCAD does not support it. Using 1.4 instead.\n"); + Base::Console().warning("When using another copy of FreeCAD you had set the PDF version to X4, but this build of FreeCAD does not support it. Using 1.4 instead.\n"); currentIndex = 0; ui->comboBox->setCurrentIndex(0); } diff --git a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp index 324ac60f80..784e949e33 100644 --- a/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp +++ b/src/Gui/PreferencePages/DlgSettingsWorkbenchesImp.cpp @@ -433,7 +433,7 @@ QStringList DlgSettingsWorkbenchesImp::getEnabledWorkbenches() enabled_wbs_list.append(wbName); } else { - Base::Console().Log("Ignoring unknown %s workbench found in user preferences.\n", wbName.toStdString().c_str()); + Base::Console().log("Ignoring unknown %s workbench found in user preferences.\n", wbName.toStdString().c_str()); } } @@ -465,7 +465,7 @@ QStringList DlgSettingsWorkbenchesImp::getDisabledWorkbenches() disabled_wbs_list.append(wbName); } else { - Base::Console().Log("Ignoring unknown %s workbench found in user preferences.\n", wbName.toStdString().c_str()); + Base::Console().log("Ignoring unknown %s workbench found in user preferences.\n", wbName.toStdString().c_str()); } } diff --git a/src/Gui/PropertyPage.cpp b/src/Gui/PropertyPage.cpp index 3a8711481b..08c8407720 100644 --- a/src/Gui/PropertyPage.cpp +++ b/src/Gui/PropertyPage.cpp @@ -140,7 +140,7 @@ PreferenceUiForm::PreferenceUiForm(const QString& fn, QWidget* parent) setLayout(layout); } else { - Base::Console().Error("Failed to load UI file from '%s'\n", + Base::Console().error("Failed to load UI file from '%s'\n", (const char*)fn.toUtf8()); } } diff --git a/src/Gui/PropertyView.cpp b/src/Gui/PropertyView.cpp index 315d339c3d..e8650a1165 100644 --- a/src/Gui/PropertyView.cpp +++ b/src/Gui/PropertyView.cpp @@ -341,7 +341,7 @@ void PropertyView::onTimer() { // See https://forum.freecad.org/viewtopic.php?f=8&t=72526 if (this->updating) { - Base::Console().Log("Ignore recursive call of PropertyView::onTimer()\n"); + Base::Console().log("Ignore recursive call of PropertyView::onTimer()\n"); return; } Base::StateLocker guard(this->updating); diff --git a/src/Gui/PythonConsolePy.cpp b/src/Gui/PythonConsolePy.cpp index 08b1f415a6..e2af2d1701 100644 --- a/src/Gui/PythonConsolePy.cpp +++ b/src/Gui/PythonConsolePy.cpp @@ -197,7 +197,7 @@ Py::Object OutputStdout::write(const Py::Tuple& args) PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", nullptr); if (unicode) { const char* string = PyBytes_AsString(unicode); - Base::Console().Message("%s",string); + Base::Console().message("%s",string); Py_DECREF(unicode); } @@ -258,7 +258,7 @@ Py::Object OutputStderr::write(const Py::Tuple& args) PyObject* unicode = PyUnicode_AsEncodedString(output, "utf-8", nullptr); if (unicode) { const char* string = PyBytes_AsString(unicode); - Base::Console().Error("%s",string); + Base::Console().error("%s",string); Py_DECREF(unicode); } diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp index 773678a4df..ffe8891ad4 100644 --- a/src/Gui/PythonDebugger.cpp +++ b/src/Gui/PythonDebugger.cpp @@ -225,7 +225,7 @@ Py::Object PythonDebugStderr::write(const Py::Tuple& args) if (strlen(msg) > 0) { - Base::Console().Error("%s", msg); + Base::Console().error("%s", msg); } return Py::None(); @@ -414,7 +414,7 @@ void PythonDebugger::runFile(const QString& fn) //PySys_WriteStderr("Exception: %s\n", e.what()); } catch (...) { - Base::Console().Warning("Unknown exception thrown during macro debugging\n"); + Base::Console().warning("Unknown exception thrown during macro debugging\n"); } } diff --git a/src/Gui/PythonEditor.cpp b/src/Gui/PythonEditor.cpp index 668f6b8029..a76c1eeba7 100644 --- a/src/Gui/PythonEditor.cpp +++ b/src/Gui/PythonEditor.cpp @@ -322,9 +322,9 @@ void PythonEditor::onExecuteInConsole() Gui::Command::doCommand(Gui::Command::Doc, dedentedCode.toStdString().c_str()); } catch (const Base::Exception& e) { QString errorMessage = QString::fromStdString(e.what()); - Base::Console().Error("Error executing Python code:\n%s\n", errorMessage.toUtf8().constData()); + Base::Console().error("Error executing Python code:\n%s\n", errorMessage.toUtf8().constData()); } catch (...) { - Base::Console().Error("An unknown error occurred while executing Python code.\n"); + Base::Console().error("An unknown error occurred while executing Python code.\n"); } } } diff --git a/src/Gui/PythonWrapper.cpp b/src/Gui/PythonWrapper.cpp index 0a72e1205f..1bda2cf2d1 100644 --- a/src/Gui/PythonWrapper.cpp +++ b/src/Gui/PythonWrapper.cpp @@ -412,7 +412,7 @@ public: Shiboken::Object::setValidCpp(sbk_ptr, false); } else { - Base::Console().DeveloperError("WrapperManager", "A QObject has just been destroyed after its Pythonic wrapper.\n"); + Base::Console().developerError("WrapperManager", "A QObject has just been destroyed after its Pythonic wrapper.\n"); } Py_DECREF (pyobj); }; diff --git a/src/Gui/Quarter/SoQTQuarterAdaptor.cpp b/src/Gui/Quarter/SoQTQuarterAdaptor.cpp index e98bd2d77f..2659960952 100644 --- a/src/Gui/Quarter/SoQTQuarterAdaptor.cpp +++ b/src/Gui/Quarter/SoQTQuarterAdaptor.cpp @@ -241,7 +241,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::setCameraType(SoType type) SoCamera* cam = getSoRenderManager()->getCamera(); if (cam && !cam->isOfType(SoPerspectiveCamera::getClassTypeId()) && !cam->isOfType(SoOrthographicCamera::getClassTypeId())) { - Base::Console().Warning("Quarter::setCameraType", + Base::Console().warning("Quarter::setCameraType", "Only SoPerspectiveCamera and SoOrthographicCamera is supported."); return; } @@ -293,7 +293,7 @@ void SIM::Coin3D::Quarter::SoQTQuarterAdaptor::convertOrtho2Perspective(const So SoPerspectiveCamera* out) { if (!in || !out) { - Base::Console().Log("Quarter::convertOrtho2Perspective", + Base::Console().log("Quarter::convertOrtho2Perspective", "Cannot convert camera settings due to wrong input."); return; } diff --git a/src/Gui/ReportView.cpp b/src/Gui/ReportView.cpp index fce293d6a5..ba834e1cf6 100644 --- a/src/Gui/ReportView.cpp +++ b/src/Gui/ReportView.cpp @@ -433,7 +433,7 @@ ReportOutput::ReportOutput(QWidget* parent) clear(); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - Base::Console().AttachObserver(this); + Base::Console().attachObserver(this); getWindowParameter()->Attach(this); getWindowParameter()->NotifyAll(); // do this explicitly because the keys below might not yet be part of a group @@ -457,7 +457,7 @@ ReportOutput::~ReportOutput() { getWindowParameter()->Detach(this); _prefs->Detach(this); - Base::Console().DetachObserver(this); + Base::Console().detachObserver(this); delete reportHl; delete d; } @@ -468,7 +468,7 @@ void ReportOutput::restoreFont() setFont(serifFont); } -void ReportOutput::SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, +void ReportOutput::sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) { // Do not log translated messages, or messages intended only to the user to the Report View diff --git a/src/Gui/ReportView.h b/src/Gui/ReportView.h index 276284ca9f..1f4be9d070 100644 --- a/src/Gui/ReportView.h +++ b/src/Gui/ReportView.h @@ -141,11 +141,11 @@ public: /** Observes its parameter group. */ void OnChange(Base::Subject &rCaller, const char * sReason) override; - void SendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, + void sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, Base::ContentType content) override; /// returns the name for observer handling - const char* Name() override {return "ReportOutput";} + const char* name() override {return "ReportOutput";} /** Restore the default font settings. */ void restoreFont (); diff --git a/src/Gui/Selection/Selection.cpp b/src/Gui/Selection/Selection.cpp index d50c15625d..baa7b87669 100644 --- a/src/Gui/Selection/Selection.cpp +++ b/src/Gui/Selection/Selection.cpp @@ -545,7 +545,7 @@ void SelectionSingleton::notify(SelectionChanges &&Chng) } catch (const boost::exception&) { // reported by code analyzers - Base::Console().Warning("notify: Unexpected boost exception\n"); + Base::Console().warning("notify: Unexpected boost exception\n"); } } NotificationQueue.pop_front(); @@ -698,7 +698,7 @@ void SelectionSingleton::slotSelectionChanged(const SelectionChanges& msg) } catch (const boost::exception&) { // reported by code analyzers - Base::Console().Warning("slotSelectionChanged: Unexpected boost exception\n"); + Base::Console().warning("slotSelectionChanged: Unexpected boost exception\n"); } } else { @@ -708,7 +708,7 @@ void SelectionSingleton::slotSelectionChanged(const SelectionChanges& msg) } catch (const boost::exception&) { // reported by code analyzers - Base::Console().Warning("slotSelectionChanged: Unexpected boost exception\n"); + Base::Console().warning("slotSelectionChanged: Unexpected boost exception\n"); } } } diff --git a/src/Gui/SplashScreen.cpp b/src/Gui/SplashScreen.cpp index 92bac0563c..04a0e00adc 100644 --- a/src/Gui/SplashScreen.cpp +++ b/src/Gui/SplashScreen.cpp @@ -65,7 +65,7 @@ public: , alignment(Qt::AlignBottom | Qt::AlignLeft) , textColor(Qt::black) { - Base::Console().AttachObserver(this); + Base::Console().attachObserver(this); // allow to customize text position and color const std::map& cfg = App::Application::Config(); @@ -107,13 +107,13 @@ public: } ~SplashObserver() override { - Base::Console().DetachObserver(this); + Base::Console().detachObserver(this); } - const char* Name() override + const char* name() override { return "SplashObserver"; } - void SendLog(const std::string& notifiername, + void sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, diff --git a/src/Gui/StartupProcess.cpp b/src/Gui/StartupProcess.cpp index 76b7e3022e..e3fb47e4ef 100644 --- a/src/Gui/StartupProcess.cpp +++ b/src/Gui/StartupProcess.cpp @@ -308,10 +308,10 @@ void StartupPostProcess::checkOpenGL() if (context.create()) { context.makeCurrent(&window); if (!context.functions()->hasOpenGLFeature(QOpenGLFunctions::Framebuffers)) { - Base::Console().Log("This system does not support framebuffer objects\n"); + Base::Console().log("This system does not support framebuffer objects\n"); } if (!context.functions()->hasOpenGLFeature(QOpenGLFunctions::NPOTTextures)) { - Base::Console().Log("This system does not support NPOT textures\n"); + Base::Console().log("This system does not support NPOT textures\n"); } int major = context.format().majorVersion(); @@ -328,7 +328,7 @@ void StartupPostProcess::checkOpenGL() .arg(major) .arg(minor) + QStringLiteral("\n"); - Base::Console().Warning(message.toStdString().c_str()); + Base::Console().warning(message.toStdString().c_str()); Dialog::DlgCheckableMessageBox::showMessage( QCoreApplication::applicationName() + QStringLiteral(" - ") + QObject::tr("Invalid OpenGL Version"), @@ -336,7 +336,7 @@ void StartupPostProcess::checkOpenGL() } #endif const char* glVersion = reinterpret_cast(glGetString(GL_VERSION)); - Base::Console().Log("OpenGL version is: %d.%d (%s)\n", major, minor, glVersion); + Base::Console().log("OpenGL version is: %d.%d (%s)\n", major, minor, glVersion); } } @@ -411,12 +411,12 @@ void StartupPostProcess::showMainWindow() // running the GUI init script try { - Base::Console().Log("Run Gui init script\n"); + Base::Console().log("Run Gui init script\n"); Application::runInitGuiScript(); setImportImageFormats(); } catch (const Base::Exception& e) { - Base::Console().Error("Error in FreeCADGuiInit.py: %s\n", e.what()); + Base::Console().error("Error in FreeCADGuiInit.py: %s\n", e.what()); mainWindow->stopSplasher(); throw; @@ -432,7 +432,7 @@ void StartupPostProcess::activateWorkbench() { // Activate the correct workbench std::string start = App::Application::Config()["StartWorkbench"]; - Base::Console().Log("Init: Activating default workbench %s\n", start.c_str()); + Base::Console().log("Init: Activating default workbench %s\n", start.c_str()); std::string autoload = App::GetApplication() .GetParameterGroupByPath("User parameter:BaseApp/Preferences/General") @@ -469,7 +469,7 @@ void StartupPostProcess::activateWorkbench() // show the main window if (!Application::hiddenMainWindow()) { - Base::Console().Log("Init: Showing main window\n"); + Base::Console().log("Init: Showing main window\n"); mainWindow->loadWindowSettings(); } @@ -528,11 +528,11 @@ void StartupPostProcess::autoloadModules(const QStringList& wb) void StartupPostProcess::checkParameters() { if (App::GetApplication().GetSystemParameter().IgnoreSave()) { - Base::Console().Warning("System parameter file couldn't be opened.\n" + Base::Console().warning("System parameter file couldn't be opened.\n" "Continue with an empty configuration that won't be saved.\n"); } if (App::GetApplication().GetUserParameter().IgnoreSave()) { - Base::Console().Warning("User parameter file couldn't be opened.\n" + Base::Console().warning("User parameter file couldn't be opened.\n" "Continue with an empty configuration that won't be saved.\n"); } } diff --git a/src/Gui/TaskView/TaskAppearance.cpp b/src/Gui/TaskView/TaskAppearance.cpp index 67d4d5bab2..f2fba23a22 100644 --- a/src/Gui/TaskView/TaskAppearance.cpp +++ b/src/Gui/TaskView/TaskAppearance.cpp @@ -166,7 +166,7 @@ void TaskAppearance::onChangeModeActivated(const QString& s) void TaskAppearance::onChangePlotActivated(const QString& s) { - Base::Console().Log("Plot = %s\n", (const char*)s.toLatin1()); + Base::Console().log("Plot = %s\n", (const char*)s.toLatin1()); } /** diff --git a/src/Gui/TaskView/TaskDialogPython.cpp b/src/Gui/TaskView/TaskDialogPython.cpp index 2c721742df..5bf0e2019d 100644 --- a/src/Gui/TaskView/TaskDialogPython.cpp +++ b/src/Gui/TaskView/TaskDialogPython.cpp @@ -582,7 +582,7 @@ bool TaskDialogPython::tryLoadUiFile() appendForm(form, QPixmap(icon)); } else { - Base::Console().Error("Failed to load UI file from '%s'\n", + Base::Console().error("Failed to load UI file from '%s'\n", (const char*)fn.toUtf8()); } diff --git a/src/Gui/TaskView/TaskImage.cpp b/src/Gui/TaskView/TaskImage.cpp index 8266e0ee95..61c60cdbcf 100644 --- a/src/Gui/TaskView/TaskImage.cpp +++ b/src/Gui/TaskView/TaskImage.cpp @@ -573,7 +573,7 @@ void InteractiveScale::collectPoint(const SbVec3f& pos3d) Q_EMIT enableApplyBtn(); } else { - Base::Console().Warning(std::string("Image scale"), + Base::Console().warning(std::string("Image scale"), "The second point is too close. Retry!\n"); } } diff --git a/src/Gui/TaskView/TaskSelectLinkProperty.cpp b/src/Gui/TaskView/TaskSelectLinkProperty.cpp index 51c3b630e2..e37faf706e 100644 --- a/src/Gui/TaskView/TaskSelectLinkProperty.cpp +++ b/src/Gui/TaskView/TaskSelectLinkProperty.cpp @@ -75,7 +75,7 @@ TaskSelectLinkProperty::TaskSelectLinkProperty(const char* sFilter, LinkList = dynamic_cast(prop); } else { - Base::Console().Warning("Unknown Link property type in " + Base::Console().warning("Unknown Link property type in " "Gui::TaskView::TaskSelectLinkProperty::TaskSelectLinkProperty()"); } diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index 310e58af1b..25ee639aed 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -289,16 +289,16 @@ TaskView::TaskView(QWidget *parent) connectApplicationActiveDocument = App::GetApplication().signalActiveDocument.connect (std::bind(&Gui::TaskView::TaskView::slotActiveDocument, this, sp::_1)); - connectApplicationDeleteDocument = + connectApplicationDeleteDocument = App::GetApplication().signalDeleteDocument.connect (std::bind(&Gui::TaskView::TaskView::slotDeletedDocument, this, sp::_1)); connectApplicationClosedView = Gui::Application::Instance->signalCloseView.connect (std::bind(&Gui::TaskView::TaskView::slotViewClosed, this, sp::_1)); - connectApplicationUndoDocument = + connectApplicationUndoDocument = App::GetApplication().signalUndoDocument.connect (std::bind(&Gui::TaskView::TaskView::slotUndoDocument, this, sp::_1)); - connectApplicationRedoDocument = + connectApplicationRedoDocument = App::GetApplication().signalRedoDocument.connect (std::bind(&Gui::TaskView::TaskView::slotRedoDocument, this, sp::_1)); //NOLINTEND @@ -453,7 +453,7 @@ QSize TaskView::minimumSizeHint() const void TaskView::slotActiveDocument(const App::Document& doc) { - Q_UNUSED(doc); + Q_UNUSED(doc); if (!ActiveDialog) updateWatcher(); } @@ -464,7 +464,7 @@ void TaskView::slotDeletedDocument(const App::Document& doc) if (ActiveDialog->isAutoCloseOnDeletedDocument()) { std::string name = ActiveDialog->getDocumentName(); if (name.empty()) { - Base::Console().Warning(std::string("TaskView::slotDeletedDocument"), + Base::Console().warning(std::string("TaskView::slotDeletedDocument"), "No document name set\n"); } @@ -487,7 +487,7 @@ void TaskView::slotViewClosed(const Gui::MDIView* view) if (ActiveDialog->isAutoCloseOnClosedView()) { const Gui::MDIView* associatedView = ActiveDialog->getAssociatedView(); if (!associatedView) { - Base::Console().Warning(std::string("TaskView::slotViewClosed"), + Base::Console().warning(std::string("TaskView::slotViewClosed"), "No view associated\n"); } @@ -509,7 +509,7 @@ void TaskView::transactionChangeOnDocument(const App::Document& doc) if (ActiveDialog->isAutoCloseOnTransactionChange()) { std::string name = ActiveDialog->getDocumentName(); if (name.empty()) { - Base::Console().Warning(std::string("TaskView::transactionChangeOnDocument"), + Base::Console().warning(std::string("TaskView::transactionChangeOnDocument"), "No document name set\n"); } @@ -539,11 +539,11 @@ void TaskView::slotRedoDocument(const App::Document& doc) void TaskView::OnChange(Gui::SelectionSingleton::SubjectType &rCaller, Gui::SelectionSingleton::MessageType Reason) { - Q_UNUSED(rCaller); + Q_UNUSED(rCaller); std::string temp; if (Reason.Type == SelectionChanges::AddSelection || - Reason.Type == SelectionChanges::ClrSelection || + Reason.Type == SelectionChanges::ClrSelection || Reason.Type == SelectionChanges::SetSelection || Reason.Type == SelectionChanges::RmvSelection) { @@ -648,7 +648,7 @@ void TaskView::removeDialog() // put the watcher back in control addTaskWatcher(); - + if (remove) { remove->closed(); remove->emitDestructionSignal(); @@ -823,7 +823,7 @@ void TaskView::removeTaskWatcher() void TaskView::accept() { if (!ActiveDialog) { // Protect against segfaults due to out-of-order deletions - Base::Console().Warning("ActiveDialog was null in call to TaskView::accept()\n"); + Base::Console().warning("ActiveDialog was null in call to TaskView::accept()\n"); return; } @@ -839,7 +839,7 @@ void TaskView::accept() void TaskView::reject() { if (!ActiveDialog) { // Protect against segfaults due to out-of-order deletions - Base::Console().Warning("ActiveDialog was null in call to TaskView::reject()\n"); + Base::Console().warning("ActiveDialog was null in call to TaskView::reject()\n"); return; } diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index 4c81c216be..8ddc8df26a 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -75,11 +75,11 @@ FC_LOG_LEVEL_INIT("Tree", false, true, true) #define _TREE_PRINT(_level,_func,_msg) \ _FC_PRINT(FC_LOG_INSTANCE,_level,_func, '['<,_msg) -#define TREE_WARN(_msg) _TREE_PRINT(FC_LOGLEVEL_WARN,Notify,_msg) -#define TREE_ERR(_msg) _TREE_PRINT(FC_LOGLEVEL_ERR,Notify,_msg) -#define TREE_LOG(_msg) _TREE_PRINT(FC_LOGLEVEL_LOG,Notify,_msg) -#define TREE_TRACE(_msg) _TREE_PRINT(FC_LOGLEVEL_TRACE,Notify,_msg) +#define TREE_MSG(_msg) _TREE_PRINT(FC_LOGLEVEL_MSG,notify,_msg) +#define TREE_WARN(_msg) _TREE_PRINT(FC_LOGLEVEL_WARN,notify,_msg) +#define TREE_ERR(_msg) _TREE_PRINT(FC_LOGLEVEL_ERR,notify,_msg) +#define TREE_LOG(_msg) _TREE_PRINT(FC_LOGLEVEL_LOG,notify,_msg) +#define TREE_TRACE(_msg) _TREE_PRINT(FC_LOGLEVEL_TRACE,notify,_msg) using namespace Gui; namespace sp = std::placeholders; @@ -3931,7 +3931,7 @@ bool DocumentItem::createNewItem(const Gui::ViewProviderDocumentObject& obj, entry.insert(pdata); } else if (pdata->rootItem && !parent) { - Base::Console().Warning("DocumentItem::slotNewObject: Cannot add view provider twice.\n"); + Base::Console().warning("DocumentItem::slotNewObject: Cannot add view provider twice.\n"); return false; } data = pdata; diff --git a/src/Gui/VectorListEditor.cpp b/src/Gui/VectorListEditor.cpp index 85e69ec673..00eb6f603d 100644 --- a/src/Gui/VectorListEditor.cpp +++ b/src/Gui/VectorListEditor.cpp @@ -210,7 +210,7 @@ void Gui::VectorTableModel::pasteFromClipboard() else { QString msg(tr("Unsupported format. Must be 3 values per row separated by tabs, semicolons, or commas:") + QLatin1String("\n")); msg += clipboard->text(); - Base::Console().Error(msg.toStdString().c_str()); + Base::Console().error(msg.toStdString().c_str()); } } diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index 11a722fbdf..7b2f2b241f 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -219,7 +219,7 @@ void View3DInventor::onRename(Gui::Document *pDoc) void View3DInventor::onUpdate() { #ifdef FC_LOGUPDATECHAIN - Base::Console().Log("Acti: Gui::View3DInventor::onUpdate()"); + Base::Console().log("Acti: Gui::View3DInventor::onUpdate()"); #endif update(); _viewer->redraw(); diff --git a/src/Gui/View3DInventorRiftViewer.cpp b/src/Gui/View3DInventorRiftViewer.cpp index 3dd1a92647..c37a945176 100644 --- a/src/Gui/View3DInventorRiftViewer.cpp +++ b/src/Gui/View3DInventorRiftViewer.cpp @@ -86,7 +86,7 @@ View3DInventorRiftViewer::~View3DInventorRiftViewer() hGrp->SetInt("RenderWindowSizeW",size().width()); hGrp->SetInt("RenderWindowSizeH",size().height()); - Base::Console().Log("pos: %d %d size: %d %d \n",pos().x(),pos().y(), + Base::Console().log("pos: %d %d size: %d %d \n",pos().x(),pos().y(), size().width(),size().height()); } diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index ff7890285f..7007908768 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -262,14 +262,14 @@ public: if (event->type() == Spaceball::ButtonEvent::ButtonEventType) { auto buttonEvent = static_cast(event); // NOLINT if (!buttonEvent) { - Base::Console().Log("invalid spaceball button event\n"); + Base::Console().log("invalid spaceball button event\n"); return true; } } else if (event->type() == Spaceball::MotionEvent::MotionEventType) { auto motionEvent = static_cast(event); // NOLINT if (!motionEvent) { - Base::Console().Log("invalid spaceball motion event\n"); + Base::Console().log("invalid spaceball motion event\n"); return true; } } @@ -287,7 +287,7 @@ public: if (event->type() == Spaceball::MotionEvent::MotionEventType) { auto motionEvent = static_cast(event); // NOLINT if (!motionEvent) { - Base::Console().Log("invalid spaceball motion event\n"); + Base::Console().log("invalid spaceball motion event\n"); return nullptr; } @@ -624,9 +624,9 @@ void View3DInventorViewer::init() this->grabGesture(Qt::PanGesture); this->grabGesture(Qt::PinchGesture); } catch (Base::Exception &e) { - Base::Console().Warning("Failed to set up gestures. Error: %s\n", e.what()); + Base::Console().warning("Failed to set up gestures. Error: %s\n", e.what()); } catch (...) { - Base::Console().Warning("Failed to set up gestures. Unknown error.\n"); + Base::Console().warning("Failed to set up gestures. Unknown error.\n"); } //create the cursors @@ -1019,18 +1019,18 @@ void View3DInventorViewer::resetEditingRoot(bool updateLinks) Py::Object py = Py::type(e); if (py.isString()) { Py::String str(py); - Base::Console().Warning("%s\n", str.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", str.as_std_string("utf-8").c_str()); } else { Py::String str(py.repr()); - Base::Console().Warning("%s\n", str.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", str.as_std_string("utf-8").c_str()); } // Prints message to console window if we are in interactive mode PyErr_Print(); } catch (Py::Exception& e) { e.clear(); - Base::Console().Error("Unexpected exception raised in View3DInventorViewer::resetEditingRoot\n"); + Base::Console().error("Unexpected exception raised in View3DInventorViewer::resetEditingRoot\n"); } } } @@ -2029,7 +2029,7 @@ void View3DInventorViewer::interactionFinishCB(void* ud, SoQTQuarterAdaptor* vie void View3DInventorViewer::interactionLoggerCB(void* ud, SoAction* action) { Q_UNUSED(ud) - Base::Console().Log("%s\n", action->getTypeId().getName().getString()); + Base::Console().log("%s\n", action->getTypeId().getName().getString()); } void View3DInventorViewer::addGraphicsItem(GLGraphicsItem* item) @@ -2215,7 +2215,7 @@ void View3DInventorViewer::imageFromFramebuffer(int width, int height, int sampl const QOpenGLContext* context = QOpenGLContext::currentContext(); if (!context) { - Base::Console().Warning("imageFromFramebuffer failed because no context is active\n"); + Base::Console().warning("imageFromFramebuffer failed because no context is active\n"); return; } @@ -3575,7 +3575,7 @@ void View3DInventorViewer::alignToSelection() // Convert to global coordinates globalRotation.multVec(alignmentZ, alignmentZ); globalRotation.multVec(alignmentX, alignmentX); - + const auto cameraOrientation = getCameraOrientation(); auto directionZ = Base::convertTo(alignmentZ); @@ -3605,18 +3605,18 @@ void View3DInventorViewer::alignToSelection() if (axis.dot(directionZ) < 0 && angle != 0) { angle *= -1; } - + using std::numbers::pi; // Make angle positive if (angle < 0) { angle += 2 * pi; } - + // Find the angle to rotate to the nearest horizontal or vertical alignment with directionX. // f is a small value used to get more deterministic behavior when the camera is at directionX +- 45 degrees. const float f = 0.00001F; - + if (angle <= pi/4 + f) { angle = 0; } @@ -3642,7 +3642,7 @@ void View3DInventorViewer::alignToSelection() directionY[0], directionY[1], directionY[2], 0, directionZ[0], directionZ[1], directionZ[2], 0, 0, 0, 0, 1)); - + setCameraOrientation(orientation); } } @@ -4295,7 +4295,7 @@ void View3DInventorViewer::removeEventCallback(SoType eventtype, SoEventCallback ViewProvider* View3DInventorViewer::getViewProviderByPath(SoPath* path) const { if (!guiDocument) { - Base::Console().Warning("View3DInventorViewer::getViewProviderByPath: No document set\n"); + Base::Console().warning("View3DInventorViewer::getViewProviderByPath: No document set\n"); return nullptr; } return guiDocument->getViewProviderByPathFromHead(path); @@ -4304,7 +4304,7 @@ ViewProvider* View3DInventorViewer::getViewProviderByPath(SoPath* path) const ViewProvider* View3DInventorViewer::getViewProviderByPathFromTail(SoPath* path) const { if (!guiDocument) { - Base::Console().Warning("View3DInventorViewer::getViewProviderByPathFromTail: No document set\n"); + Base::Console().warning("View3DInventorViewer::getViewProviderByPathFromTail: No document set\n"); return nullptr; } return guiDocument->getViewProviderByPathFromTail(path); @@ -4313,7 +4313,7 @@ ViewProvider* View3DInventorViewer::getViewProviderByPathFromTail(SoPath* path) std::vector View3DInventorViewer::getViewProvidersOfType(const Base::Type& typeId) const { if (!guiDocument) { - Base::Console().Warning("View3DInventorViewer::getViewProvidersOfType: No document set\n"); + Base::Console().warning("View3DInventorViewer::getViewProvidersOfType: No document set\n"); return {}; } return guiDocument->getViewProvidersOfType(typeId); diff --git a/src/Gui/View3DPy.cpp b/src/Gui/View3DPy.cpp index 30eaf2a56a..178f20cc0d 100644 --- a/src/Gui/View3DPy.cpp +++ b/src/Gui/View3DPy.cpp @@ -2026,11 +2026,11 @@ void View3DInventorPy::eventCallback(void * ud, SoEventCallback * n) Py::Object o = Py::type(e); if (o.isString()) { Py::String s(o); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } else { Py::String s(o.repr()); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } // Prints message to console window if we are in interactive mode PyErr_Print(); @@ -2178,11 +2178,11 @@ void View3DInventorPy::eventCallbackPivy(void * ud, SoEventCallback * n) Py::Object o = Py::type(e); if (o.isString()) { Py::String s(o); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } else { Py::String s(o.repr()); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } // Prints message to console window if we are in interactive mode PyErr_Print(); @@ -2211,11 +2211,11 @@ void View3DInventorPy::eventCallbackPivyEx(void * ud, SoEventCallback * n) Py::Object o = Py::type(e); if (o.isString()) { Py::String s(o); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } else { Py::String s(o.repr()); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } // Prints message to console window if we are in interactive mode PyErr_Print(); @@ -2347,11 +2347,11 @@ void View3DInventorPy::draggerCallback(void * ud, SoDragger* n) Py::Object o = Py::type(e); if (o.isString()) { Py::String s(o); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } else { Py::String s(o.repr()); - Base::Console().Warning("%s\n", s.as_std_string("utf-8").c_str()); + Base::Console().warning("%s\n", s.as_std_string("utf-8").c_str()); } // Prints message to console window if we are in interactive mode PyErr_Print(); diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index d3d7aee137..82823721a2 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -275,19 +275,19 @@ void ViewProvider::eventCallback(void * ud, SoEventCallback * node) } } catch (const Base::Exception& e) { - Base::Console().Error("Unhandled exception in ViewProvider::eventCallback: %s\n" + Base::Console().error("Unhandled exception in ViewProvider::eventCallback: %s\n" "(Event type: %s, object type: %s)\n" , e.what(), ev->getTypeId().getName().getString() , self->getTypeId().getName()); } catch (const std::exception& e) { - Base::Console().Error("Unhandled std exception in ViewProvider::eventCallback: %s\n" + Base::Console().error("Unhandled std exception in ViewProvider::eventCallback: %s\n" "(Event type: %s, object type: %s)\n" , e.what(), ev->getTypeId().getName().getString() , self->getTypeId().getName()); } catch (...) { - Base::Console().Error("Unhandled unknown C++ exception in ViewProvider::eventCallback" + Base::Console().error("Unhandled unknown C++ exception in ViewProvider::eventCallback" " (Event type: %s, object type: %s)\n" , ev->getTypeId().getName().getString() , self->getTypeId().getName()); @@ -736,11 +736,11 @@ bool ViewProvider::canDropObject(App::DocumentObject* obj) const { auto vector = getExtensionsDerivedFromType(); #if FC_DEBUG - Base::Console().Log("Check extensions for drop\n"); + Base::Console().log("Check extensions for drop\n"); #endif for (Gui::ViewProviderExtension* ext : vector){ #if FC_DEBUG - Base::Console().Log("Check extensions %s\n", ext->name().c_str()); + Base::Console().log("Check extensions %s\n", ext->name().c_str()); #endif if (ext->extensionCanDropObject(obj)) return true; diff --git a/src/Gui/ViewProviderCoordinateSystem.cpp b/src/Gui/ViewProviderCoordinateSystem.cpp index 32d1465ec1..2689e1031b 100644 --- a/src/Gui/ViewProviderCoordinateSystem.cpp +++ b/src/Gui/ViewProviderCoordinateSystem.cpp @@ -134,7 +134,7 @@ void ViewProviderCoordinateSystem::setTemporaryVisibility(DatumElements elements } } catch (const Base::Exception &ex) { - Base::Console().Error ("%s\n", ex.what() ); + Base::Console().error ("%s\n", ex.what() ); } // Remember & Set self visibility diff --git a/src/Gui/ViewProviderGroupExtension.cpp b/src/Gui/ViewProviderGroupExtension.cpp index 9fdc5f7c90..3577f10a45 100644 --- a/src/Gui/ViewProviderGroupExtension.cpp +++ b/src/Gui/ViewProviderGroupExtension.cpp @@ -75,7 +75,7 @@ bool ViewProviderGroupExtension::extensionCanDropObjects() const { bool ViewProviderGroupExtension::extensionCanDropObject(App::DocumentObject* obj) const { #ifdef FC_DEBUG - Base::Console().Log("Check ViewProviderGroupExtension\n"); + Base::Console().log("Check ViewProviderGroupExtension\n"); #endif auto extobj = getExtendedViewProvider()->getObject(); @@ -89,7 +89,7 @@ bool ViewProviderGroupExtension::extensionCanDropObject(App::DocumentObject* obj // Check for possible cyclic dependencies if we allowed to drop the object const auto& list = obj->getOutList(); if (std::ranges::find(list, extobj) != list.end()) { - Base::Console().Warning("Do not add cyclic dependency to %s\n", extobj->Label.getValue()); + Base::Console().warning("Do not add cyclic dependency to %s\n", extobj->Label.getValue()); return false; } diff --git a/src/Gui/ViewProviderTextureExtension.cpp b/src/Gui/ViewProviderTextureExtension.cpp index 2c86e82150..4ec1d1b5de 100644 --- a/src/Gui/ViewProviderTextureExtension.cpp +++ b/src/Gui/ViewProviderTextureExtension.cpp @@ -95,7 +95,7 @@ void ViewProviderTextureExtension::setCoinAppearance(SoMaterial* pcShapeMaterial { #if 0 if (!source.image.empty()) { - Base::Console().Log("setCoinAppearance(Texture)\n"); + Base::Console().log("setCoinAppearance(Texture)\n"); activateTexture2D(); QByteArray by = QByteArray::fromBase64(QString::fromStdString(source.image).toUtf8()); @@ -105,7 +105,7 @@ void ViewProviderTextureExtension::setCoinAppearance(SoMaterial* pcShapeMaterial Gui::BitmapFactory().convert(image, texture); pcShapeTexture2D->image = texture; } else { - Base::Console().Log("setCoinAppearance(Material)\n"); + Base::Console().log("setCoinAppearance(Material)\n"); activateMaterial(); } #endif diff --git a/src/Gui/ViewProviderVRMLObject.cpp b/src/Gui/ViewProviderVRMLObject.cpp index 0bf4f262d6..b851f8b97e 100644 --- a/src/Gui/ViewProviderVRMLObject.cpp +++ b/src/Gui/ViewProviderVRMLObject.cpp @@ -232,7 +232,7 @@ void ViewProviderVRMLObject::updateData(const App::Property* prop) if (node) { if (!checkRecursion(node)) { - Base::Console().Error("The VRML file causes an infinite recursion!\n"); + Base::Console().error("The VRML file causes an infinite recursion!\n"); return; } pcVRML->addChild(node); diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index 994cba7264..5322086848 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -77,9 +77,9 @@ QWidget* WidgetFactoryInst::createWidget (const char* sName, QWidget* parent) co // this widget class is not registered if (!w) { #ifdef FC_DEBUG - Base::Console().Warning("\"%s\" is not registered\n", sName); + Base::Console().warning("\"%s\" is not registered\n", sName); #else - Base::Console().Log("\"%s\" is not registered\n", sName); + Base::Console().log("\"%s\" is not registered\n", sName); #endif return nullptr; } @@ -87,14 +87,14 @@ QWidget* WidgetFactoryInst::createWidget (const char* sName, QWidget* parent) co try { #ifdef FC_DEBUG const char* cName = qobject_cast(w)->metaObject()->className(); - Base::Console().Log("Widget of type '%s' created.\n", cName); + Base::Console().log("Widget of type '%s' created.\n", cName); #endif } catch (...) { #ifdef FC_DEBUG - Base::Console().Error("%s does not inherit from \"QWidget\"\n", sName); + Base::Console().error("%s does not inherit from \"QWidget\"\n", sName); #else - Base::Console().Log("%s does not inherit from \"QWidget\"\n", sName); + Base::Console().log("%s does not inherit from \"QWidget\"\n", sName); #endif delete w; return nullptr; @@ -119,21 +119,21 @@ Gui::Dialog::PreferencePage* WidgetFactoryInst::createPreferencePage (const char // this widget class is not registered if (!w) { #ifdef FC_DEBUG - Base::Console().Warning("Cannot create an instance of \"%s\"\n", sName); + Base::Console().warning("Cannot create an instance of \"%s\"\n", sName); #else - Base::Console().Log("Cannot create an instance of \"%s\"\n", sName); + Base::Console().log("Cannot create an instance of \"%s\"\n", sName); #endif return nullptr; } if (qobject_cast(w)) { #ifdef FC_DEBUG - Base::Console().Log("Preference page of type '%s' created.\n", w->metaObject()->className()); + Base::Console().log("Preference page of type '%s' created.\n", w->metaObject()->className()); #endif } else { #ifdef FC_DEBUG - Base::Console().Error("%s does not inherit from 'Gui::Dialog::PreferencePage'\n", sName); + Base::Console().error("%s does not inherit from 'Gui::Dialog::PreferencePage'\n", sName); #endif delete w; return nullptr; @@ -172,7 +172,7 @@ QWidget* WidgetFactoryInst::createPrefWidget(const char* sName, QWidget* parent, } catch (...) { #ifdef FC_DEBUG - Base::Console().Error("%s does not inherit from \"PrefWidget\"\n", w->metaObject()->className()); + Base::Console().error("%s does not inherit from \"PrefWidget\"\n", w->metaObject()->className()); #endif delete w; return nullptr; diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index bf3fb836c9..a112f5ba42 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -854,7 +854,7 @@ UrlLabel::UrlLabel(QWidget* parent, Qt::WindowFlags f) , _url (QStringLiteral("http://localhost")) , _launchExternal(true) { - setToolTip(this->_url); + setToolTip(this->_url); setCursor(Qt::PointingHandCursor); if (qApp->styleSheet().isEmpty()) setStyleSheet(QStringLiteral("Gui--UrlLabel {color: #0000FF;text-decoration: underline;}")); @@ -919,9 +919,9 @@ void StatefulLabel::setParameterGroup(const std::string& groupName) { if (_parameterGroup.isValid()) _parameterGroup->Detach(this); - + // Attach to the Parametergroup so we know when it changes - _parameterGroup = App::GetApplication().GetParameterGroupByPath(groupName.c_str()); + _parameterGroup = App::GetApplication().GetParameterGroupByPath(groupName.c_str()); if (_parameterGroup.isValid()) _parameterGroup->Attach(this); } diff --git a/src/Gui/Widgets.h b/src/Gui/Widgets.h index 7eae3c745b..01f4ab54f9 100644 --- a/src/Gui/Widgets.h +++ b/src/Gui/Widgets.h @@ -1,4 +1,4 @@ -/*************************************************************************** + /*************************************************************************** * Copyright (c) 2004 Werner Mayer * * * * This file is part of the FreeCAD CAx development system. * @@ -300,7 +300,7 @@ public: QString url() const; bool launchExternal() const; - + Q_SIGNALS: void linkClicked(QString url); @@ -318,18 +318,18 @@ private: /** - * A text label whose appearance can change based on a specified state. + * A text label whose appearance can change based on a specified state. * - * The state is an arbitrary string exposed as a Qt Property (and thus available for selection via - * a stylesheet). This is intended for things like messages to the user, where a message that is an + * The state is an arbitrary string exposed as a Qt Property (and thus available for selection via + * a stylesheet). This is intended for things like messages to the user, where a message that is an * "error" might be colored differently than one that is a "warning" or a "message". - * + * * In order of style precedence for a given state: User preference > Stylesheet > Default * unless the stylesheet sets the overridePreference, in which case the stylesheet will * take precedence. If a stylesheet sets styles for this widgets states, it should also * set the "handledByStyle" property to ensure the style values are used, rather than the * defaults. - * + * * For example, the .qss might contain: * Gui--StatefulLabel { * qproperty-overridePreference: true; @@ -339,7 +339,7 @@ private: * } * In this case, StatefulLabels with state "special_state" will be colored red, regardless of any * entry in preferences. Use the "overridePreference" stylesheet option with care! - * + * * @author Chris Hennes */ class GuiExport StatefulLabel : public QLabel, public Base::Observer @@ -361,15 +361,15 @@ public: void setParameterGroup(const std::string& groupName); /** Register a state and its corresponding style (optionally attached to a user preference) */ - void registerState(const QString &state, const QString &styleCSS, + void registerState(const QString &state, const QString &styleCSS, const std::string& preferenceName = std::string()); /** For convenience, allow simple color-only states via QColor (optionally attached to a user preference) */ - void registerState(const QString& state, const QColor& color, + void registerState(const QString& state, const QColor& color, const std::string& preferenceName = std::string()); /** For convenience, allow simple color-only states via QColor (optionally attached to a user preference) */ - void registerState(const QString& state, const QColor& foregroundColor, const QColor& backgroundColor, + void registerState(const QString& state, const QColor& foregroundColor, const QColor& backgroundColor, const std::string& preferenceName = std::string()); /** Observes the parameter group and clears the cache if it changes */ @@ -389,7 +389,7 @@ private: QString defaultCSS; std::string preferenceString; }; - + std::map _availableStates; std::map _styleCache; QString _defaultStyle; diff --git a/src/Gui/propertyeditor/PropertyEditor.cpp b/src/Gui/propertyeditor/PropertyEditor.cpp index b47481a257..05d426de68 100644 --- a/src/Gui/propertyeditor/PropertyEditor.cpp +++ b/src/Gui/propertyeditor/PropertyEditor.cpp @@ -380,13 +380,13 @@ void PropertyEditor::recomputeDocument(App::Document* doc) e.reportException(); } catch (const std::exception& e) { - Base::Console().Error( + Base::Console().error( "Unhandled std::exception caught in PropertyEditor::recomputeDocument.\n" "The error message is: %s\n", e.what()); } catch (...) { - Base::Console().Error( + Base::Console().error( "Unhandled unknown exception caught in PropertyEditor::recomputeDocument.\n"); } } @@ -612,7 +612,7 @@ void PropertyEditor::buildUp(PropertyModel::PropertyList&& props, bool _checkDoc checkDocument = _checkDocument; if (committing) { - Base::Console().Warning( + Base::Console().warning( "While committing the data to the property the selection has changed.\n"); delaybuild = true; return; diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 17760c11f3..208e86c894 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -637,13 +637,13 @@ void PropertyItem::setPropertyValue(const std::string& value) } catch (Base::PyException& e) { e.reportException(); - Base::Console().Error("Stack Trace: %s\n", e.getStackTrace().c_str()); + Base::Console().error("Stack Trace: %s\n", e.getStackTrace().c_str()); } catch (Base::Exception& e) { e.reportException(); } catch (...) { - Base::Console().Error("Unknown C++ exception in PropertyItem::setPropertyValue thrown\n"); + Base::Console().error("Unknown C++ exception in PropertyItem::setPropertyValue thrown\n"); } } diff --git a/src/Main/FreeCADGuiPy.cpp b/src/Main/FreeCADGuiPy.cpp index f3a3dc70f8..39ecba36fb 100644 --- a/src/Main/FreeCADGuiPy.cpp +++ b/src/Main/FreeCADGuiPy.cpp @@ -155,7 +155,7 @@ static PyObject* FreeCADGui_showMainWindow(PyObject* /*self*/, PyObject* args) } // if successful then enable Console logger - Base::ILogger* console = Base::Console().Get("Console"); + Base::ILogger* console = Base::Console().get("Console"); if (console) { console->bMsg = true; console->bWrn = true; diff --git a/src/Main/MainCmd.cpp b/src/Main/MainCmd.cpp index 94fe05664e..dfe29dd109 100644 --- a/src/Main/MainCmd.cpp +++ b/src/Main/MainCmd.cpp @@ -141,12 +141,12 @@ int main(int argc, char** argv) exit(1); } catch (...) { - Console().Error("Application unexpectedly terminated\n"); + Console().error("Application unexpectedly terminated\n"); exit(1); } // Destruction phase =========================================================== - Console().Log("FreeCAD terminating...\n"); + Console().log("FreeCAD terminating...\n"); try { // close open documents @@ -158,7 +158,7 @@ int main(int argc, char** argv) // cleans up Application::destruct(); - Console().Log("FreeCAD completely terminated\n"); + Console().log("FreeCAD completely terminated\n"); return 0; } diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp index 2e2f1b371e..02ff633e12 100644 --- a/src/Main/MainGui.cpp +++ b/src/Main/MainGui.cpp @@ -332,11 +332,11 @@ int main(int argc, char** argv) exit(1); } catch (const std::exception& e) { - Base::Console().Error("Application unexpectedly terminated: %s\n", e.what()); + Base::Console().error("Application unexpectedly terminated: %s\n", e.what()); exit(1); } catch (...) { - Base::Console().Error("Application unexpectedly terminated\n"); + Base::Console().error("Application unexpectedly terminated\n"); exit(1); } @@ -345,12 +345,12 @@ int main(int argc, char** argv) std::cerr.rdbuf(oldcerr); // Destruction phase =========================================================== - Base::Console().Log("%s terminating...\n", App::Application::Config()["ExeName"].c_str()); + Base::Console().log("%s terminating...\n", App::Application::Config()["ExeName"].c_str()); // cleans up App::Application::destruct(); - Base::Console().Log("%s completely terminated\n", + Base::Console().log("%s completely terminated\n", App::Application::Config()["ExeName"].c_str()); return 0; @@ -383,14 +383,14 @@ public: , threadId(GetCurrentThreadId()) { std::string name = App::Application::Config()["UserAppData"] + "crash.log"; - Base::Console().AttachObserver(new Base::ConsoleObserverFile(name.c_str())); + Base::Console().attachObserver(new Base::ConsoleObserverFile(name.c_str())); } MyStackWalker(DWORD dwProcessId, HANDLE hProcess) : StackWalker(dwProcessId, hProcess) {} virtual void OnOutput(LPCSTR szText) { - Base::Console().Log("Id: %ld: %s", threadId, szText); + Base::Console().log("Id: %ld: %s", threadId, szText); // StackWalker::OnOutput(szText); } }; @@ -411,10 +411,10 @@ static LONG __stdcall MyCrashHandlerExceptionFilter(EXCEPTION_POINTERS* pEx) #endif MyStackWalker sw; sw.ShowCallstack(GetCurrentThread(), pEx->ContextRecord); - Base::Console().Log("*** Unhandled Exception!\n"); - Base::Console().Log(" ExpCode: 0x%8.8X\n", pEx->ExceptionRecord->ExceptionCode); - Base::Console().Log(" ExpFlags: %d\n", pEx->ExceptionRecord->ExceptionFlags); - Base::Console().Log(" ExpAddress: 0x%8.8X\n", pEx->ExceptionRecord->ExceptionAddress); + Base::Console().log("*** Unhandled Exception!\n"); + Base::Console().log(" ExpCode: 0x%8.8X\n", pEx->ExceptionRecord->ExceptionCode); + Base::Console().log(" ExpFlags: %d\n", pEx->ExceptionRecord->ExceptionFlags); + Base::Console().log(" ExpAddress: 0x%8.8X\n", pEx->ExceptionRecord->ExceptionAddress); bool bFailed = true; HANDLE hFile; diff --git a/src/Mod/Assembly/App/AppAssembly.cpp b/src/Mod/Assembly/App/AppAssembly.cpp index 578c592ca3..562221a891 100644 --- a/src/Mod/Assembly/App/AppAssembly.cpp +++ b/src/Mod/Assembly/App/AppAssembly.cpp @@ -55,7 +55,7 @@ PyMOD_INIT_FUNC(AssemblyApp) } PyObject* mod = Assembly::initModule(); - Base::Console().Log("Loading Assembly module... done\n"); + Base::Console().log("Loading Assembly module... done\n"); // NOTE: To finish the initialization of our own type objects we must diff --git a/src/Mod/Assembly/App/AssemblyObject.cpp b/src/Mod/Assembly/App/AssemblyObject.cpp index e38e46ab14..b7318f0938 100644 --- a/src/Mod/Assembly/App/AssemblyObject.cpp +++ b/src/Mod/Assembly/App/AssemblyObject.cpp @@ -197,7 +197,7 @@ int AssemblyObject::generateSimulation(App::DocumentObject* sim) mbdAssembly->runKINEMATIC(); } catch (...) { - Base::Console().Error("Generation of simulation failed\n"); + Base::Console().error("Generation of simulation failed\n"); motions.clear(); return -1; } @@ -367,7 +367,7 @@ bool AssemblyObject::validateNewPlacements() } if (!oldPlc.isSame(newPlacement)) { - Base::Console().Warning( + Base::Console().warning( "Assembly : Ignoring bad solve, a grounded object (%s) moved.\n", obj->getFullLabel()); return false; @@ -940,7 +940,7 @@ void AssemblyObject::removeUnconnectedJoints(std::vector& App::DocumentObject* obj2 = getMovingPartFromRef(this, joint, "Reference2"); if (!isObjInSetOfObjRefs(obj1, connectedParts) || !isObjInSetOfObjRefs(obj2, connectedParts)) { - Base::Console().Warning( + Base::Console().warning( "%s is unconnected to a grounded part so it is ignored.\n", joint->getFullName()); return true; // Remove joint if any connected object is not in connectedParts @@ -1550,7 +1550,7 @@ std::string AssemblyObject::handleOneSideOfJoint(App::DocumentObject* joint, App::DocumentObject* obj = getObjFromRef(joint, propRefName); if (!part || !obj) { - Base::Console().Warning("The property %s of Joint %s is bad.", + Base::Console().warning("The property %s of Joint %s is bad.", propRefName, joint->getFullName()); return ""; @@ -1614,7 +1614,7 @@ void AssemblyObject::getRackPinionMarkers(App::DocumentObject* joint, Base::Placement plc2 = getPlacementFromProp(joint, "Placement2"); if (!part1 || !obj1) { - Base::Console().Warning("Reference1 of Joint %s is bad.", joint->getFullName()); + Base::Console().warning("Reference1 of Joint %s is bad.", joint->getFullName()); return; } diff --git a/src/Mod/Assembly/App/BomObject.cpp b/src/Mod/Assembly/App/BomObject.cpp index 673a9bfbc6..3a63fd52e0 100644 --- a/src/Mod/Assembly/App/BomObject.cpp +++ b/src/Mod/Assembly/App/BomObject.cpp @@ -120,7 +120,7 @@ void BomObject::saveCustomColumnData() std::string columnName = getText(0, i); if (columnName != "Index" && columnName != "Name" && columnName != "Quantity" && columnName != "File Name") { - // Base::Console().Warning("row col %d %d\n", row, col); + // Base::Console().warning("row col %d %d\n", row, col); // save custom data if any. std::string text = getText(row, col); if (text != "") { @@ -268,7 +268,7 @@ std::string BomObject::getBomPropertyValue(App::DocumentObject* obj, const std:: App::Property* prop = obj->getPropertyByName(baseName.c_str()); if (!prop) { - Base::Console().Warning("Property not found: %s\n", baseName.c_str()); + Base::Console().warning("Property not found: %s\n", baseName.c_str()); return QObject::tr("N/A").toStdString(); } @@ -292,7 +292,7 @@ std::string BomObject::getBomPropertyValue(App::DocumentObject* obj, const std:: return propBool->getValue() ? "True" : "False"; } - Base::Console().Warning("Property type not supported for: %s\n", prop->getName()); + Base::Console().warning("Property type not supported for: %s\n", prop->getName()); return QObject::tr("Not supported").toStdString(); } diff --git a/src/Mod/Assembly/Gui/AppAssemblyGui.cpp b/src/Mod/Assembly/Gui/AppAssemblyGui.cpp index d24c4ab266..eb0e09c932 100644 --- a/src/Mod/Assembly/Gui/AppAssemblyGui.cpp +++ b/src/Mod/Assembly/Gui/AppAssemblyGui.cpp @@ -54,7 +54,7 @@ PyMOD_INIT_FUNC(AssemblyGui) } PyObject* mod = AssemblyGui::initModule(); - Base::Console().Log("Loading AssemblyGui module... done\n"); + Base::Console().log("Loading AssemblyGui module... done\n"); // NOTE: To finish the initialization of our own type objects we must diff --git a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp index 1aa6b9f324..22ff0efa42 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp @@ -85,7 +85,7 @@ void printPlacement(Base::Placement plc, const char* name) double angle; Base::Rotation rot = plc.getRotation(); rot.getRawValue(axis, angle); - Base::Console().Warning( + Base::Console().warning( "placement %s : position (%.1f, %.1f, %.1f) - axis (%.1f, %.1f, %.1f) angle %.1f\n", name, pos.x, @@ -340,7 +340,7 @@ bool ViewProviderAssembly::mouseMove(const SbVec2s& cursorPos, Gui::View3DInvent return tryMouseMove(cursorPos, viewer); } catch (const Base::Exception& e) { - Base::Console().Warning("%s\n", e.what()); + Base::Console().warning("%s\n", e.what()); return false; } } @@ -822,7 +822,7 @@ void ViewProviderAssembly::initMove(const SbVec2s& cursorPos, Gui::View3DInvento tryInitMove(cursorPos, viewer); } catch (const Base::Exception& e) { - Base::Console().Warning("%s\n", e.what()); + Base::Console().warning("%s\n", e.what()); } } diff --git a/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp b/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp index 9802778efd..ad52a916db 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderAssemblyLink.cpp @@ -76,7 +76,7 @@ bool ViewProviderAssemblyLink::setEdit(int mode) auto* assemblyLink = dynamic_cast(getObject()); if (!assemblyLink->isRigid() && mode == (int)ViewProvider::Transform) { - Base::Console().UserTranslatedNotification( + Base::Console().userTranslatedNotification( "Flexible sub-assemblies cannot be transformed."); return true; } @@ -106,7 +106,7 @@ bool ViewProviderAssemblyLink::onDelete(const std::vector& subNames { Q_UNUSED(subNames) - Base::Console().Warning("onDelete\n"); + Base::Console().warning("onDelete\n"); Gui::Command::doCommand(Gui::Command::Doc, "App.getDocument(\"%s\").getObject(\"%s\").removeObjectsFromDocument()", diff --git a/src/Mod/CAM/App/AppPath.cpp b/src/Mod/CAM/App/AppPath.cpp index 15001275db..2e57c22c85 100644 --- a/src/Mod/CAM/App/AppPath.cpp +++ b/src/Mod/CAM/App/AppPath.cpp @@ -63,7 +63,7 @@ PyMOD_INIT_FUNC(PathApp) } PyObject* pathModule = PathApp::initModule(); - Base::Console().Log("Loading Path module... done\n"); + Base::Console().log("Loading Path module... done\n"); Py::Object module(pathModule); diff --git a/src/Mod/CAM/App/AppPathPy.cpp b/src/Mod/CAM/App/AppPathPy.cpp index a1a58e3e99..1e73697a9e 100644 --- a/src/Mod/CAM/App/AppPathPy.cpp +++ b/src/Mod/CAM/App/AppPathPy.cpp @@ -63,7 +63,7 @@ else { \ str += "No OCCT Exception Message"; \ } \ - Base::Console().Error(str.c_str()); \ + Base::Console().error(str.c_str()); \ PyErr_SetString(Part::PartExceptionOCCError, str.c_str()); \ } \ catch (Base::Exception & e) \ @@ -81,7 +81,7 @@ str += "STL exception thrown ("; \ str += e.what(); \ str += ")"; \ - Base::Console().Error(str.c_str()); \ + Base::Console().error(str.c_str()); \ PyErr_SetString(Base::PyExc_FC_GeneralError, str.c_str()); \ } \ catch (const char* e) \ diff --git a/src/Mod/CAM/App/Path.cpp b/src/Mod/CAM/App/Path.cpp index f3f4f8e7e4..6eda0ad030 100644 --- a/src/Mod/CAM/App/Path.cpp +++ b/src/Mod/CAM/App/Path.cpp @@ -154,7 +154,7 @@ double Toolpath::getCycleTime(double hFeed, double vFeed, double hRapid, double ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/Mod/CAM"); if (!hGrp->GetBool("WarningsSuppressAllSpeeds", true)) { - Base::Console().Warning("Feed Rate Error: Check Tool Controllers have Feed Rates"); + Base::Console().warning("Feed Rate Error: Check Tool Controllers have Feed Rates"); } return 0; } diff --git a/src/Mod/CAM/Gui/AppPathGui.cpp b/src/Mod/CAM/Gui/AppPathGui.cpp index 856d3424c9..2dd45cb5ec 100644 --- a/src/Mod/CAM/Gui/AppPathGui.cpp +++ b/src/Mod/CAM/Gui/AppPathGui.cpp @@ -68,7 +68,7 @@ PyMOD_INIT_FUNC(PathGui) PyMOD_Return(nullptr); } PyObject* mod = PathGui::initModule(); - Base::Console().Log("Loading GUI of Path module... done\n"); + Base::Console().log("Loading GUI of Path module... done\n"); // instantiating the commands CreatePathCommands(); diff --git a/src/Mod/CAM/Gui/Command.cpp b/src/Mod/CAM/Gui/Command.cpp index 008445f387..a0b1311a2e 100644 --- a/src/Mod/CAM/Gui/Command.cpp +++ b/src/Mod/CAM/Gui/Command.cpp @@ -76,7 +76,7 @@ void CmdPathArea::activated(int iMsg) } for (const std::string& name : subnames) { if (name.compare(0, 4, "Face") && name.compare(0, 4, "Edge")) { - Base::Console().Error("Selected shape is not 2D\n"); + Base::Console().error("Selected shape is not 2D\n"); return; } @@ -159,14 +159,14 @@ void CmdPathAreaWorkplane::activated(int iMsg) getSelection().getSelectionEx(nullptr, Part::Feature::getClassTypeId())) { const std::vector& subnames = selObj.getSubNames(); if (subnames.size() > 1) { - Base::Console().Error("Please select one sub shape object for plane only\n"); + Base::Console().error("Please select one sub shape object for plane only\n"); return; } const Part::Feature* pcObj = static_cast(selObj.getObject()); if (subnames.empty()) { if (pcObj->isDerivedFrom()) { if (!areaName.empty()) { - Base::Console().Error("Please select one FeatureArea only\n"); + Base::Console().error("Please select one FeatureArea only\n"); return; } areaName = pcObj->getNameInDocument(); @@ -174,12 +174,12 @@ void CmdPathAreaWorkplane::activated(int iMsg) } for (TopExp_Explorer it(pcObj->Shape.getShape().getShape(), TopAbs_SHELL); it.More(); it.Next()) { - Base::Console().Error("Selected shape is not 2D\n"); + Base::Console().error("Selected shape is not 2D\n"); return; } } if (!planeName.empty()) { - Base::Console().Error("Please select one shape object for plane only\n"); + Base::Console().error("Please select one shape object for plane only\n"); return; } else { @@ -189,7 +189,7 @@ void CmdPathAreaWorkplane::activated(int iMsg) for (const std::string& name : subnames) { if (name.compare(0, 4, "Face") && name.compare(0, 4, "Edge")) { - Base::Console().Error("Selected shape is not 2D\n"); + Base::Console().error("Selected shape is not 2D\n"); return; } std::ostringstream subname; @@ -198,11 +198,11 @@ void CmdPathAreaWorkplane::activated(int iMsg) } } if (areaName.empty()) { - Base::Console().Error("Please select one FeatureArea\n"); + Base::Console().error("Please select one FeatureArea\n"); return; } if (planeName.empty()) { - Base::Console().Error("Please select one shape object\n"); + Base::Console().error("Please select one shape object\n"); return; } @@ -258,7 +258,7 @@ void CmdPathCompound::activated(int iMsg) cmd << "FreeCAD.activeDocument()." << pcPathObject->getNameInDocument() << ","; } else { - Base::Console().Error( + Base::Console().error( "Only Path objects must be selected before running this command\n"); return; } @@ -277,7 +277,7 @@ void CmdPathCompound::activated(int iMsg) updateActive(); } else { - Base::Console().Error("At least one Path object must be selected\n"); + Base::Console().error("At least one Path object must be selected\n"); return; } } @@ -320,7 +320,7 @@ void CmdPathShape::activated(int iMsg) } for (const std::string& name : subnames) { if (name.compare(0, 4, "Face") && name.compare(0, 4, "Edge")) { - Base::Console().Warning("Ignored shape %s %s\n", + Base::Console().warning("Ignored shape %s %s\n", pcObj->getNameInDocument(), name.c_str()); continue; diff --git a/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp b/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp index 3b8d1dcf5b..de91800d12 100644 --- a/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp +++ b/src/Mod/CAM/PathSimulator/App/AppPathSimulator.cpp @@ -71,7 +71,7 @@ PyMOD_INIT_FUNC(PathSimulator) // PyObject* mod = PathSimulator::initModule(); - Base::Console().Log("Loading PathSimulator module.... done\n"); + Base::Console().log("Loading PathSimulator module.... done\n"); // Add Types to module Base::Interpreter().addType(&PathSimulator::PathSimPy::Type, mod, "PathSim"); diff --git a/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp b/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp index 3df111fb77..631e6dc4e6 100644 --- a/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp +++ b/src/Mod/CAM/PathSimulator/App/PathSimPyImp.cpp @@ -134,7 +134,7 @@ PyObject* PathSimPy::ApplyCommand(PyObject* args, PyObject* kwds) Base::Placement* pos = static_cast(pObjPlace)->getPlacementPtr(); Path::Command* cmd = static_cast(pObjCmd)->getCommandPtr(); Base::Placement* newpos = sim->ApplyCommand(pos, cmd); - // Base::Console().Log("Done...\n"); + // Base::Console().log("Done...\n"); // Base::Console().Refresh(); Base::PlacementPy* newposPy = new Base::PlacementPy(newpos); return newposPy; diff --git a/src/Mod/CAM/PathSimulator/App/VolSim.cpp b/src/Mod/CAM/PathSimulator/App/VolSim.cpp index b915b64ee4..7d45033b35 100644 --- a/src/Mod/CAM/PathSimulator/App/VolSim.cpp +++ b/src/Mod/CAM/PathSimulator/App/VolSim.cpp @@ -777,7 +777,7 @@ cSimTool::cSimTool(const TopoDS_Shape& toolShape, float res) // Report the performance of the profile extraction // auto stop = std::chrono::high_resolution_clock::now(); // auto duration = std::chrono::duration_cast(stop - start); - // Base::Console().Log("cSimTool::cSimTool - Tool Profile Extraction Took: %i ms\n", + // Base::Console().log("cSimTool::cSimTool - Tool Profile Extraction Took: %i ms\n", // duration.count() / 1000); } diff --git a/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp b/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp index 8f9ce1d39e..c50b397d52 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/AppCAMSimulator.cpp @@ -71,7 +71,7 @@ PyMOD_INIT_FUNC(CAMSimulator) // PyObject* mod = CAMSimulator::initModule(); - Base::Console().Log("Loading CAMSimulator module.... done\n"); + Base::Console().log("Loading CAMSimulator module.... done\n"); // Add Types to module Base::Interpreter().addType(&CAMSimulator::CAMSimPy::Type, mod, "PathSim"); diff --git a/src/Mod/CAM/PathSimulator/AppGL/Shader.cpp b/src/Mod/CAM/PathSimulator/AppGL/Shader.cpp index f9d614ab15..a18c98146f 100644 --- a/src/Mod/CAM/PathSimulator/AppGL/Shader.cpp +++ b/src/Mod/CAM/PathSimulator/AppGL/Shader.cpp @@ -196,7 +196,7 @@ bool CheckCompileResult(int shaderId, const char* shaderName, bool isVertex) len = 1020; } log[len] = 0; - Base::Console().Error(log); + Base::Console().error(log); return true; } diff --git a/src/Mod/Cloud/App/AppCloud.cpp b/src/Mod/Cloud/App/AppCloud.cpp index 3ec811dc04..e2b7956b73 100644 --- a/src/Mod/Cloud/App/AppCloud.cpp +++ b/src/Mod/Cloud/App/AppCloud.cpp @@ -62,7 +62,7 @@ XERCES_CPP_NAMESPACE_USE PyMOD_INIT_FUNC(Cloud) { PyObject* mod = Cloud::initModule(); - Base::Console().Log("Loading Cloud module... done\n"); + Base::Console().log("Loading Cloud module... done\n"); PyMOD_Return(mod); } @@ -1495,7 +1495,7 @@ bool Cloud::Module::cloudRestore(const char* BucketName) doc->Restore(reader); } catch (const Base::Exception& e) { - Base::Console().Error("Invalid Document.xml: %s\n", e.what()); + Base::Console().error("Invalid Document.xml: %s\n", e.what()); } // Special handling for Gui document, the view representations must already diff --git a/src/Mod/Cloud/Gui/AppCloudGui.cpp b/src/Mod/Cloud/Gui/AppCloudGui.cpp index 5990cfccdf..f74d1a1a8d 100644 --- a/src/Mod/Cloud/Gui/AppCloudGui.cpp +++ b/src/Mod/Cloud/Gui/AppCloudGui.cpp @@ -75,6 +75,6 @@ PyMOD_INIT_FUNC(CloudGui) // // PyObject* mod = CloudGui::initModule(); - Base::Console().Log("Loading GUI of Cloud module... done\n"); + Base::Console().log("Loading GUI of Cloud module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Cloud/Gui/Command.cpp b/src/Mod/Cloud/Gui/Command.cpp index d1f0f045b9..ae8f107ed5 100644 --- a/src/Mod/Cloud/Gui/Command.cpp +++ b/src/Mod/Cloud/Gui/Command.cpp @@ -49,7 +49,7 @@ CmdCloudTest::CmdCloudTest() void CmdCloudTest::activated(int) { - Base::Console().Message("Hello, World!\n"); + Base::Console().message("Hello, World!\n"); } void CreateCloudCommands(void) diff --git a/src/Mod/Draft/App/AppDraftUtils.cpp b/src/Mod/Draft/App/AppDraftUtils.cpp index 4de915fec9..fade5297ac 100644 --- a/src/Mod/Draft/App/AppDraftUtils.cpp +++ b/src/Mod/Draft/App/AppDraftUtils.cpp @@ -43,6 +43,6 @@ PyMOD_INIT_FUNC(DraftUtils) PyMOD_Return(nullptr); } PyObject* mod = DraftUtils::initModule(); - Base::Console().Log("Loading DraftUtils module... done\n"); + Base::Console().log("Loading DraftUtils module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Draft/App/AppDraftUtilsPy.cpp b/src/Mod/Draft/App/AppDraftUtilsPy.cpp index fcb07767f7..a0b831c097 100644 --- a/src/Mod/Draft/App/AppDraftUtilsPy.cpp +++ b/src/Mod/Draft/App/AppDraftUtilsPy.cpp @@ -45,7 +45,7 @@ public: private: Py::Object readDXF(const Py::Tuple& /*args*/) { - Base::Console().Warning("DraftUtils.readDXF is removed. " + Base::Console().warning("DraftUtils.readDXF is removed. " "Use Import.readDxf instead.\n"); return Py::None(); } diff --git a/src/Mod/Drawing/App/AppDrawing.cpp b/src/Mod/Drawing/App/AppDrawing.cpp index 21556f4fef..e25ce90bfd 100644 --- a/src/Mod/Drawing/App/AppDrawing.cpp +++ b/src/Mod/Drawing/App/AppDrawing.cpp @@ -44,7 +44,7 @@ PyMOD_INIT_FUNC(Drawing) PyMOD_Return(nullptr); } PyObject* mod = Drawing::initModule(); - Base::Console().Log("Loading Drawing module... done\n"); + Base::Console().log("Loading Drawing module... done\n"); // NOTE: To finish the initialization of our own type objects we must diff --git a/src/Mod/Drawing/App/AppDrawingPy.cpp b/src/Mod/Drawing/App/AppDrawingPy.cpp index 585b977595..88bd819c40 100644 --- a/src/Mod/Drawing/App/AppDrawingPy.cpp +++ b/src/Mod/Drawing/App/AppDrawingPy.cpp @@ -123,7 +123,7 @@ private: else { str += "No OCCT Exception Message"; } - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::Exception(Part::PartExceptionOCCError, str); } catch (const Base::Exception& e) { @@ -139,7 +139,7 @@ private: str += "C++ exception thrown ("; str += e.what(); str += ")"; - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::RuntimeError(str); } } diff --git a/src/Mod/Drawing/App/FeaturePage.cpp b/src/Mod/Drawing/App/FeaturePage.cpp index d4cc5473cd..2e4aa60008 100644 --- a/src/Mod/Drawing/App/FeaturePage.cpp +++ b/src/Mod/Drawing/App/FeaturePage.cpp @@ -149,7 +149,7 @@ App::DocumentObjectExecReturn* FeaturePage::execute(void) fi.setFile(App::Application::getResourceDir() + "Mod/Drawing/Templates/" + fi.fileName()); // try the redirect if (!fi.isReadable()) { - Base::Console().Log("FeaturePage::execute() not able to open %s!\n", + Base::Console().log("FeaturePage::execute() not able to open %s!\n", Template.getValue()); std::string error = std::string("Cannot open file ") + Template.getValue(); return new App::DocumentObjectExecReturn(error); diff --git a/src/Mod/Drawing/Gui/AppDrawingGui.cpp b/src/Mod/Drawing/Gui/AppDrawingGui.cpp index ce4f17fe8f..2b7123c10a 100644 --- a/src/Mod/Drawing/Gui/AppDrawingGui.cpp +++ b/src/Mod/Drawing/Gui/AppDrawingGui.cpp @@ -58,7 +58,7 @@ PyMOD_INIT_FUNC(DrawingGui) } PyObject* mod = DrawingGui::initModule(); - Base::Console().Log("Loading GUI of Drawing module... done\n"); + Base::Console().log("Loading GUI of Drawing module... done\n"); // instantiating the commands CreateDrawingCommands(); diff --git a/src/Mod/Fem/App/AppFem.cpp b/src/Mod/Fem/App/AppFem.cpp index d3ed832784..e59e7930fe 100644 --- a/src/Mod/Fem/App/AppFem.cpp +++ b/src/Mod/Fem/App/AppFem.cpp @@ -87,7 +87,7 @@ PyMOD_INIT_FUNC(Fem) PyMOD_Return(nullptr); } PyObject* femModule = Fem::initModule(); - Base::Console().Log("Loading Fem module... done\n"); + Base::Console().log("Loading Fem module... done\n"); // clang-format off Fem::StdMeshers_Arithmetic1DPy ::init_type(femModule); diff --git a/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp b/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp index 7675962655..22e3ce377d 100644 --- a/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/App/FemConstraintFluidBoundary.cpp @@ -131,8 +131,8 @@ void ConstraintFluidBoundary::onChanged(const App::Property* prop) Subtype.setEnums(OutletSubtypes); } else { - Base::Console().Message(boundaryType.c_str()); - Base::Console().Message(" Error: this boundaryType is not defined\n"); + Base::Console().message(boundaryType.c_str()); + Base::Console().message(" Error: this boundaryType is not defined\n"); } // must set a default (0 or 1) as freestream has only 2 subtypes diff --git a/src/Mod/Fem/App/FemMesh.cpp b/src/Mod/Fem/App/FemMesh.cpp index c026483702..f2ccf3f619 100644 --- a/src/Mod/Fem/App/FemMesh.cpp +++ b/src/Mod/Fem/App/FemMesh.cpp @@ -572,7 +572,7 @@ std::set FemMesh::getNodesBySolid(const TopoDS_Solid& solid) const TopAbs_ShapeEnum shapetype = TopAbs_SHAPE; ShapeAnalysis_ShapeTolerance analysis; double limit = analysis.Tolerance(solid, 1, shapetype); - Base::Console().Log("The limit if a node is in or out: %.12lf in scientific: %.4e \n", + Base::Console().log("The limit if a node is in or out: %.12lf in scientific: %.4e \n", limit, limit); @@ -971,7 +971,7 @@ public: meshds->AddFaceWithID(n0, n1, n2, element_id); } else { - Base::Console().Warning("NASTRAN: Failed to add face %d from nodes: (%d, %d, %d,)\n", + Base::Console().warning("NASTRAN: Failed to add face %d from nodes: (%d, %d, %d,)\n", element_id, elements[0], elements[1], @@ -1038,7 +1038,7 @@ public: meshds->AddVolumeWithID(n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, element_id); } else { - Base::Console().Warning("NASTRAN: Failed to add volume %d from nodes: (%d, %d, %d, %d, " + Base::Console().warning("NASTRAN: Failed to add volume %d from nodes: (%d, %d, %d, %d, " "%d, %d, %d, %d, %d, %d)\n", element_id, elements[1], @@ -1299,7 +1299,7 @@ class CHEXA2Element: public NastranElement void FemMesh::readNastran(const std::string& Filename) { Base::TimeElapsed Start; - Base::Console().Log("Start: FemMesh::readNastran() =================================\n"); + Base::Console().log("Start: FemMesh::readNastran() =================================\n"); _Mtrx = Base::Matrix4D(); @@ -1375,7 +1375,7 @@ void FemMesh::readNastran(const std::string& Filename) } while (inputfile.good()); inputfile.close(); - Base::Console().Log(" %f: File read, start building mesh\n", + Base::Console().log(" %f: File read, start building mesh\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // Now fill the SMESH datastructure @@ -1386,14 +1386,14 @@ void FemMesh::readNastran(const std::string& Filename) it->addToMesh(meshds); } - Base::Console().Log(" %f: Done \n", + Base::Console().log(" %f: Done \n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); } void FemMesh::readNastran95(const std::string& Filename) { Base::TimeElapsed Start; - Base::Console().Log("Start: FemMesh::readNastran95() =================================\n"); + Base::Console().log("Start: FemMesh::readNastran95() =================================\n"); _Mtrx = Base::Matrix4D(); @@ -1428,7 +1428,7 @@ void FemMesh::readNastran95(const std::string& Filename) } else if (line1.find("GRID") != std::string::npos) // We found a Grid line { - // Base::Console().Log("Found a GRID\n"); + // Base::Console().log("Found a GRID\n"); // D06.inp // GRID 109 .9 .7 // Now lets extract the GRID Points = Nodes @@ -1502,7 +1502,7 @@ void FemMesh::readNastran95(const std::string& Filename) } while (inputfile.good()); inputfile.close(); - Base::Console().Log(" %f: File read, start building mesh\n", + Base::Console().log(" %f: File read, start building mesh\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // Now fill the SMESH datastructure @@ -1517,14 +1517,14 @@ void FemMesh::readNastran95(const std::string& Filename) it->addToMesh(meshds); } - Base::Console().Log(" %f: Done \n", + Base::Console().log(" %f: Done \n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); } void FemMesh::readAbaqus(const std::string& FileName) { Base::TimeElapsed Start; - Base::Console().Log("Start: FemMesh::readAbaqus() =================================\n"); + Base::Console().log("Start: FemMesh::readAbaqus() =================================\n"); /* Python command to read Abaqus inp mesh file from test suite: @@ -1557,14 +1557,14 @@ void FemMesh::readAbaqus(const std::string& FileName) catch (Py::Exception& e) { e.clear(); } - Base::Console().Log(" %f: Done \n", + Base::Console().log(" %f: Done \n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); } void FemMesh::readZ88(const std::string& FileName) { Base::TimeElapsed Start; - Base::Console().Log("Start: FemMesh::readZ88() =================================\n"); + Base::Console().log("Start: FemMesh::readZ88() =================================\n"); /* Python command to read Z88 mesh file from test suite: @@ -1597,7 +1597,7 @@ void FemMesh::readZ88(const std::string& FileName) catch (Py::Exception& e) { e.clear(); } - Base::Console().Log(" %f: Done \n", + Base::Console().log(" %f: Done \n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); } @@ -2226,7 +2226,7 @@ void FemMesh::writeABAQUS(const std::string& Filename, void FemMesh::writeZ88(const std::string& FileName) const { Base::TimeElapsed Start; - Base::Console().Log("Start: FemMesh::writeZ88() =================================\n"); + Base::Console().log("Start: FemMesh::writeZ88() =================================\n"); /* Python command to export FemMesh from StartWB FEM 3D example: @@ -2258,41 +2258,41 @@ void FemMesh::write(const char* FileName) const Base::FileInfo File(FileName); if (File.hasExtension("unv")) { - Base::Console().Log("FEM mesh object will be exported to unv format.\n"); + Base::Console().log("FEM mesh object will be exported to unv format.\n"); // write UNV file myMesh->ExportUNV(File.filePath().c_str()); } else if (File.hasExtension("med")) { - Base::Console().Log("FEM mesh object will be exported to med format.\n"); + Base::Console().log("FEM mesh object will be exported to med format.\n"); myMesh->ExportMED(File.filePath().c_str(), File.fileNamePure().c_str(), false, 2); // 2 means MED_V2_2 version! } else if (File.hasExtension("stl")) { - Base::Console().Log("FEM mesh object will be exported to stl format.\n"); + Base::Console().log("FEM mesh object will be exported to stl format.\n"); // export to stl file myMesh->ExportSTL(File.filePath().c_str(), false); } else if (File.hasExtension("dat")) { - Base::Console().Log("FEM mesh object will be exported to dat format.\n"); + Base::Console().log("FEM mesh object will be exported to dat format.\n"); // export to dat file myMesh->ExportDAT(File.filePath().c_str()); } else if (File.hasExtension("inp")) { - Base::Console().Log("FEM mesh object will be exported to inp format.\n"); + Base::Console().log("FEM mesh object will be exported to inp format.\n"); // write ABAQUS Output writeABAQUS(File.filePath(), 1, false); } #ifdef FC_USE_VTK else if (File.hasExtension({"vtk", "vtu"})) { - Base::Console().Log("FEM mesh object will be exported to either vtk or vtu format.\n"); + Base::Console().log("FEM mesh object will be exported to either vtk or vtu format.\n"); // write unstructure mesh to VTK format *.vtk and *.vtu writeVTK(File.filePath().c_str()); } #endif else if (File.hasExtension("z88")) { - Base::Console().Log("FEM mesh object will be exported to z88 format.\n"); + Base::Console().log("FEM mesh object will be exported to z88 format.\n"); // write z88 file writeZ88(File.filePath()); } diff --git a/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp b/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp index 64cba0c980..9a361093d7 100644 --- a/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp +++ b/src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp @@ -131,7 +131,7 @@ App::DocumentObjectExecReturn* FemMeshShapeNetgenObject::execute() // int numPris = info.NbPrisms(); // int numHedr = info.NbPolyhedrons(); - Base::Console().Log("NetgenMesh: %i Nodes, %i Volumes, %i Faces\n", numNode, numVolu, numFaces); + Base::Console().log("NetgenMesh: %i Nodes, %i Volumes, %i Faces\n", numNode, numVolu, numFaces); FemMesh.setValue(newMesh); return App::DocumentObject::StdReturn; diff --git a/src/Mod/Fem/App/FemPostPipeline.cpp b/src/Mod/Fem/App/FemPostPipeline.cpp index e76954d4a9..2689b66278 100644 --- a/src/Mod/Fem/App/FemPostPipeline.cpp +++ b/src/Mod/Fem/App/FemPostPipeline.cpp @@ -633,11 +633,11 @@ unsigned int FemPostPipeline::getFrameNumber() void FemPostPipeline::load(FemResultObject* res) { if (!res->Mesh.getValue()) { - Base::Console().Log("Result mesh object is empty.\n"); + Base::Console().log("Result mesh object is empty.\n"); return; } if (!res->Mesh.getValue()->isDerivedFrom()) { - Base::Console().Log("Result mesh object is not derived from Fem::FemMeshObject.\n"); + Base::Console().log("Result mesh object is not derived from Fem::FemMeshObject.\n"); return; } diff --git a/src/Mod/Fem/App/FemVTKTools.cpp b/src/Mod/Fem/App/FemVTKTools.cpp index e8cb884d93..d17b0b590a 100644 --- a/src/Mod/Fem/App/FemVTKTools.cpp +++ b/src/Mod/Fem/App/FemVTKTools.cpp @@ -155,8 +155,8 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me { const vtkIdType nPoints = dataset->GetNumberOfPoints(); const vtkIdType nCells = dataset->GetNumberOfCells(); - Base::Console().Log("%d nodes/points and %d cells/elements found!\n", nPoints, nCells); - Base::Console().Log("Build SMESH mesh out of the vtk mesh data.\n", nPoints, nCells); + Base::Console().log("%d nodes/points and %d cells/elements found!\n", nPoints, nCells); + Base::Console().log("Build SMESH mesh out of the vtk mesh data.\n", nPoints, nCells); // Now fill the SMESH datastructure SMESH_Mesh* smesh = mesh->getSMesh(); @@ -295,7 +295,7 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me // not handled cases default: { - Base::Console().Error( + Base::Console().error( "Only common 1D, 2D and 3D Cells are supported in VTK mesh import\n"); break; } @@ -306,13 +306,13 @@ void FemVTKTools::importVTKMesh(vtkSmartPointer dataset, FemMesh* me FemMesh* FemVTKTools::readVTKMesh(const char* filename, FemMesh* mesh) { Base::TimeElapsed Start; - Base::Console().Log("Start: read FemMesh from VTK unstructuredGrid ======================\n"); + Base::Console().log("Start: read FemMesh from VTK unstructuredGrid ======================\n"); Base::FileInfo f(filename); if (f.hasExtension("vtu")) { vtkSmartPointer dataset = readVTKFile(filename); if (!dataset.Get()) { - Base::Console().Error("Failed to load file %s\n", filename); + Base::Console().error("Failed to load file %s\n", filename); return nullptr; } importVTKMesh(dataset, mesh); @@ -320,7 +320,7 @@ FemMesh* FemVTKTools::readVTKMesh(const char* filename, FemMesh* mesh) else if (f.hasExtension("pvtu")) { vtkSmartPointer dataset = readVTKFile(filename); if (!dataset.Get()) { - Base::Console().Error("Failed to load file %s\n", filename); + Base::Console().error("Failed to load file %s\n", filename); return nullptr; } importVTKMesh(dataset, mesh); @@ -328,18 +328,18 @@ FemMesh* FemVTKTools::readVTKMesh(const char* filename, FemMesh* mesh) else if (f.hasExtension("vtk")) { vtkSmartPointer dataset = readVTKFile(filename); if (!dataset.Get()) { - Base::Console().Error("Failed to load file %s\n", filename); + Base::Console().error("Failed to load file %s\n", filename); return nullptr; } importVTKMesh(dataset, mesh); } else { - Base::Console().Error("file name extension is not supported\n"); + Base::Console().error("file name extension is not supported\n"); return nullptr; } // Mesh should link to the part feature, in order to set up FemConstraint - Base::Console().Log(" %f: Done \n", + Base::Console().log(" %f: Done \n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); return mesh; } @@ -348,7 +348,7 @@ void exportFemMeshEdges(vtkSmartPointer& elemArray, std::vector& types, const SMDS_EdgeIteratorPtr& aEdgeIter) { - Base::Console().Log(" Start: VTK mesh builder edges.\n"); + Base::Console().log(" Start: VTK mesh builder edges.\n"); while (aEdgeIter->more()) { const SMDS_MeshEdge* aEdge = aEdgeIter->next(); @@ -365,14 +365,14 @@ void exportFemMeshEdges(vtkSmartPointer& elemArray, } } - Base::Console().Log(" End: VTK mesh builder edges.\n"); + Base::Console().log(" End: VTK mesh builder edges.\n"); } void exportFemMeshFaces(vtkSmartPointer& elemArray, std::vector& types, const SMDS_FaceIteratorPtr& aFaceIter) { - Base::Console().Log(" Start: VTK mesh builder faces.\n"); + Base::Console().log(" Start: VTK mesh builder faces.\n"); while (aFaceIter->more()) { const SMDS_MeshFace* aFace = aFaceIter->next(); @@ -397,14 +397,14 @@ void exportFemMeshFaces(vtkSmartPointer& elemArray, } } - Base::Console().Log(" End: VTK mesh builder faces.\n"); + Base::Console().log(" End: VTK mesh builder faces.\n"); } void exportFemMeshCells(vtkSmartPointer& elemArray, std::vector& types, const SMDS_VolumeIteratorPtr& aVolIter) { - Base::Console().Log(" Start: VTK mesh builder volumes.\n"); + Base::Console().log(" Start: VTK mesh builder volumes.\n"); while (aVolIter->more()) { const SMDS_MeshVolume* aVol = aVolIter->next(); @@ -438,7 +438,7 @@ void exportFemMeshCells(vtkSmartPointer& elemArray, } } - Base::Console().Log(" End: VTK mesh builder volumes.\n"); + Base::Console().log(" End: VTK mesh builder volumes.\n"); } void FemVTKTools::exportVTKMesh(const FemMesh* mesh, @@ -447,12 +447,12 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh, float scale) { - Base::Console().Log("Start: VTK mesh builder ======================\n"); + Base::Console().log("Start: VTK mesh builder ======================\n"); const SMESH_Mesh* smesh = mesh->getSMesh(); const SMESHDS_Mesh* meshDS = smesh->GetMeshDS(); // nodes - Base::Console().Log(" Start: VTK mesh builder nodes.\n"); + Base::Console().log(" Start: VTK mesh builder nodes.\n"); vtkSmartPointer points = vtkSmartPointer::New(); SMDS_NodeIteratorPtr aNodeIter = meshDS->nodesIterator(); @@ -472,10 +472,10 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh, grid->SetPoints(points); // nodes debugging const SMDS_MeshInfo& info = meshDS->GetMeshInfo(); - Base::Console().Log(" Size of nodes in SMESH grid: %i.\n", info.NbNodes()); + Base::Console().log(" Size of nodes in SMESH grid: %i.\n", info.NbNodes()); const vtkIdType nNodes = grid->GetNumberOfPoints(); - Base::Console().Log(" Size of nodes in VTK grid: %i.\n", nNodes); - Base::Console().Log(" End: VTK mesh builder nodes.\n"); + Base::Console().log(" Size of nodes in VTK grid: %i.\n", nNodes); + Base::Console().log(" End: VTK mesh builder nodes.\n"); vtkSmartPointer elemArray = vtkSmartPointer::New(); std::vector types; @@ -512,19 +512,19 @@ void FemVTKTools::exportVTKMesh(const FemMesh* mesh, grid->SetCells(types.data(), elemArray); } - Base::Console().Log("End: VTK mesh builder ======================\n"); + Base::Console().log("End: VTK mesh builder ======================\n"); } void FemVTKTools::writeVTKMesh(const char* filename, const FemMesh* mesh, bool highest) { Base::TimeElapsed Start; - Base::Console().Log("Start: write FemMesh from VTK unstructuredGrid ======================\n"); + Base::Console().log("Start: write FemMesh from VTK unstructuredGrid ======================\n"); Base::FileInfo f(filename); vtkSmartPointer grid = vtkSmartPointer::New(); exportVTKMesh(mesh, grid, highest); - Base::Console().Log("Start: writing mesh data ======================\n"); + Base::Console().log("Start: writing mesh data ======================\n"); if (f.hasExtension("vtu")) { writeVTKFile(filename, grid); } @@ -532,10 +532,10 @@ void FemVTKTools::writeVTKMesh(const char* filename, const FemMesh* mesh, bool h writeVTKFile(filename, grid); } else { - Base::Console().Error("file name extension is not supported to write VTK\n"); + Base::Console().error("file name extension is not supported to write VTK\n"); } - Base::Console().Log(" %f: Done \n", + Base::Console().log(" %f: Done \n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); } @@ -544,7 +544,7 @@ App::DocumentObject* getObjectByType(const Base::Type type) { App::Document* pcDoc = App::GetApplication().getActiveDocument(); if (!pcDoc) { - Base::Console().Message("No active document is found thus created\n"); + Base::Console().message("No active document is found thus created\n"); pcDoc = App::GetApplication().newDocument(); } App::DocumentObject* obj = pcDoc->getActiveObject(); @@ -568,7 +568,7 @@ App::DocumentObject* createObjectByType(const Base::Type type) { App::Document* pcDoc = App::GetApplication().getActiveDocument(); if (!pcDoc) { - Base::Console().Message("No active document is found thus created\n"); + Base::Console().message("No active document is found thus created\n"); pcDoc = App::GetApplication().newDocument(); } App::DocumentObject* obj = pcDoc->getActiveObject(); @@ -587,7 +587,7 @@ App::DocumentObject* createObjectByType(const Base::Type type) App::DocumentObject* FemVTKTools::readResult(const char* filename, App::DocumentObject* res) { Base::TimeElapsed Start; - Base::Console().Log( + Base::Console().log( "Start: read FemResult with FemMesh from VTK file ======================\n"); Base::FileInfo f(filename); @@ -599,12 +599,12 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document ds = readVTKFile(filename); } else { - Base::Console().Error("file name extension is not supported\n"); + Base::Console().error("file name extension is not supported\n"); } App::Document* pcDoc = App::GetApplication().getActiveDocument(); if (!pcDoc) { - Base::Console().Message("No active document is found thus created\n"); + Base::Console().message("No active document is found thus created\n"); pcDoc = App::GetApplication().newDocument(); } App::DocumentObject* obj = pcDoc->getActiveObject(); @@ -613,13 +613,13 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document App::DocumentObject* result = nullptr; if (res) { - Base::Console().Message( + Base::Console().message( "FemResultObject pointer is NULL, trying to get the active object\n"); if (obj->getTypeId() == Base::Type::fromName("Fem::FemResultObjectPython")) { result = obj; } else { - Base::Console().Message("the active object is not the correct type, do nothing\n"); + Base::Console().message("the active object is not the correct type, do nothing\n"); return nullptr; } } @@ -642,9 +642,9 @@ App::DocumentObject* FemVTKTools::readResult(const char* filename, App::Document } pcDoc->recompute(); - Base::Console().Log(" %f: Done \n", + Base::Console().log(" %f: Done \n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); - Base::Console().Log("End: read FemResult with FemMesh from VTK file ======================\n"); + Base::Console().log("End: read FemResult with FemMesh from VTK file ======================\n"); return result; } @@ -655,18 +655,18 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r if (!res) { App::Document* pcDoc = App::GetApplication().getActiveDocument(); if (!pcDoc) { - Base::Console().Message("No active document is found thus do nothing and return\n"); + Base::Console().message("No active document is found thus do nothing and return\n"); return; } res = pcDoc->getActiveObject(); // type checking is done by caller } if (!res) { - Base::Console().Error("Result object pointer is invalid and it is not active object"); + Base::Console().error("Result object pointer is invalid and it is not active object"); return; } Base::TimeElapsed Start; - Base::Console().Log("Start: write FemResult to VTK unstructuredGrid dataset =======\n"); + Base::Console().log("Start: write FemResult to VTK unstructuredGrid dataset =======\n"); Base::FileInfo f(filename); // mesh @@ -677,7 +677,7 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r static_cast(mesh->getPropertyByName("FemMesh"))->getValue(); FemVTKTools::exportVTKMesh(&fmesh, grid); - Base::Console().Log(" %f: vtk mesh builder finished\n", + Base::Console().log(" %f: vtk mesh builder finished\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // result @@ -690,12 +690,12 @@ void FemVTKTools::writeResult(const char* filename, const App::DocumentObject* r writeVTKFile(filename, grid); } else { - Base::Console().Error("file name extension is not supported to write VTK\n"); + Base::Console().error("file name extension is not supported to write VTK\n"); } - Base::Console().Log(" %f: writing result object to vtk finished\n", + Base::Console().log(" %f: writing result object to vtk finished\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); - Base::Console().Log("End: write FemResult to VTK unstructuredGrid dataset =======\n"); + Base::Console().log("End: write FemResult to VTK unstructuredGrid dataset =======\n"); } @@ -779,7 +779,7 @@ std::map _getFreeCADMechResultScalarProperties() void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, App::DocumentObject* result) { - Base::Console().Log("Start: import vtk result file data into a FreeCAD result object.\n"); + Base::Console().log("Start: import vtk result file data into a FreeCAD result object.\n"); std::map vectors = _getFreeCADMechResultVectorProperties(); std::map scalars = _getFreeCADMechResultScalarProperties(); @@ -789,7 +789,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, vtkSmartPointer pd = dataset->GetPointData(); if (pd->GetNumberOfArrays() == 0) { - Base::Console().Error("No point data array is found in vtk data set, do nothing\n"); + Base::Console().error("No point data array is found in vtk data set, do nothing\n"); // if pointData is empty, data may be in cellDate, // cellData -> pointData interpolation is possible in VTK return; @@ -803,7 +803,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, } static_cast(result->getPropertyByName("NodeNumbers")) ->setValues(nodeIds); - Base::Console().Log(" NodeNumbers have been filled with values.\n"); + Base::Console().log(" NodeNumbers have been filled with values.\n"); // vectors for (const auto& it : vectors) { @@ -822,18 +822,18 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, } // PropertyVectorList will not show up in PropertyEditor vector_list->setValues(vec); - Base::Console().Log(" A PropertyVectorList has been filled with values: %s\n", + Base::Console().log(" A PropertyVectorList has been filled with values: %s\n", it.first.c_str()); } else { - Base::Console().Error("static_cast((result->" + Base::Console().error("static_cast((result->" "getPropertyByName(\"%s\")) failed.\n", it.first.c_str()); continue; } } else { - Base::Console().Message(" PropertyVectorList NOT found in vkt file data: %s\n", + Base::Console().message(" PropertyVectorList NOT found in vkt file data: %s\n", it.first.c_str()); } } @@ -845,7 +845,7 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, App::PropertyFloatList* field = static_cast( result->getPropertyByName(scalar.first.c_str())); if (!field) { - Base::Console().Error("static_cast((result->" + Base::Console().error("static_cast((result->" "getPropertyByName(\"%s\")) failed.\n", scalar.first.c_str()); continue; @@ -864,11 +864,11 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, } } field->setValues(values); - Base::Console().Log(" A PropertyFloatList has been filled with vales: %s\n", + Base::Console().log(" A PropertyFloatList has been filled with vales: %s\n", scalar.first.c_str()); } else { - Base::Console().Message(" PropertyFloatList NOT found in vkt file data %s\n", + Base::Console().message(" PropertyFloatList NOT found in vkt file data %s\n", scalar.first.c_str()); } } @@ -876,14 +876,14 @@ void FemVTKTools::importFreeCADResult(vtkSmartPointer dataset, // stats // stats are added by importVTKResults - Base::Console().Log("End: import vtk result file data into a FreeCAD result object.\n"); + Base::Console().log("End: import vtk result file data into a FreeCAD result object.\n"); } void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, vtkSmartPointer grid) { - Base::Console().Log("Start: Create VTK result data from FreeCAD result data.\n"); + Base::Console().log("Start: Create VTK result data from FreeCAD result data.\n"); std::map vectors = _getFreeCADMechResultVectorProperties(); std::map scalars = _getFreeCADMechResultScalarProperties(); @@ -897,7 +897,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, // filled with points. Then the mapping must be correct) App::DocumentObject* meshObj = res->Mesh.getValue(); if (!meshObj || !meshObj->isDerivedFrom()) { - Base::Console().Error("Result object does not correctly link to mesh"); + Base::Console().error("Result object does not correctly link to mesh"); return; } const SMESH_Mesh* smesh = static_cast(meshObj)->FemMesh.getValue().getSMesh(); @@ -916,7 +916,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, field = static_cast(res->getPropertyByName(it.first.c_str())); } else { - Base::Console().Error(" PropertyVectorList not found: %s\n", it.first.c_str()); + Base::Console().error(" PropertyVectorList not found: %s\n", it.first.c_str()); } if (field && field->getSize() > 0) { @@ -950,13 +950,13 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, data->SetTuple(node->GetID() - 1, tuple); } grid->GetPointData()->AddArray(data); - Base::Console().Log( + Base::Console().log( " The PropertyVectorList %s was exported to VTK vector list: %s\n", it.first.c_str(), it.second.c_str()); } else if (field) { - Base::Console().Log(" PropertyVectorList NOT exported to vtk: %s size is: %i\n", + Base::Console().log(" PropertyVectorList NOT exported to vtk: %s size is: %i\n", it.first.c_str(), field->getSize()); } @@ -970,7 +970,7 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, static_cast(res->getPropertyByName(scalar.first.c_str())); } else { - Base::Console().Error("PropertyFloatList %s not found \n", scalar.first.c_str()); + Base::Console().error("PropertyFloatList %s not found \n", scalar.first.c_str()); } if (field && field->getSize() > 0) { @@ -1019,19 +1019,19 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, } grid->GetPointData()->AddArray(data); - Base::Console().Log( + Base::Console().log( " The PropertyFloatList %s was exported to VTK scalar list: %s\n", scalar.first.c_str(), scalar.second.c_str()); } else if (field) { - Base::Console().Log(" PropertyFloatList NOT exported to vtk: %s size is: %i\n", + Base::Console().log(" PropertyFloatList NOT exported to vtk: %s size is: %i\n", scalar.first.c_str(), field->getSize()); } } - Base::Console().Log("End: Create VTK result data from FreeCAD result data.\n"); + Base::Console().log("End: Create VTK result data from FreeCAD result data.\n"); } @@ -1543,7 +1543,7 @@ void readResults(std::ifstream& ifstr, } } catch (const std::out_of_range&) { - Base::Console().Warning("Invalid node: %d\n", node); + Base::Console().warning("Invalid node: %d\n", node); } ++countNodes; } diff --git a/src/Mod/Fem/App/PropertyPostDataObject.cpp b/src/Mod/Fem/App/PropertyPostDataObject.cpp index 786d58f783..cbcb914552 100644 --- a/src/Mod/Fem/App/PropertyPostDataObject.cpp +++ b/src/Mod/Fem/App/PropertyPostDataObject.cpp @@ -408,12 +408,12 @@ void PropertyPostDataObject::SaveDocFile(Base::Writer& writer) const App::PropertyContainer* father = this->getContainer(); if (father && father->isDerivedFrom()) { App::DocumentObject* obj = static_cast(father); - Base::Console().Error("Dataset of '%s' cannot be written to vtk file '%s'\n", + Base::Console().error("Dataset of '%s' cannot be written to vtk file '%s'\n", obj->Label.getValue(), fi.filePath().c_str()); } else { - Base::Console().Error("Cannot save vtk file '%s'\n", fi.filePath().c_str()); + Base::Console().error("Cannot save vtk file '%s'\n", fi.filePath().c_str()); } std::stringstream ss; @@ -534,12 +534,12 @@ void PropertyPostDataObject::RestoreDocFile(Base::Reader& reader) App::PropertyContainer* father = this->getContainer(); if (father && father->isDerivedFrom()) { App::DocumentObject* obj = static_cast(father); - Base::Console().Error("Dataset file '%s' with data of '%s' seems to be empty\n", + Base::Console().error("Dataset file '%s' with data of '%s' seems to be empty\n", fi.filePath().c_str(), obj->Label.getValue()); } else { - Base::Console().Warning("Loaded Dataset file '%s' seems to be empty\n", + Base::Console().warning("Loaded Dataset file '%s' seems to be empty\n", fi.filePath().c_str()); } } @@ -551,7 +551,7 @@ void PropertyPostDataObject::RestoreDocFile(Base::Reader& reader) } } else { - Base::Console().Error( + Base::Console().error( "Dataset file '%s' is of unsupported type: %s. Data not loaded.\n", fi.filePath().c_str(), extension); diff --git a/src/Mod/Fem/Gui/AppFemGui.cpp b/src/Mod/Fem/Gui/AppFemGui.cpp index a711876d50..139fa2a4ef 100644 --- a/src/Mod/Fem/Gui/AppFemGui.cpp +++ b/src/Mod/Fem/Gui/AppFemGui.cpp @@ -104,7 +104,7 @@ PyMOD_INIT_FUNC(FemGui) } PyObject* mod = FemGui::initModule(); - Base::Console().Log("Loading GUI of Fem module... done\n"); + Base::Console().log("Loading GUI of Fem module... done\n"); // instantiating the commands CreateFemCommands(); diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 04e7e66d4d..3711b1df7a 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -2675,11 +2675,11 @@ void CmdFemPostPipelineFromResult::activated(int) /* Gui::SelectionFilter ResultFilter("SELECT Fem::FemResultObject COUNT 1"); if (ResultFilter.match()) { - Base::Console().Message("Debug: `SELECT Fem::FemResultObject COUNT 1` has matched obj"); + Base::Console().message("Debug: `SELECT Fem::FemResultObject COUNT 1` has matched obj"); Fem::FemResultObject* result = static_cast(ResultFilter.Result[0][0].getObject()); //static_cast failed here - Base::Console().Message("Debug: FemResultObject pointer = %p", result ); + Base::Console().message("Debug: FemResultObject pointer = %p", result ); */ diff --git a/src/Mod/Fem/Gui/TaskCreateElementSet.cpp b/src/Mod/Fem/Gui/TaskCreateElementSet.cpp index ae47593322..04c23a4512 100644 --- a/src/Mod/Fem/Gui/TaskCreateElementSet.cpp +++ b/src/Mod/Fem/Gui/TaskCreateElementSet.cpp @@ -219,10 +219,10 @@ void myCopyResultsMesh(std::string oldName, std::string newName) { int error = 0; - Base::Console().Warning("copy: %s and %s\n", oldName.c_str(), newName.c_str()); + Base::Console().warning("copy: %s and %s\n", oldName.c_str(), newName.c_str()); if (oldName.compare(newName) == 0 && error == 0) { error = 1; - Base::Console().Warning("Can't copy ResultMesh to ResultMesh: %s and %s\n", + Base::Console().warning("Can't copy ResultMesh to ResultMesh: %s and %s\n", oldName.c_str(), newName.c_str()); QMessageBox::warning( @@ -234,7 +234,7 @@ void myCopyResultsMesh(std::string oldName, std::string newName) if ((oldName.find("Result") == std::string::npos || newName.find("Result") == std::string::npos) && error == 0) { error = 1; - Base::Console().Warning("Mesh must be results: %s\n", oldName.c_str()); + Base::Console().warning("Mesh must be results: %s\n", oldName.c_str()); QMessageBox::warning( Gui::getMainWindow(), // QMessageBox::warning(Gui::MainWindow(), @@ -746,7 +746,7 @@ void TaskCreateElementSet::DefineNodes(const Base::Polygon2d& polygon, erase = nElements - keepElement; } if (keepElement > 0) { - Base::Console().Warning("Number of Elements Kept: %d, Number of Elements Erased: %d\n", + Base::Console().warning("Number of Elements Kept: %d, Number of Elements Erased: %d\n", keepElement, erase); writeToFile(inp_file, newMeshDS, nodeNumbers, nodeCoords, maxNode, requiredType); diff --git a/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp b/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp index cd512af306..80369b37ff 100644 --- a/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp +++ b/src/Mod/Fem/Gui/TaskCreateNodeSet.cpp @@ -203,7 +203,7 @@ void TaskCreateNodeSet::onSelectionChanged(const Gui::SelectionChanges& msg) tempSet.clear(); - Base::Console().Message("Picked Element:%i Face:%i\n", elem, face); + Base::Console().message("Picked Element:%i Face:%i\n", elem, face); if (!ui->checkBox_Add->isChecked()) { diff --git a/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp b/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp index a1f8d6a8f0..9fbaeaafcc 100644 --- a/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp +++ b/src/Mod/Fem/Gui/TaskDlgAnalysis.cpp @@ -79,7 +79,7 @@ bool TaskDlgAnalysis::accept() // return true; //} // catch (const Base::Exception& e) { - // Base::Console().Warning("TaskDlgAnalysis::accept(): %s\n", e.what()); + // Base::Console().warning("TaskDlgAnalysis::accept(): %s\n", e.what()); //} return false; diff --git a/src/Mod/Fem/Gui/TaskDlgCreateElementSet.cpp b/src/Mod/Fem/Gui/TaskDlgCreateElementSet.cpp index f591ff014f..85c764ed69 100644 --- a/src/Mod/Fem/Gui/TaskDlgCreateElementSet.cpp +++ b/src/Mod/Fem/Gui/TaskDlgCreateElementSet.cpp @@ -76,7 +76,7 @@ bool TaskDlgCreateElementSet::accept() return true; } catch (const Base::Exception& e) { - Base::Console().Warning("TaskDlgCreateElementSet::accept(): %s\n", e.what()); + Base::Console().warning("TaskDlgCreateElementSet::accept(): %s\n", e.what()); } return false; diff --git a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp index ac507e7198..5fb6733095 100644 --- a/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp +++ b/src/Mod/Fem/Gui/TaskDlgCreateNodeSet.cpp @@ -78,7 +78,7 @@ bool TaskDlgCreateNodeSet::accept() return true; } catch (const Base::Exception& e) { - Base::Console().Warning("TaskDlgCreateNodeSet::accept(): %s\n", e.what()); + Base::Console().warning("TaskDlgCreateNodeSet::accept(): %s\n", e.what()); } return false; diff --git a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp index 3f047bacc0..068209de3b 100644 --- a/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp +++ b/src/Mod/Fem/Gui/TaskDlgMeshShapeNetgen.cpp @@ -85,7 +85,7 @@ void TaskDlgMeshShapeNetgen::clicked(int button) } } catch (const Base::Exception& e) { - Base::Console().Warning("FemMeshShapeNetgenObject::execute(): %s\n", e.what()); + Base::Console().warning("FemMeshShapeNetgenObject::execute(): %s\n", e.what()); } } @@ -120,7 +120,7 @@ bool TaskDlgMeshShapeNetgen::accept() return true; } catch (const Base::Exception& e) { - Base::Console().Warning("TaskDlgMeshShapeNetgen::accept(): %s\n", e.what()); + Base::Console().warning("TaskDlgMeshShapeNetgen::accept(): %s\n", e.what()); } return false; diff --git a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp index 2db9ff25ee..cbec0958a9 100644 --- a/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp +++ b/src/Mod/Fem/Gui/TaskFemConstraintFluidBoundary.cpp @@ -235,7 +235,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( } } else { - Base::Console().Log("FemAnalysis object is not activated or no FemAnalysis in the active " + Base::Console().log("FemAnalysis object is not activated or no FemAnalysis in the active " "document, mesh dimension is unknown\n"); dimension = -1; // unknown dimension of mesh } @@ -296,7 +296,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( } else { ui->tabThermalBoundary->setEnabled(false); // could be hidden - // Base::Console().Message("retrieve solver property HeatTransferring as false\n"); + // Base::Console().message("retrieve solver property HeatTransferring as false\n"); } } else { @@ -327,7 +327,7 @@ TaskFemConstraintFluidBoundary::TaskFemConstraintFluidBoundary( } } else { - Base::Console().Warning( + Base::Console().warning( "No solver object inside FemAnalysis object, default to non-thermal, non-turbulence\n"); } ui->tabWidget->setTabText(0, tr("Basic")); @@ -417,7 +417,7 @@ void TaskFemConstraintFluidBoundary::updateBoundaryTypeUI() pcConstraint->Reversed.setValue(false); // outlet must point outward } else { - Base::Console().Error("Error: Fluid boundary type `%s` is not defined\n", + Base::Console().error("Error: Fluid boundary type `%s` is not defined\n", boundaryType.c_str()); } // std::string subtypeLabel = boundaryType + std::string(" type"); @@ -495,7 +495,7 @@ void TaskFemConstraintFluidBoundary::updateSubtypeUI() ui->tabBasicBoundary->setEnabled(true); } else { - Base::Console().Error("Fluid boundary type `%s` is not defined\n", boundaryType.c_str()); + Base::Console().error("Fluid boundary type `%s` is not defined\n", boundaryType.c_str()); } } @@ -519,7 +519,7 @@ void TaskFemConstraintFluidBoundary::updateTurbulenceUI() ui->labelTurbulentLengthValue->setText(tr("Hydraulic Diameter [m]")); } else { - Base::Console().Error("turbulence Spec type `%s` is not defined\n", turbulenceSpec.c_str()); + Base::Console().error("turbulence Spec type `%s` is not defined\n", turbulenceSpec.c_str()); } } @@ -560,7 +560,7 @@ void TaskFemConstraintFluidBoundary::updateThermalBoundaryUI() ui->spinTemperatureValue->setEnabled(true); } else { - Base::Console().Error("Thermal boundary type `%s` is not defined\n", + Base::Console().error("Thermal boundary type `%s` is not defined\n", thermalBoundaryType.c_str()); } } @@ -581,7 +581,7 @@ void TaskFemConstraintFluidBoundary::onBoundaryTypeChanged() bool ret = pcConstraint->recomputeFeature(); if (!ret) { std::string boundaryType = ui->comboBoundaryType->currentText().toStdString(); - Base::Console().Error("Fluid boundary recomputationg failed for boundaryType `%s` \n", + Base::Console().error("Fluid boundary recomputationg failed for boundaryType `%s` \n", boundaryType.c_str()); } } @@ -1080,7 +1080,7 @@ bool TaskDlgFemConstraintFluidBoundary::accept() } } else { - Base::Console().Warning("FemSolverObject is not found in the FemAnalysis object, " + Base::Console().warning("FemSolverObject is not found in the FemAnalysis object, " "thermal and turbulence setting is not accepted\n"); } } diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index 18421b07c8..805977f6d2 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -948,7 +948,7 @@ void TaskPostDataAlongLine::pointCallback(void* ud, SoEventCallback* n) if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { const SoPickedPoint* point = n->getPickedPoint(); if (!point) { - Base::Console().Message("No point picked.\n"); + Base::Console().message("No point picked.\n"); return; } @@ -1221,7 +1221,7 @@ void TaskPostDataAtPoint::pointCallback(void* ud, SoEventCallback* n) if (mbe->getButton() == SoMouseButtonEvent::BUTTON1 && mbe->getState() == SoButtonEvent::DOWN) { const SoPickedPoint* point = n->getPickedPoint(); if (!point) { - Base::Console().Message("No point picked.\n"); + Base::Console().message("No point picked.\n"); return; } @@ -1367,7 +1367,7 @@ void TaskPostDataAtPoint::showValue(double pointValue, const char* unitStr) QString posZ = ui->centerZ->text(); QString result = tr("%1 at (%2; %3; %4) is: %5 %6").arg(field, posX, posY, posZ, value, unit); - Base::Console().Message("%s\n", result.toUtf8().data()); + Base::Console().message("%s\n", result.toUtf8().data()); } std::string TaskPostDataAtPoint::toString(double val) const @@ -1874,7 +1874,7 @@ TaskPostScalarClip::TaskPostScalarClip(ViewProviderFemPostScalarClip* view, QWid ui->Slider->blockSignals(true); ui->Slider->setValue(slider_value); ui->Slider->blockSignals(false); - Base::Console().Log("init: scalar_factor, slider_value: %f, %i: \n", + Base::Console().log("init: scalar_factor, slider_value: %f, %i: \n", scalar_factor, slider_value); } @@ -2004,7 +2004,7 @@ TaskPostWarpVector::TaskPostWarpVector(ViewProviderFemPostWarpVector* view, QWid (warp_factor - ui->Min->value()) / (ui->Max->value() - ui->Min->value()) * 100.; ui->Slider->setValue(slider_value); ui->Slider->blockSignals(false); - Base::Console().Log("init: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); + Base::Console().log("init: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); } TaskPostWarpVector::~TaskPostWarpVector() = default; @@ -2058,7 +2058,7 @@ void TaskPostWarpVector::onSliderValueChanged(int slider_value) ui->Value->blockSignals(true); ui->Value->setValue(warp_factor); ui->Value->blockSignals(false); - Base::Console().Log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); + Base::Console().log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); } void TaskPostWarpVector::onValueValueChanged(double warp_factor) @@ -2076,7 +2076,7 @@ void TaskPostWarpVector::onValueValueChanged(double warp_factor) (warp_factor - ui->Min->value()) / (ui->Max->value() - ui->Min->value()) * 100.; ui->Slider->setValue(slider_value); ui->Slider->blockSignals(false); - Base::Console().Log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); + Base::Console().log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); } void TaskPostWarpVector::onMaxValueChanged(double) @@ -2112,7 +2112,7 @@ void TaskPostWarpVector::onMaxValueChanged(double) ui->Value->blockSignals(true); ui->Value->setValue(warp_factor); ui->Value->blockSignals(false); - Base::Console().Log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); + Base::Console().log("Change: warp_factor, slider_value: %f, %i: \n", warp_factor, slider_value); } */ } diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp index 44a26aaa7e..5b4e98d286 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintBearing.cpp @@ -70,7 +70,7 @@ void ViewProviderFemConstraintBearing::updateData(const App::Property* prop) Fem::ConstraintBearing* pcConstraint = this->getObject(); if (prop == &pcConstraint->References) { - Base::Console().Error("\n"); // enable a breakpoint here + Base::Console().error("\n"); // enable a breakpoint here } if (prop == &pcConstraint->BasePoint) { diff --git a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp index 326853ca15..e088fd7a01 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemConstraintGear.cpp @@ -94,7 +94,7 @@ void ViewProviderFemConstraintGear::updateData(const App::Property* prop) SbVec3f b(base.x, base.y, base.z); SbVec3f ax(axis.x, axis.y, axis.z); SbVec3f dir(direction.x, direction.y, direction.z); - // Base::Console().Error("DirectionVector: %f, %f, %f\n", direction.x, direction.y, + // Base::Console().error("DirectionVector: %f, %f, %f\n", direction.x, direction.y, // direction.z); GuiTools::createPlacement(pShapeSep, b, SbRotation(SbVec3f(0, 1, 0), ax)); @@ -148,14 +148,14 @@ void ViewProviderFemConstraintGear::updateData(const App::Property* prop) SbVec3f ax(axis.x, axis.y, axis.z); SbVec3f dir(direction.x, direction.y, direction.z); - /*Base::Console().Error("Axis: %f, %f, %f\n", axis.x, axis.y, axis.z); - Base::Console().Error("Direction: %f, %f, %f\n", direction.x, direction.y, direction.z); + /*Base::Console().error("Axis: %f, %f, %f\n", axis.x, axis.y, axis.z); + Base::Console().error("Direction: %f, %f, %f\n", direction.x, direction.y, direction.z); SbRotation rot = SbRotation(ax, dir); SbMatrix m; rot.getValue(m); SbMat m2; m.getValue(m2); - Base::Console().Error("Matrix: %f, %f, %f, %f\n", m[0][0], m[1][0], m[2][0], m[3][0]); + Base::Console().error("Matrix: %f, %f, %f, %f\n", m[0][0], m[1][0], m[2][0], m[3][0]); // Note: In spite of the fact that the rotation matrix takes on 3 different values if 3 // normal directions are chosen, the resulting arrow will only point in two different // directions when ax = (1,0,0) (but for ax=(0,1,0) it points in 3 different diff --git a/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp b/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp index 23f9c793c1..47028d56cd 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemMesh.cpp @@ -953,7 +953,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, return; } Base::TimeElapsed Start; - Base::Console().Log( + Base::Console().log( "Start: ViewProviderFEMMeshBuilder::createMesh() =================================\n"); const SMDS_MeshInfo& info = data->GetMeshInfo(); @@ -989,7 +989,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, std::vector facesHelper(numTries); - Base::Console().Log(" %f: Start build up %i face helper\n", + Base::Console().log(" %f: Start build up %i face helper\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()), facesHelper.size()); Base::BoundBox3d BndBox; @@ -1514,7 +1514,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, if (FaceSize < MaxFacesShowInner) { - Base::Console().Log(" %f: Start eliminate internal faces SIMPLE\n", + Base::Console().log(" %f: Start eliminate internal faces SIMPLE\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // search for double (inside) faces and hide them @@ -1531,7 +1531,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, } } else { - Base::Console().Log(" %f: Start eliminate internal faces GRID\n", + Base::Console().log(" %f: Start eliminate internal faces GRID\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); BndBox.Enlarge(BndBox.CalcDiagonalLength() / 10000.0); // calculate grid properties @@ -1543,7 +1543,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, unsigned int NbrX = (unsigned int)(BndBox.LengthX() / size) + 1; unsigned int NbrY = (unsigned int)(BndBox.LengthY() / size) + 1; unsigned int NbrZ = (unsigned int)(BndBox.LengthZ() / size) + 1; - Base::Console().Log(" Size:F:%f, X:%i ,Y:%i ,Z:%i\n", gridFactor, NbrX, NbrY, NbrZ); + Base::Console().log(" Size:F:%f, X:%i ,Y:%i ,Z:%i\n", gridFactor, NbrX, NbrY, NbrZ); double Xmin = BndBox.MinX; double Ymin = BndBox.MinY; @@ -1570,7 +1570,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, iZ = z; if (iX >= NbrX || iY >= NbrY || iZ >= NbrZ) { - Base::Console().Log(" Outof range!\n"); + Base::Console().log(" Outof range!\n"); } Grid[iX + iY * NbrX + iZ * NbrX * NbrY].push_back(&facesHelper[l]); @@ -1594,12 +1594,12 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, } avg = avg / Grid.size(); - Base::Console().Log(" VoxelSize: Max:%i ,Average:%i\n", max, avg); + Base::Console().log(" VoxelSize: Max:%i ,Average:%i\n", max, avg); } // if( FaceSize < 1000) - Base::Console().Log(" %f: Start build up node map\n", + Base::Console().log(" %f: Start build up node map\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // sort out double nodes and build up index map @@ -1632,7 +1632,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, } } } - Base::Console().Log(" %f: Start set point vector\n", + Base::Console().log(" %f: Start set point vector\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // set the point coordinates @@ -1650,7 +1650,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, // count triangle size - Base::Console().Log(" %f: Start count triangle size\n", + Base::Console().log(" %f: Start count triangle size\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); int triangleCount = 0; for (int l = 0; l < FaceSize; l++) { @@ -1675,7 +1675,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, } } } - Base::Console().Log(" NumTriangles:%i\n", triangleCount); + Base::Console().log(" NumTriangles:%i\n", triangleCount); // edge map collect and sort edges of the faces to be shown. std::map> EdgeMap; @@ -1706,7 +1706,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, } } - Base::Console().Log(" %f: Start build up triangle vector\n", + Base::Console().log(" %f: Start build up triangle vector\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // set the triangle face indices faces->coordIndex.setNum(4 * triangleCount); @@ -3126,7 +3126,7 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, faces->coordIndex.finishEditing(); - Base::Console().Log(" %f: Start build up edge vector\n", + Base::Console().log(" %f: Start build up edge vector\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); // std::map > EdgeMap; // count edges @@ -3152,9 +3152,9 @@ void ViewProviderFEMMeshBuilder::createMesh(const App::Property* prop, } lines->coordIndex.finishEditing(); - Base::Console().Log(" NumEdges:%i\n", EdgeSize); + Base::Console().log(" NumEdges:%i\n", EdgeSize); - Base::Console().Log( + Base::Console().log( " %f: Finish =========================================================\n", Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed())); } diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp index 51ef8ab0a2..0d44e6486e 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostObject.cpp @@ -286,13 +286,13 @@ ViewProviderFemPostObject::~ViewProviderFemPostObject() deleteColorBar(); } catch (Base::Exception& e) { - Base::Console().DestructorError( + Base::Console().destructorError( "ViewProviderFemPostObject", "ViewProviderFemPostObject destructor threw an exception: %s\n", e.what()); } catch (...) { - Base::Console().DestructorError( + Base::Console().destructorError( "ViewProviderFemPostObject", "ViewProviderFemPostObject destructor threw an unknown exception"); } diff --git a/src/Mod/Import/App/AppImport.cpp b/src/Mod/Import/App/AppImport.cpp index 2c5f1f9eeb..de5b5f3f78 100644 --- a/src/Mod/Import/App/AppImport.cpp +++ b/src/Mod/Import/App/AppImport.cpp @@ -51,6 +51,6 @@ PyMOD_INIT_FUNC(Import) Base::Interpreter().addType(&Import::StepShapePy ::Type, importModule, "StepShape"); - Base::Console().Log("Loading Import module... done\n"); + Base::Console().log("Loading Import module... done\n"); PyMOD_Return(importModule); } diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index 7aa936f1c2..b4349587ef 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -159,8 +159,8 @@ private: reader.read(hDoc); } catch (OSD_Exception& e) { - Base::Console().Error("%s\n", e.GetMessageString()); - Base::Console().Message("Try to load STEP file without colors...\n"); + Base::Console().error("%s\n", e.GetMessageString()); + Base::Console().message("Try to load STEP file without colors...\n"); Part::ImportStepParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); @@ -172,8 +172,8 @@ private: reader.read(hDoc); } catch (OSD_Exception& e) { - Base::Console().Error("%s\n", e.GetMessageString()); - Base::Console().Message("Try to load IGES file without colors...\n"); + Base::Console().error("%s\n", e.GetMessageString()); + Base::Console().message("Try to load IGES file without colors...\n"); Part::ImportIgesParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); @@ -428,7 +428,7 @@ private: Py::Object writeDXFShape(const Py::Tuple& args) { - Base::Console().Message("Imp:writeDXFShape()\n"); + Base::Console().message("Imp:writeDXFShape()\n"); PyObject* shapeObj = nullptr; char* fname = nullptr; std::string filePath; @@ -632,7 +632,7 @@ private: PyMem_Free(fname); App::DocumentObject* obj = static_cast(docObj)->getDocumentObjectPtr(); - Base::Console().Message("Imp:writeDXFObject - docObj: %s\n", obj->getNameInDocument()); + Base::Console().message("Imp:writeDXFObject - docObj: %s\n", obj->getNameInDocument()); if ((versionParm == 12) || (versionParm == 14)) { versionOverride = true; diff --git a/src/Mod/Import/App/ImportOCAF.cpp b/src/Mod/Import/App/ImportOCAF.cpp index 945d102aa7..65d92029a1 100644 --- a/src/Mod/Import/App/ImportOCAF.cpp +++ b/src/Mod/Import/App/ImportOCAF.cpp @@ -175,7 +175,7 @@ void ImportOCAF::loadShapes(const TDF_Label& label, } #ifdef FC_DEBUG - Base::Console().Log("H:%d, N:%s, T:%d, A:%d, S:%d, C:%d, SS:%d, F:%d, R:%d, C:%d, SS:%d\n", + Base::Console().log("H:%d, N:%s, T:%d, A:%d, S:%d, C:%d, SS:%d, F:%d, R:%d, C:%d, SS:%d\n", hash, part_name.c_str(), aShapeTool->IsTopLevel(label), diff --git a/src/Mod/Import/App/ImportOCAFAssembly.cpp b/src/Mod/Import/App/ImportOCAFAssembly.cpp index 3a904ce589..742e89f4f7 100644 --- a/src/Mod/Import/App/ImportOCAFAssembly.cpp +++ b/src/Mod/Import/App/ImportOCAFAssembly.cpp @@ -159,7 +159,7 @@ void ImportOCAFAssembly::loadShapes(const TDF_Label& label, std::stringstream str; - Base::Console().Log("H:%-9d \tN:%-30s \tTop:%d, Asm:%d, Shape:%d, Compound:%d, Simple:%d, " + Base::Console().log("H:%-9d \tN:%-30s \tTop:%d, Asm:%d, Shape:%d, Compound:%d, Simple:%d, " "Free:%d, Ref:%d, Component:%d, SubShape:%d\tTrf:%s-- Dep:%d \n", hash, part_name.c_str(), @@ -176,7 +176,7 @@ void ImportOCAFAssembly::loadShapes(const TDF_Label& label, dep); label.Dump(str); - Base::Console().Message(str.str().c_str()); + Base::Console().message(str.str().c_str()); #endif std::string asm_name = assembly; @@ -218,7 +218,7 @@ void ImportOCAFAssembly::createShape(const TDF_Label& label, const TopLoc_Location& loc, const std::string& name) { - Base::Console().Log("-create Shape\n"); + Base::Console().log("-create Shape\n"); const TopoDS_Shape& aShape = aShapeTool->GetShape(label); if (!aShape.IsNull() && aShape.ShapeType() == TopAbs_COMPOUND) { TopExp_Explorer xp; diff --git a/src/Mod/Import/App/Tools.cpp b/src/Mod/Import/App/Tools.cpp index 7efc54abe9..5888e6cacf 100644 --- a/src/Mod/Import/App/Tools.cpp +++ b/src/Mod/Import/App/Tools.cpp @@ -124,7 +124,7 @@ void Tools::printLabel(TDF_Label label, } ss << std::endl; - Base::Console().Notify("ImportOCAF2", ss.str().c_str()); + Base::Console().notify("ImportOCAF2", ss.str().c_str()); } void Tools::dumpLabels(TDF_Label label, diff --git a/src/Mod/Import/App/dxf/ImpExpDxf.cpp b/src/Mod/Import/App/dxf/ImpExpDxf.cpp index f34d388f19..115f9a1125 100644 --- a/src/Mod/Import/App/dxf/ImpExpDxf.cpp +++ b/src/Mod/Import/App/dxf/ImpExpDxf.cpp @@ -241,7 +241,7 @@ void ImpExpDxfRead::OnReadArc(const Base::Vector3d& start, Collector->AddObject(BRepBuilderAPI_MakeEdge(circle, p0, p1).Edge(), "Arc"); } else { - Base::Console().Warning("ImpExpDxf - ignore degenerate arc of circle\n"); + Base::Console().warning("ImpExpDxf - ignore degenerate arc of circle\n"); } } @@ -262,7 +262,7 @@ void ImpExpDxfRead::OnReadCircle(const Base::Vector3d& start, Collector->AddObject(BRepBuilderAPI_MakeEdge(circle).Edge(), "Circle"); } else { - Base::Console().Warning("ImpExpDxf - ignore degenerate circle\n"); + Base::Console().warning("ImpExpDxf - ignore degenerate circle\n"); } } @@ -379,7 +379,7 @@ void ImpExpDxfRead::OnReadSpline(struct SplineData& sd) Collector->AddObject(BRepBuilderAPI_MakeEdge(geom).Edge(), "Spline"); } catch (const Standard_Failure&) { - Base::Console().Warning("ImpExpDxf - failed to create bspline\n"); + Base::Console().warning("ImpExpDxf - failed to create bspline\n"); } } @@ -404,7 +404,7 @@ void ImpExpDxfRead::OnReadEllipse(const Base::Vector3d& center, Collector->AddObject(BRepBuilderAPI_MakeEdge(ellipse).Edge(), "Ellipse"); } else { - Base::Console().Warning("ImpExpDxf - ignore degenerate ellipse\n"); + Base::Console().warning("ImpExpDxf - ignore degenerate ellipse\n"); } } @@ -896,7 +896,7 @@ void ImpExpDxfWrite::exportShape(const TopoDS_Shape input) exportLine(adapt); } else { - Base::Console().Warning("ImpExpDxf - unknown curve type: %d\n", + Base::Console().warning("ImpExpDxf - unknown curve type: %d\n", static_cast(adapt.GetType())); } } @@ -1064,14 +1064,14 @@ void ImpExpDxfWrite::exportBSpline(BRepAdaptor_Curve& c) else { if (approx.HasResult()) { // result, but not within tolerance spline = approx.Curve(); - Base::Console().Message("DxfWrite::exportBSpline - result not within tolerance\n"); + Base::Console().message("DxfWrite::exportBSpline - result not within tolerance\n"); } else { f = c.FirstParameter(); l = c.LastParameter(); s = c.Value(f); ePt = c.Value(l); - Base::Console().Message( + Base::Console().message( "DxfWrite::exportBSpline - no result- from:(%.3f,%.3f) to:(%.3f,%.3f)\n", s.X(), s.Y(), @@ -1132,7 +1132,7 @@ void ImpExpDxfWrite::exportBSpline(BRepAdaptor_Curve& c) void ImpExpDxfWrite::exportBCurve(BRepAdaptor_Curve& c) { (void)c; - Base::Console().Message("BCurve dxf export not yet supported\n"); + Base::Console().message("BCurve dxf export not yet supported\n"); } void ImpExpDxfWrite::exportLine(BRepAdaptor_Curve& c) diff --git a/src/Mod/Import/App/dxf/dxf.cpp b/src/Mod/Import/App/dxf/dxf.cpp index 5ade18c181..2bd5330a84 100644 --- a/src/Mod/Import/App/dxf/dxf.cpp +++ b/src/Mod/Import/App/dxf/dxf.cpp @@ -434,7 +434,7 @@ std::string CDxfWrite::getPlateFile(std::string fileSpec) std::stringstream outString; Base::FileInfo fi(fileSpec); if (!fi.isReadable()) { - Base::Console().Message("dxf unable to open %s!\n", fileSpec.c_str()); + Base::Console().message("dxf unable to open %s!\n", fileSpec.c_str()); } else { string line; diff --git a/src/Mod/Import/App/dxf/dxf.h b/src/Mod/Import/App/dxf/dxf.h index 2845d57bd0..c3da0d8fba 100644 --- a/src/Mod/Import/App/dxf/dxf.h +++ b/src/Mod/Import/App/dxf/dxf.h @@ -689,12 +689,12 @@ protected: template static void ImportError(const char* format, args&&... argValues) { - Base::ConsoleSingleton::Instance().Warning(format, std::forward(argValues)...); + Base::ConsoleSingleton::instance().warning(format, std::forward(argValues)...); } template static void ImportObservation(const char* format, args&&... argValues) { - Base::ConsoleSingleton::Instance().Message(format, std::forward(argValues)...); + Base::ConsoleSingleton::instance().message(format, std::forward(argValues)...); } template void UnsupportedFeature(const char* format, args&&... argValues); diff --git a/src/Mod/Import/Gui/AppImportGui.cpp b/src/Mod/Import/Gui/AppImportGui.cpp index e1d815bc98..516727fbd2 100644 --- a/src/Mod/Import/Gui/AppImportGui.cpp +++ b/src/Mod/Import/Gui/AppImportGui.cpp @@ -56,7 +56,7 @@ PyMOD_INIT_FUNC(ImportGui) } PyObject* mod = ImportGui::initModule(); - Base::Console().Log("Loading GUI of Import module... done\n"); + Base::Console().log("Loading GUI of Import module... done\n"); CreateImportCommands(); ImportGui::Workbench::init(); diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 2a6143c21e..35319202c6 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -270,8 +270,8 @@ private: reader.read(hDoc); } catch (OSD_Exception& e) { - Base::Console().Error("%s\n", e.GetMessageString()); - Base::Console().Message("Try to load STEP file without colors...\n"); + Base::Console().error("%s\n", e.GetMessageString()); + Base::Console().message("Try to load STEP file without colors...\n"); Part::ImportStepParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); @@ -283,8 +283,8 @@ private: reader.read(hDoc); } catch (OSD_Exception& e) { - Base::Console().Error("%s\n", e.GetMessageString()); - Base::Console().Message("Try to load IGES file without colors...\n"); + Base::Console().error("%s\n", e.GetMessageString()); + Base::Console().message("Try to load IGES file without colors...\n"); Part::ImportIgesParts(pcDoc, Utf8Name.c_str()); pcDoc->recompute(); diff --git a/src/Mod/Inspection/App/AppInspection.cpp b/src/Mod/Inspection/App/AppInspection.cpp index 48dbff3927..acbbfa5191 100644 --- a/src/Mod/Inspection/App/AppInspection.cpp +++ b/src/Mod/Inspection/App/AppInspection.cpp @@ -57,7 +57,7 @@ PyMOD_INIT_FUNC(Inspection) // // PyObject* mod = Inspection::initModule(); - Base::Console().Log("Loading Inspection module... done\n"); + Base::Console().log("Loading Inspection module... done\n"); // clang-format off Inspection::PropertyDistanceList ::init(); Inspection::Feature ::init(); diff --git a/src/Mod/Inspection/App/InspectionFeature.cpp b/src/Mod/Inspection/App/InspectionFeature.cpp index ce6868327f..5bb4bfcd44 100644 --- a/src/Mod/Inspection/App/InspectionFeature.cpp +++ b/src/Mod/Inspection/App/InspectionFeature.cpp @@ -896,7 +896,7 @@ App::DocumentObjectExecReturn* Feature::execute() fRMS = sqrt(fRMS); } - Base::Console().Message("RMS value for '%s' with search radius [%.4f,%.4f] is: %.4f\n", + Base::Console().message("RMS value for '%s' with search radius [%.4f,%.4f] is: %.4f\n", this->Label.getValue(), -this->SearchRadius.getValue(), this->SearchRadius.getValue(), fRMS); #else unsigned long count = actual->countPoints(); @@ -966,7 +966,7 @@ App::DocumentObjectExecReturn* Feature::execute() } } - Base::Console().Message("RMS value for '%s' with search radius [%.4f,%.4f] is: %.4f\n", + Base::Console().message("RMS value for '%s' with search radius [%.4f,%.4f] is: %.4f\n", this->Label.getValue(), -this->SearchRadius.getValue(), this->SearchRadius.getValue(), diff --git a/src/Mod/Inspection/Gui/AppInspectionGui.cpp b/src/Mod/Inspection/Gui/AppInspectionGui.cpp index 4ed78333ad..d19ececdb5 100644 --- a/src/Mod/Inspection/Gui/AppInspectionGui.cpp +++ b/src/Mod/Inspection/Gui/AppInspectionGui.cpp @@ -78,6 +78,6 @@ PyMOD_INIT_FUNC(InspectionGui) // PyObject* mod = InspectionGui::initModule(); - Base::Console().Log("Loading GUI of Inspection module... done\n"); + Base::Console().log("Loading GUI of Inspection module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp index 243a908335..b4b666525d 100644 --- a/src/Mod/Inspection/Gui/ViewProviderInspection.cpp +++ b/src/Mod/Inspection/Gui/ViewProviderInspection.cpp @@ -121,13 +121,13 @@ ViewProviderInspection::~ViewProviderInspection() deleteColorBar(); } catch (Base::Exception& e) { - Base::Console().DestructorError( + Base::Console().destructorError( "ViewProviderInspection", "ViewProviderInspection::deleteColorBar() threw an exception: %s\n", e.what()); } catch (...) { - Base::Console().DestructorError( + Base::Console().destructorError( "ViewProviderInspection", "ViewProviderInspection destructor threw an unknown exception"); } @@ -583,7 +583,7 @@ void ViewProviderInspection::inspectCallback(void* ud, SoEventCallback* n) && mbe->getState() == SoButtonEvent::UP) { const SoPickedPoint* point = n->getPickedPoint(); if (!point) { - Base::Console().Message("No point picked.\n"); + Base::Console().message("No point picked.\n"); return; } diff --git a/src/Mod/JtReader/App/AppJtReader.cpp b/src/Mod/JtReader/App/AppJtReader.cpp index f00d81eac1..3684bec02c 100644 --- a/src/Mod/JtReader/App/AppJtReader.cpp +++ b/src/Mod/JtReader/App/AppJtReader.cpp @@ -38,7 +38,7 @@ PyMOD_INIT_FUNC(JtReader) // load dependent module Base::Interpreter().loadModule("Mesh"); - Base::Console().Log("Loading JtReader module... done\n"); + Base::Console().log("Loading JtReader module... done\n"); PyMOD_Return(jtReaderModule); } diff --git a/src/Mod/JtReader/App/AppJtReaderPy.cpp b/src/Mod/JtReader/App/AppJtReaderPy.cpp index d4b369ede9..a2c020bdae 100644 --- a/src/Mod/JtReader/App/AppJtReaderPy.cpp +++ b/src/Mod/JtReader/App/AppJtReaderPy.cpp @@ -89,7 +89,7 @@ private: PyMem_Free(Name); - // Base::Console().Log("Open in Mesh with %s",Name); + // Base::Console().log("Open in Mesh with %s",Name); Base::FileInfo file(EncodedName); if (file.hasExtension("jt")) { TestJtReader reader; diff --git a/src/Mod/JtReader/App/FcLodHandler.cpp b/src/Mod/JtReader/App/FcLodHandler.cpp index 003924bbc9..cd3f997836 100644 --- a/src/Mod/JtReader/App/FcLodHandler.cpp +++ b/src/Mod/JtReader/App/FcLodHandler.cpp @@ -29,5 +29,5 @@ void FcLodHandler::startLod() { - Base::Console().Log("FcLodHandler::startLod()"); + Base::Console().log("FcLodHandler::startLod()"); } diff --git a/src/Mod/JtReader/App/TestJtReader.cpp b/src/Mod/JtReader/App/TestJtReader.cpp index 4a66f04a21..47839de734 100644 --- a/src/Mod/JtReader/App/TestJtReader.cpp +++ b/src/Mod/JtReader/App/TestJtReader.cpp @@ -54,6 +54,6 @@ void TestJtReader::read(void) } - Base::Console().Log(i->toString().c_str()); + Base::Console().log(i->toString().c_str()); } } diff --git a/src/Mod/Material/App/AppMaterial.cpp b/src/Mod/Material/App/AppMaterial.cpp index 266cf370db..50975b3330 100644 --- a/src/Mod/Material/App/AppMaterial.cpp +++ b/src/Mod/Material/App/AppMaterial.cpp @@ -85,7 +85,7 @@ PyMOD_INIT_FUNC(Materials) #endif PyObject* module = Materials::initModule(); - Base::Console().Log("Loading Material module... done\n"); + Base::Console().log("Loading Material module... done\n"); Base::Interpreter().addType(&Materials::Array2DPy::Type, module, "Array2D"); Base::Interpreter().addType(&Materials::Array3DPy::Type, module, "Array3D"); diff --git a/src/Mod/Material/App/Library.cpp b/src/Mod/Material/App/Library.cpp index 7e87310375..dcc1c0400a 100644 --- a/src/Mod/Material/App/Library.cpp +++ b/src/Mod/Material/App/Library.cpp @@ -68,8 +68,8 @@ void Library::validate(const Library& remote) const throw InvalidLibrary("Library names don't match"); } if (getIconPath() != remote.getIconPath()) { - Base::Console().Log("Icon path 1 '%s'\n", getIconPath().toStdString().c_str()); - Base::Console().Log("Icon path 2 '%s'\n", remote.getIconPath().toStdString().c_str()); + Base::Console().log("Icon path 1 '%s'\n", getIconPath().toStdString().c_str()); + Base::Console().log("Icon path 2 '%s'\n", remote.getIconPath().toStdString().c_str()); throw InvalidLibrary("Library icon paths don't match"); } diff --git a/src/Mod/Material/App/MaterialConfigLoader.cpp b/src/Mod/Material/App/MaterialConfigLoader.cpp index cd241acf18..c2271b2456 100644 --- a/src/Mod/Material/App/MaterialConfigLoader.cpp +++ b/src/Mod/Material/App/MaterialConfigLoader.cpp @@ -1041,7 +1041,7 @@ MaterialConfigLoader::getMaterialFromPath(const std::shared_ptr fcmat; if (!readFile(path, fcmat)) { - Base::Console().Log("Error reading '%s'\n", path.toStdString().c_str()); + Base::Console().log("Error reading '%s'\n", path.toStdString().c_str()); throw MaterialReadError(); } diff --git a/src/Mod/Material/App/MaterialLibrary.cpp b/src/Mod/Material/App/MaterialLibrary.cpp index b5a83b10a3..94ae7d3f11 100644 --- a/src/Mod/Material/App/MaterialLibrary.cpp +++ b/src/Mod/Material/App/MaterialLibrary.cpp @@ -167,7 +167,7 @@ void MaterialLibraryLocal::createFolder(const QString& path) QDir fileDir(filePath); if (!fileDir.exists()) { if (!fileDir.mkpath(filePath)) { - Base::Console().Error("Unable to create directory path '%s'\n", + Base::Console().error("Unable to create directory path '%s'\n", filePath.toStdString().c_str()); } } @@ -181,7 +181,7 @@ void MaterialLibraryLocal::renameFolder(const QString& oldPath, const QString& n QDir fileDir(filePath); if (fileDir.exists()) { if (!fileDir.rename(filePath, newFilePath)) { - Base::Console().Error("Unable to rename directory path '%s'\n", + Base::Console().error("Unable to rename directory path '%s'\n", filePath.toStdString().c_str()); } } @@ -257,7 +257,7 @@ void MaterialLibraryLocal::deleteFile(MaterialManager& manager, const QString& p manager.remove(material->getUUID()); } catch (const MaterialNotFound&) { - Base::Console().Log("Unable to remove file from materials list\n"); + Base::Console().log("Unable to remove file from materials list\n"); } _materialPathMap->erase(rPath); } @@ -300,14 +300,14 @@ MaterialLibraryLocal::saveMaterial(const std::shared_ptr& material, QDir fileDir(info.path()); if (!fileDir.exists()) { if (!fileDir.mkpath(info.path())) { - Base::Console().Error("Unable to create directory path '%s'\n", + Base::Console().error("Unable to create directory path '%s'\n", info.path().toStdString().c_str()); } } if (info.exists()) { if (!overwrite) { - Base::Console().Error("File already exists '%s'\n", info.path().toStdString().c_str()); + Base::Console().error("File already exists '%s'\n", info.path().toStdString().c_str()); throw MaterialExists(); } } diff --git a/src/Mod/Material/App/MaterialLoader.cpp b/src/Mod/Material/App/MaterialLoader.cpp index 19f30c5a00..8aba6e07e2 100644 --- a/src/Mod/Material/App/MaterialLoader.cpp +++ b/src/Mod/Material/App/MaterialLoader.cpp @@ -252,7 +252,7 @@ void MaterialYamlEntry::addToTree( } catch (const Base::ValueError& e) { // Units mismatch - Base::Console().Log("Units mismatch in material '%s':'%s' = '%s', " + Base::Console().log("Units mismatch in material '%s':'%s' = '%s', " "setting to default property units '%s'\n", name.toStdString().c_str(), propertyName, @@ -267,14 +267,14 @@ void MaterialYamlEntry::addToTree( } } catch (const YAML::BadConversion& e) { - Base::Console().Log("Exception %s <%s:%s> - ignored\n", + Base::Console().log("Exception %s <%s:%s> - ignored\n", e.what(), name.toStdString().c_str(), propertyName.c_str()); } } else if (propertyName != "UUID") { - Base::Console().Log("\tProperty '%s' is not described by any model. Ignored\n", + Base::Console().log("\tProperty '%s' is not described by any model. Ignored\n", propertyName.c_str()); } } @@ -334,14 +334,14 @@ void MaterialYamlEntry::addToTree( } } catch (const YAML::BadConversion& e) { - Base::Console().Log("Exception %s <%s:%s> - ignored\n", + Base::Console().log("Exception %s <%s:%s> - ignored\n", e.what(), name.toStdString().c_str(), propertyName.c_str()); } } else if (propertyName != "UUID") { - Base::Console().Log("\tProperty '%s' is not described by any model. Ignored\n", + Base::Console().log("\tProperty '%s' is not described by any model. Ignored\n", propertyName.c_str()); } } @@ -393,8 +393,8 @@ MaterialLoader::getMaterialFromYAML(const std::shared_ptr& yamlroot); } catch (YAML::Exception const& e) { - Base::Console().Error("YAML parsing error: '%s'\n", path.toStdString().c_str()); - Base::Console().Error("\t'%s'\n", e.what()); + Base::Console().error("YAML parsing error: '%s'\n", path.toStdString().c_str()); + Base::Console().error("\t'%s'\n", e.what()); showYaml(yamlroot); } @@ -427,7 +427,7 @@ MaterialLoader::getMaterialFromPath(const std::shared_ptr& Base::FileInfo info(pathName); Base::ifstream fin(info); if (!fin) { - Base::Console().Error("YAML file open error: '%s'\n", pathName.c_str()); + Base::Console().error("YAML file open error: '%s'\n", pathName.c_str()); return model; } @@ -438,8 +438,8 @@ MaterialLoader::getMaterialFromPath(const std::shared_ptr& model = getMaterialFromYAML(materialLibrary, yamlroot, path); } catch (YAML::Exception const& e) { - Base::Console().Error("YAML parsing error: '%s'\n", pathName.c_str()); - Base::Console().Error("\t'%s'\n", e.what()); + Base::Console().error("YAML parsing error: '%s'\n", pathName.c_str()); + Base::Console().error("\t'%s'\n", e.what()); showYaml(yamlroot); } @@ -453,7 +453,7 @@ void MaterialLoader::showYaml(const YAML::Node& yaml) out << yaml; std::string logData = out.str(); - Base::Console().Log("%s\n", logData.c_str()); + Base::Console().log("%s\n", logData.c_str()); } @@ -473,7 +473,7 @@ void MaterialLoader::dereference( parent = materialMap->at(parentUUID); } catch (std::out_of_range&) { - Base::Console().Log( + Base::Console().log( "Unable to apply inheritance for material '%s', parent '%s' not found.\n", material->getName().toStdString().c_str(), parentUUID.toStdString().c_str()); diff --git a/src/Mod/Material/App/MaterialManager.cpp b/src/Mod/Material/App/MaterialManager.cpp index 67fb0d9b14..f5ca97b66e 100644 --- a/src/Mod/Material/App/MaterialManager.cpp +++ b/src/Mod/Material/App/MaterialManager.cpp @@ -103,7 +103,7 @@ void MaterialManager::OnChange(ParameterGrp::SubjectType& rCaller, ParameterGrp: { const ParameterGrp& rGrp = static_cast(rCaller); if (strcmp(Reason, "UseExternal") == 0) { - Base::Console().Log("Use external changed\n"); + Base::Console().log("Use external changed\n"); _useExternal = rGrp.GetBool("UseExternal", false); // _dbManager->refresh(); } diff --git a/src/Mod/Material/App/MaterialManagerLocal.cpp b/src/Mod/Material/App/MaterialManagerLocal.cpp index 7db46b2bad..3c96b905ce 100644 --- a/src/Mod/Material/App/MaterialManagerLocal.cpp +++ b/src/Mod/Material/App/MaterialManagerLocal.cpp @@ -559,7 +559,7 @@ MaterialManagerLocal::getConfiguredLibraries() if (!materialDir.exists()) { // Try creating the user dir if it doesn't exist if (!materialDir.mkpath(resourceDir)) { - Base::Console().Log("Unable to create user library '%s'\n", + Base::Console().log("Unable to create user library '%s'\n", resourceDir.toStdString().c_str()); } } diff --git a/src/Mod/Material/App/MaterialManagerPyImp.cpp b/src/Mod/Material/App/MaterialManagerPyImp.cpp index 61afb574f1..5b2fe808b2 100644 --- a/src/Mod/Material/App/MaterialManagerPyImp.cpp +++ b/src/Mod/Material/App/MaterialManagerPyImp.cpp @@ -255,8 +255,8 @@ PyObject* MaterialManagerPy::save(PyObject* args, PyObject* kwds) return nullptr; } - Base::Console().Log("library name %s\n", libraryName); - Base::Console().Log("path %s\n", path); + Base::Console().log("library name %s\n", libraryName); + Base::Console().log("path %s\n", path); MaterialPy* material; if (QLatin1String(obj->ob_type->tp_name) == QLatin1String("Materials.Material")) { diff --git a/src/Mod/Material/App/MaterialValue.cpp b/src/Mod/Material/App/MaterialValue.cpp index ba20eeb1c0..f8514c2845 100644 --- a/src/Mod/Material/App/MaterialValue.cpp +++ b/src/Mod/Material/App/MaterialValue.cpp @@ -431,11 +431,11 @@ void Array2D::validateColumn(int column) const void Array2D::validate(const Array2D& other) const { if (rows() != other.rows()) { - Base::Console().Log("Local row count %d, remote %d\n", rows(), other.rows()); + Base::Console().log("Local row count %d, remote %d\n", rows(), other.rows()); throw InvalidProperty("Material property value row counts don't match"); } if (columns() != other.columns()) { - Base::Console().Log("Local column count %d, remote %d\n", columns(), other.columns()); + Base::Console().log("Local column count %d, remote %d\n", columns(), other.columns()); throw InvalidProperty("Material property value column counts don't match"); } try { @@ -534,11 +534,11 @@ QVariant Array2D::getValue(int row, int column) const void Array2D::dumpRow(const std::shared_ptr>& row) { - Base::Console().Log("row: "); + Base::Console().log("row: "); for (auto& column : *row) { - Base::Console().Log("'%s' ", column.toString().toStdString().c_str()); + Base::Console().log("'%s' ", column.toString().toStdString().c_str()); } - Base::Console().Log("\n"); + Base::Console().log("\n"); } void Array2D::dump() const diff --git a/src/Mod/Material/App/Materials.cpp b/src/Mod/Material/App/Materials.cpp index bc5ee18a9d..3a0c9f1890 100644 --- a/src/Mod/Material/App/Materials.cpp +++ b/src/Mod/Material/App/Materials.cpp @@ -322,7 +322,7 @@ void MaterialProperty::setValue(const QString& value) setQuantity(Base::Quantity::parse(value.toStdString())); } catch (const Base::ParserError& e) { - Base::Console().Log("MaterialProperty::setValue Error '%s' - '%s'\n", + Base::Console().log("MaterialProperty::setValue Error '%s' - '%s'\n", e.what(), value.toStdString().c_str()); // Save as a string @@ -730,7 +730,7 @@ void Material::addPhysical(const QString& uuid) _physical[propertyName] = std::make_shared(property, uuid); } catch (const UnknownValueType&) { - Base::Console().Error("Property '%s' has unknown type '%s'. Ignoring\n", + Base::Console().error("Property '%s' has unknown type '%s'. Ignoring\n", property.getName().toStdString().c_str(), property.getPropertyType().toStdString().c_str()); } @@ -772,7 +772,7 @@ void Material::removePhysical(const QString& uuid) setEditStateAlter(); } catch (ModelNotFound const&) { - Base::Console().Log("Physical model not found '%s'\n", uuid.toStdString().c_str()); + Base::Console().log("Physical model not found '%s'\n", uuid.toStdString().c_str()); } } @@ -808,7 +808,7 @@ void Material::addAppearance(const QString& uuid) } } catch (ModelNotFound const&) { - Base::Console().Log("Appearance model not found '%s'\n", uuid.toStdString().c_str()); + Base::Console().log("Appearance model not found '%s'\n", uuid.toStdString().c_str()); } } @@ -1426,7 +1426,7 @@ void Material::saveModels(QTextStream& stream, bool saveInherited) const } } catch (const PropertyNotFound&) { - Base::Console().Log("Material::saveModels Property not found '%s'\n", + Base::Console().log("Material::saveModels Property not found '%s'\n", propertyName.toStdString().c_str()); } @@ -1757,7 +1757,7 @@ App::Material Material::getMaterialAppearance() const if (hasAppearanceProperty(QStringLiteral("TextureImage"))) { auto property = getAppearanceProperty(QStringLiteral("TextureImage")); if (!property->isNull()) { - Base::Console().Log("Has 'TextureImage'\n"); + Base::Console().log("Has 'TextureImage'\n"); material.image = property->getString().toStdString(); } @@ -1766,7 +1766,7 @@ App::Material Material::getMaterialAppearance() const else if (hasAppearanceProperty(QStringLiteral("TexturePath"))) { auto property = getAppearanceProperty(QStringLiteral("TexturePath")); if (!property->isNull()) { - Base::Console().Log("Has 'TexturePath'\n"); + Base::Console().log("Has 'TexturePath'\n"); material.imagePath = property->getString().toStdString(); } @@ -1823,8 +1823,8 @@ void Material::validate(const std::shared_ptr& other) const } if (_tags.size() != other->_tags.size()) { - Base::Console().Log("Local tags count %d\n", _tags.size()); - Base::Console().Log("Remote tags count %d\n", other->_tags.size()); + Base::Console().log("Local tags count %d\n", _tags.size()); + Base::Console().log("Remote tags count %d\n", other->_tags.size()); throw InvalidMaterial("Material tags counts don't match"); } if (!other->_tags.contains(_tags)) { @@ -1832,8 +1832,8 @@ void Material::validate(const std::shared_ptr& other) const } if (_physicalUuids.size() != other->_physicalUuids.size()) { - Base::Console().Log("Local physical model count %d\n", _physicalUuids.size()); - Base::Console().Log("Remote physical model count %d\n", other->_physicalUuids.size()); + Base::Console().log("Local physical model count %d\n", _physicalUuids.size()); + Base::Console().log("Remote physical model count %d\n", other->_physicalUuids.size()); throw InvalidMaterial("Material physical model counts don't match"); } if (!other->_physicalUuids.contains(_physicalUuids)) { @@ -1841,8 +1841,8 @@ void Material::validate(const std::shared_ptr& other) const } if (_physicalUuids.size() != other->_physicalUuids.size()) { - Base::Console().Log("Local appearance model count %d\n", _physicalUuids.size()); - Base::Console().Log("Remote appearance model count %d\n", other->_physicalUuids.size()); + Base::Console().log("Local appearance model count %d\n", _physicalUuids.size()); + Base::Console().log("Remote appearance model count %d\n", other->_physicalUuids.size()); throw InvalidMaterial("Material appearance model counts don't match"); } if (!other->_physicalUuids.contains(_physicalUuids)) { @@ -1850,8 +1850,8 @@ void Material::validate(const std::shared_ptr& other) const } if (_allUuids.size() != other->_allUuids.size()) { - Base::Console().Log("Local model count %d\n", _allUuids.size()); - Base::Console().Log("Remote model count %d\n", other->_allUuids.size()); + Base::Console().log("Local model count %d\n", _allUuids.size()); + Base::Console().log("Remote model count %d\n", other->_allUuids.size()); throw InvalidMaterial("Material model counts don't match"); } if (!other->_allUuids.contains(_allUuids)) { diff --git a/src/Mod/Material/App/Model.cpp b/src/Mod/Material/App/Model.cpp index 9c7d0a7bcf..78eeac9d7e 100644 --- a/src/Mod/Material/App/Model.cpp +++ b/src/Mod/Material/App/Model.cpp @@ -113,8 +113,8 @@ void ModelProperty::validate(const ModelProperty& other) const throw InvalidProperty("Model names don't match"); } if (getDisplayName() != other.getDisplayName()) { - Base::Console().Log("Local display name '%s'\n", getDisplayName().toStdString().c_str()); - Base::Console().Log("Remote display name '%s'\n", + Base::Console().log("Local display name '%s'\n", getDisplayName().toStdString().c_str()); + Base::Console().log("Remote display name '%s'\n", other.getDisplayName().toStdString().c_str()); throw InvalidProperty("Model display names don't match"); } @@ -135,8 +135,8 @@ void ModelProperty::validate(const ModelProperty& other) const } if (_columns.size() != other._columns.size()) { - Base::Console().Log("Local property column count %d\n", _columns.size()); - Base::Console().Log("Remote property column count %d\n", other._columns.size()); + Base::Console().log("Local property column count %d\n", _columns.size()); + Base::Console().log("Remote property column count %d\n", other._columns.size()); throw InvalidProperty("Model property column counts don't match"); } for (size_t i = 0; i < _columns.size(); i++) { @@ -243,8 +243,8 @@ void Model::validate(const std::shared_ptr& other) const // Need to compare properties if (_properties.size() != other->_properties.size()) { - // Base::Console().Log("Local property count %d\n", _properties.size()); - // Base::Console().Log("Remote property count %d\n", other->_properties.size()); + // Base::Console().log("Local property count %d\n", _properties.size()); + // Base::Console().log("Remote property count %d\n", other->_properties.size()); throw InvalidModel("Model property counts don't match"); } for (auto& property : _properties) { diff --git a/src/Mod/Material/App/ModelLoader.cpp b/src/Mod/Material/App/ModelLoader.cpp index f615f26abb..671cb8db3d 100644 --- a/src/Mod/Material/App/ModelLoader.cpp +++ b/src/Mod/Material/App/ModelLoader.cpp @@ -138,7 +138,7 @@ void ModelLoader::showYaml(const YAML::Node& yaml) const out << yaml; std::string logData = out.str(); - Base::Console().Log("%s\n", logData.c_str()); + Base::Console().log("%s\n", logData.c_str()); } void ModelLoader::dereference(const QString& uuid, @@ -198,7 +198,7 @@ void ModelLoader::dereference(std::shared_ptr model, dereference(model->getUUID(), model, child, inheritances); } catch (const std::out_of_range&) { - Base::Console().Log("Unable to find '%s' in model map\n", + Base::Console().log("Unable to find '%s' in model map\n", nodeName.toStdString().c_str()); } } @@ -333,7 +333,7 @@ void ModelLoader::loadLibrary(std::shared_ptr library) // showYaml(model->getModel()); } catch (InvalidModel const&) { - Base::Console().Log("Invalid model '%s'\n", pathname.toStdString().c_str()); + Base::Console().log("Invalid model '%s'\n", pathname.toStdString().c_str()); } } } diff --git a/src/Mod/Material/App/ModelManager.cpp b/src/Mod/Material/App/ModelManager.cpp index f0401dfff7..aeb0c1bece 100644 --- a/src/Mod/Material/App/ModelManager.cpp +++ b/src/Mod/Material/App/ModelManager.cpp @@ -95,7 +95,7 @@ void ModelManager::OnChange(ParameterGrp::SubjectType& rCaller, ParameterGrp::Me { const ParameterGrp& rGrp = static_cast(rCaller); if (strcmp(Reason, "UseExternal") == 0) { - Base::Console().Log("Use external changed\n"); + Base::Console().log("Use external changed\n"); _useExternal = rGrp.GetBool("UseExternal", false); // _dbManager->refresh(); } diff --git a/src/Mod/Material/Gui/AppMatGui.cpp b/src/Mod/Material/Gui/AppMatGui.cpp index 8d6626d3c4..f406363590 100644 --- a/src/Mod/Material/Gui/AppMatGui.cpp +++ b/src/Mod/Material/Gui/AppMatGui.cpp @@ -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(); diff --git a/src/Mod/Material/Gui/Array2D.cpp b/src/Mod/Material/Gui/Array2D.cpp index 2d2f6acefc..90062f96ec 100644 --- a/src/Mod/Material/Gui/Array2D.cpp +++ b/src/Mod/Material/Gui/Array2D.cpp @@ -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) { diff --git a/src/Mod/Material/Gui/Array3D.cpp b/src/Mod/Material/Gui/Array3D.cpp index f91b3f5b83..fe32438761 100644 --- a/src/Mod/Material/Gui/Array3D.cpp +++ b/src/Mod/Material/Gui/Array3D.cpp @@ -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) { diff --git a/src/Mod/Material/Gui/ArrayModel.cpp b/src/Mod/Material/Gui/ArrayModel.cpp index c51fa0062e..c8c72ecc86 100644 --- a/src/Mod/Material/Gui/ArrayModel.cpp +++ b/src/Mod/Material/Gui/ArrayModel.cpp @@ -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()); } catch (const Materials::InvalidIndex&) { - Base::Console().Error("Array3DModel::setData - InvalidIndex"); + Base::Console().error("Array3DModel::setData - InvalidIndex"); } Q_EMIT dataChanged(index, index); diff --git a/src/Mod/Material/Gui/DlgDisplayPropertiesImp.cpp b/src/Mod/Material/Gui/DlgDisplayPropertiesImp.cpp index b043b20ac0..aa2aaa0095 100644 --- a/src/Mod/Material/Gui/DlgDisplayPropertiesImp.cpp +++ b/src/Mod/Material/Gui/DlgDisplayPropertiesImp.cpp @@ -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()); } /** diff --git a/src/Mod/Material/Gui/DlgInspectMaterial.cpp b/src/Mod/Material/Gui/DlgInspectMaterial.cpp index 01b34c885b..e5512ba0a3 100644 --- a/src/Mod/Material/Gui/DlgInspectMaterial.cpp +++ b/src/Mod/Material/Gui/DlgInspectMaterial.cpp @@ -205,7 +205,7 @@ void DlgInspectMaterial::update(std::vector& 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(tree->model()); diff --git a/src/Mod/Material/Gui/ImageEdit.cpp b/src/Mod/Material/Gui/ImageEdit.cpp index d0ba4e70ba..4629b3b053 100644 --- a/src/Mod/Material/Gui/ImageEdit.cpp +++ b/src/Mod/Material/Gui/ImageEdit.cpp @@ -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(); } diff --git a/src/Mod/Material/Gui/ListEdit.cpp b/src/Mod/Material/Gui/ListEdit.cpp index a18022399b..4a74054cec 100644 --- a/src/Mod/Material/Gui/ListEdit.cpp +++ b/src/Mod/Material/Gui/ListEdit.cpp @@ -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(); diff --git a/src/Mod/Material/Gui/MaterialDelegate.cpp b/src/Mod/Material/Gui/MaterialDelegate.cpp index e3d32c5997..5218b687d4 100644 --- a/src/Mod/Material/Gui/MaterialDelegate.cpp +++ b/src/Mod/Material/Gui/MaterialDelegate.cpp @@ -151,7 +151,7 @@ void MaterialDelegate::setValue(QAbstractItemModel* model, catch (const Base::ValueError& e) { // Units mismatch auto quantity = value.value(); - 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(), diff --git a/src/Mod/Material/Gui/MaterialTreeWidget.cpp b/src/Mod/Material/Gui/MaterialTreeWidget.cpp index 13ae712033..0c7519667e 100644 --- a/src/Mod/Material/Gui/MaterialTreeWidget.cpp +++ b/src/Mod/Material/Gui/MaterialTreeWidget.cpp @@ -274,7 +274,7 @@ void MaterialTreeWidget::updateMaterial(const QString& uuid) material = std::make_shared(*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(); diff --git a/src/Mod/Material/Gui/MaterialTreeWidget.h b/src/Mod/Material/Gui/MaterialTreeWidget.h index 4b58759c3c..02602e9a79 100644 --- a/src/Mod/Material/Gui/MaterialTreeWidget.h +++ b/src/Mod/Material/Gui/MaterialTreeWidget.h @@ -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 \ No newline at end of file +#endif // MATGUI_MATERIALTREEWIDGET_H diff --git a/src/Mod/Material/Gui/MaterialsEditor.cpp b/src/Mod/Material/Gui/MaterialsEditor.cpp index e351d5b07f..51302dbd8b 100644 --- a/src/Mod/Material/Gui/MaterialsEditor.cpp +++ b/src/Mod/Material/Gui/MaterialsEditor.cpp @@ -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(*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(); } diff --git a/src/Mod/Material/Gui/MaterialsEditor.h b/src/Mod/Material/Gui/MaterialsEditor.h index 0ad9e9e5b7..da523c850b 100644 --- a/src/Mod/Material/Gui/MaterialsEditor.h +++ b/src/Mod/Material/Gui/MaterialsEditor.h @@ -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); } diff --git a/src/Mod/Material/Gui/TextEdit.cpp b/src/Mod/Material/Gui/TextEdit.cpp index 95c1558855..aee64ea7b9 100644 --- a/src/Mod/Material/Gui/TextEdit.cpp +++ b/src/Mod/Material/Gui/TextEdit.cpp @@ -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(); } diff --git a/src/Mod/Measure/App/AppMeasure.cpp b/src/Mod/Measure/App/AppMeasure.cpp index b85061b240..881922f6c0 100644 --- a/src/Mod/Measure/App/AppMeasure.cpp +++ b/src/Mod/Measure/App/AppMeasure.cpp @@ -183,12 +183,12 @@ PyMOD_INIT_FUNC(Measure) } - Base::Console().Log("Loading Measure module... done\n"); + Base::Console().log("Loading Measure module... done\n"); PyMOD_Return(mod); } // debug print for sketchsolv void debugprint(const std::string& text) { - Base::Console().Log("%s", text.c_str()); + Base::Console().log("%s", text.c_str()); } diff --git a/src/Mod/Measure/App/AppMeasurePy.cpp b/src/Mod/Measure/App/AppMeasurePy.cpp index c900f993da..f960c40073 100644 --- a/src/Mod/Measure/App/AppMeasurePy.cpp +++ b/src/Mod/Measure/App/AppMeasurePy.cpp @@ -116,7 +116,7 @@ private: else { str += "No OCCT Exception Message"; } - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::Exception(Part::PartExceptionOCCError, str); } catch (const Base::Exception& e) { @@ -132,7 +132,7 @@ private: str += "C++ exception thrown ("; str += e.what(); str += ")"; - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::RuntimeError(str); } } diff --git a/src/Mod/Measure/App/MeasureBase.h b/src/Mod/Measure/App/MeasureBase.h index bcbdd122a7..c5e860b632 100644 --- a/src/Mod/Measure/App/MeasureBase.h +++ b/src/Mod/Measure/App/MeasureBase.h @@ -131,7 +131,7 @@ public: auto handler = getGeometryHandler(mod); if (!handler) { - Base::Console().Log("MeasureBaseExtendable::getMeasureInfo: No geometry handler " + Base::Console().log("MeasureBaseExtendable::getMeasureInfo: No geometry handler " "available for submitted element type"); return nullptr; } diff --git a/src/Mod/Measure/App/Measurement.cpp b/src/Mod/Measure/App/Measurement.cpp index 7965870851..661edd7ea0 100644 --- a/src/Mod/Measure/App/Measurement.cpp +++ b/src/Mod/Measure/App/Measurement.cpp @@ -292,10 +292,10 @@ double Measurement::length() const double result = 0.0; int numRefs = References3D.getSize(); if (numRefs == 0) { - Base::Console().Error("Measurement::length - No 3D references available\n"); + Base::Console().error("Measurement::length - No 3D references available\n"); } else if (measureType == MeasureType::Invalid) { - Base::Console().Error("Measurement::length - measureType is Invalid\n"); + Base::Console().error("Measurement::length - measureType is Invalid\n"); } else { const std::vector& objects = References3D.getValues(); @@ -406,7 +406,7 @@ double Measurement::lineLineDistance() const distance = perpendicularComponent.Magnitude(); } else { - Base::Console().Error("Measurement::length - TwoLines measureType requires two lines\n"); + Base::Console().error("Measurement::length - TwoLines measureType requires two lines\n"); } return distance; } @@ -528,7 +528,7 @@ double Measurement::radius() const int numRefs = References3D.getSize(); if (numRefs == 0) { - Base::Console().Error("Measurement::radius - No 3D references available\n"); + Base::Console().error("Measurement::radius - No 3D references available\n"); } else if (measureType == MeasureType::Circle) { TopoDS_Shape shape = getShape(objects.at(0), subElements.at(0).c_str()); @@ -555,7 +555,7 @@ double Measurement::radius() const return sf.Torus().MinorRadius(); } } - Base::Console().Error("Measurement::radius - Invalid References3D Provided\n"); + Base::Console().error("Measurement::radius - Invalid References3D Provided\n"); return 0.0; } @@ -564,10 +564,10 @@ Base::Vector3d Measurement::delta() const Base::Vector3d result; int numRefs = References3D.getSize(); if (numRefs == 0) { - Base::Console().Error("Measurement::delta - No 3D references available\n"); + Base::Console().error("Measurement::delta - No 3D references available\n"); } else if (measureType == MeasureType::Invalid) { - Base::Console().Error("Measurement::delta - measureType is Invalid\n"); + Base::Console().error("Measurement::delta - measureType is Invalid\n"); } else { const std::vector& objects = References3D.getValues(); @@ -646,7 +646,7 @@ Base::Vector3d Measurement::delta() const } } else { - Base::Console().Error("Measurement::delta - measureType is not recognized\n"); + Base::Console().error("Measurement::delta - measureType is not recognized\n"); } } return result; @@ -656,10 +656,10 @@ double Measurement::volume() const { double result = 0.0; if (References3D.getSize() == 0) { - Base::Console().Error("Measurement::volume - No 3D references available\n"); + Base::Console().error("Measurement::volume - No 3D references available\n"); } else if (measureType != MeasureType::Volumes) { - Base::Console().Error("Measurement::volume - measureType is not Volumes\n"); + Base::Console().error("Measurement::volume - measureType is not Volumes\n"); } else { const std::vector& objects = References3D.getValues(); @@ -678,7 +678,7 @@ double Measurement::area() const { double result = 0.0; if (References3D.getSize() == 0) { - Base::Console().Error("Measurement::area - No 3D references available\n"); + Base::Console().error("Measurement::area - No 3D references available\n"); } else if (measureType == MeasureType::Volumes || measureType == MeasureType::Surfaces || measureType == MeasureType::Cylinder || measureType == MeasureType::Cone @@ -695,7 +695,7 @@ double Measurement::area() const } } else { - Base::Console().Error("Measurement::area - measureType is not valid\n"); + Base::Console().error("Measurement::area - measureType is not valid\n"); } return result; } @@ -705,10 +705,10 @@ Base::Vector3d Measurement::massCenter() const Base::Vector3d result; int numRefs = References3D.getSize(); if (numRefs == 0) { - Base::Console().Error("Measurement::massCenter - No 3D references available\n"); + Base::Console().error("Measurement::massCenter - No 3D references available\n"); } else if (measureType == MeasureType::Invalid) { - Base::Console().Error("Measurement::massCenter - measureType is Invalid\n"); + Base::Console().error("Measurement::massCenter - measureType is Invalid\n"); } else { const std::vector& objects = References3D.getValues(); @@ -735,7 +735,7 @@ Base::Vector3d Measurement::massCenter() const return Base::Vector3d(cog.X(), cog.Y(), cog.Z()); } else { - Base::Console().Error("Measurement::massCenter - measureType is not recognized\n"); + Base::Console().error("Measurement::massCenter - measureType is not recognized\n"); } } return result; diff --git a/src/Mod/Measure/Gui/AppMeasureGui.cpp b/src/Mod/Measure/Gui/AppMeasureGui.cpp index af556fead8..2897c1591b 100644 --- a/src/Mod/Measure/Gui/AppMeasureGui.cpp +++ b/src/Mod/Measure/Gui/AppMeasureGui.cpp @@ -85,7 +85,7 @@ PyMOD_INIT_FUNC(MeasureGui) } PyObject* mod = MeasureGui::initModule(); - Base::Console().Log("Loading GUI of Measure module... done\n"); + Base::Console().log("Loading GUI of Measure module... done\n"); auto manip = std::make_shared(); Gui::WorkbenchManipulator::installManipulator(manip); diff --git a/src/Mod/Measure/Gui/TaskMeasure.cpp b/src/Mod/Measure/Gui/TaskMeasure.cpp index 9b2cc03b71..e9dccee5d4 100644 --- a/src/Mod/Measure/Gui/TaskMeasure.cpp +++ b/src/Mod/Measure/Gui/TaskMeasure.cpp @@ -255,7 +255,7 @@ void TaskMeasure::update() std::string mod = Base::Type::getModuleName(sub->getTypeId().getName()); if (!App::MeasureManager::hasMeasureHandler(mod.c_str())) { - Base::Console().Message("No measure handler available for geometry of module: %s\n", + Base::Console().message("No measure handler available for geometry of module: %s\n", mod); clearSelection(); return; diff --git a/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp b/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp index 7609486af2..29d0e66b84 100644 --- a/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp +++ b/src/Mod/Measure/Gui/ViewProviderMeasureAngle.cpp @@ -334,7 +334,7 @@ void ViewProviderMeasureAngle::redrawAnnotation() pcTransform->setMatrix(matrix); } catch (const Base::Exception& e) { - Base::Console().Error("Error in ViewProviderMeasureAngle::redrawAnnotation: %s\n", + Base::Console().error("Error in ViewProviderMeasureAngle::redrawAnnotation: %s\n", e.what()); return; } diff --git a/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp b/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp index 4bc71cc99c..6b46ed20c6 100644 --- a/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp +++ b/src/Mod/Measure/Gui/ViewProviderMeasureBase.cpp @@ -380,7 +380,7 @@ void ViewProviderMeasureBase::updateData(const App::Property* prop) // TODO: should this be pure virtual? void ViewProviderMeasureBase::redrawAnnotation() { - // Base::Console().Message("VPMB::redrawAnnotation()\n"); + // Base::Console().message("VPMB::redrawAnnotation()\n"); } //! connect to the subject to receive visibility updates @@ -449,7 +449,7 @@ Base::Vector3d ViewProviderMeasureBase::getTextDirection(Base::Vector3d elementD view = dynamic_cast(this->getActiveView()); } catch (const Base::RuntimeError&) { - Base::Console().Log( + Base::Console().log( "ViewProviderMeasureBase::getTextDirection: Could not get active view\n"); } @@ -485,7 +485,7 @@ bool ViewProviderMeasureBase::isSubjectVisible() guiDoc = this->getDocument(); } catch (const Base::RuntimeError&) { - Base::Console().Log("ViewProviderMeasureBase::isSubjectVisible: Could not get document\n"); + Base::Console().log("ViewProviderMeasureBase::isSubjectVisible: Could not get document\n"); return false; } @@ -541,7 +541,7 @@ float ViewProviderMeasureBase::getViewScale() Gui::View3DInventor* view = dynamic_cast(this->getActiveView()); if (!view) { - Base::Console().Log("ViewProviderMeasureBase::getViewScale: Could not get active view\n"); + Base::Console().log("ViewProviderMeasureBase::getViewScale: Could not get active view\n"); return scale; } Gui::View3DInventorViewer* viewer = view->getViewer(); @@ -609,7 +609,7 @@ ViewProviderMeasure::ViewProviderMeasure() view = dynamic_cast(this->getActiveView()); } catch (const Base::RuntimeError&) { - Base::Console().Log( + Base::Console().log( "ViewProviderMeasure::ViewProviderMeasure: Could not get active view\n"); } @@ -641,7 +641,7 @@ void ViewProviderMeasure::positionAnno(const Measure::MeasureBase* measureObject view = dynamic_cast(this->getActiveView()); } catch (const Base::RuntimeError&) { - Base::Console().Log("ViewProviderMeasure::positionAnno: Could not get active view\n"); + Base::Console().log("ViewProviderMeasure::positionAnno: Could not get active view\n"); } if (!view) { @@ -697,7 +697,7 @@ Base::Vector3d ViewProviderMeasure::getTextPosition() Gui::View3DInventor* view = dynamic_cast(this->getActiveView()); if (!view) { - Base::Console().Log( + Base::Console().log( "ViewProviderMeasureBase::getTextPosition: Could not get active view\n"); return Base::Vector3d(); } diff --git a/src/Mod/Mesh/App/AppMesh.cpp b/src/Mod/Mesh/App/AppMesh.cpp index daca126ed5..795c3c2aab 100644 --- a/src/Mod/Mesh/App/AppMesh.cpp +++ b/src/Mod/Mesh/App/AppMesh.cpp @@ -54,7 +54,7 @@ extern PyObject* initModule(); PyMOD_INIT_FUNC(Mesh) { PyObject* meshModule = Mesh::initModule(); - Base::Console().Log("Loading Mesh module... done\n"); + Base::Console().log("Loading Mesh module... done\n"); // NOTE: To finish the initialization of our own type objects we must // call PyType_Ready, otherwise we run into a segmentation fault, later on. diff --git a/src/Mod/Mesh/App/Core/Algorithm.cpp b/src/Mod/Mesh/App/Core/Algorithm.cpp index 5ceb1d3e8b..57018986c1 100644 --- a/src/Mod/Mesh/App/Core/Algorithm.cpp +++ b/src/Mod/Mesh/App/Core/Algorithm.cpp @@ -808,7 +808,7 @@ bool MeshAlgorithm::FillupHole(const std::vector& boundary, // in case the reference facet has not an open edge print a log message if (ref_side == max || tri_side == max) { - Base::Console().Log( + Base::Console().log( "MeshAlgorithm::FillupHole: Expected open edge for facet <%d, %d, %d>\n", rFace._aulPoints[0], rFace._aulPoints[1], diff --git a/src/Mod/Mesh/App/Core/Approximation.cpp b/src/Mod/Mesh/App/Core/Approximation.cpp index f0b8d2c25c..eb03190946 100644 --- a/src/Mod/Mesh/App/Core/Approximation.cpp +++ b/src/Mod/Mesh/App/Core/Approximation.cpp @@ -1186,7 +1186,7 @@ float CylinderFit::Fit() Base::Vector3d dir = cylFit.GetAxis(); #if defined(FC_DEBUG) - Base::Console().Log( + Base::Console().log( "MeshCoreFit::Cylinder Fit: Base: (%0.4f, %0.4f, %0.4f), Axis: (%0.6f, %0.6f, " "%0.6f), Radius: %0.4f, Std Dev: %0.4f, Iterations: %d\n", base.x, @@ -1238,7 +1238,7 @@ float CylinderFit::Fit() Eigen::LevenbergMarquardt lm(functor); int status = lm.minimize(x); - Base::Console().Log("Cylinder fit: %d, iterations: %d, gradient norm: %f\n", + Base::Console().log("Cylinder fit: %d, iterations: %d, gradient norm: %f\n", status, lm.iter, lm.gnorm); @@ -1421,7 +1421,7 @@ float SphereFit::Fit() _fLastResult = 0; #if defined(_DEBUG) - Base::Console().Message(" WildMagic Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: " + Base::Console().message(" WildMagic Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: " "%0.4f, Std Dev: %0.4f\n", _vCenter.x, _vCenter.y, @@ -1437,7 +1437,7 @@ float SphereFit::Fit() if (result < std::numeric_limits::max()) { Base::Vector3d center = sphereFit.GetCenter(); #if defined(_DEBUG) - Base::Console().Message("MeshCoreFit::Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: " + Base::Console().message("MeshCoreFit::Sphere Fit: Center: (%0.4f, %0.4f, %0.4f), Radius: " "%0.4f, Std Dev: %0.4f, Iterations: %d\n", center.x, center.y, diff --git a/src/Mod/Mesh/App/Core/CylinderFit.cpp b/src/Mod/Mesh/App/Core/CylinderFit.cpp index 3cec8a71f5..9b940cb9dd 100644 --- a/src/Mod/Mesh/App/Core/CylinderFit.cpp +++ b/src/Mod/Mesh/App/Core/CylinderFit.cpp @@ -699,7 +699,7 @@ bool CylinderFit::computeResiduals(SolutionD solDir, } // rmsVv = sqrt(rmsVv / (double)nPtsUsed); - // Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS + // Base::Console().message("X: %0.3e %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS // Vv: %0.4f\n", x(0), x(1), x(2), x(3), x(4), maxdVx, maxdVy, maxdVz, rmsVv); return true; diff --git a/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp b/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp index 6e0ed76831..e872ec73ee 100644 --- a/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp +++ b/src/Mod/Mesh/App/Core/IO/WriterOBJ.cpp @@ -83,7 +83,7 @@ bool WriterOBJ::Save(std::ostream& out) if (_material) { if (_material->binding == MeshIO::PER_FACE) { if (_material->diffuseColor.size() != rFacets.size()) { - Base::Console().Warning("Cannot export color information because there is a " + Base::Console().warning("Cannot export color information because there is a " "different number of faces and colors"); } else { @@ -92,7 +92,7 @@ bool WriterOBJ::Save(std::ostream& out) } else if (_material->binding == MeshIO::PER_VERTEX) { if (_material->diffuseColor.size() != rPoints.size()) { - Base::Console().Warning("Cannot export color information because there is a " + Base::Console().warning("Cannot export color information because there is a " "different number of points and colors"); } else { @@ -101,7 +101,7 @@ bool WriterOBJ::Save(std::ostream& out) } else if (_material->binding == MeshIO::OVERALL) { if (_material->diffuseColor.empty()) { - Base::Console().Warning( + Base::Console().warning( "Cannot export color information because there is no color defined"); } else { diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index 096ccc0f14..d1e5fdad74 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -246,7 +246,7 @@ bool MeshInput::LoadAny(const char* FileName) else if (fi.hasExtension("iv")) { ok = LoadInventor(str); if (ok && _rclMesh.CountFacets() == 0) { - Base::Console().Warning("No usable mesh found in file '%s'", FileName); + Base::Console().warning("No usable mesh found in file '%s'", FileName); } } else if (fi.hasExtension({"nas", "bdf"})) { @@ -1151,14 +1151,14 @@ bool MeshInput::LoadNastran(std::istream& input) } if (badElementCounter > 0) { - Base::Console().Warning("Found bad elements while reading NASTRAN file.\n"); + Base::Console().warning("Found bad elements while reading NASTRAN file.\n"); } // Check the triangles to make sure the vertices they refer to actually exist: for (const auto& tri : mTria) { for (int i : tri.second.iV) { if (mNode.find(i) == mNode.end()) { - Base::Console().Error( + Base::Console().error( "CTRIA3 element refers to a node that does not exist, or could not be read.\n"); return false; } @@ -1169,7 +1169,7 @@ bool MeshInput::LoadNastran(std::istream& input) for (const auto& quad : mQuad) { for (int i : quad.second.iV) { if (mNode.find(i) == mNode.end()) { - Base::Console().Error( + Base::Console().error( "CQUAD4 element refers to a node that does not exist, or could not be read.\n"); return false; } @@ -1869,12 +1869,12 @@ bool MeshOutput::SaveOFF(std::ostream& out) const bool exportColor = false; if (_material) { if (_material->binding == MeshIO::PER_FACE) { - Base::Console().Warning( + Base::Console().warning( "Cannot export color information because it's defined per face"); } else if (_material->binding == MeshIO::PER_VERTEX) { if (_material->diffuseColor.size() != rPoints.size()) { - Base::Console().Warning("Cannot export color information because there is a " + Base::Console().warning("Cannot export color information because there is a " "different number of points and colors"); } else { @@ -1883,7 +1883,7 @@ bool MeshOutput::SaveOFF(std::ostream& out) const } else if (_material->binding == MeshIO::OVERALL) { if (_material->diffuseColor.empty()) { - Base::Console().Warning( + Base::Console().warning( "Cannot export color information because there is no color defined"); } else { diff --git a/src/Mod/Mesh/App/Core/SphereFit.cpp b/src/Mod/Mesh/App/Core/SphereFit.cpp index 91ae259706..02a42fd409 100644 --- a/src/Mod/Mesh/App/Core/SphereFit.cpp +++ b/src/Mod/Mesh/App/Core/SphereFit.cpp @@ -440,7 +440,7 @@ bool SphereFit::computeResiduals(const Eigen::VectorXd& x, } // rmsVv = sqrt(rmsVv / (double)nPtsUsed); - // Base::Console().Message("X: %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS Vv: + // Base::Console().message("X: %0.3e %0.3e %0.3e %0.3e , Max dV: %0.4f %0.4f %0.4f , RMS Vv: // %0.4f\n", x(0), x(1), x(2), x(3), maxdVx, maxdVy, maxdVz, rmsVv); return true; diff --git a/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp b/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp index 9d7960f847..3273fb9385 100644 --- a/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp +++ b/src/Mod/Mesh/App/Core/TopoAlgorithm.cpp @@ -1729,7 +1729,7 @@ void MeshTopoAlgorithm::FillupHoles(int level, for (auto& newFacet : newFacets) { if (newFacet._aulPoints[0] >= ctPoints || newFacet._aulPoints[1] >= ctPoints || newFacet._aulPoints[2] >= ctPoints) { - Base::Console().Log("Ignore invalid face <%d, %d, %d> (%d vertices)\n", + Base::Console().log("Ignore invalid face <%d, %d, %d> (%d vertices)\n", newFacet._aulPoints[0], newFacet._aulPoints[1], newFacet._aulPoints[2], diff --git a/src/Mod/Mesh/App/Core/Triangulation.cpp b/src/Mod/Mesh/App/Core/Triangulation.cpp index 710f64df8f..98dbcc91d4 100644 --- a/src/Mod/Mesh/App/Core/Triangulation.cpp +++ b/src/Mod/Mesh/App/Core/Triangulation.cpp @@ -237,7 +237,7 @@ bool AbstractPolygonTriangulator::TriangulatePolygon() { try { if (!this->_indices.empty() && this->_points.size() != this->_indices.size()) { - Base::Console().Log("Triangulation: %d points <> %d indices\n", + Base::Console().log("Triangulation: %d points <> %d indices\n", _points.size(), _indices.size()); return false; @@ -249,11 +249,11 @@ bool AbstractPolygonTriangulator::TriangulatePolygon() return ok; } catch (const Base::Exception& e) { - Base::Console().Log("Triangulation: %s\n", e.what()); + Base::Console().log("Triangulation: %s\n", e.what()); return false; } catch (const std::exception& e) { - Base::Console().Log("Triangulation: %s\n", e.what()); + Base::Console().log("Triangulation: %s\n", e.what()); return false; } catch (...) { diff --git a/src/Mod/Mesh/App/Mesh.cpp b/src/Mod/Mesh/App/Mesh.cpp index 42d551e589..125df12d97 100644 --- a/src/Mod/Mesh/App/Mesh.cpp +++ b/src/Mod/Mesh/App/Mesh.cpp @@ -526,19 +526,19 @@ void MeshObject::load(std::istream& in) try { MeshCore::MeshEvalNeighbourhood nb(_kernel); if (!nb.Evaluate()) { - Base::Console().Warning("Errors in neighbourhood of mesh found..."); + Base::Console().warning("Errors in neighbourhood of mesh found..."); _kernel.RebuildNeighbours(); - Base::Console().Warning("fixed\n"); + Base::Console().warning("fixed\n"); } MeshCore::MeshEvalTopology eval(_kernel); if (!eval.Evaluate()) { - Base::Console().Warning("The mesh data structure has some defects\n"); + Base::Console().warning("The mesh data structure has some defects\n"); } } catch (const Base::MemoryException&) { // ignore memory exceptions and continue - Base::Console().Log("Check for defects in mesh data structure failed\n"); + Base::Console().log("Check for defects in mesh data structure failed\n"); } #endif } diff --git a/src/Mod/Mesh/Gui/AppMeshGui.cpp b/src/Mod/Mesh/Gui/AppMeshGui.cpp index d19bfb68bb..a5fb88d494 100644 --- a/src/Mod/Mesh/Gui/AppMeshGui.cpp +++ b/src/Mod/Mesh/Gui/AppMeshGui.cpp @@ -135,7 +135,7 @@ PyMOD_INIT_FUNC(MeshGui) PyMOD_Return(nullptr); } PyObject* mod = MeshGui::initModule(); - Base::Console().Log("Loading GUI of Mesh module... done\n"); + Base::Console().log("Loading GUI of Mesh module... done\n"); // instantiating the commands CreateMeshCommands(); diff --git a/src/Mod/Mesh/Gui/Command.cpp b/src/Mod/Mesh/Gui/Command.cpp index cfbc9d9842..6f6212780e 100644 --- a/src/Mod/Mesh/Gui/Command.cpp +++ b/src/Mod/Mesh/Gui/Command.cpp @@ -1447,7 +1447,7 @@ void CmdMeshBoundingBox::activated(int) const MeshCore::MeshKernel& rMesh = ((Mesh::Feature*)it)->Mesh.getValue().getKernel(); const Base::BoundBox3f& box = rMesh.GetBoundBox(); - Base::Console().Message("Boundings: Min=<%f,%f,%f>, Max=<%f,%f,%f>\n", + Base::Console().message("Boundings: Min=<%f,%f,%f>, Max=<%f,%f,%f>\n", box.MinX, box.MinY, box.MinZ, diff --git a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp index c26f66c7cd..6ed255f1aa 100644 --- a/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp +++ b/src/Mod/Mesh/Gui/DlgEvaluateMeshImp.cpp @@ -1017,7 +1017,7 @@ void DlgEvaluateMeshImp::onAnalyzeSelfIntersectionButtonClicked() eval.GetIntersections(intersection); } catch (const Base::AbortException&) { - Base::Console().Message("The self-intersection analysis was aborted by the user\n"); + Base::Console().message("The self-intersection analysis was aborted by the user\n"); } if (intersection.empty()) { diff --git a/src/Mod/Mesh/Gui/MeshSelection.cpp b/src/Mod/Mesh/Gui/MeshSelection.cpp index 728a3a978c..d63cf2f398 100644 --- a/src/Mod/Mesh/Gui/MeshSelection.cpp +++ b/src/Mod/Mesh/Gui/MeshSelection.cpp @@ -555,7 +555,7 @@ void MeshSelection::pickFaceCallback(void* ud, SoEventCallback* n) && mbe->getState() == SoButtonEvent::DOWN) { const SoPickedPoint* point = n->getPickedPoint(); if (!point) { - Base::Console().Message("No facet picked.\n"); + Base::Console().message("No facet picked.\n"); return; } diff --git a/src/Mod/Mesh/Gui/RemeshGmsh.cpp b/src/Mod/Mesh/Gui/RemeshGmsh.cpp index f6aa7f480b..08a050a8f5 100644 --- a/src/Mod/Mesh/Gui/RemeshGmsh.cpp +++ b/src/Mod/Mesh/Gui/RemeshGmsh.cpp @@ -174,7 +174,7 @@ double GmshWidget::getMinSize() const void GmshWidget::accept() { if (d->gmsh.state() == QProcess::Running) { - Base::Console().Warning("Cannot start gmsh because it's already running\n"); + Base::Console().warning("Cannot start gmsh because it's already running\n"); return; } diff --git a/src/Mod/Mesh/Gui/SegmentationBestFit.cpp b/src/Mod/Mesh/Gui/SegmentationBestFit.cpp index 3b413e0228..5bb5cea1e4 100644 --- a/src/Mod/Mesh/Gui/SegmentationBestFit.cpp +++ b/src/Mod/Mesh/Gui/SegmentationBestFit.cpp @@ -87,7 +87,7 @@ public: fit.SetInitialValues(base, axis); #if defined(FC_DEBUG) - Base::Console().Message("Initial axis: (%f, %f, %f)\n", axis.x, axis.y, axis.z); + Base::Console().message("Initial axis: (%f, %f, %f)\n", axis.x, axis.y, axis.z); #endif } diff --git a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp index 2304b30633..268e40fde5 100644 --- a/src/Mod/Mesh/Gui/SoFCMeshObject.cpp +++ b/src/Mod/Mesh/Gui/SoFCMeshObject.cpp @@ -1157,7 +1157,7 @@ void SoFCMeshObjectShape::generatePrimitives(SoAction* action) } } catch (const Base::MemoryException&) { - Base::Console().Log("Not enough memory to generate primitives\n"); + Base::Console().log("Not enough memory to generate primitives\n"); } endShape(); @@ -1582,7 +1582,7 @@ void SoFCMeshSegmentShape::generatePrimitives(SoAction* action) } } catch (const Base::MemoryException&) { - Base::Console().Log("Not enough memory to generate primitives\n"); + Base::Console().log("Not enough memory to generate primitives\n"); } endShape(); diff --git a/src/Mod/Mesh/Gui/ViewProvider.cpp b/src/Mod/Mesh/Gui/ViewProvider.cpp index 338b060dd4..c3e535c9c9 100644 --- a/src/Mod/Mesh/Gui/ViewProvider.cpp +++ b/src/Mod/Mesh/Gui/ViewProvider.cpp @@ -1159,7 +1159,7 @@ void ViewProviderMesh::partMeshCallback(void* ud, SoEventCallback* cb) // create a tool shape from these points std::vector aFaces; if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) { - Base::Console().Message("The picked polygon seems to have self-overlappings. This could " + Base::Console().message("The picked polygon seems to have self-overlappings. This could " "lead to strange results."); } @@ -1232,7 +1232,7 @@ void ViewProviderMesh::segmMeshCallback(void* ud, SoEventCallback* cb) // create a tool shape from these points std::vector aFaces; if (!ViewProviderMesh::createToolMesh(clPoly, vol, cNormal, aFaces)) { - Base::Console().Message("The picked polygon seems to have self-overlappings. This could " + Base::Console().message("The picked polygon seems to have self-overlappings. This could " "lead to strange results."); } @@ -1366,7 +1366,7 @@ void ViewProviderMesh::getFacetsFromPolygon(const std::vector& picked, } if (!ok) { // note: the mouse grabbing needs to be released - Base::Console().Message("The picked polygon seems to have self-overlappings. This could " + Base::Console().message("The picked polygon seems to have self-overlappings. This could " "lead to strange results."); } } @@ -1701,7 +1701,7 @@ void ViewProviderMesh::faceInfoCallback(void* ud, SoEventCallback* cb) && mbe->getState() == SoButtonEvent::DOWN) { const SoPickedPoint* point = cb->getPickedPoint(); if (!point) { - Base::Console().Message("No facet picked.\n"); + Base::Console().message("No facet picked.\n"); return; } @@ -1784,7 +1784,7 @@ void ViewProviderMesh::fillHoleCallback(void* ud, SoEventCallback* cb) && mbe->getState() == SoButtonEvent::DOWN) { const SoPickedPoint* point = cb->getPickedPoint(); if (!point) { - Base::Console().Message("No facet picked.\n"); + Base::Console().message("No facet picked.\n"); return; } @@ -1859,7 +1859,7 @@ void ViewProviderMesh::markPartCallback(void* ud, SoEventCallback* cb) && mbe->getState() == SoButtonEvent::DOWN) { const SoPickedPoint* point = cb->getPickedPoint(); if (!point) { - Base::Console().Message("No facet picked.\n"); + Base::Console().message("No facet picked.\n"); return; } @@ -1888,7 +1888,7 @@ void ViewProviderMesh::faceInfo(Mesh::FacetIndex uFacet) if (uFacet < facets.size()) { MeshCore::MeshFacet face = facets[uFacet]; MeshCore::MeshGeomFacet tria = rKernel.GetFacet(face); - Base::Console().Message( + Base::Console().message( "Mesh: %s Facet %lu: Points: <%lu, %lu, %lu>, Neighbours: <%lu, %lu, %lu>\n" "Triangle: <[%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f]>\n", getObject()->getNameInDocument(), diff --git a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp index 04d6c59718..8067a19e1e 100644 --- a/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderCurvature.cpp @@ -133,13 +133,13 @@ ViewProviderMeshCurvature::~ViewProviderMeshCurvature() deleteColorBar(); } catch (Base::Exception& e) { - Base::Console().DestructorError( + Base::Console().destructorError( "ViewProviderMeshCurvature", "ViewProviderMeshCurvature::deleteColorBar() threw an exception: %s\n", e.what()); } catch (...) { - Base::Console().DestructorError( + Base::Console().destructorError( "ViewProviderInspection", "ViewProviderInspection destructor threw an unknown exception"); } @@ -554,7 +554,7 @@ void ViewProviderMeshCurvature::curvatureInfoCallback(void* ud, SoEventCallback* && mbe->getState() == SoButtonEvent::UP) { const SoPickedPoint* point = n->getPickedPoint(); if (!point) { - Base::Console().Message("No facet picked.\n"); + Base::Console().message("No facet picked.\n"); return; } diff --git a/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp b/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp index 0f5feef8b2..c1d4b778ac 100644 --- a/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp +++ b/src/Mod/Mesh/Gui/ViewProviderTransformDemolding.cpp @@ -170,7 +170,7 @@ void ViewProviderMeshTransformDemolding::DragEndCallback() SbRotation rot = pcTrackballDragger->rotation.getValue(); calcMaterialIndex(rot); - Base::Console().Log("View: Finish dragging\n"); + Base::Console().log("View: Finish dragging\n"); } void ViewProviderMeshTransformDemolding::valueChangedCallback() diff --git a/src/Mod/MeshPart/App/AppMeshPart.cpp b/src/Mod/MeshPart/App/AppMeshPart.cpp index 3d3b79d306..4c1ea6598e 100644 --- a/src/Mod/MeshPart/App/AppMeshPart.cpp +++ b/src/Mod/MeshPart/App/AppMeshPart.cpp @@ -44,6 +44,6 @@ PyMOD_INIT_FUNC(MeshPart) PyMOD_Return(nullptr); } PyObject* mod = MeshPart::initModule(); - Base::Console().Log("Loading MeshPart module... done\n"); + Base::Console().log("Loading MeshPart module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/MeshPart/App/AppMeshPartPy.cpp b/src/Mod/MeshPart/App/AppMeshPartPy.cpp index 76368c349c..56a0bf897d 100644 --- a/src/Mod/MeshPart/App/AppMeshPartPy.cpp +++ b/src/Mod/MeshPart/App/AppMeshPartPy.cpp @@ -155,7 +155,7 @@ private: str += " "; if (msg) {str += msg;} else {str += "No OCCT Exception Message";} - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::Exception(Base::PyExc_FC_GeneralError, str); } catch (const Base::Exception &e) { @@ -171,7 +171,7 @@ private: str += "C++ exception thrown ("; str += e.what(); str += ")"; - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::RuntimeError(str); } } diff --git a/src/Mod/MeshPart/App/CurveProjector.cpp b/src/Mod/MeshPart/App/CurveProjector.cpp index 866d239a10..62c6acae4c 100644 --- a/src/Mod/MeshPart/App/CurveProjector.cpp +++ b/src/Mod/MeshPart/App/CurveProjector.cpp @@ -197,7 +197,7 @@ void CurveProjectorShape::projectCurve(const TopoDS_Edge& aEdge, } else if (Alg.NbPoints() > 1) { PointOnEdge[i] = Base::Vector3f(std::numeric_limits::max(), 0, 0); - Base::Console().Log("MeshAlgos::projectCurve(): More then one intersection in " + Base::Console().log("MeshAlgos::projectCurve(): More then one intersection in " "Facet %lu, Edge %d\n", uCurFacetIdx, i); @@ -218,7 +218,7 @@ void CurveProjectorShape::projectCurve(const TopoDS_Edge& aEdge, GoOn = true; } else { - Base::Console().Log("MeshAlgos::projectCurve(): Possible reentry in Facet %lu\n", + Base::Console().log("MeshAlgos::projectCurve(): Possible reentry in Facet %lu\n", uCurFacetIdx); } @@ -340,7 +340,7 @@ void CurveProjectorSimple::projectCurve(const TopoDS_Edge& aEdge, FaceProjctMap[It.Position()].push_back(TempResultPoint); str << TempResultPoint.x << " " << TempResultPoint.y << " " << TempResultPoint.z << std::endl; - Base::Console().Log("IDX %d\n", It.Position()); + Base::Console().log("IDX %d\n", It.Position()); if (bFirst) { bFirst = false; @@ -352,7 +352,7 @@ void CurveProjectorSimple::projectCurve(const TopoDS_Edge& aEdge, } str.close(); - Base::Console().Log("Projection map [%d facets with %d points]\n", + Base::Console().log("Projection map [%d facets with %d points]\n", FaceProjctMap.size(), PointCount); } @@ -460,7 +460,7 @@ void CurveProjectorWithToolMesh::makeToolMesh(const TopoDS_Edge& aEdge, LineSegs.push_back(s); } - Base::Console().Log("Projection map [%d facets with %d points]\n", + Base::Console().log("Projection map [%d facets with %d points]\n", FaceProjctMap.size(), PointCount); @@ -989,7 +989,7 @@ void MeshProjection::projectEdgeToEdge(const TopoDS_Edge& aEdge, rParamSplitEdges[fSol] = splitEdge; } else if (nCntSol > 1) { - Base::Console().Log("More than one possible intersection points\n"); + Base::Console().log("More than one possible intersection points\n"); } } } diff --git a/src/Mod/MeshPart/App/Mesher.cpp b/src/Mod/MeshPart/App/Mesher.cpp index 0ba26fe51e..eb1603a299 100644 --- a/src/Mod/MeshPart/App/Mesher.cpp +++ b/src/Mod/MeshPart/App/Mesher.cpp @@ -112,7 +112,7 @@ int MeshingOutput::sync() else { sub = buffer; } - Base::Console().Error("%s", sub.c_str()); + Base::Console().error("%s", sub.c_str()); } buffer.clear(); } @@ -570,7 +570,7 @@ Mesh::MeshObject* Mesher::createFrom(SMESH_Mesh* mesh) const faces.push_back(f6); } else { - Base::Console().Warning("Face with %d nodes ignored\n", aFace->NbNodes()); + Base::Console().warning("Face with %d nodes ignored\n", aFace->NbNodes()); } } diff --git a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp index f71dc60387..827ed1cec1 100644 --- a/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp +++ b/src/Mod/MeshPart/Gui/AppMeshPartGui.cpp @@ -74,7 +74,7 @@ PyMOD_INIT_FUNC(MeshPartGui) } PyObject* mod = MeshPartGui::initModule(); - Base::Console().Log("Loading GUI of MeshPart module... done\n"); + Base::Console().log("Loading GUI of MeshPart module... done\n"); // clang-format off // instantiating the commands diff --git a/src/Mod/MeshPart/Gui/Tessellation.cpp b/src/Mod/MeshPart/Gui/Tessellation.cpp index 2031453a8d..675dd06f87 100644 --- a/src/Mod/MeshPart/Gui/Tessellation.cpp +++ b/src/Mod/MeshPart/Gui/Tessellation.cpp @@ -347,7 +347,7 @@ void Tessellation::process(int method, } catch (const Base::Exception& e) { doc->abortTransaction(); - Base::Console().Error(e.what()); + Base::Console().error(e.what()); } } diff --git a/src/Mod/Part/App/AppPart.cpp b/src/Mod/Part/App/AppPart.cpp index 7668f6d9dd..b66e3c60ca 100644 --- a/src/Mod/Part/App/AppPart.cpp +++ b/src/Mod/Part/App/AppPart.cpp @@ -217,7 +217,7 @@ PyMOD_INIT_FUNC(Part) PyErr_SetString(PyExc_ImportError, e.what()); PyMOD_Return(nullptr); } - Base::Console().Log("Module: Part\n"); + Base::Console().log("Module: Part\n"); // This is highly experimental and we should keep an eye on it // if we have mysterious crashes @@ -229,7 +229,7 @@ PyMOD_INIT_FUNC(Part) #endif PyObject* partModule = Part::initModule(); - Base::Console().Log("Loading Part module... done\n"); + Base::Console().log("Loading Part module... done\n"); Py::Object module(partModule); module.setAttr("OCC_VERSION", Py::String(OCC_VERSION_STRING_EXT)); @@ -246,7 +246,7 @@ PyMOD_INIT_FUNC(Part) OCCError = PyErr_NewException("Part.OCCError", Base::PyExc_FC_GeneralError, nullptr); } else { - Base::Console().Error("Can not inherit Part.OCCError form BaseFreeCADError.\n"); + Base::Console().error("Can not inherit Part.OCCError form BaseFreeCADError.\n"); OCCError = PyErr_NewException("Part.OCCError", PyExc_RuntimeError, nullptr); } Py_INCREF(OCCError); @@ -575,7 +575,7 @@ PyMOD_INIT_FUNC(Part) Base::Reference hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/Part/Boolean"); - + Part::FuzzyHelper::setBooleanFuzzy(hGrp->GetFloat("BooleanFuzzy",10.0)); Base::registerServiceImplementation(new AttacherSubObjectPlacement); diff --git a/src/Mod/Part/App/AppPartPy.cpp b/src/Mod/Part/App/AppPartPy.cpp index 227441cfe0..665c797c26 100644 --- a/src/Mod/Part/App/AppPartPy.cpp +++ b/src/Mod/Part/App/AppPartPy.cpp @@ -658,7 +658,7 @@ private: str += " "; if (msg) {str += msg;} else {str += "No OCCT Exception Message";} - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::Exception(Part::PartExceptionOCCError, str); } catch (const Base::Exception &e) { @@ -674,7 +674,7 @@ private: str += "C++ exception thrown ("; str += e.what(); str += ")"; - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::RuntimeError(str); } } @@ -691,7 +691,7 @@ private: str += " "; if (msg) {str += msg;} else {str += "No OCCT Exception Message";} - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::Exception(Part::PartExceptionOCCError, str); } catch (const Base::Exception &e) { @@ -707,7 +707,7 @@ private: str += "C++ exception thrown ("; str += e.what(); str += ")"; - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::RuntimeError(str); } } @@ -762,7 +762,7 @@ private: std::string EncodedName = std::string(Name); PyMem_Free(Name); - //Base::Console().Log("Insert in Part with %s",Name); + //Base::Console().log("Insert in Part with %s",Name); Base::FileInfo file(EncodedName.c_str()); // extract ending @@ -821,7 +821,7 @@ private: builder.Add(comp, shape); } else { - Base::Console().Message("'%s' is not a shape, export will be ignored.\n", obj->Label.getValue()); + Base::Console().message("'%s' is not a shape, export will be ignored.\n", obj->Label.getValue()); } } } diff --git a/src/Mod/Part/App/AttachEnginePyImp.cpp b/src/Mod/Part/App/AttachEnginePyImp.cpp index 7955a5fbd6..761f3877ab 100644 --- a/src/Mod/Part/App/AttachEnginePyImp.cpp +++ b/src/Mod/Part/App/AttachEnginePyImp.cpp @@ -301,16 +301,16 @@ PyObject* AttachEnginePy::getModeInfo(PyObject* args) } catch (Py::Exception& e) { if (PyErr_ExceptionMatches(PyExc_ImportError)) { // the GUI is not up. - Base::Console().Warning("AttachEngine: Gui not up, so no gui-related entries in getModeInfo.\n"); + Base::Console().warning("AttachEngine: Gui not up, so no gui-related entries in getModeInfo.\n"); e.clear(); } else { - Base::Console().Warning("AttachEngine.getModeInfo: error obtaining GUI strings\n"); + Base::Console().warning("AttachEngine.getModeInfo: error obtaining GUI strings\n"); e.clear(); } } catch (Base::Exception &e){ - Base::Console().Warning("AttachEngine.getModeInfo: error obtaining GUI strings:"); - Base::Console().Warning(e.what()); - Base::Console().Warning("\n"); + Base::Console().warning("AttachEngine.getModeInfo: error obtaining GUI strings:"); + Base::Console().warning(e.what()); + Base::Console().warning("\n"); } return Py::new_reference_to(ret); @@ -384,16 +384,16 @@ PyObject* AttachEnginePy::getRefTypeInfo(PyObject* args) } catch (Py::Exception& e) { if (PyErr_ExceptionMatches(PyExc_ImportError)) { // the GUI is not up. - Base::Console().Warning("AttachEngine: Gui not up, so no gui-related entries in getModeInfo.\n"); + Base::Console().warning("AttachEngine: Gui not up, so no gui-related entries in getModeInfo.\n"); e.clear(); } else { - Base::Console().Warning("AttachEngine.getRefTypeInfo: error obtaining GUI strings\n"); + Base::Console().warning("AttachEngine.getRefTypeInfo: error obtaining GUI strings\n"); e.clear(); } } catch (Base::Exception &e){ - Base::Console().Warning("AttachEngine.getRefTypeInfo: error obtaining GUI strings:"); - Base::Console().Warning(e.what()); - Base::Console().Warning("\n"); + Base::Console().warning("AttachEngine.getRefTypeInfo: error obtaining GUI strings:"); + Base::Console().warning(e.what()); + Base::Console().warning("\n"); } return Py::new_reference_to(ret); diff --git a/src/Mod/Part/App/AttachExtension.cpp b/src/Mod/Part/App/AttachExtension.cpp index 493a3b13ea..e3ede2e495 100644 --- a/src/Mod/Part/App/AttachExtension.cpp +++ b/src/Mod/Part/App/AttachExtension.cpp @@ -414,12 +414,12 @@ void AttachExtension::extensionOnChanged(const App::Property* prop) } catch (Base::Exception &e) { getExtendedObject()->setStatus(App::Error, true); - Base::Console().Error("PositionBySupport: %s\n",e.what()); + Base::Console().error("PositionBySupport: %s\n",e.what()); //set error message - how? } catch (Standard_Failure &e){ getExtendedObject()->setStatus(App::Error, true); - Base::Console().Error("PositionBySupport: %s\n",e.GetMessageString()); + Base::Console().error("PositionBySupport: %s\n",e.GetMessageString()); } updateSinglePropertyStatus(bAttached); diff --git a/src/Mod/Part/App/Attacher.cpp b/src/Mod/Part/App/Attacher.cpp index 2107d02fed..31492009e5 100644 --- a/src/Mod/Part/App/Attacher.cpp +++ b/src/Mod/Part/App/Attacher.cpp @@ -1315,7 +1315,7 @@ AttachEngine3D::_calculateAttachedPlacement(const std::vector 1) { - Base::Console().Warning("AttachEngineLine::calculateAttachedPlacement: " + Base::Console().warning("AttachEngineLine::calculateAttachedPlacement: " "proximity calculation gave %i solutions, ambiguous.\n", int(distancer.NbSolution())); } @@ -2751,7 +2751,7 @@ gp_Pnt AttachEnginePoint::getProximityPoint(eMapMode mmode, const TopoDS_Shape& } if (points.size() > 1) - Base::Console().Warning("AttachEnginePoint::calculateAttachedPlacement: proximity calculation gave %d solutions, ambiguous.\n", int(points.size())); + Base::Console().warning("AttachEnginePoint::calculateAttachedPlacement: proximity calculation gave %d solutions, ambiguous.\n", int(points.size())); // if an intersection is found return the first hit // otherwise continue with BRepExtrema_DistShapeShape @@ -2767,7 +2767,7 @@ gp_Pnt AttachEnginePoint::getProximityPoint(eMapMode mmode, const TopoDS_Shape& if (!distancer.IsDone()) throw Base::ValueError("AttachEnginePoint::calculateAttachedPlacement: proximity calculation failed."); if (distancer.NbSolution() > 1) - Base::Console().Warning("AttachEnginePoint::calculateAttachedPlacement: proximity calculation gave %i solutions, ambiguous.\n",int(distancer.NbSolution())); + Base::Console().warning("AttachEnginePoint::calculateAttachedPlacement: proximity calculation gave %i solutions, ambiguous.\n",int(distancer.NbSolution())); gp_Pnt p1 = distancer.PointOnShape1(1); gp_Pnt p2 = distancer.PointOnShape2(1); diff --git a/src/Mod/Part/App/BSplineSurfacePyImp.cpp b/src/Mod/Part/App/BSplineSurfacePyImp.cpp index a7f24ec97e..12aa95d8dd 100644 --- a/src/Mod/Part/App/BSplineSurfacePyImp.cpp +++ b/src/Mod/Part/App/BSplineSurfacePyImp.cpp @@ -1183,7 +1183,7 @@ PyObject* BSplineSurfacePy::approximate(PyObject *args, PyObject *kwds) Standard_Integer lv = col.size(); TColgp_Array2OfPnt interpolationPoints(1, lu, 1, lv); TColStd_Array2OfReal zPoints(1, lu, 1, lv); - //Base::Console().Message("lu=%d, lv=%d\n", lu, lv); + //Base::Console().message("lu=%d, lv=%d\n", lu, lv); Standard_Integer index1 = 0; Standard_Integer index2 = 0; diff --git a/src/Mod/Part/App/ExtrusionHelper.cpp b/src/Mod/Part/App/ExtrusionHelper.cpp index aabafa7141..d09a40c3da 100644 --- a/src/Mod/Part/App/ExtrusionHelper.cpp +++ b/src/Mod/Part/App/ExtrusionHelper.cpp @@ -382,7 +382,7 @@ void ExtrusionHelper::checkInnerWires(std::vector& isInnerWire, const gp_D isInnerWire[0] = false; checklist[0] = false; --numCheckWires; - Base::Console().Warning("Extrusion: could not determine what structure is the outer one.\n\ + Base::Console().warning("Extrusion: could not determine what structure is the outer one.\n\ The first input one will now be taken as outer one.\n"); } @@ -399,7 +399,7 @@ void ExtrusionHelper::checkInnerWires(std::vector& isInnerWire, const gp_D } ++i; } - Base::Console().Warning("Extrusion: too many self-intersection structures!\n\ + Base::Console().warning("Extrusion: too many self-intersection structures!\n\ Impossible to determine what structure is an inner one.\n\ All undeterminable structures will therefore be taken as outer ones.\n"); } @@ -450,10 +450,10 @@ void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire, } if (offsetShape.IsNull()) { if (isSecond) - Base::Console().Error("Extrusion: end face of tapered against extrusion is empty\n" \ + Base::Console().error("Extrusion: end face of tapered against extrusion is empty\n" \ "This means most probably that the against taper angle is too large or small.\n"); else - Base::Console().Error("Extrusion: end face of tapered along extrusion is empty\n" \ + Base::Console().error("Extrusion: end face of tapered along extrusion is empty\n" \ "This means most probably that the along taper angle is too large or small.\n"); Standard_Failure::Raise("Extrusion: end face of tapered extrusion is empty"); } @@ -472,10 +472,10 @@ void ExtrusionHelper::createTaperedPrismOffset(TopoDS_Wire sourceWire, // FIXME: Standard_Failure::Raise or App::DocumentObjectExecReturn don't output the message to the user result = TopoDS_Wire(); if (isSecond) - Base::Console().Error("Extrusion: type of against extrusion end face is not supported.\n" \ + Base::Console().error("Extrusion: type of against extrusion end face is not supported.\n" \ "This means most probably that the against taper angle is too large or small.\n"); else - Base::Console().Error("Extrusion: type of along extrusion is not supported.\n" \ + Base::Console().error("Extrusion: type of along extrusion is not supported.\n" \ "This means most probably that the along taper angle is too large or small.\n"); } diff --git a/src/Mod/Part/App/FT2FC.cpp b/src/Mod/Part/App/FT2FC.cpp index 76ca6959cf..54024bb5f0 100644 --- a/src/Mod/Part/App/FT2FC.cpp +++ b/src/Mod/Part/App/FT2FC.cpp @@ -190,7 +190,7 @@ PyObject* FT2FC(const Py_UCS4 *PyUString, } catch (Py::Exception& e) { e.clear(); - Base::Console().Log("FT2FC char '0x%04x'/'%d' has no Wires!\n", currchar, currchar); + Base::Console().log("FT2FC char '0x%04x'/'%d' has no Wires!\n", currchar, currchar); } PenPos += cadv; @@ -270,7 +270,7 @@ static int quad_cb(const FT_Vector* pt0, const FT_Vector* pt1, void* p) { ShapeConstruct_Curve scc; Handle(Geom2d_BSplineCurve) spline = scc.ConvertToBSpline(bcseg, u, v, Precision::Confusion()); if (spline.IsNull()) { - Base::Console().Message("Conversion to B-spline failed"); + Base::Console().message("Conversion to B-spline failed"); } TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(spline , dc->surf); dc->Edges.push_back(edge); @@ -299,7 +299,7 @@ static int cubic_cb(const FT_Vector* pt0, const FT_Vector* pt1, const FT_Vector* ShapeConstruct_Curve scc; Handle(Geom2d_BSplineCurve) spline = scc.ConvertToBSpline(bcseg, u, v, Precision::Confusion()); if (spline.IsNull()) { - Base::Console().Message("Conversion to B-spline failed"); + Base::Console().message("Conversion to B-spline failed"); } TopoDS_Edge edge = BRepBuilderAPI_MakeEdge(spline , dc->surf); dc->Edges.push_back(edge); @@ -374,7 +374,7 @@ PyObject* getGlyphContours(FT_Face FTFace, FT_ULong currchar, double PenPos, dou (*iWire).Orientation(TopAbs_REVERSED); } else { //this is likely a poorly constructed font (ex a ttf with outer wires ACW ) - Base::Console().Message("FT2FC::getGlyphContours - indeterminate wire direction\n"); + Base::Console().message("FT2FC::getGlyphContours - indeterminate wire direction\n"); } BRepScale.Perform(*iWire,bCopy); @@ -416,7 +416,7 @@ TopoDS_Wire edgesToWire(std::vector Edges) { for (iEdge = Edges.begin(); iEdge != Edges.end(); ++iEdge){ mkWire.Add(*iEdge); if (!mkWire.IsDone()) { - Base::Console().Message("FT2FC Trace edgesToWire failed to add wire\n"); + Base::Console().message("FT2FC Trace edgesToWire failed to add wire\n"); } } occwire = mkWire.Wire(); diff --git a/src/Mod/Part/App/FeaturePartCurveNet.cpp b/src/Mod/Part/App/FeaturePartCurveNet.cpp index aafcf457ae..245ea2036b 100644 --- a/src/Mod/Part/App/FeaturePartCurveNet.cpp +++ b/src/Mod/Part/App/FeaturePartCurveNet.cpp @@ -47,7 +47,7 @@ App::DocumentObjectExecReturn *CurveNet::execute() { Base::FileInfo fi(FileName.getValue()); if (!fi.isReadable()) { - Base::Console().Log("CurveNet::execute() not able to open %s!\n",FileName.getValue()); + Base::Console().log("CurveNet::execute() not able to open %s!\n",FileName.getValue()); std::string error = std::string("Cannot open file ") + FileName.getValue(); return new App::DocumentObjectExecReturn(error); } diff --git a/src/Mod/Part/App/FeaturePartImportBrep.cpp b/src/Mod/Part/App/FeaturePartImportBrep.cpp index 81c09ef1c2..068761986b 100644 --- a/src/Mod/Part/App/FeaturePartImportBrep.cpp +++ b/src/Mod/Part/App/FeaturePartImportBrep.cpp @@ -52,7 +52,7 @@ App::DocumentObjectExecReturn *ImportBrep::execute() { Base::FileInfo fi(FileName.getValue()); if (!fi.isReadable()) { - Base::Console().Log("ImportBrep::execute() not able to open %s!\n",FileName.getValue()); + Base::Console().log("ImportBrep::execute() not able to open %s!\n",FileName.getValue()); std::string error = std::string("Cannot open file ") + FileName.getValue(); return new App::DocumentObjectExecReturn(error); } diff --git a/src/Mod/Part/App/FeaturePartImportIges.cpp b/src/Mod/Part/App/FeaturePartImportIges.cpp index cc28d598a8..2ffe9d400d 100644 --- a/src/Mod/Part/App/FeaturePartImportIges.cpp +++ b/src/Mod/Part/App/FeaturePartImportIges.cpp @@ -52,7 +52,7 @@ App::DocumentObjectExecReturn *ImportIges::execute() { Base::FileInfo fi(FileName.getValue()); if (!fi.isReadable()) { - Base::Console().Log("ImportIges::execute() not able to open %s!\n",FileName.getValue()); + Base::Console().log("ImportIges::execute() not able to open %s!\n",FileName.getValue()); std::string error = std::string("Cannot open file ") + FileName.getValue(); return new App::DocumentObjectExecReturn(error); } diff --git a/src/Mod/Part/App/FeaturePartImportStep.cpp b/src/Mod/Part/App/FeaturePartImportStep.cpp index 435722b7cd..4cf53c3d70 100644 --- a/src/Mod/Part/App/FeaturePartImportStep.cpp +++ b/src/Mod/Part/App/FeaturePartImportStep.cpp @@ -52,7 +52,7 @@ App::DocumentObjectExecReturn *ImportStep::execute() { Base::FileInfo fi(FileName.getValue()); if (!fi.isReadable()) { - Base::Console().Log("ImportStep::execute() not able to open %s!\n",FileName.getValue()); + Base::Console().log("ImportStep::execute() not able to open %s!\n",FileName.getValue()); std::string error = std::string("Cannot open file ") + FileName.getValue(); return new App::DocumentObjectExecReturn(error); } diff --git a/src/Mod/Part/App/FeatureScale.cpp b/src/Mod/Part/App/FeatureScale.cpp index 8e30efc9a5..d2173a36dc 100644 --- a/src/Mod/Part/App/FeatureScale.cpp +++ b/src/Mod/Part/App/FeatureScale.cpp @@ -88,7 +88,7 @@ TopoShape Scale::scaleShape(const TopoShape& source, const Scale::ScaleParameter TopoShape Scale::uniformScale(const TopoShape& source, const double& factor) { -// Base::Console().Message("FS::uniformScale()\n"); +// Base::Console().message("FS::uniformScale()\n"); TopoDS_Shape transShape; TopoShape transTopo; try { @@ -107,7 +107,7 @@ TopoShape Scale::uniformScale(const TopoShape& source, const double& factor) TopoShape Scale::nonuniformScale(const TopoShape& source, const Scale::ScaleParameters& params) { -// Base::Console().Message("FS::nonuniformScale()\n"); +// Base::Console().message("FS::nonuniformScale()\n"); Base::Matrix4D matScale; matScale.scale(params.XScale, params.YScale, params.ZScale); @@ -136,7 +136,7 @@ TopoShape Scale::nonuniformScale(const TopoShape& source, const Scale::ScalePara transTopo.setShape(mkTrf.Shape()); } catch (...) { - Base::Console().Warning("FeatureScale failed on nonuniform scale\n"); + Base::Console().warning("FeatureScale failed on nonuniform scale\n"); return transTopo; } return transTopo; @@ -144,7 +144,7 @@ TopoShape Scale::nonuniformScale(const TopoShape& source, const Scale::ScalePara App::DocumentObjectExecReturn* Scale::execute() { -// Base::Console().Message("FS::execute()\n"); +// Base::Console().message("FS::execute()\n"); App::DocumentObject* link = Base.getValue(); if (!link) return new App::DocumentObjectExecReturn("No object linked"); diff --git a/src/Mod/Part/App/Geometry.cpp b/src/Mod/Part/App/Geometry.cpp index e8c0a2e4c5..a77cf165a2 100644 --- a/src/Mod/Part/App/Geometry.cpp +++ b/src/Mod/Part/App/Geometry.cpp @@ -326,7 +326,7 @@ void Geometry::Restore(Base::XMLReader &reader) extensions.push_back(std::shared_ptr(newExtension)); } else { - Base::Console().Warning("Cannot restore geometry extension of type: %s\n", TypeName); + Base::Console().warning("Cannot restore geometry extension of type: %s\n", TypeName); } } diff --git a/src/Mod/Part/App/ImportStep.cpp b/src/Mod/Part/App/ImportStep.cpp index f040919d91..6790536171 100644 --- a/src/Mod/Part/App/ImportStep.cpp +++ b/src/Mod/Part/App/ImportStep.cpp @@ -84,7 +84,7 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name) // Root transfers Standard_Integer nbr = aReader.NbRootsForTransfer(); for (Standard_Integer n = 1; n<= nbr; n++) { - Base::Console().Log("STEP: Transferring Root %d\n",n); + Base::Console().log("STEP: Transferring Root %d\n",n); aReader.TransferRoot(n); } @@ -98,7 +98,7 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name) std::map hash_col; for (Standard_Integer i=1; i<=nbs; i++) { - Base::Console().Log("STEP: Transferring Shape %d\n",i); + Base::Console().log("STEP: Transferring Shape %d\n",i); aShape = aReader.Shape(i); // load each solid as an own object diff --git a/src/Mod/Part/App/MeasureClient.cpp b/src/Mod/Part/App/MeasureClient.cpp index 3e2e9ded86..35230ee242 100644 --- a/src/Mod/Part/App/MeasureClient.cpp +++ b/src/Mod/Part/App/MeasureClient.cpp @@ -100,7 +100,7 @@ TopoDS_Shape getLocatedShape(const App::SubObjectT& subject, Base::Matrix4D* mat Part::TopoShape shape = Part::Feature::getTopoShape(obj, subject.getElementName(), false, mat, nullptr, true); if (shape.isNull()) { - Base::Console().Log("Part::MeasureClient::getLocatedShape: Did not retrieve shape for %s, %s\n", obj->getNameInDocument(), subject.getElementName()); + Base::Console().log("Part::MeasureClient::getLocatedShape: Did not retrieve shape for %s, %s\n", obj->getNameInDocument(), subject.getElementName()); return {}; } @@ -124,7 +124,7 @@ App::MeasureElementType PartMeasureTypeCb(App::DocumentObject* ob, const char* s TopoDS_Shape shape = Part::Feature::getShape(ob, subName, true); if (shape.IsNull()) { // failure here on loading document with existing measurement. - Base::Console().Message("Part::PartMeasureTypeCb did not retrieve shape for %s, %s\n", ob->getNameInDocument(), subName); + Base::Console().message("Part::PartMeasureTypeCb did not retrieve shape for %s, %s\n", ob->getNameInDocument(), subName); return App::MeasureElementType(); } TopAbs_ShapeEnum shapeType = shape.ShapeType(); @@ -188,7 +188,7 @@ Part::VectorAdapter buildAdapter(const App::SubObjectT& subject) if (shape.IsNull()) { // failure here on loading document with existing measurement. - Base::Console().Message("Part::buildAdapter did not retrieve shape for %s, %s\n", + Base::Console().message("Part::buildAdapter did not retrieve shape for %s, %s\n", subject.getObjectName(), subject.getElementName()); return Part::VectorAdapter(); } @@ -240,7 +240,7 @@ MeasureLengthInfoPtr MeasureLengthHandler(const App::SubObjectT& subject) if (shape.IsNull()) { // failure here on loading document with existing measurement. - Base::Console().Message("MeasureLengthHandler did not retrieve shape for %s, %s\n", + Base::Console().message("MeasureLengthHandler did not retrieve shape for %s, %s\n", subject.getObjectName(), subject.getElementName()); return std::make_shared(false, 0.0, Base::Matrix4D()); } @@ -301,7 +301,7 @@ MeasureAreaInfoPtr MeasureAreaHandler(const App::SubObjectT& subject) if (shape.IsNull()) { // failure here on loading document with existing measurement. - Base::Console().Message("MeasureAreaHandler did not retrieve shape for %s, %s\n", + Base::Console().message("MeasureAreaHandler did not retrieve shape for %s, %s\n", subject.getObjectName(), subject.getElementName()); return std::make_shared(false, 0.0, Base::Matrix4D()); } @@ -328,7 +328,7 @@ MeasurePositionInfoPtr MeasurePositionHandler(const App::SubObjectT& subject) TopoDS_Shape shape = getLocatedShape(subject); if (shape.IsNull()) { - Base::Console().Message("MeasurePositionHandler did not retrieve shape for %s, %s\n", + Base::Console().message("MeasurePositionHandler did not retrieve shape for %s, %s\n", subject.getObjectName(), subject.getElementName()); return std::make_shared(false, Base::Vector3d()); } @@ -350,7 +350,7 @@ MeasureAngleInfoPtr MeasureAngleHandler(const App::SubObjectT& subject) if (shape.IsNull()) { // failure here on loading document with existing measurement. - Base::Console().Message("MeasureAngleHandler did not retrieve shape for %s, %s\n", + Base::Console().message("MeasureAngleHandler did not retrieve shape for %s, %s\n", subject.getObjectName(), subject.getElementName()); return std::make_shared(); } @@ -389,7 +389,7 @@ MeasureDistanceInfoPtr MeasureDistanceHandler(const App::SubObjectT& subject) if (shape.IsNull()) { // failure here on loading document with existing measurement. - Base::Console().Message("MeasureDistanceHandler did not retrieve shape for %s, %s\n", + Base::Console().message("MeasureDistanceHandler did not retrieve shape for %s, %s\n", subject.getObjectName(), subject.getElementName()); return std::make_shared(); } diff --git a/src/Mod/Part/App/PropertyGeometryList.cpp b/src/Mod/Part/App/PropertyGeometryList.cpp index 76515145e9..1fc142923c 100644 --- a/src/Mod/Part/App/PropertyGeometryList.cpp +++ b/src/Mod/Part/App/PropertyGeometryList.cpp @@ -197,7 +197,7 @@ void PropertyGeometryList::trySaveGeometry(Geometry * geom, Base::Writer &writer } } catch (const Base::NotImplementedError& e) { - Base::Console().Warning(std::string("PropertyGeometryList"), "Not yet implemented: %s\n", e.what()); + Base::Console().warning(std::string("PropertyGeometryList"), "Not yet implemented: %s\n", e.what()); } } @@ -219,7 +219,7 @@ void PropertyGeometryList::tryRestoreGeometry(Geometry * geom, Base::XMLReader & geom->Restore(reader); } catch (const Base::NotImplementedError& e) { - Base::Console().Warning(std::string("PropertyGeometryList"), "Not yet implemented: %s\n", e.what()); + Base::Console().warning(std::string("PropertyGeometryList"), "Not yet implemented: %s\n", e.what()); } } @@ -263,7 +263,7 @@ void PropertyGeometryList::Restore(Base::XMLReader &reader) tryRestoreGeometry(newG, reader); if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) { - Base::Console().Error("Geometry \"%s\" within a PropertyGeometryList was subject to a partial restore.\n",reader.localName()); + Base::Console().error("Geometry \"%s\" within a PropertyGeometryList was subject to a partial restore.\n",reader.localName()); if(isOrderRelevant()) { // Pushes the best try by the Geometry class values.push_back(newG); diff --git a/src/Mod/Part/App/PropertyTopoShape.cpp b/src/Mod/Part/App/PropertyTopoShape.cpp index cf7dc91951..ba4a0a7b68 100644 --- a/src/Mod/Part/App/PropertyTopoShape.cpp +++ b/src/Mod/Part/App/PropertyTopoShape.cpp @@ -481,11 +481,11 @@ void PropertyPartShape::saveToFile(Base::Writer &writer) const App::PropertyContainer* father = this->getContainer(); if (father && father->isDerivedFrom()) { App::DocumentObject* obj = static_cast(father); - Base::Console().Error("Shape of '%s' cannot be written to BRep file '%s'\n", + Base::Console().error("Shape of '%s' cannot be written to BRep file '%s'\n", obj->Label.getValue(),fi.filePath().c_str()); } else { - Base::Console().Error("Cannot save BRep file '%s'\n", fi.filePath().c_str()); + Base::Console().error("Cannot save BRep file '%s'\n", fi.filePath().c_str()); } std::stringstream ss; @@ -533,11 +533,11 @@ void PropertyPartShape::loadFromFile(Base::Reader &reader) App::PropertyContainer* father = this->getContainer(); if (father && father->isDerivedFrom()) { App::DocumentObject* obj = static_cast(father); - Base::Console().Error("BRep file '%s' with shape of '%s' seems to be empty\n", + Base::Console().error("BRep file '%s' with shape of '%s' seems to be empty\n", fi.filePath().c_str(),obj->Label.getValue()); } else { - Base::Console().Warning("Loaded BRep file '%s' seems to be empty\n", fi.filePath().c_str()); + Base::Console().warning("Loaded BRep file '%s' seems to be empty\n", fi.filePath().c_str()); } } } @@ -558,7 +558,7 @@ void PropertyPartShape::loadFromStream(Base::Reader &reader) } catch (const std::exception&) { if (!reader.eof()) - Base::Console().Warning("Failed to load BRep file %s\n", reader.getFileName().c_str()); + Base::Console().warning("Failed to load BRep file %s\n", reader.getFileName().c_str()); } } diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 951b6086dc..67735d914c 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -2417,7 +2417,7 @@ TopoDS_Shape TopoShape::makeLoft(const TopTools_ListOfShape& profiles, - W1-W2-W3-V1 ==> W1-W2-W3-V1-W1 invalid closed - W1-W2-W3 ==> W1-W2-W3-W1 valid closed*/ if (profiles.Last().ShapeType() == TopAbs_VERTEX) { - Base::Console().Message("TopoShape::makeLoft: can't close Loft with Vertex as last profile. 'Closed' ignored.\n"); + Base::Console().message("TopoShape::makeLoft: can't close Loft with Vertex as last profile. 'Closed' ignored.\n"); } else { // repeat Add logic above for first profile @@ -2444,7 +2444,7 @@ TopoDS_Shape TopoShape::makeLoft(const TopTools_ListOfShape& profiles, if (!aGenerator.IsDone()) Standard_Failure::Raise("Failed to create loft face"); - //Base::Console().Message("DEBUG: TopoShape::makeLoft returns.\n"); + //Base::Console().message("DEBUG: TopoShape::makeLoft returns.\n"); return aGenerator.Shape(); } @@ -2487,7 +2487,7 @@ TopoDS_Shape TopoShape::revolve(const gp_Ax1& axis, double d, Standard_Boolean i } if (convertFailed) { - Base::Console().Message("TopoShape::revolve could not make Solid from Wire/Edge.\n");} + Base::Console().message("TopoShape::revolve could not make Solid from Wire/Edge.\n");} BRepPrimAPI_MakeRevol mkRevol(base, axis,d); return mkRevol.Shape(); @@ -4088,7 +4088,7 @@ bool TopoShape::_makeTransform(const TopoShape &shape, } } catch (const Standard_Failure& e) { - Base::Console().Warning("TopoShape::makeGTransform failed: %s\n", e.GetMessageString()); + Base::Console().warning("TopoShape::makeGTransform failed: %s\n", e.GetMessageString()); } } makeTransform(shape,convert(rclTrf),op,copy); diff --git a/src/Mod/Part/App/TopoShapeExpansion.cpp b/src/Mod/Part/App/TopoShapeExpansion.cpp index b5a28ed9a5..ea9babd627 100644 --- a/src/Mod/Part/App/TopoShapeExpansion.cpp +++ b/src/Mod/Part/App/TopoShapeExpansion.cpp @@ -4206,7 +4206,7 @@ TopoShape& TopoShape::makeElementLoft(const std::vector& shapes, - W1-W2-W3-V1 ==> W1-W2-W3-V1-W1 invalid closed - W1-W2-W3 ==> W1-W2-W3-W1 valid closed*/ if (profiles.back().getShape().ShapeType() == TopAbs_VERTEX) { - Base::Console().Message("TopoShape::makeLoft: can't close Loft with Vertex as last " + Base::Console().message("TopoShape::makeLoft: can't close Loft with Vertex as last " "profile. 'Closed' ignored.\n"); } else { diff --git a/src/Mod/Part/App/TopoShapePyImp.cpp b/src/Mod/Part/App/TopoShapePyImp.cpp index f3513be0e0..32ed00a274 100644 --- a/src/Mod/Part/App/TopoShapePyImp.cpp +++ b/src/Mod/Part/App/TopoShapePyImp.cpp @@ -2215,7 +2215,7 @@ PyObject* TopoShapePy::distToShape(PyObject *args) const } break; default: - Base::Console().Message("distToShape: supportType1 is unknown: %d \n", + Base::Console().message("distToShape: supportType1 is unknown: %d \n", static_cast(supportType1)); suppType1 = Py::String("Unknown"); suppIndex1 = -1; @@ -2250,7 +2250,7 @@ PyObject* TopoShapePy::distToShape(PyObject *args) const } break; default: - Base::Console().Message("distToShape: supportType2 is unknown: %d \n", + Base::Console().message("distToShape: supportType2 is unknown: %d \n", static_cast(supportType2)); suppType2 = Py::String("Unknown"); suppIndex2 = -1; diff --git a/src/Mod/Part/App/modelRefine.cpp b/src/Mod/Part/App/modelRefine.cpp index 0c6338f979..0a71cef4c5 100644 --- a/src/Mod/Part/App/modelRefine.cpp +++ b/src/Mod/Part/App/modelRefine.cpp @@ -944,13 +944,13 @@ bool FaceTypedBSpline::isEqual(const TopoDS_Face &faceOne, const TopoDS_Face &fa stream << "FaceTypedBSpline::isEqual: OCC Error: " << e.GetMessageString() << std::endl; else stream << "FaceTypedBSpline::isEqual: Unknown OCC Error" << std::endl; - Base::Console().Message(stream.str().c_str()); + Base::Console().message(stream.str().c_str()); } catch (...) { std::ostringstream stream; stream << "FaceTypedBSpline::isEqual: Unknown Error" << std::endl; - Base::Console().Message(stream.str().c_str()); + Base::Console().message(stream.str().c_str()); } return false; diff --git a/src/Mod/Part/Gui/AppPartGui.cpp b/src/Mod/Part/Gui/AppPartGui.cpp index 168a553e71..297b8e4c43 100644 --- a/src/Mod/Part/Gui/AppPartGui.cpp +++ b/src/Mod/Part/Gui/AppPartGui.cpp @@ -133,7 +133,7 @@ PyMOD_INIT_FUNC(PartGui) PyObject* partGuiModule = PartGui::initModule(); - Base::Console().Log("Loading GUI of Part module... done\n"); + Base::Console().log("Loading GUI of Part module... done\n"); Gui::BitmapFactory().addPath(QStringLiteral(":/icons/booleans")); Gui::BitmapFactory().addPath(QStringLiteral(":/icons/create")); diff --git a/src/Mod/Part/Gui/AttacherTexts.cpp b/src/Mod/Part/Gui/AttacherTexts.cpp index 58f329f3ca..ec188e8a39 100644 --- a/src/Mod/Part/Gui/AttacherTexts.cpp +++ b/src/Mod/Part/Gui/AttacherTexts.cpp @@ -311,7 +311,7 @@ TextSet getUIStrings(Base::Type attacherType, eMapMode mmode) } } - Base::Console().Warning("No user-friendly string defined for this attachment mode and attacher type: %s %s \n",AttachEngine::getModeName(mmode).c_str(), attacherType.getName()); + Base::Console().warning("No user-friendly string defined for this attachment mode and attacher type: %s %s \n",AttachEngine::getModeName(mmode).c_str(), attacherType.getName()); return TwoStrings(QString::fromStdString(AttachEngine::getModeName(mmode)), QString()); } diff --git a/src/Mod/Part/Gui/Command.cpp b/src/Mod/Part/Gui/Command.cpp index cf1ad10396..b86d5343ee 100644 --- a/src/Mod/Part/Gui/Command.cpp +++ b/src/Mod/Part/Gui/Command.cpp @@ -1107,7 +1107,7 @@ void CmdPartMakeSolid::activated(int iMsg) TopAbs_ShapeEnum type = shape.ShapeType(); QString str; if (type == TopAbs_SOLID) { - Base::Console().Message("%s is ignored because it is already a solid.\n", + Base::Console().message("%s is ignored because it is already a solid.\n", it->Label.getValue()); } else if (type == TopAbs_COMPOUND || type == TopAbs_COMPSOLID) { @@ -1135,7 +1135,7 @@ void CmdPartMakeSolid::activated(int iMsg) QLatin1String(it->Label.getValue())); } else { - Base::Console().Message("%s is ignored because it is neither a shell nor a compound.\n", + Base::Console().message("%s is ignored because it is neither a shell nor a compound.\n", it->Label.getValue()); } @@ -1144,7 +1144,7 @@ void CmdPartMakeSolid::activated(int iMsg) runCommand(Doc, str.toLatin1()); } catch (const Base::Exception& e) { - Base::Console().Error("Cannot convert %s because %s.\n", + Base::Console().error("Cannot convert %s because %s.\n", it->Label.getValue(), e.what()); } } @@ -1203,7 +1203,7 @@ void CmdPartReverseShape::activated(int iMsg) copyVisual(name.c_str(), "PointColor", it->getNameInDocument()); } catch (const Base::Exception& e) { - Base::Console().Error("Cannot convert %s because %s.\n", + Base::Console().error("Cannot convert %s because %s.\n", it->Label.getValue(), e.what()); } } diff --git a/src/Mod/Part/Gui/CommandSimple.cpp b/src/Mod/Part/Gui/CommandSimple.cpp index b4bd40c04f..4e3fb0b11d 100644 --- a/src/Mod/Part/Gui/CommandSimple.cpp +++ b/src/Mod/Part/Gui/CommandSimple.cpp @@ -382,7 +382,7 @@ void CmdPartRefineShape::activated(int iMsg) Gui::copyVisualT(newObj->getNameInDocument(), "PointColor", obj->getNameInDocument()); } catch (const Base::Exception& e) { - Base::Console().Warning("%s: %s\n", obj->Label.getValue(), e.what()); + Base::Console().warning("%s: %s\n", obj->Label.getValue(), e.what()); } }); commitCommand(); @@ -452,7 +452,7 @@ void CmdPartDefeaturing::activated(int iMsg) it->getFeatName()); } catch (const Base::Exception& e) { - Base::Console().Warning("%s: %s\n", it->getFeatName(), e.what()); + Base::Console().warning("%s: %s\n", it->getFeatName(), e.what()); } } commitCommand(); diff --git a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp index 78c627df01..93f34e6f79 100644 --- a/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp +++ b/src/Mod/Part/Gui/DlgProjectionOnSurface.cpp @@ -183,7 +183,7 @@ DlgProjectionOnSurface::~DlgProjectionOnSurface() higlight_object(it.partFeature, it.partName, false, 0); } catch (Standard_NoSuchObject& e) { - Base::Console().Warning("DlgProjectionOnSurface::~DlgProjectionOnSurface: %s", + Base::Console().warning("DlgProjectionOnSurface::~DlgProjectionOnSurface: %s", e.GetMessageString()); } auto vp = dynamic_cast( @@ -198,7 +198,7 @@ DlgProjectionOnSurface::~DlgProjectionOnSurface() higlight_object(it.partFeature, it.partName, false, 0); } catch (Standard_NoSuchObject& e) { - Base::Console().Warning("DlgProjectionOnSurface::~DlgProjectionOnSurface: %s", + Base::Console().warning("DlgProjectionOnSurface::~DlgProjectionOnSurface: %s", e.GetMessageString()); } } diff --git a/src/Mod/Part/Gui/DlgScale.cpp b/src/Mod/Part/Gui/DlgScale.cpp index e3c87aa6ff..1b4515284c 100644 --- a/src/Mod/Part/Gui/DlgScale.cpp +++ b/src/Mod/Part/Gui/DlgScale.cpp @@ -92,7 +92,7 @@ void DlgScale::changeEvent(QEvent *e) void DlgScale::onUniformScaleToggled(bool state) { -// Base::Console().Message("DS::onUniformScaleToggled()\n"); +// Base::Console().message("DS::onUniformScaleToggled()\n"); if (state) { // this is uniform scaling, so hide the non-uniform input fields ui->dsbUniformScale->setEnabled(true); @@ -112,7 +112,7 @@ void DlgScale::onUniformScaleToggled(bool state) //! list widget void DlgScale::findShapes() { -// Base::Console().Message("DS::findShapes()\n"); +// Base::Console().message("DS::findShapes()\n"); App::Document* activeDoc = App::GetApplication().getActiveDocument(); if (!activeDoc) return; @@ -179,19 +179,19 @@ bool DlgScale::canScale(const TopoDS_Shape& shape) const void DlgScale::accept() { -// Base::Console().Message("DS::accept()\n"); +// Base::Console().message("DS::accept()\n"); try{ apply(); QDialog::accept(); } catch (Base::AbortException&){ - Base::Console().Message("DS::accept - apply failed!\n"); + Base::Console().message("DS::accept - apply failed!\n"); }; } // create a FeatureScale for each scalable object void DlgScale::apply() { -// Base::Console().Message("DS::apply()\n"); +// Base::Console().message("DS::apply()\n"); try{ if (!validate()) { QMessageBox::critical(this, windowTitle(), @@ -271,7 +271,7 @@ void DlgScale::reject() //! widget std::vector DlgScale::getShapesToScale() const { -// Base::Console().Message("DS::getShapesToScale()\n"); +// Base::Console().message("DS::getShapesToScale()\n"); QList items = ui->treeWidget->selectedItems(); App::Document* doc = App::GetApplication().getDocument(m_document.c_str()); if (!doc) @@ -309,7 +309,7 @@ bool DlgScale::validate() //! update a FeatureScale with the parameters from the UI void DlgScale::writeParametersToFeature(App::DocumentObject &feature, App::DocumentObject* base) const { -// Base::Console().Message("DS::writeParametersToFeature()\n"); +// Base::Console().message("DS::writeParametersToFeature()\n"); Gui::Command::doCommand(Gui::Command::Doc,"f = App.getDocument('%s').getObject('%s')", feature.getDocument()->getName(), feature.getNameInDocument()); if (!base) { diff --git a/src/Mod/Part/Gui/SectionCutting.cpp b/src/Mod/Part/Gui/SectionCutting.cpp index fd5c5c1683..b6e517a9ac 100644 --- a/src/Mod/Part/Gui/SectionCutting.cpp +++ b/src/Mod/Part/Gui/SectionCutting.cpp @@ -549,7 +549,7 @@ void SectionCut::deleteCompound() // check for BooleanFragments pcCompoundDelBF = Gui::Application::Instance->getViewProvider(compoundObject); if (!pcCompoundDelBF) { - Base::Console().Error( + Base::Console().error( "SectionCut error: compound is incorrectly named, cannot proceed\n"); return; } @@ -1567,7 +1567,7 @@ void SectionCut::onCutXvalueChanged(double val) } auto pcBox = dynamic_cast(CutBox); if (!pcBox) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(BoxXName) + Base::Console().error((std::string("SectionCut error: ") + std::string(BoxXName) + std::string(" is no Part::Box object. Cannot proceed.\n")).c_str()); return; } @@ -1644,7 +1644,7 @@ void SectionCut::onCutXvalueChanged(double val) // recompute the cut auto pcCut = dynamic_cast(CutObject); if (!pcCut) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(CutZName) + Base::Console().error((std::string("SectionCut error: ") + std::string(CutZName) + std::string(" is no Part::Cut object. Cannot proceed.\n")).c_str()); return; } @@ -1688,7 +1688,7 @@ void SectionCut::onCutYvalueChanged(double val) } auto pcBox = dynamic_cast(CutBox); if (!pcBox) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(BoxYName) + Base::Console().error((std::string("SectionCut error: ") + std::string(BoxYName) + std::string(" is no Part::Box object. Cannot proceed.\n")).c_str()); return; } @@ -1710,7 +1710,7 @@ void SectionCut::onCutYvalueChanged(double val) if (hasBoxZ) { auto CutFeatureZ = findObject(CutZName); if (!CutFeatureZ) { - Base::Console().Error((std::string("SectionCut error: there is no ") + Base::Console().error((std::string("SectionCut error: there is no ") + std::string(CutZName) + std::string("\n")).c_str()); return; } @@ -1746,7 +1746,7 @@ void SectionCut::onCutYvalueChanged(double val) // recompute the cut auto pcCut = dynamic_cast(CutObject); if (!pcCut) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(CutZName) + Base::Console().error((std::string("SectionCut error: ") + std::string(CutZName) + std::string(" is no Part::Cut object. Cannot proceed.\n")).c_str()); return; } @@ -1810,7 +1810,7 @@ void SectionCut::onCutZvalueChanged(double val) } auto pcBox = dynamic_cast(CutBox); if (!pcBox) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(BoxZName) + Base::Console().error((std::string("SectionCut error: ") + std::string(BoxZName) + std::string(" is no Part::Box object. Cannot proceed.\n")).c_str()); return; } @@ -1827,7 +1827,7 @@ void SectionCut::onCutZvalueChanged(double val) } auto pcCut = dynamic_cast(CutObject); if (!pcCut) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(CutZName) + Base::Console().error((std::string("SectionCut error: ") + std::string(CutZName) + std::string(" is no Part::Cut object. Cannot proceed.\n")).c_str()); return; } @@ -1916,7 +1916,7 @@ void SectionCut::FlipClickedHelper(const char* BoxName) } auto pcBox = dynamic_cast(CutBox); if (!pcBox) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(BoxName) + Base::Console().error((std::string("SectionCut error: ") + std::string(BoxName) + std::string(" is no Part::Box object. Cannot proceed.\n")).c_str()); return; } @@ -2025,7 +2025,7 @@ App::DocumentObject* SectionCut::findOrCreateObject(const char* objName) { auto object = findObject(objName); if (!object) { - Base::Console().Warning((std::string("SectionCut warning: there is no ") + Base::Console().warning((std::string("SectionCut warning: there is no ") + std::string(objName) + std::string(", trying to recreate it\n")).c_str()); startCutting(); return nullptr; @@ -2144,7 +2144,7 @@ void SectionCut::setBooleanFragmentsColor() compoundObject = doc->getObject(CompoundName); } else { - Base::Console().Error("SectionCut error: compound is incorrectly named, cannot proceed\n"); + Base::Console().error("SectionCut error: compound is incorrectly named, cannot proceed\n"); return; } // assure it is not a Part::Compound @@ -2153,7 +2153,7 @@ void SectionCut::setBooleanFragmentsColor() // check for valid BooleanFragments by accessing its ViewProvider auto CompoundBFVP = Gui::Application::Instance->getViewProvider(compoundObject); if (!CompoundBFVP) { - Base::Console().Error("SectionCut error: cannot access ViewProvider of cut compound\n"); + Base::Console().error("SectionCut error: cannot access ViewProvider of cut compound\n"); return; } auto CutCompoundBFGeom = dynamic_cast(CompoundBFVP); @@ -2174,7 +2174,7 @@ void SectionCut::onBFragTransparencyHSMoved(int val) auto setTransparency = [&](App::DocumentObject* cutObject) { Gui::ViewProvider* CutVP = Gui::Application::Instance->getViewProvider(cutObject); if (!CutVP) { - Base::Console().Error( + Base::Console().error( "SectionCut error: cannot access ViewProvider of cut object\n"); return; } @@ -2227,14 +2227,14 @@ void SectionCut::onRefreshCutPBclicked() // get document auto docGui = Gui::Application::Instance->activeDocument(); if (!docGui) { - Base::Console().Error("SectionCut error: there is no document\n"); + Base::Console().error("SectionCut error: there is no document\n"); return; } doc = docGui->getDocument(); // get all objects in the document std::vector ObjectsList = doc->getObjects(); if (ObjectsList.empty()) { - Base::Console().Error("SectionCut error: there are no objects in the document\n"); + Base::Console().error("SectionCut error: there are no objects in the document\n"); return; } // empty the ObjectsListVisible @@ -2281,12 +2281,12 @@ SbBox3f SectionCut::getViewBoundingBox() SbBox3f Box; auto docGui = Gui::Application::Instance->activeDocument(); if (!docGui) { - Base::Console().Error("SectionCut error: there is no active document\n"); + Base::Console().error("SectionCut error: there is no active document\n"); return Box; // return an empty box } auto view = dynamic_cast(docGui->getActiveView()); if (!view) { - Base::Console().Error("SectionCut error: could not get the active view\n"); + Base::Console().error("SectionCut error: could not get the active view\n"); return Box; // return an empty box } Gui::View3DInventorViewer* viewer = view->getViewer(); @@ -2376,7 +2376,7 @@ App::DocumentObject* SectionCut::CreateBooleanFragments(App::Document* doc) // check for success App::DocumentObject* object = doc->getObject(CompoundName); if (!object) { - Base::Console().Error((std::string("SectionCut error: ") + std::string(CompoundName) + Base::Console().error((std::string("SectionCut error: ") + std::string(CompoundName) + std::string(" could not be added\n")).c_str()); return nullptr; } diff --git a/src/Mod/Part/Gui/TaskAttacher.cpp b/src/Mod/Part/Gui/TaskAttacher.cpp index a7620f9bba..74e8f7e484 100644 --- a/src/Mod/Part/Gui/TaskAttacher.cpp +++ b/src/Mod/Part/Gui/TaskAttacher.cpp @@ -72,7 +72,7 @@ const QString makeRefString(const App::DocumentObject* obj, const std::string& s return QString::fromLatin1(obj->getNameInDocument()); } - // Hide the TNP string from the user. ie show "Body.Pad.Face6" and not : + // Hide the TNP string from the user. ie show "Body.Pad.Face6" and not : // "Body.Pad.;#a:1;:G0;XTR;:Hc94:8,F.Face6" App::ElementNamePair el; App::GeoFeature::resolveElement(obj, sub.c_str(), el, true); @@ -419,7 +419,7 @@ void TaskAttacher::findCorrectObjAndSubInThisContext(App::DocumentObject*& rootO for (size_t i = 0; i < names.size(); ++i) { App::DocumentObject* obj = doc->getObject(names[i].c_str()); if (!obj) { - Base::Console().TranslatedUserError("TaskAttacher", + Base::Console().translatedUserError("TaskAttacher", "Unsuitable selection: '%s' cannot be attached to '%s' from within it's group '%s'.\n", attachingObj->getFullLabel(), subObj->getFullLabel(), group->getFullLabel()); rootObj = nullptr; @@ -441,7 +441,7 @@ void TaskAttacher::findCorrectObjAndSubInThisContext(App::DocumentObject*& rootO } // In case the attaching object is in a link to a part. - // For instance : + // For instance : // - Part1 // - - LinkToPart2 // - - - Cube @@ -454,7 +454,7 @@ void TaskAttacher::findCorrectObjAndSubInThisContext(App::DocumentObject*& rootO } // if we reach this point it means that attaching object's group is outside of - // the scope of the attached object. For instance: + // the scope of the attached object. For instance: // - Part1 // - - Part2 // - - - Cube @@ -1224,7 +1224,7 @@ void TaskAttacher::visibilityAutomation(bool opening_not_closing) // TaskDialog //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -TaskDlgAttacher::TaskDlgAttacher(Gui::ViewProviderDocumentObject* ViewProvider, bool createBox, +TaskDlgAttacher::TaskDlgAttacher(Gui::ViewProviderDocumentObject* ViewProvider, bool createBox, std::function onAccept, std::function onReject) : TaskDialog(), ViewProvider(ViewProvider), parameter(nullptr), onAccept(onAccept), onReject(onReject), accepted(false) { diff --git a/src/Mod/Part/Gui/TaskCheckGeometry.cpp b/src/Mod/Part/Gui/TaskCheckGeometry.cpp index 006734b8c7..5ce8629a82 100644 --- a/src/Mod/Part/Gui/TaskCheckGeometry.cpp +++ b/src/Mod/Part/Gui/TaskCheckGeometry.cpp @@ -546,7 +546,7 @@ void TaskCheckGeometryResults::goCheck() void TaskCheckGeometryResults::generateReport() { QString reportString = reportViewStrings.join(QLatin1String("\n")); - Base::Console().Message(reportString.toStdString().c_str()); + Base::Console().message(reportString.toStdString().c_str()); } diff --git a/src/Mod/Part/Gui/TaskShapeBuilder.cpp b/src/Mod/Part/Gui/TaskShapeBuilder.cpp index 295764cfba..7b87f880e1 100644 --- a/src/Mod/Part/Gui/TaskShapeBuilder.cpp +++ b/src/Mod/Part/Gui/TaskShapeBuilder.cpp @@ -198,7 +198,7 @@ void ShapeBuilderWidget::onCreateButtonClicked() Gui::Selection().clearSelection(); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } diff --git a/src/Mod/Part/Gui/ViewProvider.cpp b/src/Mod/Part/Gui/ViewProvider.cpp index f0e34d685f..d15bdf649e 100644 --- a/src/Mod/Part/Gui/ViewProvider.cpp +++ b/src/Mod/Part/Gui/ViewProvider.cpp @@ -54,7 +54,7 @@ bool ViewProviderPart::doubleClicked() return true; } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); return false; } } diff --git a/src/Mod/Part/Gui/ViewProvider2DObject.cpp b/src/Mod/Part/Gui/ViewProvider2DObject.cpp index c555600f69..c6645c2ae9 100644 --- a/src/Mod/Part/Gui/ViewProvider2DObject.cpp +++ b/src/Mod/Part/Gui/ViewProvider2DObject.cpp @@ -172,7 +172,7 @@ SoSeparator* ViewProvider2DObjectGrid::createGrid() int lines = vlines + hlines; if (lines > maxNumberOfLines.getValue()) { - Base::Console().Warning("Grid Disabled: Requested number of lines %d is larger than the maximum configured of %d\n." + Base::Console().warning("Grid Disabled: Requested number of lines %d is larger than the maximum configured of %d\n." "Either increase the 'GridSize' property to a more reasonable value (recommended) or increase the 'maxNumberOfLines' property.\n", lines, maxNumberOfLines.getValue()); parent->addChild(vts); parent->addChild(grid); diff --git a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp index c549610827..976b89fbfc 100644 --- a/src/Mod/Part/Gui/ViewProviderCurveNet.cpp +++ b/src/Mod/Part/Gui/ViewProviderCurveNet.cpp @@ -112,7 +112,7 @@ void ViewProviderCurveNet::updateData(const App::Property* prop) computeVertices(VertexRoot,cShape); } catch (...){ - Base::Console().Error("ViewProviderPart::create() Cannot compute Inventor representation for the actual shape"); + Base::Console().error("ViewProviderPart::create() Cannot compute Inventor representation for the actual shape"); } } } @@ -183,7 +183,7 @@ bool ViewProviderCurveNet::handleEvent(const SoEvent * const ev, Gui::View3DInve switch (button) { case SoMouseButtonEvent::BUTTON1: if (press) { - Base::Console().Log("ViewProviderCurveNet::handleEvent() press left\n"); + Base::Console().log("ViewProviderCurveNet::handleEvent() press left\n"); bool bIsNode = false; for (const auto & It : NodeList) @@ -207,7 +207,7 @@ bool ViewProviderCurveNet::handleEvent(const SoEvent * const ev, Gui::View3DInve else if(Viewer.pickPoint(pos,point,norm)) { Node n; - Base::Console().Log("Picked(%f,%f,%f)\n",point[0],point[1],point[2]); + Base::Console().log("Picked(%f,%f,%f)\n",point[0],point[1],point[2]); SoSeparator *TransRoot = new SoSeparator(); n.pcTransform = new SoTransform(); diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index 4f616fef91..9850151fea 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -1312,8 +1312,8 @@ void ViewProviderPartExt::updateVisual() # ifdef FC_DEBUG // printing some information - Base::Console().Log("ViewProvider update time: %f s\n",Base::TimeElapsed::diffTimeF(start_time,Base::TimeElapsed())); - Base::Console().Log("Shape tria info: Faces:%d Edges:%d Nodes:%d Triangles:%d IdxVec:%d\n",numFaces,numEdges,numNodes,numTriangles,numLines); + Base::Console().log("ViewProvider update time: %f s\n",Base::TimeElapsed::diffTimeF(start_time,Base::TimeElapsed())); + Base::Console().log("Shape tria info: Faces:%d Edges:%d Nodes:%d Triangles:%d IdxVec:%d\n",numFaces,numEdges,numNodes,numTriangles,numLines); # else (void)numEdges; # endif diff --git a/src/Mod/Part/Gui/ViewProviderGridExtension.cpp b/src/Mod/Part/Gui/ViewProviderGridExtension.cpp index 986de17151..878267ac66 100644 --- a/src/Mod/Part/Gui/ViewProviderGridExtension.cpp +++ b/src/Mod/Part/Gui/ViewProviderGridExtension.cpp @@ -167,7 +167,7 @@ void GridExtensionP::getClosestGridPoint(double &x, double &y) const closestdim(x, computedGridValue); closestdim(y, computedGridValue); - //Base::Console().Log("gridvalue=%f, (x,y)=(%f,%f)", computedGridValue, x, y); + //Base::Console().log("gridvalue=%f, (x,y)=(%f,%f)", computedGridValue, x, y); } bool GridExtensionP::checkCameraZoomChange(const Gui::View3DInventorViewer* viewer) @@ -300,7 +300,7 @@ void GridExtensionP::createGridPart(int numberSubdiv, bool subDivLines, bool div if (nlines > 2000) { if(!isTooManySegmentsNotified) { - Base::Console().Warning("The grid is too dense, so it is being disabled. Consider zooming in or changing the grid configuration\n"); + Base::Console().warning("The grid is too dense, so it is being disabled. Consider zooming in or changing the grid configuration\n"); isTooManySegmentsNotified = true; } diff --git a/src/Mod/PartDesign/App/AppPartDesign.cpp b/src/Mod/PartDesign/App/AppPartDesign.cpp index 92f28e9fdf..56df444367 100644 --- a/src/Mod/PartDesign/App/AppPartDesign.cpp +++ b/src/Mod/PartDesign/App/AppPartDesign.cpp @@ -78,7 +78,7 @@ PyMOD_INIT_FUNC(_PartDesign) } PyObject* mod = PartDesign::initModule(); - Base::Console().Log("Loading PartDesign module... done\n"); + Base::Console().log("Loading PartDesign module... done\n"); // NOTE: To finish the initialization of our own type objects we must diff --git a/src/Mod/PartDesign/App/Body.cpp b/src/Mod/PartDesign/App/Body.cpp index 7d3c6cf5aa..53c3e90f55 100644 --- a/src/Mod/PartDesign/App/Body.cpp +++ b/src/Mod/PartDesign/App/Body.cpp @@ -378,19 +378,19 @@ App::DocumentObjectExecReturn *Body::execute() { Part::BodyBase::execute(); /* - Base::Console().Error("Body '%s':\n", getNameInDocument()); + Base::Console().error("Body '%s':\n", getNameInDocument()); App::DocumentObject* tip = Tip.getValue(); - Base::Console().Error(" Tip: %s\n", (tip == NULL) ? "None" : tip->getNameInDocument()); + Base::Console().error(" Tip: %s\n", (tip == NULL) ? "None" : tip->getNameInDocument()); std::vector model = Group.getValues(); - Base::Console().Error(" Group:\n"); + Base::Console().error(" Group:\n"); for (std::vector::const_iterator m = model.begin(); m != model.end(); m++) { if (*m == NULL) continue; - Base::Console().Error(" %s", (*m)->getNameInDocument()); + Base::Console().error(" %s", (*m)->getNameInDocument()); if (Body::isSolidFeature(*m)) { App::DocumentObject* baseFeature = static_cast(*m)->BaseFeature.getValue(); - Base::Console().Error(", Base: %s\n", baseFeature == NULL ? "None" : baseFeature->getNameInDocument()); + Base::Console().error(", Base: %s\n", baseFeature == NULL ? "None" : baseFeature->getNameInDocument()); } else { - Base::Console().Error("\n"); + Base::Console().error("\n"); } } */ diff --git a/src/Mod/PartDesign/App/FeatureDraft.cpp b/src/Mod/PartDesign/App/FeatureDraft.cpp index d317b77863..6c826ab963 100644 --- a/src/Mod/PartDesign/App/FeatureDraft.cpp +++ b/src/Mod/PartDesign/App/FeatureDraft.cpp @@ -301,7 +301,7 @@ App::DocumentObjectExecReturn *Draft::execute() // therefore unusable. See https://forum.freecad.org/viewtopic.php?f=10&t=3209&start=10#p25341 // The only solution is to discard mkDraft and start over without the current face // mkDraft.Remove(face); - Base::Console().Error("Adding face failed on %s. Omitted\n", it->c_str()); + Base::Console().error("Adding face failed on %s. Omitted\n", it->c_str()); success = false; SubVals.erase(it); break; diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index f37030bb77..9b7298655e 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -2628,7 +2628,7 @@ int Hole::baseProfileOption_idxToBitmask(int index) if (index == 2) { return PartDesign::Hole::BaseProfileTypeOptions::OnPoints; } - Base::Console().Error("Unexpected hole base profile combobox index: %i", index); + Base::Console().error("Unexpected hole base profile combobox index: %i", index); return 0; } int Hole::baseProfileOption_bitmaskToIdx(int bitmask) @@ -2643,7 +2643,7 @@ int Hole::baseProfileOption_bitmaskToIdx(int bitmask) return 2; } - Base::Console().Error("Unexpected hole base profile bitmask: %i", bitmask); + Base::Console().error("Unexpected hole base profile bitmask: %i", bitmask); return -1; } diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index 7b60026224..08c4077948 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -494,9 +494,9 @@ void Pipe::getContinuousEdges(Part::TopoShape /*TopShape*/, std::vectorShape.setValue(getSolid(supportShape)); // picking the first solid diff --git a/src/Mod/PartDesign/App/ShapeBinder.cpp b/src/Mod/PartDesign/App/ShapeBinder.cpp index b99ff6e6c6..399d4a0ead 100644 --- a/src/Mod/PartDesign/App/ShapeBinder.cpp +++ b/src/Mod/PartDesign/App/ShapeBinder.cpp @@ -817,7 +817,7 @@ void SubShapeBinder::update(SubShapeBinder::UpdateOption options) { catch (...) { std::ostringstream msg; msg << Label.getValue() << ": failed to make 2D offset" << std::endl; - Base::Console().Error(msg.str().c_str()); + Base::Console().error(msg.str().c_str()); } } diff --git a/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp b/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp index 9ccb4a38e3..e9e8a33985 100644 --- a/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp +++ b/src/Mod/PartDesign/Gui/AppPartDesignGui.cpp @@ -116,7 +116,7 @@ PyMOD_INIT_FUNC(PartDesignGui) } PyObject* mod = PartDesignGui::initModule(); - Base::Console().Log("Loading GUI of PartDesign module... done\n"); + Base::Console().log("Loading GUI of PartDesign module... done\n"); // instantiating the commands CreatePartDesignCommands(); diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 7f7426897e..400fc4269e 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -609,13 +609,13 @@ unsigned validateSketches(std::vector& sketches, continue; } - //Base::Console().Error("Checking sketch %s\n", (*s)->getNameInDocument()); + //Base::Console().error("Checking sketch %s\n", (*s)->getNameInDocument()); // Check whether this sketch is already being used by another feature // Body features don't count... std::vector inList = (*s)->getInList(); std::vector::iterator o = inList.begin(); while (o != inList.end()) { - //Base::Console().Error("Inlist: %s\n", (*o)->getNameInDocument()); + //Base::Console().error("Inlist: %s\n", (*o)->getNameInDocument()); if ((*o)->isDerivedFrom()) o = inList.erase(o); //ignore bodies else if (!( (*o)->isDerivedFrom() )) diff --git a/src/Mod/PartDesign/Gui/CommandBody.cpp b/src/Mod/PartDesign/Gui/CommandBody.cpp index 0f2f85e804..db38c7915c 100644 --- a/src/Mod/PartDesign/Gui/CommandBody.cpp +++ b/src/Mod/PartDesign/Gui/CommandBody.cpp @@ -570,7 +570,7 @@ void CmdPartDesignMoveTip::activated(int iMsg) App::DocumentObject* oldTip = body->Tip.getValue(); if (oldTip == selFeature) { // it's not generally an error, so print only a console message - Base::Console().Message ("%s is already the tip of the body\n", selFeature->getNameInDocument () ); + Base::Console().message ("%s is already the tip of the body\n", selFeature->getNameInDocument () ); return; } diff --git a/src/Mod/PartDesign/Gui/SketchWorkflow.cpp b/src/Mod/PartDesign/Gui/SketchWorkflow.cpp index 7697239afc..acc06864be 100644 --- a/src/Mod/PartDesign/Gui/SketchWorkflow.cpp +++ b/src/Mod/PartDesign/Gui/SketchWorkflow.cpp @@ -380,7 +380,7 @@ public: tryFindBasePlanes(); } catch (const Base::Exception &ex) { - Base::Console().Error ("%s\n", ex.what() ); + Base::Console().error ("%s\n", ex.what() ); } } diff --git a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp index cd2ddf8b20..41bd6b0393 100644 --- a/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskChamferParameters.cpp @@ -324,7 +324,7 @@ void TaskChamferParameters::apply() // Alert user if he created an empty feature if (ui->listWidgetReferences->count() == 0) { - Base::Console().Warning(tr("Empty chamfer created !\n").toStdString().c_str()); + Base::Console().warning(tr("Empty chamfer created !\n").toStdString().c_str()); } } diff --git a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp index 2b87fd73d3..0bd58df7c2 100644 --- a/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDraftParameters.cpp @@ -284,7 +284,7 @@ void TaskDraftParameters::apply() { // Alert user if he created an empty feature if (ui->listWidgetReferences->count() == 0) { - Base::Console().Warning(tr("Empty draft created !\n").toStdString().c_str()); + Base::Console().warning(tr("Empty draft created !\n").toStdString().c_str()); } TaskDressUpParameters::apply(); diff --git a/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp b/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp index aeb7fc2d83..4f8987f192 100644 --- a/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskDressUpParameters.cpp @@ -277,7 +277,7 @@ void TaskDressUpParameters::tryAddSelection(const std::string& doc, e.reportException(); } catch (const Standard_Failure& e) { - Base::Console().Error("OCC error: %s\n", e.GetMessageString()); + Base::Console().error("OCC error: %s\n", e.GetMessageString()); } } diff --git a/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp b/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp index 41499a3bd2..8cba881348 100644 --- a/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskExtrudeParameters.cpp @@ -800,7 +800,7 @@ void TaskExtrudeParameters::onDirectionCBChanged(int num) else if (auto extrude = getObject()) { if (lnk.getValue()) { if (!extrude->getDocument()->isIn(lnk.getValue())) { - Base::Console().Error("Object was deleted\n"); + Base::Console().error("Object was deleted\n"); return; } propReferenceAxis->Paste(lnk); diff --git a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp index 7e8aaaa452..ad00474162 100644 --- a/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp +++ b/src/Mod/PartDesign/Gui/TaskFeaturePick.cpp @@ -330,11 +330,11 @@ std::vector TaskFeaturePick::buildFeatures() catch (Py::Exception& e) { // reported by code analyzers e.clear(); - Base::Console().Warning("Unexpected PyCXX exception\n"); + Base::Console().warning("Unexpected PyCXX exception\n"); } catch (const boost::exception&) { // reported by code analyzers - Base::Console().Warning("Unexpected boost exception\n"); + Base::Console().warning("Unexpected boost exception\n"); } return result; diff --git a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp index 1fe48e7d35..d1f9cd5cc4 100644 --- a/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskFilletParameters.cpp @@ -191,7 +191,7 @@ void TaskFilletParameters::apply() // Alert user if he created an empty feature if (ui->listWidgetReferences->count() == 0) { std::string text = tr("Empty fillet created!").toStdString(); - Base::Console().Warning("%s\n", text.c_str()); + Base::Console().warning("%s\n", text.c_str()); } } diff --git a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp index c018cdf360..980ec2ffaf 100644 --- a/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHelixParameters.cpp @@ -496,7 +496,7 @@ void TaskHelixParameters::onAxisChanged(int num) } else { if (!helix->getDocument()->isIn(lnk.getValue())) { - Base::Console().Error("Object was deleted\n"); + Base::Console().error("Object was deleted\n"); return; } propReferenceAxis->Paste(lnk); diff --git a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp index a29aea8ac1..6d3e5d2ced 100644 --- a/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskHoleParameters.cpp @@ -277,7 +277,7 @@ void TaskHoleParameters::threadedChanged() ui->ThreadGroupBox->setVisible(isChecked); ui->ClearanceWidget->setHidden(isChecked); - // run modelThreadChanged + // run modelThreadChanged // it will handle the visibility of the model options modelThreadChanged(); recomputeFeature(); @@ -781,7 +781,7 @@ void TaskHoleParameters::changedObject(const App::Document&, const App::Property } bool ro = Prop.isReadOnly(); - Base::Console().Log("Parameter %s was updated\n", Prop.getName()); + Base::Console().log("Parameter %s was updated\n", Prop.getName()); auto updateCheckable = [&](QCheckBox* widget, bool value) { [[maybe_unused]] QSignalBlocker blocker(widget); @@ -1182,7 +1182,7 @@ void TaskHoleParameters::Observer::slotChangedObject(const App::DocumentObject& const App::Property& Prop) { if (&Obj == hole) { - Base::Console().Log("Parameter %s was updated with a new value\n", Prop.getName()); + Base::Console().log("Parameter %s was updated with a new value\n", Prop.getName()); if (Obj.getDocument()) { owner->changedObject(*Obj.getDocument(), Prop); } diff --git a/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp b/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp index a546acf69f..5cff275990 100644 --- a/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskLinearPatternParameters.cpp @@ -114,7 +114,7 @@ void TaskLinearPatternParameters::setupParameterUI(QWidget* widget) vpOrigin->setTemporaryVisibility(Gui::DatumElement::Axes); } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } @@ -400,7 +400,7 @@ TaskLinearPatternParameters::~TaskLinearPatternParameters() } } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } diff --git a/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp b/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp index e7912ff4d6..3e8fcc74ae 100644 --- a/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskMirroredParameters.cpp @@ -95,7 +95,7 @@ void TaskMirroredParameters::setupParameterUI(QWidget* widget) vpOrigin->setTemporaryVisibility(Gui::DatumElement::Planes); } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } @@ -231,7 +231,7 @@ TaskMirroredParameters::~TaskMirroredParameters() } } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } diff --git a/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp b/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp index 95df7a06fa..d69d610591 100644 --- a/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPolarPatternParameters.cpp @@ -116,7 +116,7 @@ void TaskPolarPatternParameters::setupParameterUI(QWidget* widget) vpOrigin->setTemporaryVisibility(Gui::DatumElement::Axes); } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } @@ -394,7 +394,7 @@ TaskPolarPatternParameters::~TaskPolarPatternParameters() } } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } diff --git a/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp b/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp index d7546695f3..ebb5d0d8f6 100644 --- a/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskPrimitiveParameters.cpp @@ -265,7 +265,7 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent) vpOrigin = static_cast(Gui::Application::Instance->getViewProvider(origin)); vpOrigin->setTemporaryVisibility(Gui::DatumElement::Planes | Gui::DatumElement::Axes); } catch (const Base::Exception &ex) { - Base::Console().Error ("%s\n", ex.what () ); + Base::Console().error ("%s\n", ex.what () ); } } @@ -388,7 +388,7 @@ TaskBoxPrimitives::~TaskBoxPrimitives() } } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } diff --git a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp index fecba11e4d..734c6fffc6 100644 --- a/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskRevolutionParameters.cpp @@ -541,7 +541,7 @@ void TaskRevolutionParameters::onAxisChanged(int num) AllowSelection::CIRCLE); } else { if (!pcRevolution->getDocument()->isIn(lnk.getValue())){ - Base::Console().Error("Object was deleted\n"); + Base::Console().error("Object was deleted\n"); return; } propReferenceAxis->Paste(lnk); diff --git a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp index 077623a02c..e9c8d55dfa 100644 --- a/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskSketchBasedParameters.cpp @@ -242,7 +242,7 @@ QString TaskSketchBasedParameters::make2DLabel(const App::DocumentObject* sectio return QString::fromUtf8(section->Label.getValue()); } else if (subValues.empty()) { - Base::Console().Error("No valid subelement linked in %s\n", section->Label.getValue()); + Base::Console().error("No valid subelement linked in %s\n", section->Label.getValue()); return {}; } else { diff --git a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp index a356021720..732d541c07 100644 --- a/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskThicknessParameters.cpp @@ -257,7 +257,7 @@ void TaskThicknessParameters::apply() { // Alert user if he created an empty feature if (ui->listWidgetReferences->count() == 0) { - Base::Console().Warning(tr("Empty thickness created !\n").toStdString().c_str()); + Base::Console().warning(tr("Empty thickness created !\n").toStdString().c_str()); } } diff --git a/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp b/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp index 68b113263b..b426bba314 100644 --- a/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp +++ b/src/Mod/PartDesign/Gui/TaskTransformedParameters.cpp @@ -374,7 +374,7 @@ void TaskTransformedParameters::onFeatureDeleted() std::vector originals = pcTransformed->Originals.getValues(); int currentRow = ui->listWidgetFeatures->currentRow(); if (currentRow < 0) { - Base::Console().Error("PartDesign Pattern: No feature selected for removing.\n"); + Base::Console().error("PartDesign Pattern: No feature selected for removing.\n"); return; // no current row selected } originals.erase(originals.begin() + currentRow); @@ -424,7 +424,7 @@ void TaskTransformedParameters::fillAxisCombo(ComboLinks& combolinks, Part::Part combolinks.addLink(orig->getZ(), "", tr("Base Z axis")); } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } @@ -460,7 +460,7 @@ void TaskTransformedParameters::fillPlanesCombo(ComboLinks& combolinks, Part::Pa combolinks.addLink(orig->getXZ(), "", tr("Base XZ plane")); } catch (const Base::Exception& ex) { - Base::Console().Error("%s\n", ex.what()); + Base::Console().error("%s\n", ex.what()); } } diff --git a/src/Mod/PartDesign/Gui/ViewProviderAddSub.cpp b/src/Mod/PartDesign/Gui/ViewProviderAddSub.cpp index 0cc2fdbefe..250771aa5a 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderAddSub.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderAddSub.cpp @@ -222,7 +222,7 @@ void ViewProviderAddSub::updateAddSubShapeIndicator() { previewFaceSet ->partIndex .finishEditing(); } catch (...) { - Base::Console().Error("Cannot compute Inventor representation for the shape of %s.\n",pcObject->getNameInDocument()); + Base::Console().error("Cannot compute Inventor representation for the shape of %s.\n",pcObject->getNameInDocument()); } } diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index d275549542..08a2d2a429 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -183,16 +183,16 @@ bool ViewProviderBody::doubleClicked() // if (ActiveGuiDoc == NULL) return; // // // Highlight active body and all its features -// //Base::Console().Error("ViewProviderBody::updateTree()\n"); +// //Base::Console().error("ViewProviderBody::updateTree()\n"); // PartDesign::Body* body = getObject(); // bool active = body->IsActive.getValue(); -// //Base::Console().Error("Body is %s\n", active ? "active" : "inactive"); +// //Base::Console().error("Body is %s\n", active ? "active" : "inactive"); // ActiveGuiDoc->signalHighlightObject(*this, Gui::Blue, active); // std::vector features = body->Group.getValues(); // bool highlight = true; // App::DocumentObject* tip = body->Tip.getValue(); // for (std::vector::const_iterator f = features.begin(); f != features.end(); f++) { -// //Base::Console().Error("Highlighting %s: %s\n", (*f)->getNameInDocument(), highlight ? "true" : "false"); +// //Base::Console().error("Highlighting %s: %s\n", (*f)->getNameInDocument(), highlight ? "true" : "false"); // Gui::ViewProviderDocumentObject* vp = dynamic_cast(Gui::Application::Instance->getViewProvider(*f)); // if (vp != NULL) // ActiveGuiDoc->signalHighlightObject(*vp, Gui::LightBlue, active ? highlight : false); @@ -257,7 +257,7 @@ void ViewProviderBody::onChanged(const App::Property* prop) { if(getOverrideMode() == "As Is") setDisplayMaskMode(DisplayMode.getValueAsString()); else { - Base::Console().Message("Set override mode: %s\n", getOverrideMode().c_str()); + Base::Console().message("Set override mode: %s\n", getOverrideMode().c_str()); setDisplayMaskMode(getOverrideMode().c_str()); } } diff --git a/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp b/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp index 9b46447312..73c4aa1225 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderTransformed.cpp @@ -330,7 +330,7 @@ void ViewProviderTransformed::showRejectedShape(TopoDS_Shape shape) } } catch (...) { - Base::Console().Error("Cannot compute Inventor representation for the rejected transformations of shape of %s.\n", + Base::Console().error("Cannot compute Inventor representation for the rejected transformations of shape of %s.\n", getObject()->getNameInDocument()); } } diff --git a/src/Mod/Points/App/AppPoints.cpp b/src/Mod/Points/App/AppPoints.cpp index fbdc5c8a57..b367009ac0 100644 --- a/src/Mod/Points/App/AppPoints.cpp +++ b/src/Mod/Points/App/AppPoints.cpp @@ -42,7 +42,7 @@ PyMOD_INIT_FUNC(Points) { // clang-format off PyObject* pointsModule = Points::initModule(); - Base::Console().Log("Loading Points module... done\n"); + Base::Console().log("Loading Points module... done\n"); // add python types Base::Interpreter().addType(&Points::PointsPy::Type, pointsModule, "Points"); diff --git a/src/Mod/Points/App/AppPointsPy.cpp b/src/Mod/Points/App/AppPointsPy.cpp index fb6aa8cbde..c0e7cf9ba6 100644 --- a/src/Mod/Points/App/AppPointsPy.cpp +++ b/src/Mod/Points/App/AppPointsPy.cpp @@ -83,7 +83,7 @@ private: PyMem_Free(Name); try { - Base::Console().Log("Open in Points with %s", EncodedName.c_str()); + Base::Console().log("Open in Points with %s", EncodedName.c_str()); Base::FileInfo file(EncodedName.c_str()); // extract ending @@ -205,7 +205,7 @@ private: PyMem_Free(Name); try { - Base::Console().Log("Import in Points with %s", EncodedName.c_str()); + Base::Console().log("Import in Points with %s", EncodedName.c_str()); Base::FileInfo file(EncodedName.c_str()); // extract ending @@ -390,7 +390,7 @@ private: break; } else { - Base::Console().Message("'%s' is not a point object, export will be ignored.\n", + Base::Console().message("'%s' is not a point object, export will be ignored.\n", obj->Label.getValue()); } } diff --git a/src/Mod/Points/Gui/AppPointsGui.cpp b/src/Mod/Points/Gui/AppPointsGui.cpp index 0da1eb3f5f..303ec357c9 100644 --- a/src/Mod/Points/Gui/AppPointsGui.cpp +++ b/src/Mod/Points/Gui/AppPointsGui.cpp @@ -81,7 +81,7 @@ PyMOD_INIT_FUNC(PointsGui) PyMOD_Return(nullptr); } - Base::Console().Log("Loading GUI of Points module... done\n"); + Base::Console().log("Loading GUI of Points module... done\n"); PyObject* mod = PointsGui::initModule(); // instantiating the commands diff --git a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp index 311cf73e8b..ca4848c8e5 100644 --- a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp +++ b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp @@ -999,7 +999,7 @@ PyMOD_INIT_FUNC(ReverseEngineering) } PyObject* mod = Reen::initModule(); - Base::Console().Log("Loading ReverseEngineering module... done\n"); + Base::Console().log("Loading ReverseEngineering module... done\n"); PyMOD_Return(mod); } // clang-format on diff --git a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp index f89ba6ee71..ef9ec5e51d 100644 --- a/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp +++ b/src/Mod/ReverseEngineering/Gui/AppReverseEngineeringGui.cpp @@ -82,7 +82,7 @@ PyMOD_INIT_FUNC(ReverseEngineeringGui) } PyObject* mod = ReverseEngineeringGui::initModule(); - Base::Console().Log("Loading GUI of ReverseEngineering module... done\n"); + Base::Console().log("Loading GUI of ReverseEngineering module... done\n"); // instantiating the commands CreateReverseEngineeringCommands(); diff --git a/src/Mod/ReverseEngineering/Gui/Command.cpp b/src/Mod/ReverseEngineering/Gui/Command.cpp index 8ac65d98d6..09b72958e6 100644 --- a/src/Mod/ReverseEngineering/Gui/Command.cpp +++ b/src/Mod/ReverseEngineering/Gui/Command.cpp @@ -208,11 +208,11 @@ void CmdApproxPlane::activated(int) double q0, q1, q2, q3; pm.getRotation().getValue(q0, q1, q2, q3); - Base::Console().Log("RMS value for plane fit with %lu points: %.4f\n", + Base::Console().log("RMS value for plane fit with %lu points: %.4f\n", aData.size(), sigma); - Base::Console().Log(" Plane base(%.4f, %.4f, %.4f)\n", base.x, base.y, base.z); - Base::Console().Log(" Plane normal(%.4f, %.4f, %.4f)\n", norm.x, norm.y, norm.z); + Base::Console().log(" Plane base(%.4f, %.4f, %.4f)\n", base.x, base.y, base.z); + Base::Console().log(" Plane normal(%.4f, %.4f, %.4f)\n", norm.x, norm.y, norm.z); std::stringstream str; str << "from FreeCAD import Base" << std::endl; diff --git a/src/Mod/ReverseEngineering/Gui/Segmentation.cpp b/src/Mod/ReverseEngineering/Gui/Segmentation.cpp index 6a47a77e86..1f9a119952 100644 --- a/src/Mod/ReverseEngineering/Gui/Segmentation.cpp +++ b/src/Mod/ReverseEngineering/Gui/Segmentation.cpp @@ -211,13 +211,13 @@ void Segmentation::accept() } else { failures.push_back(feaSegm); - Base::Console().Warning("Failed to create face from %s\n", + Base::Console().warning("Failed to create face from %s\n", feaSegm->Label.getValue()); } } catch (Standard_Failure&) { failures.push_back(feaSegm); - Base::Console().Error("Fatal failure to create face from %s\n", + Base::Console().error("Fatal failure to create face from %s\n", feaSegm->Label.getValue()); } } diff --git a/src/Mod/Robot/App/AppRobot.cpp b/src/Mod/Robot/App/AppRobot.cpp index d0b7051ef7..03f15bb67a 100644 --- a/src/Mod/Robot/App/AppRobot.cpp +++ b/src/Mod/Robot/App/AppRobot.cpp @@ -109,7 +109,7 @@ PyMOD_INIT_FUNC(Robot) } PyObject* robotModule = Robot::initModule(); - Base::Console().Log("Loading Robot module... done\n"); + Base::Console().log("Loading Robot module... done\n"); // Add Types to module Base::Interpreter().addType(&Robot::Robot6AxisPy ::Type,robotModule,"Robot6Axis"); diff --git a/src/Mod/Robot/Gui/AppRobotGui.cpp b/src/Mod/Robot/Gui/AppRobotGui.cpp index 334b2500e3..b7609b0fd3 100644 --- a/src/Mod/Robot/Gui/AppRobotGui.cpp +++ b/src/Mod/Robot/Gui/AppRobotGui.cpp @@ -100,7 +100,7 @@ PyMOD_INIT_FUNC(RobotGui) PyMOD_Return(nullptr); } PyObject* mod = RobotGui::initModule(); - Base::Console().Log("Loading GUI of Robot module... done\n"); + Base::Console().log("Loading GUI of Robot module... done\n"); // instantiating the commands CreateRobotCommands(); diff --git a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp index c5d43531af..c6ee2e283a 100644 --- a/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp +++ b/src/Mod/Robot/Gui/TaskDlgEdge2Trac.cpp @@ -83,7 +83,7 @@ void TaskDlgEdge2Trac::clicked(int button) } } catch (const Base::Exception& e) { - Base::Console().Warning("TaskDlgEdge2Trac::clicked(): %s\n", e.what()); + Base::Console().warning("TaskDlgEdge2Trac::clicked(): %s\n", e.what()); } } @@ -104,7 +104,7 @@ bool TaskDlgEdge2Trac::accept() } } catch (const Base::Exception& e) { - Base::Console().Warning("TaskDlgEdge2Trac::accept(): %s\n", e.what()); + Base::Console().warning("TaskDlgEdge2Trac::accept(): %s\n", e.what()); } return false; diff --git a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp index 8373c795eb..22792ea55c 100644 --- a/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp +++ b/src/Mod/Robot/Gui/ViewProviderRobotObject.cpp @@ -445,7 +445,7 @@ void ViewProviderRobotObject::DraggerMotionCallback(SoDragger* dragger) SbVec3f center(Tcp.getPosition().x, Tcp.getPosition().y, Tcp.getPosition().z); M.getTransform(translation, rotation, scaleFactor, scaleOrientation); rotation.getValue(q0, q1, q2, q3); - // Base::Console().Message("M %f %f %f\n", M[3][0], M[3][1], M[3][2]); + // Base::Console().message("M %f %f %f\n", M[3][0], M[3][1], M[3][2]); Base::Rotation rot(q0, q1, q2, q3); Base::Vector3d pos(translation[0], translation[1], translation[2]); robObj->Tcp.setValue(Base::Placement(pos, rot)); diff --git a/src/Mod/Sandbox/App/AppSandbox.cpp b/src/Mod/Sandbox/App/AppSandbox.cpp index 4618589aa8..5a6adf4c7a 100644 --- a/src/Mod/Sandbox/App/AppSandbox.cpp +++ b/src/Mod/Sandbox/App/AppSandbox.cpp @@ -209,12 +209,12 @@ public: &Module::new_DocumentObjectProtector, "DocumentObjectProtector(DocumentObject)"); initialize("This module is the Sandbox module"); // register with Python - + Py::Dict d( moduleDictionary() ); Py::Object x( Sandbox::PythonBaseClass::type() ); d["PythonBaseClass"] = x; } - + virtual ~Module() {} private: @@ -253,6 +253,6 @@ PyMOD_INIT_FUNC(Sandbox) // the following constructor call registers our extension module // with the Python runtime system PyObject* mod = Sandbox::initModule(); - Base::Console().Log("Loading Sandbox module... done\n"); + Base::Console().log("Loading Sandbox module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Sandbox/App/DocumentThread.cpp b/src/Mod/Sandbox/App/DocumentThread.cpp index bd11674f01..b8df4ce511 100644 --- a/src/Mod/Sandbox/App/DocumentThread.cpp +++ b/src/Mod/Sandbox/App/DocumentThread.cpp @@ -133,7 +133,7 @@ void PythonThread::run() #endif } catch (const Base::PyException& e) { - Base::Console().Error(e.what()); + Base::Console().error(e.what()); } } @@ -181,26 +181,26 @@ short SandboxObject::mustExecute(void) const App::DocumentObjectExecReturn *SandboxObject::execute(void) { - Base::Console().Message("SandboxObject::execute()\n"); + Base::Console().message("SandboxObject::execute()\n"); return 0; } void SandboxObject::onChanged(const App::Property* prop) { if (prop == &Integer) - Base::Console().Message("SandboxObject::onChanged(%d)\n", Integer.getValue()); + Base::Console().message("SandboxObject::onChanged(%d)\n", Integer.getValue()); App::DocumentObject::onChanged(prop); } void SandboxObject::setIntValue(int v) { - Base::Console().Message("SandboxObject::setIntValue(%d)\n", v); + Base::Console().message("SandboxObject::setIntValue(%d)\n", v); Integer.setValue(v); } void SandboxObject::resetValue() { - Base::Console().Message("SandboxObject::resetValue()\n"); + Base::Console().message("SandboxObject::resetValue()\n"); Integer.setValue(4711); } @@ -215,7 +215,7 @@ DocumentTestThread::~DocumentTestThread() void DocumentTestThread::run() { - Base::Console().Message("DocumentTestThread::run()\n"); + Base::Console().message("DocumentTestThread::run()\n"); App::Document* doc = App::GetApplication().getActiveDocument(); DocumentProtector dp(doc); SandboxObject* obj = dp.addObject(); diff --git a/src/Mod/Sandbox/Gui/AppSandboxGui.cpp b/src/Mod/Sandbox/Gui/AppSandboxGui.cpp index 6bc88ea0c0..34cc678910 100644 --- a/src/Mod/Sandbox/Gui/AppSandboxGui.cpp +++ b/src/Mod/Sandbox/Gui/AppSandboxGui.cpp @@ -107,17 +107,17 @@ private: coords->point.set1Value(1, (float)m2.x,(float)m2.y,(float)m2.z); coords->point.set1Value(2, (float)s2.x,(float)s2.y,(float)s2.z); - Base::Console().Message("M1=<%.4f,%.4f>\n", m1.x,m1.y); - Base::Console().Message("M2=<%.4f,%.4f>\n", m2.x,m2.y); - Base::Console().Message("S1=<%.4f,%.4f>\n", s1.x,s1.y); - Base::Console().Message("S2=<%.4f,%.4f>\n", s2.x,s2.y); - Base::Console().Message("P=<%.4f,%.4f>\n", a3.x,a3.y); - Base::Console().Message("Q=<%.4f,%.4f>\n", l2.x,l2.y); - Base::Console().Message("\n"); + Base::Console().message("M1=<%.4f,%.4f>\n", m1.x,m1.y); + Base::Console().message("M2=<%.4f,%.4f>\n", m2.x,m2.y); + Base::Console().message("S1=<%.4f,%.4f>\n", s1.x,s1.y); + Base::Console().message("S2=<%.4f,%.4f>\n", s2.x,s2.y); + Base::Console().message("P=<%.4f,%.4f>\n", a3.x,a3.y); + Base::Console().message("Q=<%.4f,%.4f>\n", l2.x,l2.y); + Base::Console().message("\n"); } catch (Py::Exception&) { Base::PyException e; // extract the Python error text - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } #else @@ -144,7 +144,7 @@ public: "Read XML"); initialize("This module is the SandboxGui module"); // register with Python } - + virtual ~Module() {} private: @@ -215,6 +215,6 @@ PyMOD_INIT_FUNC(SandboxGui) // the following constructor call registers our extension module // with the Python runtime system PyObject* mod = SandboxGui::initModule(); - Base::Console().Log("Loading GUI of Sandbox module... done\n"); + Base::Console().log("Loading GUI of Sandbox module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Sandbox/Gui/Command.cpp b/src/Mod/Sandbox/Gui/Command.cpp index 4df0634e81..38b7040df4 100644 --- a/src/Mod/Sandbox/Gui/Command.cpp +++ b/src/Mod/Sandbox/Gui/Command.cpp @@ -533,7 +533,7 @@ void CmdSandboxEventLoop::activated(int) timer.start(5000); // 5s timeout loop.exec(); - Base::Console().Message("CmdSandboxEventLoop: timeout\n"); + Base::Console().message("CmdSandboxEventLoop: timeout\n"); } bool CmdSandboxEventLoop::isActive(void) @@ -758,7 +758,7 @@ public: kernel = myMesh->getKernel(); for (std::vector::iterator it = meshes.begin(); it != meshes.end(); ++it) { if (*it != myMesh) { - Base::Console().Message("MeshTestJob::run() in thread: %p\n", QThread::currentThreadId()); + Base::Console().message("MeshTestJob::run() in thread: %p\n", QThread::currentThreadId()); } } @@ -822,7 +822,7 @@ void CmdSandboxMeshTestJob::activated(int) } // run the actual multi-threaded mesh test - Base::Console().Message("Mesh test (step %d)...\n",iteration++); + Base::Console().message("Mesh test (step %d)...\n",iteration++); MeshTestJob meshJob; QFuture mesh_future = QtConcurrent::mapped (mesh_groups, boost::bind(&MeshTestJob::run, &meshJob, bp::_1)); @@ -840,7 +840,7 @@ void CmdSandboxMeshTestJob::activated(int) } if (meshes.empty()) { - Base::Console().Error("The mesh test failed to create a valid mesh.\n"); + Base::Console().error("The mesh test failed to create a valid mesh.\n"); return; } } @@ -905,9 +905,9 @@ void CmdSandboxMeshTestRef::activated(int) Mesh::MeshObject* ptr = (Mesh::MeshObject*)mesh; if (!ptr) - Base::Console().Error("Object deleted\n"); + Base::Console().error("Object deleted\n"); if (num != mesh.getRefCount()) - Base::Console().Error("Reference count is %d\n",mesh.getRefCount()); + Base::Console().error("Reference count is %d\n",mesh.getRefCount()); } bool CmdSandboxMeshTestRef::isActive(void) diff --git a/src/Mod/Sketcher/App/AppSketcher.cpp b/src/Mod/Sketcher/App/AppSketcher.cpp index eba2a200e6..97766496eb 100644 --- a/src/Mod/Sketcher/App/AppSketcher.cpp +++ b/src/Mod/Sketcher/App/AppSketcher.cpp @@ -99,7 +99,7 @@ PyMOD_INIT_FUNC(Sketcher) Sketcher::Measure ::initialize(); - Base::Console().Log("Loading Sketcher module... done\n"); + Base::Console().log("Loading Sketcher module... done\n"); PyMOD_Return(sketcherModule); } diff --git a/src/Mod/Sketcher/App/AppSketcherPy.cpp b/src/Mod/Sketcher/App/AppSketcherPy.cpp index 590cc013be..c324233c57 100644 --- a/src/Mod/Sketcher/App/AppSketcherPy.cpp +++ b/src/Mod/Sketcher/App/AppSketcherPy.cpp @@ -58,7 +58,7 @@ private: std::string EncodedName = std::string(Name); PyMem_Free(Name); - // Base::Console().Log("Open in Part with %s",Name); + // Base::Console().log("Open in Part with %s",Name); Base::FileInfo file(EncodedName.c_str()); // extract extension @@ -81,7 +81,7 @@ private: PyMem_Free(Name); try { - // Base::Console().Log("Insert in Part with %s",Name); + // Base::Console().log("Insert in Part with %s",Name); Base::FileInfo file(EncodedName.c_str()); // extract extension diff --git a/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp b/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp index 6a4d249ba2..899bcc5100 100644 --- a/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp +++ b/src/Mod/Sketcher/App/ExternalGeometryFacade.cpp @@ -94,7 +94,7 @@ void ExternalGeometryFacade::initExtensions() // The following warning was commented out as part of the Toponaming problem mitigation, and // left for potential usefulness to future developers making a custom build for debugging. - // Base::Console().Warning("Sketcher External Geometry without Geometry Extension: %s + // Base::Console().warning("Sketcher External Geometry without Geometry Extension: %s // \n", // boost::uuids::to_string(Geo->getTag()).c_str()); } @@ -106,7 +106,7 @@ void ExternalGeometryFacade::initExtensions() // The following warning was commented out as part of the Toponaming problem mitigation, and // left for potential usefulness to future developers making a custom build for debugging. - // Base::Console().Warning( + // Base::Console().warning( // "Sketcher External Geometry without ExternalGeometryExtension: %s \n", // boost::uuids::to_string(Geo->getTag()).c_str()); } diff --git a/src/Mod/Sketcher/App/GeometryFacade.cpp b/src/Mod/Sketcher/App/GeometryFacade.cpp index 4b4d89b70f..6746cae859 100644 --- a/src/Mod/Sketcher/App/GeometryFacade.cpp +++ b/src/Mod/Sketcher/App/GeometryFacade.cpp @@ -86,7 +86,7 @@ void GeometryFacade::initExtension() getGeo()->setExtension(std::make_unique()); // Create getExtension - // Base::Console().Warning("%s\nSketcher Geometry without Extension: %s \n", + // Base::Console().warning("%s\nSketcher Geometry without Extension: %s \n", // boost::uuids::to_string(Geo->getTag()).c_str()); } diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 24d350825d..dcc117664a 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -227,31 +227,31 @@ int Sketch::setUpSketch(const std::vector& GeoList, #ifdef DEBUG_BLOCK_CONSTRAINT if (doesBlockAffectOtherConstraints) { - Base::Console().Log("\n Block interferes with other constraints: Post-analysis required"); + Base::Console().log("\n Block interferes with other constraints: Post-analysis required"); } - Base::Console().Log("\nOnlyBlocked GeoIds:"); + Base::Console().log("\nOnlyBlocked GeoIds:"); size_t i = 0; bool found = false; for (; i < onlyBlockedGeometry.size(); i++) { if (onlyBlockedGeometry[i]) { - Base::Console().Log("\n GeoId=%d", i); + Base::Console().log("\n GeoId=%d", i); found = true; } } if (found) { - Base::Console().Log("\n None"); + Base::Console().log("\n None"); } - Base::Console().Log("\nNotOnlyBlocked GeoIds:"); + Base::Console().log("\nNotOnlyBlocked GeoIds:"); i = 0; for (; i < blockedGeoIds.size(); i++) { - Base::Console().Log("\n GeoId=%d", blockedGeoIds[i]); + Base::Console().log("\n GeoId=%d", blockedGeoIds[i]); } if (i == 0) { - Base::Console().Log("\n None"); + Base::Console().log("\n None"); } - Base::Console().Log("\n"); + Base::Console().log("\n"); #endif // DEBUG_BLOCK_CONSTRAINT buildInternalAlignmentGeometryMap(ConstraintList); @@ -301,7 +301,7 @@ int Sketch::setUpSketch(const std::vector& GeoList, analyseBlockedConstraintDependentParameters(blockedGeoIds, params_to_block); if (debugMode == GCS::IterationLevel) { - Base::Console().Log("Sketcher::setUpSketch()-BlockConstraint-PostAnalysis:%d\n", + Base::Console().log("Sketcher::setUpSketch()-BlockConstraint-PostAnalysis:%d\n", index); } index++; @@ -317,9 +317,9 @@ int Sketch::setUpSketch(const std::vector& GeoList, // Debug code block for (size_t i = 0; i < groups.size(); i++) { - Base::Console().Log("\nDepParams: Group %d:", i); + Base::Console().log("\nDepParams: Group %d:", i); for (size_t j = 0; j < groups[i].size(); j++) { - Base::Console().Log( + Base::Console().log( "\n Param=%x ,GeoId=%d, GeoPos=%d", param2geoelement.find(*std::next(groups[i].begin(), j))->first, param2geoelement.find(*std::next(groups[i].begin(), j))->second.first, @@ -341,7 +341,7 @@ int Sketch::setUpSketch(const std::vector& GeoList, if (debugMode == GCS::Minimal || debugMode == GCS::IterationLevel) { Base::TimeElapsed end_time; - Base::Console().Log("Sketcher::setUpSketch()-T:%s\n", + Base::Console().log("Sketcher::setUpSketch()-T:%s\n", Base::TimeElapsed::diffTime(start_time, end_time).c_str()); } @@ -401,9 +401,9 @@ bool Sketch::analyseBlockedConstraintDependentParameters( #ifdef DEBUG_BLOCK_CONSTRAINT for (size_t i = 0; i < groups.size(); i++) { - Base::Console().Log("\nDepParams: Group %d:", i); + Base::Console().log("\nDepParams: Group %d:", i); for (size_t j = 0; j < groups[i].size(); j++) { - Base::Console().Log( + Base::Console().log( "\n Param=%x ,GeoId=%d, GeoPos=%d", param2geoelement.find(*std::next(groups[i].begin(), j))->first, param2geoelement.find(*std::next(groups[i].begin(), j))->second.first, @@ -442,7 +442,7 @@ bool Sketch::analyseBlockedConstraintDependentParameters( params_to_block.push_back(thisparam); prop_groups[i].blocking_param_in_group = thisparam; #ifdef DEBUG_BLOCK_CONSTRAINT - Base::Console().Log("\nTentatively blocking group %d, with param=%x", i, thisparam); + Base::Console().log("\nTentatively blocking group %d, with param=%x", i, thisparam); #endif // DEBUG_BLOCK_CONSTRAINT break; } @@ -2388,7 +2388,7 @@ int Sketch::addConstraints(const std::vector& ConstraintList) if (rtn == -1) { int humanconstraintid = cid + 1; - Base::Console().Error("Sketcher constraint number %d is malformed!\n", + Base::Console().error("Sketcher constraint number %d is malformed!\n", humanconstraintid); MalformedConstraints.push_back(humanconstraintid); } @@ -2411,7 +2411,7 @@ int Sketch::addConstraints(const std::vector& ConstraintList, if (rtn == -1) { int humanconstraintid = cid + 1; - Base::Console().Error("Sketcher constraint number %d is malformed!\n", + Base::Console().error("Sketcher constraint number %d is malformed!\n", humanconstraintid); MalformedConstraints.push_back(humanconstraintid); } @@ -2803,7 +2803,7 @@ int Sketch::addPerpendicularConstraint(int geoId1, int geoId2) } } - Base::Console().Warning("Perpendicular constraints between %s and %s are not supported.\n", + Base::Console().warning("Perpendicular constraints between %s and %s are not supported.\n", nameByType(Geoms[geoId1].type), nameByType(Geoms[geoId2].type)); return -1; @@ -2863,7 +2863,7 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2) return ConstraintsCounter; } else if (Geoms[geoId2].type == BSpline) { - Base::Console().Error("Direct tangency constraint between line and B-spline is not " + Base::Console().error("Direct tangency constraint between line and B-spline is not " "supported. Use tangent-via-point instead."); return -1; } @@ -2877,7 +2877,7 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2) return ConstraintsCounter; } else if (Geoms[geoId2].type == Ellipse) { - Base::Console().Error("Direct tangency constraint between circle and ellipse is not " + Base::Console().error("Direct tangency constraint between circle and ellipse is not " "supported. Use tangent-via-point instead."); return -1; } @@ -2888,24 +2888,24 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2) return ConstraintsCounter; } else if (Geoms[geoId2].type == BSpline) { - Base::Console().Error("Direct tangency constraint between circle and B-spline is not " + Base::Console().error("Direct tangency constraint between circle and B-spline is not " "supported. Use tangent-via-point instead."); return -1; } } else if (Geoms[geoId1].type == Ellipse) { if (Geoms[geoId2].type == Circle) { - Base::Console().Error("Direct tangency constraint between circle and ellipse is not " + Base::Console().error("Direct tangency constraint between circle and ellipse is not " "supported. Use tangent-via-point instead."); return -1; } else if (Geoms[geoId2].type == Arc) { - Base::Console().Error("Direct tangency constraint between arc and ellipse is not " + Base::Console().error("Direct tangency constraint between arc and ellipse is not " "supported. Use tangent-via-point instead."); return -1; } else if (Geoms[geoId2].type == BSpline) { - Base::Console().Error("Direct tangency constraint between ellipse and B-spline is not " + Base::Console().error("Direct tangency constraint between ellipse and B-spline is not " "supported. Use tangent-via-point instead."); return -1; } @@ -2919,7 +2919,7 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2) return ConstraintsCounter; } else if (Geoms[geoId2].type == Ellipse) { - Base::Console().Error("Direct tangency constraint between arc and ellipse is not " + Base::Console().error("Direct tangency constraint between arc and ellipse is not " "supported. Use tangent-via-point instead."); return -1; } @@ -2930,13 +2930,13 @@ int Sketch::addTangentConstraint(int geoId1, int geoId2) return ConstraintsCounter; } else if (Geoms[geoId2].type == BSpline) { - Base::Console().Error("Direct tangency constraint between arc and B-spline is not " + Base::Console().error("Direct tangency constraint between arc and B-spline is not " "supported. Use tangent-via-point instead."); return -1; } } else if (Geoms[geoId1].type == BSpline) { - Base::Console().Error("Direct tangency constraint including B-splines is not " + Base::Console().error("Direct tangency constraint including B-splines is not " "supported. Use tangent-via-point instead."); return -1; } @@ -2958,13 +2958,13 @@ int Sketch::addTangentLineAtBSplineKnotConstraint(int checkedlinegeoId, knotindex = std::distance(b.knotpointGeoids.begin(), knotIt); if (knotindex >= b.knots.size()) { - Base::Console().Error("addConstraint: Knot index out-of-range!\n"); + Base::Console().error("addConstraint: Knot index out-of-range!\n"); return -1; } if (b.mult[knotindex] >= b.degree) { if (b.periodic || (knotindex > 0 && knotindex < (b.knots.size() - 1))) { - Base::Console().Error("addTangentLineAtBSplineKnotConstraint: cannot set constraint " + Base::Console().error("addTangentLineAtBSplineKnotConstraint: cannot set constraint " "when B-spline slope is discontinuous at knot!\n"); return -1; } @@ -2977,7 +2977,7 @@ int Sketch::addTangentLineAtBSplineKnotConstraint(int checkedlinegeoId, // nullptr, Tangent, true); // For now we just throw an error. - Base::Console().Error( + Base::Console().error( "addTangentLineAtBSplineKnotConstraint: This method cannot set tangent constraint " "at end knots of a B-spline. Please constrain the start/end points instead.\n"); return -1; @@ -3011,13 +3011,13 @@ int Sketch::addTangentLineEndpointAtBSplineKnotConstraint(int checkedlinegeoId, knotindex = std::distance(b.knotpointGeoids.begin(), knotIt); if (knotindex >= b.knots.size()) { - Base::Console().Error("addConstraint: Knot index out-of-range!\n"); + Base::Console().error("addConstraint: Knot index out-of-range!\n"); return -1; } if (b.mult[knotindex] >= b.degree) { if (b.periodic || (knotindex > 0 && knotindex < (b.knots.size() - 1))) { - Base::Console().Error("addTangentLineEndpointAtBSplineKnotConstraint: cannot set " + Base::Console().error("addTangentLineEndpointAtBSplineKnotConstraint: cannot set " "constraint when B-spline slope is discontinuous at knot!\n"); return -1; } @@ -3030,7 +3030,7 @@ int Sketch::addTangentLineEndpointAtBSplineKnotConstraint(int checkedlinegeoId, // nullptr, Tangent, true); // For now we just throw an error. - Base::Console().Error("addTangentLineEndpointAtBSplineKnotConstraint: This method " + Base::Console().error("addTangentLineEndpointAtBSplineKnotConstraint: This method " "cannot set tangent constraint at end knots of a B-spline. " "Please constrain the start/end points instead.\n"); return -1; @@ -3082,14 +3082,14 @@ int Sketch::addAngleAtPointConstraint(int geoId1, } if (Geoms[geoId1].type == Point || Geoms[geoId2].type == Point) { - Base::Console().Error("addAngleAtPointConstraint: one of the curves is a point!\n"); + Base::Console().error("addAngleAtPointConstraint: one of the curves is a point!\n"); return -1; } GCS::Curve* crv1 = getGCSCurveByGeoId(geoId1); GCS::Curve* crv2 = getGCSCurveByGeoId(geoId2); if (!crv1 || !crv2) { - Base::Console().Error("addAngleAtPointConstraint: getGCSCurveByGeoId returned NULL!\n"); + Base::Console().error("addAngleAtPointConstraint: getGCSCurveByGeoId returned NULL!\n"); return -1; } @@ -3102,7 +3102,7 @@ int Sketch::addAngleAtPointConstraint(int geoId1, } if (pointId < 0 || pointId >= int(Points.size())) { - Base::Console().Error("addAngleAtPointConstraint: point index out of range.\n"); + Base::Console().error("addAngleAtPointConstraint: point index out of range.\n"); return -1; } GCS::Point& p = Points[pointId]; @@ -3110,7 +3110,7 @@ int Sketch::addAngleAtPointConstraint(int geoId1, if (e2e) { // we need second point int pointId = getPointId(geoId2, pos2); if (pointId < 0 || pointId >= int(Points.size())) { - Base::Console().Error("addAngleAtPointConstraint: point index out of range.\n"); + Base::Console().error("addAngleAtPointConstraint: point index out of range.\n"); return -1; } p2 = &(Points[pointId]); @@ -3638,7 +3638,7 @@ int Sketch::addEqualConstraint(int geoId1, int geoId2) } } - Base::Console().Warning("Equality constraints between %s and %s are not supported.\n", + Base::Console().warning("Equality constraints between %s and %s are not supported.\n", nameByType(Geoms[geoId1].type), nameByType(Geoms[geoId2].type)); return -1; @@ -3798,7 +3798,7 @@ int Sketch::addSnellsLawConstraint(int geoIdRay1, geoIdBnd = checkGeoId(geoIdBnd); if (Geoms[geoIdRay1].type == Point || Geoms[geoIdRay2].type == Point) { - Base::Console().Error("addSnellsLawConstraint: point is not a curve. Not applicable!\n"); + Base::Console().error("addSnellsLawConstraint: point is not a curve. Not applicable!\n"); return -1; } @@ -3806,7 +3806,7 @@ int Sketch::addSnellsLawConstraint(int geoIdRay1, GCS::Curve* ray2 = getGCSCurveByGeoId(geoIdRay2); GCS::Curve* boundary = getGCSCurveByGeoId(geoIdBnd); if (!ray1 || !ray2 || !boundary) { - Base::Console().Error("addSnellsLawConstraint: getGCSCurveByGeoId returned NULL!\n"); + Base::Console().error("addSnellsLawConstraint: getGCSCurveByGeoId returned NULL!\n"); return -1; } @@ -3814,7 +3814,7 @@ int Sketch::addSnellsLawConstraint(int geoIdRay1, int pointId2 = getPointId(geoIdRay2, posRay2); if (pointId1 < 0 || pointId1 >= int(Points.size()) || pointId2 < 0 || pointId2 >= int(Points.size())) { - Base::Console().Error("addSnellsLawConstraint: point index out of range.\n"); + Base::Console().error("addSnellsLawConstraint: point index out of range.\n"); return -1; } GCS::Point& p1 = Points[pointId1]; @@ -4316,7 +4316,7 @@ bool Sketch::updateGeometry() ++i; } catch (Base::Exception& e) { - Base::Console().Error("Updating geometry: Error build geometry(%d): %s\n", i, e.what()); + Base::Console().error("Updating geometry: Error build geometry(%d): %s\n", i, e.what()); return false; } } @@ -4594,7 +4594,7 @@ int Sketch::solve() if (debugMode == GCS::Minimal || debugMode == GCS::IterationLevel) { - Base::Console().Log("Sketcher::Solve()-%s-T:%s\n", + Base::Console().log("Sketcher::Solve()-%s-T:%s\n", solvername.c_str(), Base::TimeElapsed::diffTime(start_time, end_time).c_str()); } @@ -4646,7 +4646,7 @@ int Sketch::internalSolve(std::string& solvername, int level) if (!valid_solution) { GCSsys.undoSolution(); updateGeometry(); - Base::Console().Warning("Invalid solution from %s solver.\n", solvername.c_str()); + Base::Console().warning("Invalid solution from %s solver.\n", solvername.c_str()); } else { updateNonDrivingConstraints(); @@ -4656,7 +4656,7 @@ int Sketch::internalSolve(std::string& solvername, int level) valid_solution = false; if (debugMode == GCS::Minimal || debugMode == GCS::IterationLevel) { - Base::Console().Log("Sketcher::Solve()-%s- Failed!! Falling back...\n", + Base::Console().log("Sketcher::Solve()-%s- Failed!! Falling back...\n", solvername.c_str()); } } @@ -4706,7 +4706,7 @@ int Sketch::internalSolve(std::string& solvername, int level) if (!valid_solution) { GCSsys.undoSolution(); updateGeometry(); - Base::Console().Warning("Invalid solution from %s solver.\n", + Base::Console().warning("Invalid solution from %s solver.\n", solvername.c_str()); ret = GCS::SuccessfulSolutionInvalid; } @@ -4718,7 +4718,7 @@ int Sketch::internalSolve(std::string& solvername, int level) valid_solution = false; if (debugMode == GCS::Minimal || debugMode == GCS::IterationLevel) { - Base::Console().Log("Sketcher::Solve()-%s- Failed!! Falling back...\n", + Base::Console().log("Sketcher::Solve()-%s- Failed!! Falling back...\n", solvername.c_str()); } } @@ -4729,19 +4729,19 @@ int Sketch::internalSolve(std::string& solvername, int level) if (valid_solution) { if (soltype == 1) { - Base::Console().Log("Important: the LevenbergMarquardt solver succeeded where " + Base::Console().log("Important: the LevenbergMarquardt solver succeeded where " "the DogLeg solver had failed.\n"); } else if (soltype == 2) { - Base::Console().Log("Important: the BFGS solver succeeded where the DogLeg and " + Base::Console().log("Important: the BFGS solver succeeded where the DogLeg and " "LevenbergMarquardt solvers have failed.\n"); } else if (soltype == 3) { - Base::Console().Log("Important: the SQP solver succeeded where all single " + Base::Console().log("Important: the SQP solver succeeded where all single " "subsystem solvers have failed.\n"); } else if (soltype > 0) { - Base::Console().Log("All solvers failed.\n"); + Base::Console().log("All solvers failed.\n"); } break; diff --git a/src/Mod/Sketcher/App/SketchAnalysis.cpp b/src/Mod/Sketcher/App/SketchAnalysis.cpp index 81d20781ef..a0275bdd5d 100644 --- a/src/Mod/Sketcher/App/SketchAnalysis.cpp +++ b/src/Mod/Sketcher/App/SketchAnalysis.cpp @@ -596,7 +596,7 @@ void SketchAnalysis::analyseMissingPointOnPointCoincident(double angleprecision) } } catch (Base::Exception&) { - Base::Console().Warning("Point-On-Point Coincidence analysis: unable to obtain " + Base::Console().warning("Point-On-Point Coincidence analysis: unable to obtain " "derivative. Detection ignored.\n"); continue; } @@ -930,7 +930,7 @@ int SketchAnalysis::autoconstraint(double precision, // STAGE 3: Equality constraint detection int ne = detectMissingEqualityConstraints(precision); - Base::Console().Log("Constraints: Vertical/Horizontal: %d found. " + Base::Console().log("Constraints: Vertical/Horizontal: %d found. " "Point-on-point: %d. Equality: %d\n", nhv, nc, diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index 0cd3178b80..621a48bd80 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -278,7 +278,7 @@ App::DocumentObjectExecReturn* SketchObject::execute() catch (const Base::Exception&) { // 9/16/24: We used to clear the constraints here, but we no longer want to do that // as missing reference geometry is not considered an error while we sort out sketcher UI. - // Base::Console().Error("%s\nClear constraints to external geometry\n", e.what()); + // Base::Console().error("%s\nClear constraints to external geometry\n", e.what()); // we cannot trust the constraints of external geometries, so remove them // delConstraintsToExternal(); } @@ -577,13 +577,13 @@ int SketchObject::solve(bool updateGeoAfterSolving /*=true*/) } if (lastHasMalformedConstraints) { - Base::Console().Error( + Base::Console().error( this->getFullLabel(), QT_TRANSLATE_NOOP("Notifications", "The Sketch has malformed constraints!") "\n"); } if (lastHasPartialRedundancies) { - Base::Console().Warning( + Base::Console().warning( this->getFullLabel(), QT_TRANSLATE_NOOP("Notifications", "The Sketch has partially redundant constraints!") "\n"); @@ -1188,7 +1188,7 @@ void SketchObject::setConstraintExpression(int constNum, const std::string& newE setExpression(path, std::move(expr)); } catch (const Base::Exception&) { - Base::Console().Error("Failed to set constraint expression."); + Base::Console().error("Failed to set constraint expression."); } } } @@ -4000,7 +4000,7 @@ bool SketchObject::isExternalAllowed(App::Document* pDoc, App::DocumentObject* p } } catch (Base::Exception& e) { - Base::Console().Warning( + Base::Console().warning( "Probably, there is a circular reference in the document. Error: %s\n", e.what()); return true;// prohibiting this reference won't remove the problem anyway... } @@ -4072,7 +4072,7 @@ bool SketchObject::isCarbonCopyAllowed(App::Document* pDoc, App::DocumentObject* } } catch (Base::Exception& e) { - Base::Console().Warning( + Base::Console().warning( "Probably, there is a circular reference in the document. Error: %s\n", e.what()); return true;// prohibiting this reference won't remove the problem anyway... } @@ -4603,7 +4603,7 @@ std::vector SketchObject::getSymmetric(const std::vector& isStartEndInverted.insert(std::make_pair(geoId, false)); } else { - Base::Console().Error("Unsupported Geometry!! Just copying it.\n"); + Base::Console().error("Unsupported Geometry!! Just copying it.\n"); isStartEndInverted.insert(std::make_pair(geoId, false)); } @@ -4624,7 +4624,7 @@ std::vector SketchObject::getSymmetric(const std::vector& } else { if (refPosId == Sketcher::PointPos::none) { - Base::Console().Error("Wrong PointPosId.\n"); + Base::Console().error("Wrong PointPosId.\n"); return {}; } refpoint = getPoint(georef, refPosId); @@ -4762,7 +4762,7 @@ std::vector SketchObject::getSymmetric(const std::vector& isStartEndInverted.insert(std::make_pair(geoId, false)); } else { - Base::Console().Error("Unsupported Geometry!! Just copying it.\n"); + Base::Console().error("Unsupported Geometry!! Just copying it.\n"); isStartEndInverted.insert(std::make_pair(geoId, false)); } @@ -5023,7 +5023,7 @@ int SketchObject::addCopy(const std::vector& geoIdList, const Base::Vector3 iterfirstpoint = scp; } else { - Base::Console().Error("Unsupported Geometry!! Just skipping it.\n"); + Base::Console().error("Unsupported Geometry!! Just skipping it.\n"); continue; } @@ -6413,7 +6413,7 @@ bool SketchObject::convertToNURBS(int GeoId) } } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); // revert to original values return false; } @@ -6499,7 +6499,7 @@ bool SketchObject::increaseBSplineDegree(int GeoId, int degreeincrement /*= 1*/) bspline->increaseDegree(cdegree + degreeincrement); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); return false; } @@ -6545,7 +6545,7 @@ bool SketchObject::decreaseBSplineDegree(int GeoId, int degreedecrement /*= 1*/) bspline->approximate(Precision::Confusion(), 20, maxdegree, GeomAbs_C0); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); return false; } @@ -6644,7 +6644,7 @@ bool SketchObject::modifyBSplineKnotMultiplicity(int GeoId, int knotIndex, int m } } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); return false; } @@ -6789,7 +6789,7 @@ bool SketchObject::insertBSplineKnot(int GeoId, double param, int multiplicity) bspline->insertKnot(param, multiplicity); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); return false; } @@ -6972,7 +6972,7 @@ int SketchObject::carbonCopy(App::DocumentObject* pObj, bool construction) if (Objects.size() != SubElements.size() || sObjects.size() != sSubElements.size()) { assert(0 /*counts of objects and subelements in external geometry links do not match*/); - Base::Console().Error("Internal error: counts of objects and subelements in external " + Base::Console().error("Internal error: counts of objects and subelements in external " "geometry links do not match\n"); return -1; } @@ -6982,7 +6982,7 @@ int SketchObject::carbonCopy(App::DocumentObject* pObj, bool construction) int i = 0; for (auto& obj : Objects) { if (obj == sobj && SubElements[i] == sSubElements[si]) { - Base::Console().Error( + Base::Console().error( "Link to %s already exists in this sketch. Delete the link and try again\n", sSubElements[si].c_str()); return -1; @@ -7003,7 +7003,7 @@ int SketchObject::carbonCopy(App::DocumentObject* pObj, bool construction) rebuildExternalGeometry(); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); // revert to original values ExternalGeometry.setValues(originalObjects, originalSubElements); return -1; @@ -7173,7 +7173,7 @@ int SketchObject::addExternal(App::DocumentObject *Obj, const char* SubName, boo if (Objects.size() != SubElements.size()) { assert(0 /*counts of objects and subelements in external geometry links do not match*/); - Base::Console().Error("Internal error: counts of objects and subelements in external " + Base::Console().error("Internal error: counts of objects and subelements in external " "geometry links do not match\n"); return -1; } @@ -7184,7 +7184,7 @@ int SketchObject::addExternal(App::DocumentObject *Obj, const char* SubName, boo if (Types[i] == (int)ExtType::Both || (Types[i] == (int)ExtType::Projection && !intersection) || (Types[i] == (int)ExtType::Intersection && intersection)) { - Base::Console().Error("Link to %s already exists in this sketch.\n", SubName); + Base::Console().error("Link to %s already exists in this sketch.\n", SubName); return -1; } // Case where projections are already there when adding intersections. @@ -7209,7 +7209,7 @@ int SketchObject::addExternal(App::DocumentObject *Obj, const char* SubName, boo rebuildExternalGeometry(ext); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); // revert to original values ExternalGeometry.setValues(originalObjects, originalSubElements); return -1; @@ -7401,7 +7401,7 @@ int SketchObject::delAllExternal() rebuildExternalGeometry(); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); // revert to original values ExternalGeometry.setValues(originalObjects, originalSubElements); for (Constraint* it : newConstraints) @@ -7779,12 +7779,12 @@ void SketchObject::validateExternalLinks() } catch (Base::IndexError& indexError) { removeBadLink = true; - Base::Console().Warning( + Base::Console().warning( this->getFullLabel(), (indexError.getMessage() + "\n").c_str()); } catch (Base::ValueError& valueError) { removeBadLink = true; - Base::Console().Warning( + Base::Console().warning( this->getFullLabel(), (valueError.getMessage() + "\n").c_str()); } catch (Standard_Failure&) { @@ -8540,7 +8540,7 @@ std::vector projectShape(const TopoDS_Shape& inShape, const gp_Ax3 brep_hlr->Hide(); } catch (const Standard_Failure& e) { - Base::Console().Error("GO::projectShape - OCC error - %s - while projecting shape\n", + Base::Console().error("GO::projectShape - OCC error - %s - while projecting shape\n", e.GetMessageString()); throw Base::RuntimeError("SketchObject::projectShape - OCC error"); } @@ -9955,7 +9955,7 @@ void SketchObject::onChanged(const App::Property* prop) acceptGeometry(); } else { - Base::Console().Error( + Base::Console().error( this->getFullLabel() + " SketchObject::onChanged ", QT_TRANSLATE_NOOP("Notifications", "Unmanaged change of Geometry Property " "results in invalid constraint indices") "\n"); @@ -9986,7 +9986,7 @@ void SketchObject::onChanged(const App::Property* prop) } } else { - Base::Console().Error( + Base::Console().error( this->getFullLabel() + " SketchObject::onChanged ", QT_TRANSLATE_NOOP("Notifications", "Unmanaged change of Constraint " "Property results in invalid constraint indices") "\n"); @@ -10614,7 +10614,7 @@ void SketchObject::migrateSketch() Constraints.setValues(std::move(newconstraints)); - Base::Console().Critical( + Base::Console().critical( this->getFullName(), QT_TRANSLATE_NOOP("Notifications", "Parabolas were migrated. Migrated files won't open in previous " @@ -10675,13 +10675,13 @@ int SketchObject::changeConstraintsLocking(bool bLock) cntSuccess++; newVals[i] = constNew; - Base::Console().Log("Constraint%i will be affected\n", i + 1); + Base::Console().log("Constraint%i will be affected\n", i + 1); } } this->Constraints.setValues(std::move(newVals)); - Base::Console().Log("ChangeConstraintsLocking: affected %i of %i tangent/perp constraints\n", + Base::Console().log("ChangeConstraintsLocking: affected %i of %i tangent/perp constraints\n", cntSuccess, cntToBeAffected); @@ -10768,13 +10768,13 @@ int SketchObject::port_reversedExternalArcs(bool justAnalyze) if (affected) { cntToBeAffected++; newVals[ic] = constNew; - Base::Console().Log("Constraint%i will be affected\n", ic + 1); + Base::Console().log("Constraint%i will be affected\n", ic + 1); }; } if (!justAnalyze) { this->Constraints.setValues(std::move(newVals)); - Base::Console().Log("Swapped start/end of reversed external arcs in %i constraints\n", + Base::Console().log("Swapped start/end of reversed external arcs in %i constraints\n", cntToBeAffected); } @@ -10880,7 +10880,7 @@ bool SketchObject::AutoLockTangencyAndPerpty(Constraint* cstr, bool bForce, bool } catch (Base::Exception& e) { // failure to determine tangency type is not a big deal, so a warning. - Base::Console().Warning("Error in AutoLockTangency. %s \n", e.what()); + Base::Console().warning("Error in AutoLockTangency. %s \n", e.what()); return false; } return true; diff --git a/src/Mod/Sketcher/App/SketchObjectSF.cpp b/src/Mod/Sketcher/App/SketchObjectSF.cpp index 87da13e326..52a7adc063 100644 --- a/src/Mod/Sketcher/App/SketchObjectSF.cpp +++ b/src/Mod/Sketcher/App/SketchObjectSF.cpp @@ -50,7 +50,7 @@ short SketchObjectSF::mustExecute() const App::DocumentObjectExecReturn* SketchObjectSF::execute() { - Base::Console().Warning( + Base::Console().warning( "%s: This feature is deprecated and won't be longer supported in future FreeCAD versions\n", this->getNameInDocument()); // do nothing diff --git a/src/Mod/Sketcher/App/planegcs/GCS.cpp b/src/Mod/Sketcher/App/planegcs/GCS.cpp index bc63d84608..a5b02b86bc 100644 --- a/src/Mod/Sketcher/App/planegcs/GCS.cpp +++ b/src/Mod/Sketcher/App/planegcs/GCS.cpp @@ -302,7 +302,7 @@ SolverReportingManager& SolverReportingManager::Manager() void SolverReportingManager::LogToConsole(const std::string& str) { - Base::Console().Log(str.c_str()); + Base::Console().log(str.c_str()); } void SolverReportingManager::LogToFile(const std::string& str) @@ -2086,7 +2086,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi << ", maxIter: " << maxIterNumber << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } double divergingLim = 1e6 * err + 1e12; @@ -2101,7 +2101,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi << ", err: " << err << ", h_norm: " << h_norm << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } break; } @@ -2113,7 +2113,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi << ", err: " << err << ", divergingLim: " << divergingLim << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } break; } @@ -2150,7 +2150,7 @@ int System::solve_BFGS(SubSystem* subsys, bool /*isFine*/, bool isRedundantsolvi << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } } @@ -2213,7 +2213,7 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) << ", xsize: " << xsize << ", maxIter: " << maxIterNumber << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } double nu = 2, mu = 0; @@ -2332,7 +2332,7 @@ int System::solve_LM(SubSystem* subsys, bool isRedundantsolving) << ", g_inf(eps1): " << g_inf << ", h_norm: " << h_norm << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } } @@ -2385,7 +2385,7 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving) << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } Eigen::VectorXd x(xsize), x_new(xsize); @@ -2542,7 +2542,7 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving) << ", err(divergingLim): " << err << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } // count this iteration and start again @@ -2556,7 +2556,7 @@ int System::solve_DL(SubSystem* subsys, bool isRedundantsolving) stream << "DL: stopcode: " << stop << ((stop == 1) ? ", Success" : ", Failed") << "\n"; const std::string tmp = stream.str(); - Base::Console().Log(tmp.c_str()); + Base::Console().log(tmp.c_str()); } return (stop == 1) ? Success : Failed; @@ -4975,7 +4975,7 @@ int System::diagnose(Algorithm alg) #ifndef EIGEN_SPARSEQR_COMPATIBLE if (qrAlgorithm == EigenSparseQR) { - Base::Console().Warning("SparseQR not supported by you current version of Eigen. It " + Base::Console().warning("SparseQR not supported by you current version of Eigen. It " "requires Eigen 3.2.2 or higher. Falling back to Dense QR\n"); qrAlgorithm = EigenDenseQR; } @@ -5053,7 +5053,7 @@ int System::diagnose(Algorithm alg) auto SolveTime = Base::TimeElapsed::diffTimeF(DenseQR_start_time, DenseQR_end_time); - Base::Console().Log("\nDenseQR - Lapsed Time: %f seconds\n", SolveTime); + Base::Console().log("\nDenseQR - Lapsed Time: %f seconds\n", SolveTime); #endif } @@ -5128,7 +5128,7 @@ int System::diagnose(Algorithm alg) auto SolveTime = Base::TimeElapsed::diffTimeF(SparseQR_start_time, SparseQR_end_time); - Base::Console().Log("\nSparseQR - Lapsed Time: %f seconds\n", SolveTime); + Base::Console().log("\nSparseQR - Lapsed Time: %f seconds\n", SolveTime); #endif } #endif @@ -5658,7 +5658,7 @@ void System::identifyConflictingRedundantConstraints( break; } - Base::Console().Log("Sketcher::RedundantSolving-%s-\n", solvername.c_str()); + Base::Console().log("Sketcher::RedundantSolving-%s-\n", solvername.c_str()); } if (res == Success) { @@ -5673,7 +5673,7 @@ void System::identifyConflictingRedundantConstraints( resetToReference(); if (debugMode == Minimal || debugMode == IterationLevel) { - Base::Console().Log("Sketcher Redundant solving: %d redundants\n", redundant.size()); + Base::Console().log("Sketcher Redundant solving: %d redundants\n", redundant.size()); } // TODO: Figure out why we need to iterate in reverse order and add explanation here. @@ -5692,7 +5692,7 @@ void System::identifyConflictingRedundantConstraints( } if (debugMode == IterationLevel) { - Base::Console().Log("(Partially) Redundant, Group %d, index %d, Tag: %d\n", + Base::Console().log("(Partially) Redundant, Group %d, index %d, Tag: %d\n", i, iterRedundantEntry - conflictGroupsOrig[i].begin(), (*iterRedundantEntry)->getTag()); diff --git a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp index b7cedd992f..2fdb7597d0 100644 --- a/src/Mod/Sketcher/Gui/AppSketcherGui.cpp +++ b/src/Mod/Sketcher/Gui/AppSketcherGui.cpp @@ -99,7 +99,7 @@ PyMOD_INIT_FUNC(SketcherGui) } PyObject* sketcherGuiModule = SketcherGui::initModule(); - Base::Console().Log("Loading GUI of Sketcher module... done\n"); + Base::Console().log("Loading GUI of Sketcher module... done\n"); Gui::BitmapFactory().addPath(QStringLiteral(":/icons/constraints")); Gui::BitmapFactory().addPath(QStringLiteral(":/icons/elements")); diff --git a/src/Mod/Sketcher/Gui/DrawSketchController.h b/src/Mod/Sketcher/Gui/DrawSketchController.h index 823883ed5a..9c53f56f5a 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchController.h +++ b/src/Mod/Sketcher/Gui/DrawSketchController.h @@ -361,7 +361,7 @@ public: e.reportException(); } catch (const std::exception& e) { - Base::Console().Error("C++ exception in onViewValueChanged: %s\n", e.what()); + Base::Console().error("C++ exception in onViewValueChanged: %s\n", e.what()); } } diff --git a/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h b/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h index f80f62f4f2..177bc6ed5a 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h +++ b/src/Mod/Sketcher/Gui/DrawSketchDefaultHandler.h @@ -502,7 +502,7 @@ protected: // RuntimeError exceptions inside of the block above must provide a translatable // message. It is reported both to developer (report view) and user (notifications // area). - Base::Console().Error(e.what()); + Base::Console().error(e.what()); } // Keep the recompute separate so that everything is drawn even if execution fails @@ -514,7 +514,7 @@ protected: // RuntimeError exceptions inside of the block above must provide a translatable // message. It is reported both to developer (report view) and user (notifications // area). - Base::Console().Error(e.what()); + Base::Console().error(e.what()); } return handleContinuousMode(); } @@ -940,7 +940,7 @@ protected: sketchobject->diagnoseAdditionalConstraints(autoConstraints); if (sketchobject->getLastHasRedundancies()) { - Base::Console().Warning( + Base::Console().warning( QT_TRANSLATE_NOOP("Notifications", "Autoconstraints cause redundancy. Removing them") "\n"); diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp index c4d0deeb78..7c66b4ac9a 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp +++ b/src/Mod/Sketcher/Gui/DrawSketchHandler.cpp @@ -173,7 +173,7 @@ CurveConverter::CurveConverter() } catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, // the exception is not propagated - Base::Console().DeveloperError("CurveConverter", + Base::Console().developerError("CurveConverter", "Malformed parameter string: %s\n", e.what()); } diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h index d2b0f8d516..ac79f17a90 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerBSpline.h @@ -784,7 +784,7 @@ private: // Since it happens very frequently that the interpolation fails // it's sufficient to report this as log message to avoid to pollute // the output window - Base::Console().Log(std::string("drawBSplineToPosition"), "interpolation failed\n"); + Base::Console().log(std::string("drawBSplineToPosition"), "interpolation failed\n"); } } } diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h index c60285d2db..81a13412d3 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerOffset.h @@ -513,7 +513,7 @@ private: stream.str().c_str()); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } @@ -1070,11 +1070,11 @@ private: /*void printCCeVec() { for (size_t j = 0; j < vCC.size(); j++) { - Base::Console().Warning("curve %d{", j); + Base::Console().warning("curve %d{", j); for (size_t k = 0; k < vCC[j].size(); k++) { - Base::Console().Warning("%d, ", vCC[j][k]); + Base::Console().warning("%d, ", vCC[j][k]); } - Base::Console().Warning("}\n"); + Base::Console().warning("}\n"); } }*/ }; diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerRotate.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerRotate.h index a650dc023f..118c4c7d2e 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerRotate.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerRotate.h @@ -225,7 +225,7 @@ private: stream.str().c_str()); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerScale.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerScale.h index 456c1d85be..de9d80901f 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerScale.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerScale.h @@ -219,7 +219,7 @@ private: stream.str().c_str()); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerSymmetry.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerSymmetry.h index 2df43af48f..bda7afdfbf 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerSymmetry.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerSymmetry.h @@ -228,7 +228,7 @@ private: stream.str().c_str()); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } diff --git a/src/Mod/Sketcher/Gui/DrawSketchHandlerTranslate.h b/src/Mod/Sketcher/Gui/DrawSketchHandlerTranslate.h index dfffdd37f3..403269c5a9 100644 --- a/src/Mod/Sketcher/Gui/DrawSketchHandlerTranslate.h +++ b/src/Mod/Sketcher/Gui/DrawSketchHandlerTranslate.h @@ -240,7 +240,7 @@ private: stream.str().c_str()); } catch (const Base::Exception& e) { - Base::Console().Error("%s\n", e.what()); + Base::Console().error("%s\n", e.what()); } } diff --git a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp index d083f133a4..58c1fef4fe 100644 --- a/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp +++ b/src/Mod/Sketcher/Gui/EditModeCoinManager.cpp @@ -486,7 +486,7 @@ void EditModeCoinManager::ParameterObserver::subscribeToParameters() } catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, // the exception is not propagated - Base::Console().DeveloperError("EditModeCoinManager", + Base::Console().developerError("EditModeCoinManager", "Malformed parameter string: %s\n", e.what()); } @@ -514,7 +514,7 @@ void EditModeCoinManager::ParameterObserver::unsubscribeToParameters() catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, the program is not // terminated when calling the noexcept destructor. - Base::Console().DeveloperError("EditModeCoinManager", + Base::Console().developerError("EditModeCoinManager", "Malformed parameter string: %s\n", e.what()); } @@ -726,7 +726,7 @@ EditModeCoinManager::detectPreselection(SoPickedPoint* Point, const SbVec2s& cur return result; } - // Base::Console().Log("Point pick\n"); + // Base::Console().log("Point pick\n"); SoPath* path = Point->getPath(); SoNode* tail = path->getTail(); // Tail is directly the node containing points and curves diff --git a/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp b/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp index 7b9e5481e1..4d66b3ee9b 100644 --- a/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp +++ b/src/Mod/Sketcher/Gui/EditModeConstraintCoinManager.cpp @@ -1617,13 +1617,13 @@ Restart: } } catch (Base::Exception& e) { - Base::Console().DeveloperError("EditModeConstraintCoinManager", + Base::Console().developerError("EditModeConstraintCoinManager", "Exception during draw: %s\n", e.what()); e.reportException(); } catch (...) { - Base::Console().DeveloperError("EditModeConstraintCoinManager", + Base::Console().developerError("EditModeConstraintCoinManager", "Exception during draw: unknown\n"); } } @@ -2049,7 +2049,7 @@ void EditModeConstraintCoinManager::rebuildConstraintNodes( const Part::Geometry* geo1 = geolistfacade.getGeometryFromGeoId((*it)->First); const Part::Geometry* geo2 = geolistfacade.getGeometryFromGeoId((*it)->Second); if (!geo1 || !geo2) { - Base::Console().DeveloperWarning( + Base::Console().developerWarning( "EditModeConstraintCoinManager", "Tangent constraint references non-existing geometry\n"); } @@ -2254,7 +2254,7 @@ std::set EditModeConstraintCoinManager::detectPreselectionConstr(const SoPi if (tail != sep->getChild( static_cast(ConstraintNodePosition::FirstIconIndex))) { - Base::Console().Log("SecondIcon\n"); + Base::Console().log("SecondIcon\n"); auto translation2 = static_cast( static_cast(tailFather) @@ -2295,7 +2295,7 @@ std::set EditModeConstraintCoinManager::detectPreselectionConstr(const SoPi // Useful code to debug coordinates and bounding boxes that does // not need to be compiled in for any debug operations. - /*Base::Console().Log("Abs(%f,%f),Trans(%f,%f),Coords(%d,%d),iCoords(%f,%f),icon(%d,%d),isize(%d,%d),boundingbox([%d,%d],[%d,%d])\n", + /*Base::Console().log("Abs(%f,%f),Trans(%f,%f),Coords(%d,%d),iCoords(%f,%f),icon(%d,%d),isize(%d,%d),boundingbox([%d,%d],[%d,%d])\n", * absPos[0],absPos[1],trans[0], trans[1], cursorPos[0], * cursorPos[1], iconCoords[0], iconCoords[1], iconX, iconY, * iconSize[0], iconSize[1], @@ -2417,7 +2417,7 @@ void EditModeConstraintCoinManager::drawConstraintIcons(const GeoListFacade& geo // Double-check that we can safely access the Inventor nodes if (constrId >= editModeScenegraphNodes.constrGroup->getNumChildren()) { - Base::Console().DeveloperWarning( + Base::Console().developerWarning( "EditModeConstraintManager", "Can't update constraint icons because view is not in sync with sketch\n"); break; diff --git a/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp b/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp index f04aa0a0f8..d1d827a362 100644 --- a/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp +++ b/src/Mod/Sketcher/Gui/EditModeGeometryCoinConverter.cpp @@ -432,7 +432,7 @@ void EditModeGeometryCoinConverter::convert(const Sketcher::GeometryFacade* geom // terminating here would mean that the other shapes would not be drawn. // Solution: Report the issue and set dummy curvature to 0 e.reportException(); - Base::Console().DeveloperError( + Base::Console().developerError( "EditModeGeometryCoinConverter", "Curvature graph for B-spline with GeoId=%d could not be calculated.\n", geoid); // TODO: Fix identification of curve. diff --git a/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp b/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp index 04d6b68a32..29f17b61ad 100644 --- a/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp +++ b/src/Mod/Sketcher/Gui/EditModeInformationOverlayCoinConverter.cpp @@ -215,7 +215,7 @@ void EditModeInformationOverlayCoinConverter::calculate(const Part::Geometry* ge // terminating here would mean that the other shapes would not be drawn. // Solution: Report the issue and set dummy curvature to 0 e.reportException(); - Base::Console().DeveloperError( + Base::Console().developerError( "EditModeInformationOverlayCoinConverter", "Curvature graph for B-spline with GeoId=%d could not be calculated.\n", geoid); diff --git a/src/Mod/Sketcher/Gui/SketcherSettings.cpp b/src/Mod/Sketcher/Gui/SketcherSettings.cpp index 6f965ec3cf..17c84fbcc8 100644 --- a/src/Mod/Sketcher/Gui/SketcherSettings.cpp +++ b/src/Mod/Sketcher/Gui/SketcherSettings.cpp @@ -491,7 +491,7 @@ void SketcherSettingsDisplay::onBtnTVApplyClicked(bool) this->ui->checkBoxTVSectionView->isChecked() ? "True" : "False"); } catch (Base::PyException& e) { - Base::Console().DeveloperError("SketcherSettings", "error in onBtnTVApplyClicked:\n"); + Base::Console().developerError("SketcherSettings", "error in onBtnTVApplyClicked:\n"); e.reportException(); errMsg = QString::fromLatin1(e.what()); } diff --git a/src/Mod/Sketcher/Gui/SnapManager.cpp b/src/Mod/Sketcher/Gui/SnapManager.cpp index 5e15aafcf5..ad435cbe91 100644 --- a/src/Mod/Sketcher/Gui/SnapManager.cpp +++ b/src/Mod/Sketcher/Gui/SnapManager.cpp @@ -135,7 +135,7 @@ void SnapManager::ParameterObserver::subscribeToParameters() } catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, // the exception is not propagated - Base::Console().DeveloperError("SnapManager", "Malformed parameter string: %s\n", e.what()); + Base::Console().developerError("SnapManager", "Malformed parameter string: %s\n", e.what()); } } @@ -148,7 +148,7 @@ void SnapManager::ParameterObserver::unsubscribeToParameters() catch (const Base::ValueError& e) { // ensure that if parameter strings are not well-formed, the program is not // terminated when calling the noexcept destructor. - Base::Console().DeveloperError("SnapManager", "Malformed parameter string: %s\n", e.what()); + Base::Console().developerError("SnapManager", "Malformed parameter string: %s\n", e.what()); } } diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index ef4a28882b..315c569be0 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -217,7 +217,7 @@ void ViewProviderSketch::ParameterObserver::subscribeToParameters() } catch (const Base::ValueError& e) {// ensure that if parameter strings are not well-formed, the // exception is not propagated - Base::Console().DeveloperError( + Base::Console().developerError( "ViewProviderSketch", "Malformed parameter string: %s\n", e.what()); } } @@ -239,7 +239,7 @@ void ViewProviderSketch::ParameterObserver::unsubscribeToParameters() } catch (const Base::ValueError& e) {// ensure that if parameter strings are not well-formed, the // exception is not propagated - Base::Console().DeveloperError( + Base::Console().developerError( "ViewProviderSketch", "Malformed parameter string: %s\n", e.what()); } } @@ -917,22 +917,22 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe case STATUS_NONE: { bool done = false; if (preselection.isPreselectPointValid()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Point; done = true; } else if (preselection.isPreselectCurveValid()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Edge; done = true; } else if (preselection.isCrossPreselected()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Cross; done = true; } else if (!preselection.PreselectConstraintSet.empty()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Constraint; done = true; } @@ -978,7 +978,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe switch (Mode) { case STATUS_SELECT_Point: if (pp) { - // Base::Console().Log("Select Point:%d\n",this->DragPoint); + // Base::Console().log("Select Point:%d\n",this->DragPoint); // Do selection std::stringstream ss; ss << "Vertex" << preselection.getPreselectionVertexIndex(); @@ -989,7 +989,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe return true; case STATUS_SELECT_Edge: if (pp) { - // Base::Console().Log("Select Point:%d\n",this->DragPoint); + // Base::Console().log("Select Point:%d\n",this->DragPoint); std::stringstream ss; if (preselection.isEdge()) ss << "Edge" << preselection.getPreselectionEdgeIndex(); @@ -1002,7 +1002,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe return true; case STATUS_SELECT_Cross: if (pp) { - // Base::Console().Log("Select Point:%d\n",this->DragPoint); + // Base::Console().log("Select Point:%d\n",this->DragPoint); std::stringstream ss; switch (preselection.PreselectCross) { case Preselection::Axes::RootPoint: @@ -1102,19 +1102,19 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe switch (Mode) { case STATUS_NONE: { if (preselection.isPreselectPointValid()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Point; } else if (preselection.isPreselectCurveValid()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Edge; } else if (preselection.isCrossPreselected()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Cross; } else if (!preselection.PreselectConstraintSet.empty()) { - // Base::Console().Log("start dragging, point:%d\n",this->DragPoint); + // Base::Console().log("start dragging, point:%d\n",this->DragPoint); Mode = STATUS_SELECT_Constraint; } } @@ -1133,7 +1133,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe return true; case STATUS_SELECT_Point: if (pp) { - // Base::Console().Log("Select Point:%d\n",this->DragPoint); + // Base::Console().log("Select Point:%d\n",this->DragPoint); // Do selection std::stringstream ss; ss << "Vertex" << preselection.getPreselectionVertexIndex(); @@ -1145,7 +1145,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe return true; case STATUS_SELECT_Edge: if (pp) { - // Base::Console().Log("Select Point:%d\n",this->DragPoint); + // Base::Console().log("Select Point:%d\n",this->DragPoint); std::stringstream ss; if (preselection.isEdge()) { ss << "Edge" << preselection.getPreselectionEdgeIndex(); @@ -1161,7 +1161,7 @@ bool ViewProviderSketch::mouseButtonPressed(int Button, bool pressed, const SbVe return true; case STATUS_SELECT_Cross: if (pp) { - // Base::Console().Log("Select Point:%d\n",this->DragPoint); + // Base::Console().log("Select Point:%d\n",this->DragPoint); std::stringstream ss; switch (preselection.PreselectCross) { case Preselection::Axes::RootPoint: @@ -1226,7 +1226,7 @@ bool ViewProviderSketch::mouseWheelEvent(int delta, const SbVec2s& cursorPos, void ViewProviderSketch::editDoubleClicked() { if (preselection.isPreselectPointValid()) { - Base::Console().Log("double click point:%d\n", preselection.PreselectPoint); + Base::Console().log("double click point:%d\n", preselection.PreselectPoint); } else if (preselection.isPreselectCurveValid()) { // We cannot do toggleWireSelelection directly here because the released event with @@ -1234,7 +1234,7 @@ void ViewProviderSketch::editDoubleClicked() Mode = STATUS_SELECT_Wire; } else if (preselection.isCrossPreselected()) { - Base::Console().Log("double click cross:%d\n", + Base::Console().log("double click cross:%d\n", static_cast(preselection.PreselectCross)); } else if (!preselection.PreselectConstraintSet.empty()) { @@ -1737,7 +1737,7 @@ void ViewProviderSketch::commitDragMove(double x, double y) } catch (const Base::Exception& e) { getDocument()->abortCommand(); - Base::Console().DeveloperError("ViewProviderSketch", "Drag: %s\n", e.what()); + Base::Console().developerError("ViewProviderSketch", "Drag: %s\n", e.what()); } getDocument()->commitCommand(); @@ -2583,7 +2583,7 @@ void ViewProviderSketch::doBoxSelection(const SbVec2s& startPos, const SbVec2s& } } else { - Base::Console().DeveloperError("ViewProviderSketch::doBoxSelection", + Base::Console().developerError("ViewProviderSketch::doBoxSelection", "Geometry type is unsupported. Selection may be unsynchronised and fail."); } } @@ -3076,13 +3076,13 @@ bool ViewProviderSketch::setEdit(int ModNum) Gui::Command::runCommand(Gui::Command::Gui, cmdstr_bytearray); } catch (Base::PyException& e) { - Base::Console().DeveloperError( + Base::Console().developerError( "ViewProviderSketch", "setEdit: visibility automation failed with an error: \n"); e.reportException(); } } catch (Base::PyException&) { - Base::Console().DeveloperWarning( + Base::Console().developerWarning( "ViewProviderSketch", "setEdit: could not import Show module. Visibility automation will not work.\n"); } @@ -3338,7 +3338,7 @@ void ViewProviderSketch::unsetEdit(int ModNum) Gui::Command::runCommand(Gui::Command::Gui, cmdstr_bytearray); } catch (Base::PyException& e) { - Base::Console().DeveloperError( + Base::Console().developerError( "ViewProviderSketch", "unsetEdit: visibility automation failed with an error: %s \n", e.what()); @@ -3366,7 +3366,7 @@ void ViewProviderSketch::setEditViewer(Gui::View3DInventorViewer* viewer, int Mo Gui::Command::runCommand(Gui::Command::Gui, cmdstr_bytearray); } catch (Base::PyException& e) { - Base::Console().DeveloperError( + Base::Console().developerError( "ViewProviderSketch", "setEdit: visibility automation failed with an error: %s \n", e.what()); @@ -3473,7 +3473,7 @@ void ViewProviderSketch::camSensCB(void* data, SoSensor*) auto cam = proxyVPrdr->renderMgr->getCamera(); if (cam == nullptr) - Base::Console().DeveloperWarning("ViewProviderSketch", "Camera is nullptr!\n"); + Base::Console().developerWarning("ViewProviderSketch", "Camera is nullptr!\n"); else vp->onCameraChanged(cam); } @@ -3493,7 +3493,7 @@ void ViewProviderSketch::onCameraChanged(SoCamera* cam) auto tmpFactor = orientation.z < 0 ? -1 : 1; if (tmpFactor != viewOrientationFactor) {// redraw only if viewing side changed - Base::Console().Log("Switching side, now %s, redrawing\n", + Base::Console().log("Switching side, now %s, redrawing\n", tmpFactor < 0 ? "back" : "front"); viewOrientationFactor = tmpFactor; draw(); @@ -3556,7 +3556,7 @@ void ViewProviderSketch::deleteSelected() // only one sketch with its subelements are allowed to be selected if (selection.size() != 1) { - Base::Console().DeveloperWarning( + Base::Console().developerWarning( "ViewProviderSketch", "Delete: Selection not restricted to one sketch and its subelements\n"); return; @@ -3633,7 +3633,7 @@ bool ViewProviderSketch::onDelete(const std::vector& subList) Gui::cmdAppObjectArgs(getObject(), "delConstraint(%d)", *rit); } catch (const Base::Exception& e) { - Base::Console().DeveloperError("ViewProviderSketch", "%s\n", e.what()); + Base::Console().developerError("ViewProviderSketch", "%s\n", e.what()); } } @@ -3661,7 +3661,7 @@ bool ViewProviderSketch::onDelete(const std::vector& subList) getObject(), "delConstraintOnPoint(%d,%d)", GeoId, (int)PosId); } catch (const Base::Exception& e) { - Base::Console().DeveloperError("ViewProviderSketch", "%s\n", e.what()); + Base::Console().developerError("ViewProviderSketch", "%s\n", e.what()); } break; } @@ -3685,7 +3685,7 @@ bool ViewProviderSketch::onDelete(const std::vector& subList) Gui::cmdAppObjectArgs(getObject(), "delGeometries([%s])", stream.str().c_str()); } catch (const Base::Exception& e) { - Base::Console().DeveloperError("ViewProviderSketch", "%s\n", e.what()); + Base::Console().developerError("ViewProviderSketch", "%s\n", e.what()); } stream.str(std::string()); @@ -3696,7 +3696,7 @@ bool ViewProviderSketch::onDelete(const std::vector& subList) Gui::cmdAppObjectArgs(getObject(), "delExternal(%d)", *rit); } catch (const Base::Exception& e) { - Base::Console().DeveloperError("ViewProviderSketch", "%s\n", e.what()); + Base::Console().developerError("ViewProviderSketch", "%s\n", e.what()); } } diff --git a/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp b/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp index d6a58b01cd..db92e460c9 100644 --- a/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp +++ b/src/Mod/Spreadsheet/App/AppSpreadsheet.cpp @@ -62,6 +62,6 @@ PyMOD_INIT_FUNC(Spreadsheet) Spreadsheet::SheetPython::init(); PyObject* mod = Spreadsheet::initModule(); - Base::Console().Log("Loading Spreadsheet module... done\n"); + Base::Console().log("Loading Spreadsheet module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Spreadsheet/App/Sheet.cpp b/src/Mod/Spreadsheet/App/Sheet.cpp index ea39f8575f..cacbe011fa 100644 --- a/src/Mod/Spreadsheet/App/Sheet.cpp +++ b/src/Mod/Spreadsheet/App/Sheet.cpp @@ -116,7 +116,7 @@ Sheet::~Sheet() } catch (...) { // Don't let an exception propagate out of a destructor (calls terminate()) - Base::Console().Error( + Base::Console().error( "clearAll() resulted in an exception when deleting the spreadsheet : %s\n", getNameInDocument()); } @@ -1159,7 +1159,7 @@ DocumentObjectExecReturn* Sheet::execute() } catch (std::exception&) { // TODO: evaluate using a more specific exception (not_a_dag) // Cycle detected; flag all with errors - Base::Console().Error("Cyclic dependency detected in spreadsheet : %s\n", + Base::Console().error("Cyclic dependency detected in spreadsheet : %s\n", getNameInDocument()); std::ostringstream ss; ss << "Cyclic dependency"; diff --git a/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp b/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp index b9b964868c..2a1778cca2 100644 --- a/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp +++ b/src/Mod/Spreadsheet/Gui/AppSpreadsheetGui.cpp @@ -152,6 +152,6 @@ PyMOD_INIT_FUNC(SpreadsheetGui) loadSpreadsheetResource(); PyObject* mod = SpreadsheetGui::initModule(); - Base::Console().Log("Loading GUI of Spreadsheet module... done\n"); + Base::Console().log("Loading GUI of Spreadsheet module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Spreadsheet/Gui/Command.cpp b/src/Mod/Spreadsheet/Gui/Command.cpp index 0137d42272..a9430fcf97 100644 --- a/src/Mod/Spreadsheet/Gui/Command.cpp +++ b/src/Mod/Spreadsheet/Gui/Command.cpp @@ -212,7 +212,7 @@ void CmdSpreadsheetImport::activated(int iMsg) sheet->execute(); } else { - Base::Console().Error(errMsg.c_str()); + Base::Console().error(errMsg.c_str()); return; } } diff --git a/src/Mod/Spreadsheet/Gui/LineEdit.cpp b/src/Mod/Spreadsheet/Gui/LineEdit.cpp index 2b41b8991c..48e5dcae92 100644 --- a/src/Mod/Spreadsheet/Gui/LineEdit.cpp +++ b/src/Mod/Spreadsheet/Gui/LineEdit.cpp @@ -56,13 +56,13 @@ void LineEdit::setDocumentObject(const App::DocumentObject* currentDocObj, bool QPointer active_view = Gui::MainWindow::getInstance()->activeWindow(); if (!active_view) { - Base::Console().DeveloperWarning("LineEdit::setDocumentObject", + Base::Console().developerWarning("LineEdit::setDocumentObject", "The active view is not Spreadsheet"); return; } QPointer zv = active_view->findChild(); if (!zv) { - Base::Console().DeveloperWarning("LineEdit::setDocumentObject", "ZoomableView not found"); + Base::Console().developerWarning("LineEdit::setDocumentObject", "ZoomableView not found"); return; } diff --git a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp index c4cab0eaed..bfea61b06f 100644 --- a/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp +++ b/src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp @@ -450,7 +450,7 @@ void SheetView::confirmAliasChanged(const QString& text) std::string current_alias; (void)cell->getAlias(current_alias); if (text != QString::fromUtf8(current_alias.c_str())) { - Base::Console().Error("Unable to set alias: %s\n", text.toStdString().c_str()); + Base::Console().error("Unable to set alias: %s\n", text.toStdString().c_str()); } } else { diff --git a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp index 7a098cc490..cc09cbb5ee 100644 --- a/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp +++ b/src/Mod/Spreadsheet/Gui/ViewProviderSpreadsheet.cpp @@ -122,7 +122,7 @@ void ViewProviderSheet::exportAsFile() sheet->exportToFile(fileName.toStdString(), delim, quote, escape); } else { - Base::Console().Error(errMsg.c_str()); + Base::Console().error(errMsg.c_str()); } } } diff --git a/src/Mod/Spreadsheet/Gui/ZoomableView.cpp b/src/Mod/Spreadsheet/Gui/ZoomableView.cpp index b5a3eae54f..7c6a3b0693 100644 --- a/src/Mod/Spreadsheet/Gui/ZoomableView.cpp +++ b/src/Mod/Spreadsheet/Gui/ZoomableView.cpp @@ -33,14 +33,14 @@ ZoomableView::ZoomableView(Ui::Sheet* ui) , stv {ui->cells} { if (!stv) { - Base::Console().DeveloperWarning("ZoomableView", "Failed to find a SheetTableView object"); + Base::Console().developerWarning("ZoomableView", "Failed to find a SheetTableView object"); deleteLater(); return; } else { QLayoutItem* li_stv = stv->parentWidget()->layout()->replaceWidget(stv, this); if (li_stv == nullptr) { - Base::Console().DeveloperWarning("ZoomableView", + Base::Console().developerWarning("ZoomableView", "Failed to replace the SheetTableView object"); deleteLater(); return; @@ -67,7 +67,7 @@ ZoomableView::ZoomableView(Ui::Sheet* ui) dummySB_v {stv->verticalScrollBar()}, realSB_h {ui->realSB_h}, realSB_v {ui->realSB_v}; if (!dummySB_h || !dummySB_v || !realSB_h || !realSB_v) { - Base::Console().DeveloperWarning("ZoomableView", "Failed to identify the scrollbars"); + Base::Console().developerWarning("ZoomableView", "Failed to identify the scrollbars"); deleteLater(); return; } diff --git a/src/Mod/Start/App/AppStart.cpp b/src/Mod/Start/App/AppStart.cpp index 3bed957bde..075e0b819b 100644 --- a/src/Mod/Start/App/AppStart.cpp +++ b/src/Mod/Start/App/AppStart.cpp @@ -55,6 +55,6 @@ PyObject* initModule() PyMOD_INIT_FUNC(Start) { PyObject* mod = Start::initModule(); - Base::Console().Log("Loading Start module... done\n"); + Base::Console().log("Loading Start module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Start/App/CustomFolderModel.cpp b/src/Mod/Start/App/CustomFolderModel.cpp index 7de6452362..651425f5f9 100644 --- a/src/Mod/Start/App/CustomFolderModel.cpp +++ b/src/Mod/Start/App/CustomFolderModel.cpp @@ -59,13 +59,13 @@ void CustomFolderModel::loadCustomFolder() for (const auto& path : paths) { QDir customFolderDirectory(path); if (!customFolderDirectory.exists()) { - Base::Console().Warning( + Base::Console().warning( "BaseApp/Preferences/Mod/Start/CustomFolder: custom folder %s does not exist\n", customFolderDirectory.absolutePath().toStdString().c_str()); continue; } if (!customFolderDirectory.isReadable()) { - Base::Console().Warning( + Base::Console().warning( "BaseApp/Preferences/Mod/Start/CustomFolder: cannot read custom folder %s\n", customFolderDirectory.absolutePath().toStdString().c_str()); continue; diff --git a/src/Mod/Start/App/DisplayedFilesModel.cpp b/src/Mod/Start/App/DisplayedFilesModel.cpp index 06d631df43..b4d837e5cc 100644 --- a/src/Mod/Start/App/DisplayedFilesModel.cpp +++ b/src/Mod/Start/App/DisplayedFilesModel.cpp @@ -87,7 +87,7 @@ QByteArray loadFCStdThumbnail(const QString& pathToFCStdFile) } } catch (...) { - Base::Console().Log("Failed to load thumbnail for %s\n", pathToFCStdFile.toStdString()); + Base::Console().log("Failed to load thumbnail for %s\n", pathToFCStdFile.toStdString()); } } return {}; @@ -257,7 +257,7 @@ void DisplayedFilesModel::processNewThumbnail(const QString& file, const QByteAr Q_EMIT(dataChanged(qmi, qmi, {static_cast(DisplayedFilesModelRoles::image)})); } else { - Base::Console().Log("Unrecognized path %s\n", file.toStdString()); + Base::Console().log("Unrecognized path %s\n", file.toStdString()); } } } diff --git a/src/Mod/Start/App/ExamplesModel.cpp b/src/Mod/Start/App/ExamplesModel.cpp index c1b8c10334..a295d50c17 100644 --- a/src/Mod/Start/App/ExamplesModel.cpp +++ b/src/Mod/Start/App/ExamplesModel.cpp @@ -44,7 +44,7 @@ void ExamplesModel::loadExamples() beginResetModel(); clear(); if (!_examplesDirectory.isReadable()) { - Base::Console().Warning("Cannot read %s", + Base::Console().warning("Cannot read %s", _examplesDirectory.absolutePath().toStdString().c_str()); } auto entries = _examplesDirectory.entryList(QDir::Filter::Files | QDir::Filter::Readable, diff --git a/src/Mod/Start/App/ThumbnailSource.cpp b/src/Mod/Start/App/ThumbnailSource.cpp index d8d20b2617..b80040c93c 100644 --- a/src/Mod/Start/App/ThumbnailSource.cpp +++ b/src/Mod/Start/App/ThumbnailSource.cpp @@ -70,22 +70,22 @@ void ThumbnailSource::run() args << QLatin1String("--output=") + _thumbnailPath << _file; QProcess process; - Base::Console().Log("Creating thumbnail for %s...\n", _file.toStdString()); + Base::Console().log("Creating thumbnail for %s...\n", _file.toStdString()); process.start(f3d, args); if (!process.waitForFinished()) { process.kill(); - Base::Console().Log("Creating thumbnail for %s timed out\n", _file.toStdString()); + Base::Console().log("Creating thumbnail for %s timed out\n", _file.toStdString()); return; } if (process.exitStatus() == QProcess::CrashExit) { - Base::Console().Log("Creating thumbnail for %s crashed\n", _file.toStdString()); + Base::Console().log("Creating thumbnail for %s crashed\n", _file.toStdString()); return; } if (process.exitCode() != 0) { - Base::Console().Log("Creating thumbnail for %s failed\n", _file.toStdString()); + Base::Console().log("Creating thumbnail for %s failed\n", _file.toStdString()); return; } - Base::Console().Log("Creating thumbnail for %s succeeded, wrote to %s\n", + Base::Console().log("Creating thumbnail for %s succeeded, wrote to %s\n", _file.toStdString(), _thumbnailPath.toStdString()); } @@ -110,7 +110,7 @@ std::tuple extractF3DVersion(const QString& stdoutString) patch = split[2].toInt(); } catch (...) { - Base::Console().Log( + Base::Console().log( "Could not determine F3D version, disabling thumbnail generation\n"); } } @@ -188,5 +188,5 @@ void ThumbnailSource::setupF3D() if (_f3d.major >= 2) { _f3d.baseArgs = getF3DOptions(f3d); } - Base::Console().Log("Running f3d version %d.%d\n", _f3d.major, _f3d.minor); + Base::Console().log("Running f3d version %d.%d\n", _f3d.major, _f3d.minor); } diff --git a/src/Mod/Start/Gui/AppStartGui.cpp b/src/Mod/Start/Gui/AppStartGui.cpp index 5750b1baab..6e0a02ed46 100644 --- a/src/Mod/Start/Gui/AppStartGui.cpp +++ b/src/Mod/Start/Gui/AppStartGui.cpp @@ -119,12 +119,12 @@ PyMOD_INIT_FUNC(StartGui) static StartGui::StartLauncher* launcher = new StartGui::StartLauncher(); Q_UNUSED(launcher) - Base::Console().Log("Loading GUI of Start module... "); + Base::Console().log("Loading GUI of Start module... "); PyObject* mod = StartGui::initModule(); auto manipulator = std::make_shared(); Gui::WorkbenchManipulator::installManipulator(manipulator); loadStartResource(); - Base::Console().Log("done\n"); + Base::Console().log("done\n"); // register preferences pages new Gui::PrefPageProducer( diff --git a/src/Mod/Start/Gui/StartView.cpp b/src/Mod/Start/Gui/StartView.cpp index a8b45b89f0..63ce17f892 100644 --- a/src/Mod/Start/Gui/StartView.cpp +++ b/src/Mod/Start/Gui/StartView.cpp @@ -378,13 +378,13 @@ void StartView::fileCardSelected(const QModelIndex& index) Gui::ModuleIO::verifyAndOpenFile(filename); } catch (Base::PyException& e) { - Base::Console().Error(e.getMessage().c_str()); + Base::Console().error(e.getMessage().c_str()); } catch (Base::Exception& e) { - Base::Console().Error(e.getMessage().c_str()); + Base::Console().error(e.getMessage().c_str()); } catch (...) { - Base::Console().Error("An unknown error occurred"); + Base::Console().error("An unknown error occurred"); } } diff --git a/src/Mod/Surface/App/AppSurface.cpp b/src/Mod/Surface/App/AppSurface.cpp index 0505a788fc..0108acbbdc 100644 --- a/src/Mod/Surface/App/AppSurface.cpp +++ b/src/Mod/Surface/App/AppSurface.cpp @@ -71,7 +71,7 @@ PyMOD_INIT_FUNC(Surface) } PyObject* mod = Surface::initModule(); - Base::Console().Log("Loading Surface module... done\n"); + Base::Console().log("Loading Surface module... done\n"); Base::Interpreter().addType(&Surface::BlendPointPy::Type, mod, "BlendPoint"); Base::Interpreter().addType(&Surface::BlendCurvePy::Type, mod, "BlendCurve"); diff --git a/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp b/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp index 21ad172725..6ffc238a9b 100644 --- a/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp +++ b/src/Mod/Surface/App/Blending/BlendPointPyImp.cpp @@ -98,8 +98,8 @@ int BlendPointPy::PyInit(PyObject* args, PyObject*) BRepAdaptor_Curve adapt(e); if (param < adapt.FirstParameter() || param > adapt.LastParameter()) { PyErr_Warn(PyExc_UserWarning, "BlendPoint: edge is not a closed curve"); - Base::Console().Message("fp=%f\n", adapt.FirstParameter()); - Base::Console().Message("lp=%f\n", adapt.LastParameter()); + Base::Console().message("fp=%f\n", adapt.FirstParameter()); + Base::Console().message("lp=%f\n", adapt.LastParameter()); } adapt.D0(param, Pt); diff --git a/src/Mod/Surface/Gui/AppSurfaceGui.cpp b/src/Mod/Surface/Gui/AppSurfaceGui.cpp index 365226ea99..6b58be7835 100644 --- a/src/Mod/Surface/Gui/AppSurfaceGui.cpp +++ b/src/Mod/Surface/Gui/AppSurfaceGui.cpp @@ -87,6 +87,6 @@ PyMOD_INIT_FUNC(SurfaceGui) // clang-format on PyObject* mod = SurfaceGui::initModule(); - Base::Console().Log("Loading GUI of Surface module... done\n"); + Base::Console().log("Loading GUI of Surface module... done\n"); PyMOD_Return(mod); } diff --git a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp index 90b6456641..2c5caa111a 100644 --- a/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp +++ b/src/Mod/Surface/Gui/TaskGeomFillSurface.cpp @@ -452,7 +452,7 @@ void GeomFillSurface::changeFillType(GeomFill_FillingStyle fillType) editedObject->FillType.setValue(static_cast(fillType)); editedObject->recomputeFeature(); if (!editedObject->isValid()) { - Base::Console().Error("Surface filling: %s", editedObject->getStatusString()); + Base::Console().error("Surface filling: %s", editedObject->getStatusString()); } } } diff --git a/src/Mod/TechDraw/App/AppTechDraw.cpp b/src/Mod/TechDraw/App/AppTechDraw.cpp index 370211d953..a4a5435119 100644 --- a/src/Mod/TechDraw/App/AppTechDraw.cpp +++ b/src/Mod/TechDraw/App/AppTechDraw.cpp @@ -82,7 +82,7 @@ PyMOD_INIT_FUNC(TechDraw) PyMOD_Return(nullptr); } PyObject* mod = TechDraw::initModule(); - Base::Console().Log("Loading TechDraw module... done\n"); + Base::Console().log("Loading TechDraw module... done\n"); TechDraw::DrawPage ::init(); TechDraw::DrawView ::init(); diff --git a/src/Mod/TechDraw/App/AppTechDrawPy.cpp b/src/Mod/TechDraw/App/AppTechDrawPy.cpp index fc65670172..185d36e43f 100644 --- a/src/Mod/TechDraw/App/AppTechDrawPy.cpp +++ b/src/Mod/TechDraw/App/AppTechDrawPy.cpp @@ -211,7 +211,7 @@ private: str += " "; if (msg) {str += msg;} else {str += "No OCCT Exception Message";} - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::Exception(Part::PartExceptionOCCError, str); } catch (const Base::Exception &e) { @@ -227,7 +227,7 @@ private: str += "C++ exception thrown ("; str += e.what(); str += ")"; - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::RuntimeError(str); } } @@ -284,7 +284,7 @@ private: } if (sortedWires.empty()) { - Base::Console().Warning("ATDP::edgeWalker: Wire detection failed\n"); + Base::Console().warning("ATDP::edgeWalker: Wire detection failed\n"); return Py::None(); } else { @@ -322,7 +322,7 @@ private: } if (edgeList.empty()) { - Base::Console().Message("ATDP::findOuterWire: input is empty\n"); + Base::Console().message("ATDP::findOuterWire: input is empty\n"); return Py::None(); } @@ -343,7 +343,7 @@ private: } if(sortedWires.empty()) { - Base::Console().Warning("ATDP::findOuterWire: Outline wire detection failed\n"); + Base::Console().warning("ATDP::findOuterWire: Outline wire detection failed\n"); return Py::None(); } else { outerWire = new TopoShapeWirePy(new TopoShape(*sortedWires.begin())); @@ -372,7 +372,7 @@ private: TopoShapePy* pShape = static_cast(pcObjShape); if (!pShape) { - Base::Console().Message("TRACE - AATDP::findShapeOutline - input shape is null\n"); + Base::Console().message("TRACE - AATDP::findShapeOutline - input shape is null\n"); return Py::None(); } @@ -408,7 +408,7 @@ private: } if(sortedWires.empty()) { - Base::Console().Warning("ATDP::findShapeOutline: Outline wire detection failed\n"); + Base::Console().warning("ATDP::findShapeOutline: Outline wire detection failed\n"); return Py::None(); } else { outerWire = new TopoShapeWirePy(new TopoShape(*sortedWires.begin())); @@ -435,7 +435,7 @@ private: dvp = static_cast(obj); TechDraw::GeometryObjectPtr gObj = dvp->getGeometryObject(); if (!gObj) { - Base::Console().Message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue()); + Base::Console().message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue()); return Py::String(); } TopoDS_Shape shape = ShapeUtils::mirrorShape(gObj->getVisHard()); @@ -498,7 +498,7 @@ private: dvp = static_cast(obj); TechDraw::GeometryObjectPtr gObj = dvp->getGeometryObject(); if (!gObj) { - Base::Console().Message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue()); + Base::Console().message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue()); return Py::String(); } @@ -568,7 +568,7 @@ private: TechDraw::GeometryObjectPtr gObj = dvp->getGeometryObject(); if (!gObj) { // this test might be redundant here since we already checked hasGeometry. - Base::Console().Message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue()); + Base::Console().message("TechDraw: %s has no geometry object!\n", dvp->Label.getValue()); return; } TopoDS_Shape shape = ShapeUtils::mirrorShape(gObj->getVisHard()); @@ -849,7 +849,7 @@ private: TopoShapePy* pShape = static_cast(pcObjShape); if (!pShape) { - Base::Console().Error("ShapeUtils::findCentroid - input shape is null\n"); + Base::Console().error("ShapeUtils::findCentroid - input shape is null\n"); return Py::None(); } @@ -1020,7 +1020,7 @@ private: } Base::FileInfo fi(patFile); if (!fi.isReadable()) { - Base::Console().Error(".pat File: %s is not readable\n", patFile.c_str()); + Base::Console().error(".pat File: %s is not readable\n", patFile.c_str()); return Py::None(); } std::vector specs = TechDraw::DrawGeomHatch::getDecodedSpecsFromFile(patFile, patName); diff --git a/src/Mod/TechDraw/App/CenterLine.cpp b/src/Mod/TechDraw/App/CenterLine.cpp index 965fffd935..4d88862f97 100644 --- a/src/Mod/TechDraw/App/CenterLine.cpp +++ b/src/Mod/TechDraw/App/CenterLine.cpp @@ -142,7 +142,7 @@ void CenterLine::initialize() TechDraw::BaseGeomPtr CenterLine::BaseGeomPtrFromVectors(Base::Vector3d pt1, Base::Vector3d pt2) { - // Base::Console().Message("CE::CE(p1, p2)\n"); + // Base::Console().message("CE::CE(p1, p2)\n"); Base::Vector3d p1 = DrawUtil::invertY(pt1); Base::Vector3d p2 = DrawUtil::invertY(pt2); gp_Pnt gp1(p1.x, p1.y, p1.z); @@ -157,7 +157,7 @@ CenterLine* CenterLine::CenterLineBuilder(const DrawViewPart* partFeat, const Mode mode, const bool flip) { -// Base::Console().Message("CL::CLBuilder()\n - subNames: %d\n", subNames.size()); +// Base::Console().message("CL::CLBuilder()\n - subNames: %d\n", subNames.size()); std::pair ends; std::vector faces; std::vector edges; @@ -191,9 +191,9 @@ CenterLine* CenterLine::CenterLineBuilder(const DrawViewPart* partFeat, verts = subNames; } if ((ends.first).IsEqual(ends.second, Precision::Confusion())) { - Base::Console().Warning("CenterLineBuilder - endpoints are equal: %s\n", + Base::Console().warning("CenterLineBuilder - endpoints are equal: %s\n", DrawUtil::formatVector(ends.first).c_str()); - Base::Console().Warning("CenterLineBuilder - check V/H/A and/or Flip parameters\n"); + Base::Console().warning("CenterLineBuilder - check V/H/A and/or Flip parameters\n"); return nullptr; } @@ -212,7 +212,7 @@ CenterLine* CenterLine::CenterLineBuilder(const DrawViewPart* partFeat, TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* partFeat) { -// Base::Console().Message("CL::scaledGeometry() - m_type: %d\n", m_type); +// Base::Console().message("CL::scaledGeometry() - m_type: %d\n", m_type); double scale = partFeat->getScale(); double viewAngleDeg = partFeat->Rotation.getValue(); std::pair ends; @@ -220,7 +220,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p if (m_faces.empty() && m_edges.empty() && m_verts.empty() ) { -// Base::Console().Message("CL::scaledGeometry - no geometry to scale!\n"); +// Base::Console().message("CL::scaledGeometry - no geometry to scale!\n"); //CenterLine was created by points without a geometry reference, ends = calcEndPointsNoRef(m_start, m_end, scale, m_extendBy, m_hShift, m_vShift, m_rotate, viewAngleDeg); @@ -245,14 +245,14 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p } catch (...) { - Base::Console().Error("CL::scaledGeometry - failed to calculate endpoints!\n"); + Base::Console().error("CL::scaledGeometry - failed to calculate endpoints!\n"); return nullptr; } Base::Vector3d p1 = ends.first; Base::Vector3d p2 = ends.second; if (p1.IsEqual(p2, 0.00001)) { - Base::Console().Warning("Centerline endpoints are equal. Could not draw.\n"); + Base::Console().warning("Centerline endpoints are equal. Could not draw.\n"); //what to do here? //return current geom? return m_geometry; } @@ -274,7 +274,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledGeometry(const TechDraw::DrawViewPart* p TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPart* partFeat) { -// Base::Console().Message("CL::scaledGeometry() - m_type: %d\n", m_type); +// Base::Console().message("CL::scaledGeometry() - m_type: %d\n", m_type); double scale = partFeat->getScale(); double viewAngleDeg = partFeat->Rotation.getValue(); std::pair ends; @@ -282,7 +282,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar if (m_faces.empty() && m_edges.empty() && m_verts.empty() ) { -// Base::Console().Message("CL::scaledGeometry - no geometry to scale!\n"); +// Base::Console().message("CL::scaledGeometry - no geometry to scale!\n"); //CenterLine was created by points without a geometry reference, ends = calcEndPointsNoRef(m_start, m_end, scale, m_extendBy, m_hShift, m_vShift, m_rotate, viewAngleDeg); @@ -307,7 +307,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar } catch (...) { - Base::Console().Error("CL::scaledGeometry - failed to calculate endpoints!\n"); + Base::Console().error("CL::scaledGeometry - failed to calculate endpoints!\n"); return nullptr; } @@ -315,7 +315,7 @@ TechDraw::BaseGeomPtr CenterLine::scaledAndRotatedGeometry(TechDraw::DrawViewPar Base::Vector3d p1 = ends.first; Base::Vector3d p2 = ends.second; if (p1.IsEqual(p2, 0.00001)) { - Base::Console().Warning("Centerline endpoints are equal. Could not draw.\n"); + Base::Console().warning("Centerline endpoints are equal. Could not draw.\n"); //what to do here? //return current geom? return m_geometry; } @@ -382,8 +382,8 @@ std::string CenterLine::toString() const void CenterLine::dump(const char* title) { - Base::Console().Message("CL::dump - %s \n", title); - Base::Console().Message("CL::dump - %s \n", toString().c_str()); + Base::Console().message("CL::dump - %s \n", title); + Base::Console().message("CL::dump - %s \n", toString().c_str()); } //! rotate a notional 2d vector from p1 to p2 around its midpoint by angleDeg @@ -416,7 +416,7 @@ std::pair CenterLine::calcEndPointsNoRef(const B const double vShift, const double rotate, const double viewAngleDeg) { -// Base::Console().Message("CL::calcEndPointsNoRef()\n"); +// Base::Console().message("CL::calcEndPointsNoRef()\n"); Base::Vector3d p1 = start; Base::Vector3d p2 = end; Base::Vector3d mid = (p1 + p2) / 2.0; @@ -465,9 +465,9 @@ std::pair CenterLine::calcEndPoints(const DrawVi const double vShift, const double rotate) { -// Base::Console().Message("CL::calcEndPoints()\n"); +// Base::Console().message("CL::calcEndPoints()\n"); if (faceNames.empty()) { - Base::Console().Warning("CL::calcEndPoints - no faces!\n"); + Base::Console().warning("CL::calcEndPoints - no faces!\n"); return std::pair(); } @@ -510,7 +510,7 @@ std::pair CenterLine::calcEndPoints(const DrawVi BRepBndLib::AddOptimal(faceEdgeCompound, faceBox); if (faceBox.IsVoid()) { - Base::Console().Error("CL::calcEndPoints - faceBox is void!\n"); + Base::Console().error("CL::calcEndPoints - faceBox is void!\n"); throw Base::IndexError("CenterLine wrong number of faces."); } @@ -536,7 +536,7 @@ std::pair CenterLine::calcEndPoints(const DrawVi p1 = Base::Vector3d(Xmin, Ymid, 0.0); p2 = Base::Vector3d(Xmax, Ymid, 0.0); } else { //vert == Mode::ALIGNED //aligned, but aligned doesn't make sense for face(s) bbox - Base::Console().Message("CL::calcEndPoints - aligned is not applicable to Face center lines\n"); + Base::Console().message("CL::calcEndPoints - aligned is not applicable to Face center lines\n"); p1 = Base::Vector3d(Xmid, Ymax, 0.0); p2 = Base::Vector3d(Xmid, Ymin, 0.0); } @@ -591,10 +591,10 @@ std::pair CenterLine::calcEndPoints2Lines(const { Q_UNUSED(flip) -// Base::Console().Message("CL::calc2Lines() - mode: %d flip: %d edgeNames: %d\n", mode, flip, edgeNames.size()); +// Base::Console().message("CL::calc2Lines() - mode: %d flip: %d edgeNames: %d\n", mode, flip, edgeNames.size()); std::pair result; if (edgeNames.empty()) { - Base::Console().Warning("CL::calcEndPoints2Lines - no edges!\n"); + Base::Console().warning("CL::calcEndPoints2Lines - no edges!\n"); return result; } @@ -610,11 +610,11 @@ std::pair CenterLine::calcEndPoints2Lines(const if (bg) { edges.push_back(bg); } else { - Base::Console().Message("CL::calcEndPoints2Lines - no geom for index: %d\n", idx); + Base::Console().message("CL::calcEndPoints2Lines - no geom for index: %d\n", idx); } } if (edges.size() != 2) { - Base::Console().Message("CL::calcEndPoints2Lines - wrong number of edges: %d!\n", edges.size()); + Base::Console().message("CL::calcEndPoints2Lines - wrong number of edges: %d!\n", edges.size()); throw Base::IndexError("CenterLine wrong number of edges."); } @@ -709,9 +709,9 @@ std::pair CenterLine::calcEndPoints2Points(const const bool flip) { -// Base::Console().Message("CL::calc2Points() - mode: %d\n", mode); +// Base::Console().message("CL::calc2Points() - mode: %d\n", mode); if (vertNames.empty()) { - Base::Console().Warning("CL::calcEndPoints2Points - no points!\n"); + Base::Console().warning("CL::calcEndPoints2Points - no points!\n"); return std::pair(); } @@ -891,7 +891,7 @@ void CenterLine::Save(Base::Writer &writer) const //stored geometry if (!m_geometry) { - return Base::Console().Error("CL::Save - m_geometry is null\n"); + return Base::Console().error("CL::Save - m_geometry is null\n"); } writer.Stream() << writer.ind() << "getGeomType() <<"\"/>" << std::endl; @@ -905,7 +905,7 @@ void CenterLine::Save(Base::Writer &writer) const TechDraw::AOCPtr aoc = std::static_pointer_cast(m_geometry); aoc->Save(writer); } else { - Base::Console().Message("CL::Save - unimplemented geomType: %d\n", static_cast(m_geometry->getGeomType())); + Base::Console().message("CL::Save - unimplemented geomType: %d\n", static_cast(m_geometry->getGeomType())); } writer.Stream() << writer.ind() << "" << std::endl; @@ -917,7 +917,7 @@ void CenterLine::Restore(Base::XMLReader &reader) if (!CosmeticVertex::restoreCosmetic()) { return; } -// Base::Console().Message("CL::Restore - reading elements\n"); +// Base::Console().message("CL::Restore - reading elements\n"); // read my Element reader.readElement("Start"); // get the value of my Attribute @@ -1012,7 +1012,7 @@ void CenterLine::Restore(Base::XMLReader &reader) aoc->setOCCEdge(GeometryUtils::edgeFromCircleArc(aoc)); m_geometry = aoc; } else { - Base::Console().Warning("CL::Restore - unimplemented geomType: %d\n", static_cast(gType)); + Base::Console().warning("CL::Restore - unimplemented geomType: %d\n", static_cast(gType)); } // older documents may not have the LineNumber element, so we need to check the diff --git a/src/Mod/TechDraw/App/Cosmetic.cpp b/src/Mod/TechDraw/App/Cosmetic.cpp index 3e95a72d1e..974f2533b4 100644 --- a/src/Mod/TechDraw/App/Cosmetic.cpp +++ b/src/Mod/TechDraw/App/Cosmetic.cpp @@ -76,7 +76,7 @@ CosmeticEdge::CosmeticEdge(const TopoDS_Edge& e) : CosmeticEdge::CosmeticEdge(const TechDraw::BaseGeomPtr g) { -// Base::Console().Message("CE::CE(bg)\n"); +// Base::Console().message("CE::CE(bg)\n"); m_geometry = g; //we assume input edge is already in Yinverted coordinates permaStart = m_geometry->getStartPoint(); @@ -192,8 +192,8 @@ std::string CosmeticEdge::toString() const void CosmeticEdge::dump(const char* title) const { - Base::Console().Message("CE::dump - %s \n", title); - Base::Console().Message("CE::dump - %s \n", toString().c_str()); + Base::Console().message("CE::dump - %s \n", title); + Base::Console().message("CE::dump - %s \n", toString().c_str()); } // Persistence implementers @@ -223,7 +223,7 @@ void CosmeticEdge::Save(Base::Writer &writer) const TechDraw::AOCPtr aoc = std::static_pointer_cast(m_geometry); aoc->inverted()->Save(writer); } else { - Base::Console().Warning("CE::Save - unimplemented geomType: %d\n", static_cast(m_geometry->getGeomType())); + Base::Console().warning("CE::Save - unimplemented geomType: %d\n", static_cast(m_geometry->getGeomType())); } writer.Stream() << writer.ind() << "" << endl; @@ -235,7 +235,7 @@ void CosmeticEdge::Restore(Base::XMLReader &reader) if (!CosmeticVertex::restoreCosmetic()) { return; } -// Base::Console().Message("CE::Restore - reading elements\n"); +// Base::Console().message("CE::Restore - reading elements\n"); reader.readElement("Style"); m_format.setStyle(reader.getAttributeAsInteger("value")); reader.readElement("Weight"); @@ -275,7 +275,7 @@ void CosmeticEdge::Restore(Base::XMLReader &reader) permaEnd = aoc->center; permaRadius = aoc->radius; } else { - Base::Console().Warning("CE::Restore - unimplemented geomType: %d\n", static_cast(gType)); + Base::Console().warning("CE::Restore - unimplemented geomType: %d\n", static_cast(gType)); } // older documents may not have the LineNumber element, so we need to check the // next entry. if it is a start element, then we check if it is a start element @@ -294,7 +294,7 @@ void CosmeticEdge::Restore(Base::XMLReader &reader) CosmeticEdge* CosmeticEdge::clone() const { - Base::Console().Message("CE::clone()\n"); + Base::Console().message("CE::clone()\n"); CosmeticEdge* cpy = new CosmeticEdge(); cpy->m_geometry = m_geometry->copy(); cpy->m_format = m_format; @@ -352,8 +352,8 @@ GeomFormat::~GeomFormat() void GeomFormat::dump(const char* title) const { - Base::Console().Message("GF::dump - %s \n", title); - Base::Console().Message("GF::dump - %s \n", toString().c_str()); + Base::Console().message("GF::dump - %s \n", title); + Base::Console().message("GF::dump - %s \n", toString().c_str()); } std::string GeomFormat::toString() const diff --git a/src/Mod/TechDraw/App/CosmeticEdgePyImp.cpp b/src/Mod/TechDraw/App/CosmeticEdgePyImp.cpp index c989ec3881..c22ac782ee 100644 --- a/src/Mod/TechDraw/App/CosmeticEdgePyImp.cpp +++ b/src/Mod/TechDraw/App/CosmeticEdgePyImp.cpp @@ -167,13 +167,13 @@ Py::String CosmeticEdgePy::getTag() const //Py::Object CosmeticEdgePy::getGeometry(void) const //{ //// TechDraw::BaseGeomPtr bg = getCosmeticEdgePtr()->m_geometry; -// Base::Console().Message("Not implemented yet"); +// Base::Console().message("Not implemented yet"); // return Py::asObject(Py_None); //} //void CosmeticEdgePy::setGeometry(Py::Object arg) //{ -// Base::Console().Message("Not implemented yet"); +// Base::Console().message("Not implemented yet"); // PyObject* p = arg.ptr(); // if (PyObject_TypeCheck(p, &(TechDraw::BaseGeomPy::Type))) { // //TODO diff --git a/src/Mod/TechDraw/App/CosmeticExtension.cpp b/src/Mod/TechDraw/App/CosmeticExtension.cpp index 6f835d0ce1..bf094a0afd 100644 --- a/src/Mod/TechDraw/App/CosmeticExtension.cpp +++ b/src/Mod/TechDraw/App/CosmeticExtension.cpp @@ -114,7 +114,7 @@ void CosmeticExtension::clearCosmeticVertexes() /// add the cosmetic verts in the property list to view's vertex geometry list void CosmeticExtension::addCosmeticVertexesToGeom() { -// Base::Console().Message("CE::addCosmeticVertexesToGeom()\n"); +// Base::Console().message("CE::addCosmeticVertexesToGeom()\n"); const std::vector cVerts = CosmeticVertexes.getValues(); for (auto& cv : cVerts) { double scale = getOwner()->getScale(); @@ -128,10 +128,10 @@ void CosmeticExtension::addCosmeticVertexesToGeom() /// add a single cosmetic vertex in the property list to the view's vertex geometry list int CosmeticExtension::add1CVToGV(const std::string& tag) { -// Base::Console().Message("CE::add1CVToGV(%s)\n", tag.c_str()); +// Base::Console().message("CE::add1CVToGV(%s)\n", tag.c_str()); TechDraw::CosmeticVertex* cv = getCosmeticVertex(tag); if (!cv) { - Base::Console().Message("CE::add1CVToGV - cv %s not found\n", tag.c_str()); + Base::Console().message("CE::add1CVToGV - cv %s not found\n", tag.c_str()); return 0; } double scale = getOwner()->getScale(); @@ -145,7 +145,7 @@ int CosmeticExtension::add1CVToGV(const std::string& tag) /// update the parent view's vertex geometry with all the cosmetic vertices in the list property void CosmeticExtension::refreshCVGeoms() { - // Base::Console().Message("CE::refreshCVGeoms()\n"); + // Base::Console().message("CE::refreshCVGeoms()\n"); std::vector gVerts = getOwner()->getVertexGeometry(); std::vector newGVerts; @@ -162,7 +162,7 @@ void CosmeticExtension::refreshCVGeoms() /// find the position of a cosmetic vertex with the given tag in the parent view's geometry list int CosmeticExtension::getCVIndex(const std::string& tag) { - // Base::Console().Message("CE::getCVIndex(%s)\n", tag.c_str()); + // Base::Console().message("CE::getCVIndex(%s)\n", tag.c_str()); std::vector gVerts = getOwner()->getVertexGeometry(); std::vector cVerts = CosmeticVertexes.getValues(); @@ -178,7 +178,7 @@ int CosmeticExtension::getCVIndex(const std::string& tag) int base = gVerts.size(); i = 0; for (auto& cv : cVerts) { - // Base::Console().Message("CE::getCVIndex - cv tag: %s\n", + // Base::Console().message("CE::getCVIndex - cv tag: %s\n", // cv->getTagAsString().c_str()); if (cv->getTagAsString() == tag) { return base + i; @@ -186,7 +186,7 @@ int CosmeticExtension::getCVIndex(const std::string& tag) i++; } - // Base::Console().Message("CE::getCVIndex - returns: %d\n", result); + // Base::Console().message("CE::getCVIndex - returns: %d\n", result); return -1; } @@ -196,7 +196,7 @@ int CosmeticExtension::getCVIndex(const std::string& tag) /// invert should be set to false. std::string CosmeticExtension::addCosmeticVertex(const Base::Vector3d& pos, bool invert) { -// Base::Console().Message("CEx::addCosmeticVertex(%s)\n", +// Base::Console().message("CEx::addCosmeticVertex(%s)\n", // DrawUtil::formatVector(pos).c_str()); std::vector verts = CosmeticVertexes.getValues(); Base::Vector3d tempPos = pos; @@ -212,7 +212,7 @@ std::string CosmeticExtension::addCosmeticVertex(const Base::Vector3d& pos, bool /// retrieve a cosmetic vertex by unique id TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertex(const std::string& tagString) const { -// Base::Console().Message("CEx::getCosmeticVertex(%s)\n", tagString.c_str()); +// Base::Console().message("CEx::getCosmeticVertex(%s)\n", tagString.c_str()); const std::vector verts = CosmeticVertexes.getValues(); for (auto& cv: verts) { std::string cvTag = cv->getTagAsString(); @@ -227,7 +227,7 @@ TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertex(const std::string /// used when selecting TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const std::string& name) const { -// Base::Console().Message("CEx::getCVBySelection(%s)\n", name.c_str()); +// Base::Console().message("CEx::getCVBySelection(%s)\n", name.c_str()); App::DocumentObject* extObj = const_cast (getExtendedObject()); TechDraw::DrawViewPart* dvp = dynamic_cast(extObj); if (!dvp) { @@ -244,7 +244,7 @@ TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const /// retrieve a cosmetic vertex by index (the 5 in Vertex5) TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const int i) const { -// Base::Console().Message("CEx::getCVBySelection(%d)\n", i); +// Base::Console().message("CEx::getCVBySelection(%d)\n", i); std::stringstream ss; ss << "Vertex" << i; std::string vName = ss.str(); @@ -254,7 +254,7 @@ TechDraw::CosmeticVertex* CosmeticExtension::getCosmeticVertexBySelection(const /// remove the cosmetic vertex with the given tag from the list property void CosmeticExtension::removeCosmeticVertex(const std::string& delTag) { -// Base::Console().Message("DVP::removeCV(%s)\n", delTag.c_str()); +// Base::Console().message("DVP::removeCV(%s)\n", delTag.c_str()); std::vector cVerts = CosmeticVertexes.getValues(); std::vector newVerts; for (auto& cv: cVerts) { @@ -292,7 +292,7 @@ void CosmeticExtension::clearCosmeticEdges() /// add the cosmetic edges to geometry edge list void CosmeticExtension::addCosmeticEdgesToGeom() { -// Base::Console().Message("CEx::addCosmeticEdgesToGeom()\n"); +// Base::Console().message("CEx::addCosmeticEdgesToGeom()\n"); const std::vector cEdges = CosmeticEdges.getValues(); for (auto& ce : cEdges) { double scale = getOwner()->getScale(); @@ -308,10 +308,10 @@ void CosmeticExtension::addCosmeticEdgesToGeom() /// add a single cosmetic edge to the geometry edge list int CosmeticExtension::add1CEToGE(const std::string& tag) { - // Base::Console().Message("CEx::add1CEToGE(%s) 2\n", tag.c_str()); + // Base::Console().message("CEx::add1CEToGE(%s) 2\n", tag.c_str()); TechDraw::CosmeticEdge* ce = getCosmeticEdge(tag); if (!ce) { - Base::Console().Message("CEx::add1CEToGE 2 - ce %s not found\n", tag.c_str()); + Base::Console().message("CEx::add1CEToGE 2 - ce %s not found\n", tag.c_str()); return -1; } double scale = getOwner()->getScale(); @@ -325,7 +325,7 @@ int CosmeticExtension::add1CEToGE(const std::string& tag) /// update Edge geometry with current CE's void CosmeticExtension::refreshCEGeoms() { - // Base::Console().Message("CEx::refreshCEGeoms()\n"); + // Base::Console().message("CEx::refreshCEGeoms()\n"); std::vector gEdges = getOwner()->getEdgeGeometry(); std::vector oldGEdges; for (auto& ge : gEdges) { @@ -342,7 +342,7 @@ void CosmeticExtension::refreshCEGeoms() std::string CosmeticExtension::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end) { -// Base::Console().Message("CEx::addCosmeticEdge(s, e)\n"); +// Base::Console().message("CEx::addCosmeticEdge(s, e)\n"); std::vector edges = CosmeticEdges.getValues(); TechDraw::CosmeticEdge* ce = new TechDraw::CosmeticEdge(start, end); edges.push_back(ce); @@ -354,7 +354,7 @@ std::string CosmeticExtension::addCosmeticEdge(Base::Vector3d start, /// returns unique CE id std::string CosmeticExtension::addCosmeticEdge(TechDraw::BaseGeomPtr bg) { -// Base::Console().Message("CEx::addCosmeticEdge(bg: %X)\n", bg); +// Base::Console().message("CEx::addCosmeticEdge(bg: %X)\n", bg); std::vector edges = CosmeticEdges.getValues(); TechDraw::CosmeticEdge* ce = new TechDraw::CosmeticEdge(bg); edges.push_back(ce); @@ -365,7 +365,7 @@ std::string CosmeticExtension::addCosmeticEdge(TechDraw::BaseGeomPtr bg) /// retrieve a CE by unique id TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdge(const std::string& tagString) const { -// Base::Console().Message("CEx::getCosmeticEdge(%s)\n", tagString.c_str()); +// Base::Console().message("CEx::getCosmeticEdge(%s)\n", tagString.c_str()); const std::vector edges = CosmeticEdges.getValues(); for (auto& ce: edges) { std::string ceTag = ce->getTagAsString(); @@ -375,7 +375,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdge(const std::string& ta } // None found -// Base::Console().Message("CEx::getCosmeticEdge - CE for tag: %s not found.\n", tagString.c_str()); +// Base::Console().message("CEx::getCosmeticEdge - CE for tag: %s not found.\n", tagString.c_str()); return nullptr; } @@ -383,7 +383,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdge(const std::string& ta /// used when selecting TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(const std::string& name) const { - // Base::Console().Message("CEx::getCEBySelection(%s)\n", name.c_str()); + // Base::Console().message("CEx::getCEBySelection(%s)\n", name.c_str()); App::DocumentObject* extObj = const_cast (getExtendedObject()); TechDraw::DrawViewPart* dvp = dynamic_cast(extObj); if (!dvp) { @@ -401,7 +401,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(const std: /// find the cosmetic edge corresponding to the input parameter (the 5 in Edge5) TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(int i) const { - // Base::Console().Message("CEx::getCEBySelection(%d)\n", i); + // Base::Console().message("CEx::getCEBySelection(%d)\n", i); std::stringstream edgeName; edgeName << "Edge" << i; return getCosmeticEdgeBySelection(edgeName.str()); @@ -410,7 +410,7 @@ TechDraw::CosmeticEdge* CosmeticExtension::getCosmeticEdgeBySelection(int i) con /// remove the cosmetic edge with the given tag from the list property void CosmeticExtension::removeCosmeticEdge(const std::string& delTag) { - // Base::Console().Message("DVP::removeCE(%s)\n", delTag.c_str()); + // Base::Console().message("DVP::removeCE(%s)\n", delTag.c_str()); std::vector cEdges = CosmeticEdges.getValues(); std::vector newEdges; for (auto& ce: cEdges) { @@ -427,7 +427,7 @@ void CosmeticExtension::removeCosmeticEdge(const std::string& delTag) /// remove the cosmetic edges with the given tags from the list property void CosmeticExtension::removeCosmeticEdge(const std::vector& delTags) { - // Base::Console().Message("DVP::removeCE(%d tags)\n", delTags.size()); + // Base::Console().message("DVP::removeCE(%d tags)\n", delTags.size()); std::vector cEdges = CosmeticEdges.getValues(); for (auto& t: delTags) { removeCosmeticEdge(t); @@ -449,10 +449,10 @@ void CosmeticExtension::clearCenterLines() int CosmeticExtension::add1CLToGE(const std::string& tag) { - // Base::Console().Message("CEx::add1CLToGE(%s) 2\n", tag.c_str()); + // Base::Console().message("CEx::add1CLToGE(%s) 2\n", tag.c_str()); TechDraw::CenterLine* cl = getCenterLine(tag); if (!cl) { -// Base::Console().Message("CEx::add1CLToGE 2 - cl %s not found\n", tag.c_str()); +// Base::Console().message("CEx::add1CLToGE 2 - cl %s not found\n", tag.c_str()); return -1; } TechDraw::BaseGeomPtr scaledGeom = cl->scaledAndRotatedGeometry(getOwner()); @@ -464,7 +464,7 @@ int CosmeticExtension::add1CLToGE(const std::string& tag) //update Edge geometry with current CL's void CosmeticExtension::refreshCLGeoms() { - // Base::Console().Message("CE::refreshCLGeoms()\n"); + // Base::Console().message("CE::refreshCLGeoms()\n"); std::vector gEdges = getOwner()->getEdgeGeometry(); std::vector newGEdges; for (auto& ge : gEdges) { @@ -479,12 +479,12 @@ void CosmeticExtension::refreshCLGeoms() //add the center lines to geometry Edges list void CosmeticExtension::addCenterLinesToGeom() { - // Base::Console().Message("CE::addCenterLinesToGeom()\n"); + // Base::Console().message("CE::addCenterLinesToGeom()\n"); const std::vector lines = CenterLines.getValues(); for (auto& cl : lines) { TechDraw::BaseGeomPtr scaledGeom = cl->scaledAndRotatedGeometry(getOwner()); if (!scaledGeom) { - Base::Console().Error("CE::addCenterLinesToGeom - scaledGeometry is null\n"); + Base::Console().error("CE::addCenterLinesToGeom - scaledGeometry is null\n"); continue; } // int idx = @@ -497,7 +497,7 @@ void CosmeticExtension::addCenterLinesToGeom() std::string CosmeticExtension::addCenterLine(Base::Vector3d start, Base::Vector3d end) { -// Base::Console().Message("CEx::addCenterLine(%s)\n", +// Base::Console().message("CEx::addCenterLine(%s)\n", // DrawUtil::formatVector(start).c_str(), // DrawUtil::formatVector(end).c_str()); std::vector cLines = CenterLines.getValues(); @@ -509,7 +509,7 @@ std::string CosmeticExtension::addCenterLine(Base::Vector3d start, std::string CosmeticExtension::addCenterLine(TechDraw::CenterLine* cl) { -// Base::Console().Message("CEx::addCenterLine(cl: %X)\n", cl); +// Base::Console().message("CEx::addCenterLine(cl: %X)\n", cl); std::vector cLines = CenterLines.getValues(); cLines.push_back(cl); CenterLines.setValues(cLines); @@ -519,7 +519,7 @@ std::string CosmeticExtension::addCenterLine(TechDraw::CenterLine* cl) std::string CosmeticExtension::addCenterLine(TechDraw::BaseGeomPtr bg) { -// Base::Console().Message("CEx::addCenterLine(bg: %X)\n", bg); +// Base::Console().message("CEx::addCenterLine(bg: %X)\n", bg); std::vector cLines = CenterLines.getValues(); TechDraw::CenterLine* cl = new TechDraw::CenterLine(bg); cLines.push_back(cl); @@ -530,7 +530,7 @@ std::string CosmeticExtension::addCenterLine(TechDraw::BaseGeomPtr bg) //get CL by unique id TechDraw::CenterLine* CosmeticExtension::getCenterLine(const std::string& tagString) const { -// Base::Console().Message("CEx::getCenterLine(%s)\n", tagString.c_str()); +// Base::Console().message("CEx::getCenterLine(%s)\n", tagString.c_str()); const std::vector cLines = CenterLines.getValues(); for (auto& cl: cLines) { std::string clTag = cl->getTagAsString(); @@ -545,7 +545,7 @@ TechDraw::CenterLine* CosmeticExtension::getCenterLine(const std::string& tagStr // used when selecting TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(const std::string& name) const { -// Base::Console().Message("CEx::getCLBySelection(%s)\n", name.c_str()); +// Base::Console().message("CEx::getCLBySelection(%s)\n", name.c_str()); App::DocumentObject* extObj = const_cast (getExtendedObject()); TechDraw::DrawViewPart* dvp = dynamic_cast(extObj); if (!dvp) { @@ -562,7 +562,7 @@ TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(const std::str //overload for index only TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(int i) const { -// Base::Console().Message("CEx::getCLBySelection(%d)\n", i); +// Base::Console().message("CEx::getCLBySelection(%d)\n", i); std::stringstream edgeName; edgeName << "Edge" << i; return getCenterLineBySelection(edgeName.str()); @@ -570,7 +570,7 @@ TechDraw::CenterLine* CosmeticExtension::getCenterLineBySelection(int i) const void CosmeticExtension::removeCenterLine(const std::string& delTag) { - // Base::Console().Message("DVP::removeCL(%s)\n", delTag.c_str()); + // Base::Console().message("DVP::removeCL(%s)\n", delTag.c_str()); std::vector cLines = CenterLines.getValues(); std::vector newLines; for (auto& cl: cLines) { @@ -603,7 +603,7 @@ void CosmeticExtension::clearGeomFormats() //only adds gf to gflist property. does not add to display geometry until dvp repaints. std::string CosmeticExtension::addGeomFormat(TechDraw::GeomFormat* gf) { -// Base::Console().Message("CEx::addGeomFormat(gf: %X)\n", gf); +// Base::Console().message("CEx::addGeomFormat(gf: %X)\n", gf); std::vector formats = GeomFormats.getValues(); TechDraw::GeomFormat* newGF = new TechDraw::GeomFormat(gf); formats.push_back(newGF); @@ -615,7 +615,7 @@ std::string CosmeticExtension::addGeomFormat(TechDraw::GeomFormat* gf) //get GF by unique id TechDraw::GeomFormat* CosmeticExtension::getGeomFormat(const std::string& tagString) const { -// Base::Console().Message("CEx::getGeomFormat(%s)\n", tagString.c_str()); +// Base::Console().message("CEx::getGeomFormat(%s)\n", tagString.c_str()); const std::vector formats = GeomFormats.getValues(); for (auto& gf: formats) { std::string gfTag = gf->getTagAsString(); @@ -632,7 +632,7 @@ TechDraw::GeomFormat* CosmeticExtension::getGeomFormat(const std::string& tagStr // used when selecting TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(const std::string& name) const { -// Base::Console().Message("CEx::getCEBySelection(%s)\n", name.c_str()); +// Base::Console().message("CEx::getCEBySelection(%s)\n", name.c_str()); App::DocumentObject* extObj = const_cast (getExtendedObject()); TechDraw::DrawViewPart* dvp = dynamic_cast(extObj); if (!dvp) { @@ -653,7 +653,7 @@ TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(const std::str //overload for index only TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(int i) const { -// Base::Console().Message("CEx::getCEBySelection(%d)\n", i); +// Base::Console().message("CEx::getCEBySelection(%d)\n", i); std::stringstream edgeName; edgeName << "Edge" << i; return getGeomFormatBySelection(edgeName.str()); @@ -661,7 +661,7 @@ TechDraw::GeomFormat* CosmeticExtension::getGeomFormatBySelection(int i) const void CosmeticExtension::removeGeomFormat(const std::string& delTag) { -// Base::Console().Message("DVP::removeCE(%s)\n", delTag.c_str()); +// Base::Console().message("DVP::removeCE(%s)\n", delTag.c_str()); std::vector cFormats = GeomFormats.getValues(); std::vector newFormats; for (auto& gf: cFormats) { diff --git a/src/Mod/TechDraw/App/CosmeticVertex.cpp b/src/Mod/TechDraw/App/CosmeticVertex.cpp index 35275c0546..9d7df4780b 100644 --- a/src/Mod/TechDraw/App/CosmeticVertex.cpp +++ b/src/Mod/TechDraw/App/CosmeticVertex.cpp @@ -208,13 +208,13 @@ Base::Vector3d CosmeticVertex::makeCanonicalPointInverted(DrawViewPart* dvp, Bas CosmeticVertex* CosmeticVertex::copy() const { -// Base::Console().Message("CV::copy()\n"); +// Base::Console().message("CV::copy()\n"); return new CosmeticVertex(this); } CosmeticVertex* CosmeticVertex::clone() const { -// Base::Console().Message("CV::clone()\n"); +// Base::Console().message("CV::clone()\n"); CosmeticVertex* cpy = this->copy(); cpy->setTag(this->getTag()); return cpy; @@ -232,6 +232,6 @@ PyObject* CosmeticVertex::getPyObject() // To do: make const void CosmeticVertex::dump(const char* title) { - Base::Console().Message("CV::dump - %s \n", title); - Base::Console().Message("CV::dump - %s \n", toString().c_str()); + Base::Console().message("CV::dump - %s \n", title); + Base::Console().message("CV::dump - %s \n", toString().c_str()); } diff --git a/src/Mod/TechDraw/App/CosmeticVertexPyImp.cpp b/src/Mod/TechDraw/App/CosmeticVertexPyImp.cpp index 3b92e6c3fc..5fe31eec25 100644 --- a/src/Mod/TechDraw/App/CosmeticVertexPyImp.cpp +++ b/src/Mod/TechDraw/App/CosmeticVertexPyImp.cpp @@ -180,7 +180,7 @@ void CosmeticVertexPy::setColor(Py::Object arg) CosmeticVertex* cv = getCosmeticVertexPtr(); cv->color = c; } else { - Base::Console().Error("CEPI::setColor - not a tuple!\n"); + Base::Console().error("CEPI::setColor - not a tuple!\n"); std::string error = std::string("type must be 'tuple', not "); error += pTuple->ob_type->tp_name; throw Py::TypeError(error); diff --git a/src/Mod/TechDraw/App/DimensionAutoCorrect.cpp b/src/Mod/TechDraw/App/DimensionAutoCorrect.cpp index a18edac90c..aecb2be68b 100644 --- a/src/Mod/TechDraw/App/DimensionAutoCorrect.cpp +++ b/src/Mod/TechDraw/App/DimensionAutoCorrect.cpp @@ -87,7 +87,7 @@ using DU = DrawUtil; //! was created. bool DimensionAutoCorrect::referencesHaveValidGeometry(std::vector& referenceState) const { - // Base::Console().Message("DAC::referencesHaveValidGeometry()\n"); + // Base::Console().message("DAC::referencesHaveValidGeometry()\n"); ReferenceVector refsAll = getDimension()->getEffectiveReferences(); const std::vector savedGeometry = getDimension()->SavedGeometry.getValues(); @@ -126,7 +126,7 @@ bool DimensionAutoCorrect::referencesHaveValidGeometry(std::vector& refere bool DimensionAutoCorrect::autocorrectReferences(std::vector& referenceState, ReferenceVector& repairedRefs) const { - // Base::Console().Message("DAC::autocorrectReferences()\n"); + // Base::Console().message("DAC::autocorrectReferences()\n"); if (!Preferences::autoCorrectDimRefs()) { return false; } @@ -199,7 +199,7 @@ bool DimensionAutoCorrect::autocorrectReferences(std::vector& referenceSta //! fix a single reference with an exact match to geomToMatch bool DimensionAutoCorrect::fix1GeomExact(ReferenceEntry& refToFix, const TopoDS_Shape &geomToMatch) const { - // Base::Console().Message("DAC::fix1GeomExact()\n"); + // Base::Console().message("DAC::fix1GeomExact()\n"); ReferenceEntry fixedRef = refToFix; Part::TopoShape topoShapeToMatch(geomToMatch); bool success {false}; @@ -229,7 +229,7 @@ bool DimensionAutoCorrect::fix1GeomExact(ReferenceEntry& refToFix, const TopoDS_ //! fix a single reference with an Similar match to geomToMatch bool DimensionAutoCorrect::fix1GeomSimilar(ReferenceEntry& refToFix, const TopoDS_Shape &geomToMatch) const { - // Base::Console().Message("DAC::fix1GeomSimilar()\n"); + // Base::Console().message("DAC::fix1GeomSimilar()\n"); Part::TopoShape topoShapeToMatch(geomToMatch); bool success {false}; if (refToFix.is3d()) { @@ -261,7 +261,7 @@ bool DimensionAutoCorrect::fix1GeomSimilar(ReferenceEntry& refToFix, const TopoD bool DimensionAutoCorrect::findExactVertex2d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findExactVertex2d()\n"); + // Base::Console().message("DAC::findExactVertex2d()\n"); getMatcher()->setPointTolerance(EWTOLERANCE); auto refObj = refToFix.getObject(); auto refDvp = dynamic_cast(refObj); @@ -281,7 +281,7 @@ bool DimensionAutoCorrect::findExactVertex2d(ReferenceEntry& refToFix, //! and return a reference pointing to the matching edge. bool DimensionAutoCorrect::findExactEdge2d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findExactEdge2d()\n"); + // Base::Console().message("DAC::findExactEdge2d()\n"); auto refObj = refToFix.getObject(); auto refDvp = dynamic_cast(refObj); if (refDvp) { @@ -301,7 +301,7 @@ bool DimensionAutoCorrect::findExactEdge2d(ReferenceEntry& refToFix, const Part: bool DimensionAutoCorrect::findExactVertex3d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findExactVertex3d()\n"); + // Base::Console().message("DAC::findExactVertex3d()\n"); getMatcher()->setPointTolerance(EWTOLERANCE); // try the referenced object @@ -331,7 +331,7 @@ bool DimensionAutoCorrect::findExactVertex3d(ReferenceEntry& refToFix, //! and return a reference pointing to the matching edge. bool DimensionAutoCorrect::findExactEdge3d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findExactEdge3d() - cache: %d\n", m_3dObjectCache.size()); + // Base::Console().message("DAC::findExactEdge3d() - cache: %d\n", m_3dObjectCache.size()); // first, try to find a match in the referenced object auto refObj = refToFix.getObject(); if (refObj) { @@ -367,10 +367,10 @@ bool DimensionAutoCorrect::findExactEdge3d(ReferenceEntry& refToFix, const Part: bool DimensionAutoCorrect::findSimilarVertex2d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findSimilarVertex2d()\n"); + // Base::Console().message("DAC::findSimilarVertex2d()\n"); (void)refToFix; (void)refGeom; - // Base::Console().Message("DAC::findSimilarVertex2d is not implemented yet\n"); + // Base::Console().message("DAC::findSimilarVertex2d is not implemented yet\n"); return false; } @@ -379,10 +379,10 @@ bool DimensionAutoCorrect::findSimilarVertex2d(ReferenceEntry& refToFix, bool DimensionAutoCorrect::findSimilarEdge2d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findSimilarEdge2d()\n"); + // Base::Console().message("DAC::findSimilarEdge2d()\n"); (void)refToFix; (void)refGeom; - // Base::Console().Message("DAC::findSimilarEdge2d is not implemented yet\n"); + // Base::Console().message("DAC::findSimilarEdge2d is not implemented yet\n"); return false; } @@ -392,10 +392,10 @@ bool DimensionAutoCorrect::findSimilarEdge2d(ReferenceEntry& refToFix, bool DimensionAutoCorrect::findSimilarVertex3d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findSimilarVertex3d()\n"); + // Base::Console().message("DAC::findSimilarVertex3d()\n"); (void)refToFix; (void)refGeom; - // Base::Console().Message("DAC::findSimilarVertex3d is not implemented yet\n"); + // Base::Console().message("DAC::findSimilarVertex3d is not implemented yet\n"); return false; } @@ -405,10 +405,10 @@ bool DimensionAutoCorrect::findSimilarVertex3d(ReferenceEntry& refToFix, bool DimensionAutoCorrect::findSimilarEdge3d(ReferenceEntry& refToFix, const Part::TopoShape& refGeom) const { - // Base::Console().Message("DAC::findSimilarEdge3d(%s)\n", refToFix.getObjectName().c_str()); + // Base::Console().message("DAC::findSimilarEdge3d(%s)\n", refToFix.getObjectName().c_str()); (void)refToFix; (void)refGeom; - // Base::Console().Message("DAC::findSimilarEdge3d is not implemented yet\n"); + // Base::Console().message("DAC::findSimilarEdge3d is not implemented yet\n"); return false; } @@ -471,7 +471,7 @@ ReferenceEntry DimensionAutoCorrect::searchViewForVert(DrawViewPart* obj, const Part::TopoShape& refVertex, bool exact) const { - // Base::Console().Message("DAC::searchViewForVert()\n"); + // Base::Console().message("DAC::searchViewForVert()\n"); (void)exact; std::vector gVertexAll = getDimension()->getViewPart()->getVertexGeometry(); @@ -494,7 +494,7 @@ ReferenceEntry DimensionAutoCorrect::searchViewForVert(DrawViewPart* obj, ReferenceEntry DimensionAutoCorrect::searchViewForExactEdge(DrawViewPart* obj, const Part::TopoShape& refEdge) const { - // Base::Console().Message("DAC::searchViewForExactEdge()\n"); + // Base::Console().message("DAC::searchViewForExactEdge()\n"); auto gEdgeAll = getDimension()->getViewPart()->getEdgeGeometry(); int iEdge {0}; for (auto& edge : gEdgeAll) { @@ -516,10 +516,10 @@ ReferenceEntry DimensionAutoCorrect::searchViewForExactEdge(DrawViewPart* obj, ReferenceEntry DimensionAutoCorrect::searchViewForSimilarEdge(DrawViewPart* obj, const Part::TopoShape& refEdge) const { - // Base::Console().Message("DAC::searchViewForSimilarEdge()\n"); + // Base::Console().message("DAC::searchViewForSimilarEdge()\n"); (void)obj; (void)refEdge; - Base::Console().Message("DAC::searchViewForSimilarEdge is not implemented yet\n"); + Base::Console().message("DAC::searchViewForSimilarEdge is not implemented yet\n"); return {}; } @@ -529,7 +529,7 @@ ReferenceEntry DimensionAutoCorrect::searchObjForEdge(App::DocumentObject* obj, const Part::TopoShape& refEdge, bool exact) const { - // Base::Console().Message("DAC::searchObjForEdge(%s)\n", obj->Label.getValue()); + // Base::Console().message("DAC::searchObjForEdge(%s)\n", obj->Label.getValue()); (void)exact; auto shape3d = Part::Feature::getShape(obj); if (shape3d.IsNull()) { @@ -553,7 +553,7 @@ ReferenceEntry DimensionAutoCorrect::searchObjForEdge(App::DocumentObject* obj, //! have been repaired bool DimensionAutoCorrect::fixBrokenReferences(ReferenceVector& fixedReferences) const { - // Base::Console().Message("DAC::fixBrokenReferences()\n"); + // Base::Console().message("DAC::fixBrokenReferences()\n"); bool success {true}; const std::vector savedGeometry = getDimension()->SavedGeometry.getValues(); int iGeom {0}; diff --git a/src/Mod/TechDraw/App/DimensionFormatter.cpp b/src/Mod/TechDraw/App/DimensionFormatter.cpp index e8217354a6..40656acf73 100644 --- a/src/Mod/TechDraw/App/DimensionFormatter.cpp +++ b/src/Mod/TechDraw/App/DimensionFormatter.cpp @@ -82,7 +82,7 @@ std::string DimensionFormatter::formatValue(const qreal value, } if (formatSpecifier.isEmpty()) { - Base::Console().Warning("Warning - no numeric format in Format Spec %s - %s\n", + Base::Console().warning("Warning - no numeric format in Format Spec %s - %s\n", qPrintable(qFormatSpec), m_dimension->getNameInDocument()); return qFormatSpec.toStdString(); @@ -125,7 +125,7 @@ std::string DimensionFormatter::formatValue(const qreal value, } if (isTooSmall(userVal, formatSpecifier)) { - Base::Console().Warning("Dimension %s value %.6f is too small for format specifier: %s\n", + Base::Console().warning("Dimension %s value %.6f is too small for format specifier: %s\n", m_dimension->getNameInDocument(), userVal, qPrintable(formatSpecifier)); @@ -356,7 +356,7 @@ QStringList DimensionFormatter::getPrefixSuffixSpec(const QString& fSpec) const result.append(formatSuffix); result.append(match); } else { //printf format not found! - Base::Console().Warning("Warning - no numeric format in formatSpec %s - %s\n", + Base::Console().warning("Warning - no numeric format in formatSpec %s - %s\n", qPrintable(fSpec), m_dimension->getNameInDocument()); result.append(QString()); result.append(QString()); @@ -421,7 +421,7 @@ bool DimensionFormatter::isTooSmall(const double value, const QString& formatSpe return true; } } else { - Base::Console().Warning("Failed to parse dimension format spec\n"); + Base::Console().warning("Failed to parse dimension format spec\n"); } return false; } diff --git a/src/Mod/TechDraw/App/DimensionGeometry.cpp b/src/Mod/TechDraw/App/DimensionGeometry.cpp index 67b3b1cdbe..a6187345e3 100644 --- a/src/Mod/TechDraw/App/DimensionGeometry.cpp +++ b/src/Mod/TechDraw/App/DimensionGeometry.cpp @@ -114,8 +114,8 @@ void pointPair::invertY() void pointPair::dump(const std::string& text) const { - Base::Console().Message("pointPair - %s\n", text.c_str()); - Base::Console().Message("pointPair - first: %s second: %s\n", + Base::Console().message("pointPair - %s\n", text.c_str()); + Base::Console().message("pointPair - first: %s second: %s\n", DU::formatVector(first()).c_str(), DU::formatVector(second()).c_str()); } @@ -233,10 +233,10 @@ anglePoints anglePoints::toDisplayForm(DrawViewPart* dvp) const } void anglePoints::dump(const std::string& text) const { - Base::Console().Message("anglePoints - %s\n", text.c_str()); - Base::Console().Message("anglePoints - ends - first: %s second: %s\n", + Base::Console().message("anglePoints - %s\n", text.c_str()); + Base::Console().message("anglePoints - ends - first: %s second: %s\n", DU::formatVector(first()).c_str(), DU::formatVector(second()).c_str()); - Base::Console().Message("anglePoints - vertex: %s\n", DU::formatVector(vertex()).c_str()); + Base::Console().message("anglePoints - vertex: %s\n", DU::formatVector(vertex()).c_str()); } arcPoints::arcPoints() : @@ -350,17 +350,17 @@ arcPoints arcPoints::toCanonicalForm(DrawViewPart* dvp) const void arcPoints::dump(const std::string& text) const { - Base::Console().Message("arcPoints - %s\n", text.c_str()); - Base::Console().Message("arcPoints - radius: %.3f center: %s\n", radius, + Base::Console().message("arcPoints - %s\n", text.c_str()); + Base::Console().message("arcPoints - radius: %.3f center: %s\n", radius, DrawUtil::formatVector(center).c_str()); - Base::Console().Message("arcPoints - isArc: %d arcCW: %d\n", isArc, arcCW); - Base::Console().Message("arcPoints - onCurve: %s %s\n", + Base::Console().message("arcPoints - isArc: %d arcCW: %d\n", isArc, arcCW); + Base::Console().message("arcPoints - onCurve: %s %s\n", DrawUtil::formatVector(onCurve.first()).c_str(), DrawUtil::formatVector(onCurve.second()).c_str()); - Base::Console().Message("arcPoints - arcEnds: %s %s\n", + Base::Console().message("arcPoints - arcEnds: %s %s\n", DrawUtil::formatVector(arcEnds.first()).c_str(), DrawUtil::formatVector(arcEnds.second()).c_str()); - Base::Console().Message("arcPoints - midArc: %s\n", DrawUtil::formatVector(midArc).c_str()); + Base::Console().message("arcPoints - midArc: %s\n", DrawUtil::formatVector(midArc).c_str()); } @@ -396,7 +396,7 @@ void areaPoint::invertY() void areaPoint::dump(const std::string& text) const { - Base::Console().Message("areaPoint - %s\n", text.c_str()); - Base::Console().Message("areaPoint - area: %.3f center: %s\n", area, + Base::Console().message("areaPoint - %s\n", text.c_str()); + Base::Console().message("areaPoint - area: %.3f center: %s\n", area, DrawUtil::formatVector(center).c_str()); } diff --git a/src/Mod/TechDraw/App/DimensionReferences.cpp b/src/Mod/TechDraw/App/DimensionReferences.cpp index a81f1bbc6b..c756a457f6 100644 --- a/src/Mod/TechDraw/App/DimensionReferences.cpp +++ b/src/Mod/TechDraw/App/DimensionReferences.cpp @@ -150,7 +150,7 @@ TopoDS_Shape ReferenceEntry::getGeometry2d() const } } catch (...) { - Base::Console().Message("RE::getGeometry2d - no shape for dimension 2d reference - gType: **%s**\n", gType.c_str()); + Base::Console().message("RE::getGeometry2d - no shape for dimension 2d reference - gType: **%s**\n", gType.c_str()); } return {}; diff --git a/src/Mod/TechDraw/App/DrawBrokenView.cpp b/src/Mod/TechDraw/App/DrawBrokenView.cpp index 170b09cd3a..0e7fb2c86f 100644 --- a/src/Mod/TechDraw/App/DrawBrokenView.cpp +++ b/src/Mod/TechDraw/App/DrawBrokenView.cpp @@ -151,7 +151,7 @@ App::DocumentObjectExecReturn* DrawBrokenView::execute() TopoDS_Shape shape = getSourceShape(); if (shape.IsNull()) { - Base::Console().Message("DBV::execute - %s - Source shape is Null.\n", getNameInDocument()); + Base::Console().message("DBV::execute - %s - Source shape is Null.\n", getNameInDocument()); return DrawView::execute(); // NOLINT } @@ -188,7 +188,7 @@ TopoDS_Shape DrawBrokenView::apply1Break(const App::DocumentObject& breakObj, co { auto breakPoints = breakPointsFromObj(breakObj); if (breakPoints.first.IsEqual(breakPoints.second, EWTOLERANCE)) { - Base::Console().Message("DBV::apply1Break - break points are equal\n"); + Base::Console().message("DBV::apply1Break - break points are equal\n"); return inShape; } @@ -203,7 +203,7 @@ TopoDS_Shape DrawBrokenView::apply1Break(const App::DocumentObject& breakObj, co auto halfSpace0 = makeHalfSpace(breakPoints.first, moveDir0, breakPoints.second); FCBRepAlgoAPI_Cut mkCut0(inShape, halfSpace0); if (!mkCut0.IsDone()) { - Base::Console().Message("DBV::apply1Break - cut0 failed\n"); + Base::Console().message("DBV::apply1Break - cut0 failed\n"); } TopoDS_Shape cut0 = mkCut0.Shape(); @@ -215,7 +215,7 @@ TopoDS_Shape DrawBrokenView::apply1Break(const App::DocumentObject& breakObj, co auto halfSpace1 = makeHalfSpace(breakPoints.second, moveDir1, breakPoints.first); FCBRepAlgoAPI_Cut mkCut1(inShape, halfSpace1); if (!mkCut1.IsDone()) { - Base::Console().Message("DBV::apply1Break - cut1 failed\n"); + Base::Console().message("DBV::apply1Break - cut1 failed\n"); } TopoDS_Shape cut1 = mkCut1.Shape(); @@ -402,7 +402,7 @@ bool DrawBrokenView::isBreakObjectSketch(const App::DocumentObject& breakObj) } // there should be 2 if (sketchEdges.size() != 2) { - Base::Console().Message("DBV::isBreakObjectSketch - wrong number of edges\n"); + Base::Console().message("DBV::isBreakObjectSketch - wrong number of edges\n"); return false; } // they should both have the same orientation @@ -553,7 +553,7 @@ std::pair DrawBrokenView::breakBoundsFromEdge(co } if (!DU::fpCompare(fabs(direction.Dot(stdY)), 1.0, EWTOLERANCE) ) { - Base::Console().Message("DBV::breakBoundsFromEdge - direction is not X or Y\n"); + Base::Console().message("DBV::breakBoundsFromEdge - direction is not X or Y\n"); // TODO: throw? return nonsense? } @@ -596,7 +596,7 @@ double DrawBrokenView::breaklineLengthFromSketch(const App::DocumentObject& brea if (sketchEdges.size() < 2) { // need 2 edges - Base::Console().Message("DBV::breaklineLengthFromSketch - not enough edges\n"); + Base::Console().message("DBV::breaklineLengthFromSketch - not enough edges\n"); } std::pair ends0 = SU::getEdgeEnds(sketchEdges.front()); @@ -1158,9 +1158,9 @@ bool DrawBrokenView::isDirectionReversed(Base::Vector3d direction) const void DrawBrokenView::printBreakList(const std::string& text, const BreakList& inBreaks) const { - Base::Console().Message("DBV - %s\n", text.c_str()); + Base::Console().message("DBV - %s\n", text.c_str()); for (auto& entry : inBreaks) { - Base::Console().Message(" > label: %s > low: %.3f > high: %.3f > net: %.3f\n", entry.breakObj->Label.getValue(), + Base::Console().message(" > label: %s > low: %.3f > high: %.3f > net: %.3f\n", entry.breakObj->Label.getValue(), entry.lowLimit, entry.highLimit, entry.netRemoved); } } diff --git a/src/Mod/TechDraw/App/DrawComplexSection.cpp b/src/Mod/TechDraw/App/DrawComplexSection.cpp index 76425f6a30..bbc518ecb6 100644 --- a/src/Mod/TechDraw/App/DrawComplexSection.cpp +++ b/src/Mod/TechDraw/App/DrawComplexSection.cpp @@ -174,7 +174,7 @@ TopoDS_Shape DrawComplexSection::makeCuttingTool(double dMax) bool isPositionOK = validateProfilePosition(profileWire, sectionCS); if (!isPositionOK) { //profile is not in a good position. Result might not be right. - Base::Console().Warning("DCS::makeCuttingTool - %s - profile is outside shape box\n", + Base::Console().warning("DCS::makeCuttingTool - %s - profile is outside shape box\n", getNameInDocument()); } @@ -302,7 +302,7 @@ void DrawComplexSection::makeSectionCut(const TopoDS_Shape& baseShape) waitingForAlign(true); } catch (...) { - Base::Console().Message("DCS::makeSectionCut - failed to make alignedPieces"); + Base::Console().message("DCS::makeSectionCut - failed to make alignedPieces"); return; } @@ -326,7 +326,6 @@ void DrawComplexSection::onSectionCutFinished() //for Aligned strategy, cut the rawShape by each segment of the tool void DrawComplexSection::makeAlignedPieces(const TopoDS_Shape& rawShape) { - if (!canBuild(getSectionCS(), CuttingToolWireObject.getValue())) { throw Base::RuntimeError("Profile is parallel to Section Normal"); } @@ -469,7 +468,7 @@ DrawComplexSection::findSectionPlaneIntersections(const TopoDS_Shape& shapeToInt { if (shapeToIntersect.IsNull()) { // this shouldn't happen - Base::Console().Warning("DCS::findSectionPlaneInter - %s - cut shape is Null\n", + Base::Console().warning("DCS::findSectionPlaneInter - %s - cut shape is Null\n", getNameInDocument()); return {}; } @@ -486,7 +485,7 @@ TopoDS_Compound DrawComplexSection::singleToolIntersections(const TopoDS_Shape& App::DocumentObject* toolObj = CuttingToolWireObject.getValue(); if (!isLinearProfile(toolObj)) { //TODO: special handling here - // Base::Console().Message("DCS::singleToolIntersection - profile has curves\n"); + // Base::Console().message("DCS::singleToolIntersection - profile has curves\n"); } BRep_Builder builder; @@ -526,7 +525,7 @@ TopoDS_Compound DrawComplexSection::alignedToolIntersections(const TopoDS_Shape& App::DocumentObject* toolObj = CuttingToolWireObject.getValue(); if (!isLinearProfile(toolObj)) { //TODO: special handling here? - // Base::Console().Message("DCS::alignedToolIntersection - profile has curves\n"); + // Base::Console().message("DCS::alignedToolIntersection - profile has curves\n"); } gp_Pln effectivePlane = getSectionPlane(); @@ -730,7 +729,7 @@ TopoDS_Wire DrawComplexSection::makeSectionLineWire() } else { //probably can't happen as cut profile has been checked before this - Base::Console().Message("DCS::makeSectionLineGeometry - profile is type: %d\n", + Base::Console().message("DCS::makeSectionLineGeometry - profile is type: %d\n", static_cast(sScaled.ShapeType())); return TopoDS_Wire(); } @@ -817,7 +816,7 @@ bool DrawComplexSection::validateOffsetProfile(TopoDS_Wire profile, Base::Vector if (angleRad < angleThresholdRad && angleRad > 0.0) { // profile segment is slightly skewed. possible bad SectionNormal? - Base::Console().Warning("%s profile is slightly skewed. Check SectionNormal low decimal places\n", + Base::Console().warning("%s profile is slightly skewed. Check SectionNormal low decimal places\n", getNameInDocument()); return false; } @@ -1419,13 +1418,13 @@ std::vector> DrawComplexSection::getSegmentViewDi if (!checkSectionCS()) { // results will likely be incorrect // this message will show for every recompute of the complex section. - Base::Console().Warning("Coordinate system for ComplexSection is invalid. Check SectionNormal, Direction or XDirection.\n"); + Base::Console().warning("Coordinate system for ComplexSection is invalid. Check SectionNormal, Direction or XDirection.\n"); } auto profileVector = Base::convertTo(makeProfileVector(profileWire)); auto parallelDot = profileVector.Dot(sectionNormal); if (DU::fpCompare(std::fabs(parallelDot), 1, EWTOLERANCE)) { - Base::Console().Warning("Section normal is parallel to profile vector. Results may be incorrect.\n"); + Base::Console().warning("Section normal is parallel to profile vector. Results may be incorrect.\n"); } auto profilePlanWire = closeProfile(profileWire, sectionNormal, m_shapeSize); diff --git a/src/Mod/TechDraw/App/DrawDimHelper.cpp b/src/Mod/TechDraw/App/DrawDimHelper.cpp index 11f0c81063..f5fd78f9d3 100644 --- a/src/Mod/TechDraw/App/DrawDimHelper.cpp +++ b/src/Mod/TechDraw/App/DrawDimHelper.cpp @@ -81,7 +81,7 @@ DrawViewDimension* DrawDimHelper::makeExtentDim(DrawViewPart* dvp, DrawViewDimension* DrawDimHelper::makeExtentDim(DrawViewPart* dvp, std::vector edgeNames, int direction) { - // Base::Console().Message("DDH::makeExtentDim() - dvp: %s edgeNames: %d\n", + // Base::Console().message("DDH::makeExtentDim() - dvp: %s edgeNames: %d\n", // dvp->Label.getValue(), edgeNames.size()); if (!dvp) { return nullptr; @@ -147,7 +147,7 @@ void DrawDimHelper::makeExtentDim3d(DrawViewPart* dvp, const std::string& dimTyp void DrawDimHelper::makeExtentDim3d(DrawViewPart* dvp, ReferenceVector references, int direction) { - // Base::Console().Message("DDH::makeExtentDim3d() - dvp: %s references: %d\n", + // Base::Console().message("DDH::makeExtentDim3d() - dvp: %s references: %d\n", // dvp->Label.getValue(), references.size()); if (!dvp) { return; @@ -205,7 +205,7 @@ void DrawDimHelper::makeExtentDim3d(DrawViewPart* dvp, ReferenceVector reference std::pair DrawDimHelper::minMax(DrawViewPart* dvp, std::vector edgeNames, int direction) { - // Base::Console().Message("DDH::minMax() - edgeName: %d\n", edgeNames.size()); + // Base::Console().message("DDH::minMax() - edgeName: %d\n", edgeNames.size()); std::pair result; Base::Vector3d refMin; Base::Vector3d refMax; @@ -297,7 +297,7 @@ DrawDimHelper::minMax(DrawViewPart* dvp, std::vector edgeNames, int //computation intensive for a cosmetic result. gp_Pnt DrawDimHelper::findClosestPoint(std::vector inEdges, TopoDS_Edge& boundary) { - // Base::Console().Message("DDH::findClosestPoint() - edges: %d\n", inEdges.size()); + // Base::Console().message("DDH::findClosestPoint() - edges: %d\n", inEdges.size()); // //find an extent point that is actually on one of the curves double minDistance(std::numeric_limits::max()); @@ -305,12 +305,12 @@ gp_Pnt DrawDimHelper::findClosestPoint(std::vector inEdges, TopoDS_ for (auto& edge : inEdges) { BRepExtrema_DistShapeShape extss(edge, boundary); if (!extss.IsDone()) { - Base::Console().Warning( + Base::Console().warning( "DDH::findClosestPoint - BRepExtrema_DistShapeShape failed - 1\n"); continue; } if (extss.NbSolution() == 0) { - Base::Console().Warning( + Base::Console().warning( "DDH::findClosestPoint - BRepExtrema_DistShapeShape failed - 2\n"); continue; } @@ -325,7 +325,7 @@ gp_Pnt DrawDimHelper::findClosestPoint(std::vector inEdges, TopoDS_ std::pair DrawDimHelper::minMax3d(DrawViewPart* dvp, ReferenceVector references, int direction) { - // Base::Console().Message("DDH::minMax3d() - references: %d\n", references.size()); + // Base::Console().message("DDH::minMax3d() - references: %d\n", references.size()); std::pair result; Base::Vector3d refMin; Base::Vector3d refMax; @@ -420,7 +420,7 @@ DrawDimHelper::makeDistDim(DrawViewPart* dvp, std::string dimType, Base::Vector3d inMax,//expects scaled from makeExtentDim bool extent) { - // Base::Console().Message("DDH::makeDistDim() - inMin: %s inMax: %s\n", + // Base::Console().message("DDH::makeDistDim() - inMin: %s inMax: %s\n", // DrawUtil::formatVector(inMin).c_str(), // DrawUtil::formatVector(inMax).c_str()); TechDraw::DrawPage* page = dvp->findParentPage(); diff --git a/src/Mod/TechDraw/App/DrawGeomHatch.cpp b/src/Mod/TechDraw/App/DrawGeomHatch.cpp index 1728e86b2e..9afc7d4539 100644 --- a/src/Mod/TechDraw/App/DrawGeomHatch.cpp +++ b/src/Mod/TechDraw/App/DrawGeomHatch.cpp @@ -126,7 +126,7 @@ void DrawGeomHatch::onChanged(const App::Property* prop) App::DocumentObjectExecReturn *DrawGeomHatch::execute() { -// Base::Console().Message("DGH::execute()\n"); +// Base::Console().message("DGH::execute()\n"); //does execute even need to exist? Its all about the property value changes DrawViewPart* parent = getSourceView(); if (parent) { @@ -145,7 +145,7 @@ void DrawGeomHatch::onDocumentRestored() void DrawGeomHatch::replacePatIncluded(std::string newHatchFileName) { -// Base::Console().Message("DGH::replaceFileIncluded(%s)\n", newHatchFileName.c_str()); +// Base::Console().message("DGH::replaceFileIncluded(%s)\n", newHatchFileName.c_str()); if (newHatchFileName.empty()) { return; } @@ -160,13 +160,13 @@ void DrawGeomHatch::replacePatIncluded(std::string newHatchFileName) void DrawGeomHatch::setupObject() { -// Base::Console().Message("DGH::setupObject()\n"); +// Base::Console().message("DGH::setupObject()\n"); replacePatIncluded(FilePattern.getValue()); } void DrawGeomHatch::unsetupObject() { -// Base::Console().Message("DGH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving()); +// Base::Console().message("DGH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving()); App::DocumentObject* source = Source.getValue(); DrawView* dv = freecad_cast(source); if (dv) { @@ -179,7 +179,7 @@ void DrawGeomHatch::unsetupObject() void DrawGeomHatch::makeLineSets() { -// Base::Console().Message("DGH::makeLineSets()\n"); +// Base::Console().message("DGH::makeLineSets()\n"); if (!PatIncluded.isEmpty() && !NamePattern.isEmpty()) { m_lineSets.clear(); @@ -229,7 +229,7 @@ std::vector DrawGeomHatch::getDecodedSpecsFromFile(std::string file { Base::FileInfo fi(fileSpec); if (!fi.isReadable()) { - Base::Console().Error("DrawGeomHatch::getDecodedSpecsFromFile not able to open %s!\n", fileSpec.c_str()); + Base::Console().error("DrawGeomHatch::getDecodedSpecsFromFile not able to open %s!\n", fileSpec.c_str()); return std::vector(); } return PATLineSpec::getSpecsForPattern(fileSpec, myPattern); @@ -307,7 +307,7 @@ std::vector DrawGeomHatch::getTrimmedLines(DrawViewPart* source, double hatchRotation, Base::Vector3d hatchOffset) { -// Base::Console().Message("DGH::getTrimmedLines() - rotation: %.3f hatchOffset: %s\n", hatchRotation, DrawUtil::formatVector(hatchOffset).c_str()); +// Base::Console().message("DGH::getTrimmedLines() - rotation: %.3f hatchOffset: %s\n", hatchRotation, DrawUtil::formatVector(hatchOffset).c_str()); (void)source; std::vector result; @@ -444,7 +444,7 @@ std::vector DrawGeomHatch::makeEdgeOverlay(PATLineSpec hatchLine, B // we handle hatch as a set of parallel lines made of dashes, here we loop on each line for (int i = firstRepeatIndex ; i <= lastRepeatIndex ; ++i) { Base::Vector3d currentOrigin = origin + static_cast(i) * hatchIntervalAndOffset; - + int firstDashIndex, lastDashIndex; if (std::abs(hatchDirection.x) > std::abs(hatchDirection.y)) { // we compute intersections with minX and maxX firstDashIndex = (hatchDirection.x > 0.) @@ -499,7 +499,7 @@ TopoDS_Edge DrawGeomHatch::makeLine(const Base::Vector3d& s, const Base::Vector3 //! these will be clipped to shape on the gui side std::vector DrawGeomHatch::getFaceOverlay(int iFace) { -// Base::Console().Message("TRACE - DGH::getFaceOverlay(%d)\n", iFace); +// Base::Console().message("TRACE - DGH::getFaceOverlay(%d)\n", iFace); std::vector result; DrawViewPart* source = getSourceView(); if (!source || diff --git a/src/Mod/TechDraw/App/DrawHatch.cpp b/src/Mod/TechDraw/App/DrawHatch.cpp index ac049443ba..904cb10546 100644 --- a/src/Mod/TechDraw/App/DrawHatch.cpp +++ b/src/Mod/TechDraw/App/DrawHatch.cpp @@ -126,7 +126,7 @@ bool DrawHatch::affectsFace(int i) //remove a subElement(Face) from Source PropertyLinkSub bool DrawHatch::removeSub(std::string toRemove) { -// Base::Console().Message("DH::removeSub(%s)\n", toRemove.c_str()); +// Base::Console().message("DH::removeSub(%s)\n", toRemove.c_str()); bool removed = false; const std::vector &sourceNames = Source.getSubValues(); std::vector newList; @@ -146,7 +146,7 @@ bool DrawHatch::removeSub(std::string toRemove) bool DrawHatch::removeSub(int i) { -// Base::Console().Message("DH::removeSub(%d)\n", i); +// Base::Console().message("DH::removeSub(%d)\n", i); std::stringstream ss; ss << "Face" << i; return removeSub(ss.str()); @@ -160,7 +160,7 @@ bool DrawHatch::empty(void) void DrawHatch::replaceFileIncluded(std::string newHatchFileName) { -// Base::Console().Message("DH::replaceFileIncluded(%s)\n", newHatchFileName.c_str()); +// Base::Console().message("DH::replaceFileIncluded(%s)\n", newHatchFileName.c_str()); if (newHatchFileName.empty()) { return; } @@ -175,13 +175,13 @@ void DrawHatch::replaceFileIncluded(std::string newHatchFileName) void DrawHatch::setupObject() { -// Base::Console().Message("DH::setupObject()\n"); +// Base::Console().message("DH::setupObject()\n"); replaceFileIncluded(HatchPattern.getValue()); } void DrawHatch::unsetupObject(void) { -// Base::Console().Message("DH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving()); +// Base::Console().message("DH::unsetupObject() - status: %lu removing: %d \n", getStatus(), isRemoving()); App::DocumentObject* source = Source.getValue(); DrawView* dv = freecad_cast(source); if (dv) { diff --git a/src/Mod/TechDraw/App/DrawLeaderLine.cpp b/src/Mod/TechDraw/App/DrawLeaderLine.cpp index 4b2bf7f63b..e2aa00a4a7 100644 --- a/src/Mod/TechDraw/App/DrawLeaderLine.cpp +++ b/src/Mod/TechDraw/App/DrawLeaderLine.cpp @@ -130,7 +130,7 @@ short DrawLeaderLine::mustExecute() const App::DocumentObjectExecReturn *DrawLeaderLine::execute() { - // Base::Console().Message("DLL::execute()\n"); + // Base::Console().message("DLL::execute()\n"); if (!keepUpdated()) { return App::DocumentObject::StdReturn; } @@ -166,7 +166,7 @@ bool DrawLeaderLine::keepUpdated() double DrawLeaderLine::getBaseScale() const { -// Base::Console().Message("DLL::getBaseScale()\n"); +// Base::Console().message("DLL::getBaseScale()\n"); DrawView* parent = getBaseView(); if (!parent) { return 1.0; @@ -176,7 +176,7 @@ double DrawLeaderLine::getBaseScale() const double DrawLeaderLine::getScale() const { -// Base::Console().Message("DLL::getScale()\n"); +// Base::Console().message("DLL::getScale()\n"); if (!Scalable.getValue()) { return 1.0; } @@ -296,9 +296,9 @@ Base::Vector3d DrawLeaderLine::lastSegmentDirection() const //! pagePoints are in mm from bottom left of page. DrawLeaderLine* DrawLeaderLine::makeLeader(DrawViewPart* parent, std::vector pagePoints, int iStartSymbol, int iEndSymbol) { - Base::Console().Message("DLL::makeLeader(%s, %d, %d, %d)\n", parent->getNameInDocument(), pagePoints.size(), iStartSymbol, iEndSymbol); + Base::Console().message("DLL::makeLeader(%s, %d, %d, %d)\n", parent->getNameInDocument(), pagePoints.size(), iStartSymbol, iEndSymbol); if (pagePoints.size() < 2) { - Base::Console().Message("DLL::makeLeader - not enough pagePoints\n"); + Base::Console().message("DLL::makeLeader - not enough pagePoints\n"); return {}; } @@ -364,7 +364,7 @@ std::vector DrawLeaderLine::getScaledAndRotatedPoints(bool doSc auto dvp = getBaseView(); if (!dvp) { // document is restoring? - // Base::Console().Message("DLL::getScaledAndRotatedPoints - no DV\n"); + // Base::Console().message("DLL::getScaledAndRotatedPoints - no DV\n"); return {}; } @@ -455,7 +455,7 @@ bool DrawLeaderLine::isParentReady() const if (!parent || (dvp && !dvp->hasGeometry())) { // still restoring or // we are attached to a dvp that has no geometry, so don't bother trying to draw yet - Base::Console().Message("DLL:: - no parent or geometry\n"); + Base::Console().message("DLL:: - no parent or geometry\n"); return false; } return true; @@ -468,9 +468,9 @@ bool DrawLeaderLine::getDefAuto() const void DrawLeaderLine::dumpWaypoints(const std::vector &points, const std::string &label) { - Base::Console().Message("DLL::dumpWaypoints - %s\n", label.c_str()); + Base::Console().message("DLL::dumpWaypoints - %s\n", label.c_str()); for (auto& p : points) { - Base::Console().Message(">>>> a point: %s\n", DU::formatVector(p).c_str()); + Base::Console().message(">>>> a point: %s\n", DU::formatVector(p).c_str()); } } diff --git a/src/Mod/TechDraw/App/DrawPage.cpp b/src/Mod/TechDraw/App/DrawPage.cpp index fb86cc0b4b..2c3c982b0c 100644 --- a/src/Mod/TechDraw/App/DrawPage.cpp +++ b/src/Mod/TechDraw/App/DrawPage.cpp @@ -99,7 +99,7 @@ void DrawPage::onChanged(const App::Property* prop) if (prop == &KeepUpdated && KeepUpdated.getValue()) { if (!isRestoring() && !isUnsetting()) { //would be nice if this message was displayed immediately instead of after the recomputeFeature - Base::Console().Message("Rebuilding Views for: %s/%s\n", getNameInDocument(), + Base::Console().message("Rebuilding Views for: %s/%s\n", getNameInDocument(), Label.getValue()); updateAllViews(); purgeTouched(); @@ -270,7 +270,7 @@ int DrawPage::addView(App::DocumentObject* docObj, bool setPosition) //check if View fits on Page if (!view->checkFit(this)) { - Base::Console().Warning("%s is larger than page. Will be scaled.\n", + Base::Console().warning("%s is larger than page. Will be scaled.\n", view->getNameInDocument()); view->ScaleType.setValue("Automatic"); } @@ -325,7 +325,7 @@ void DrawPage::onDocumentRestored() void DrawPage::redrawCommand() { - // Base::Console().Message("DP::redrawCommand()\n"); + // Base::Console().message("DP::redrawCommand()\n"); forceRedraw(true); updateAllViews(); forceRedraw(false); @@ -333,7 +333,7 @@ void DrawPage::redrawCommand() void DrawPage::updateAllViews() { - // Base::Console().Message("DP::updateAllViews()\n"); + // Base::Console().message("DP::updateAllViews()\n"); //unordered list of views within page std::vector featViews = getAllViews(); @@ -374,7 +374,7 @@ std::vector DrawPage::getViews() const v = static_cast(v)->getLinkedObject(); addChildren = true; } - + if (!v->isDerivedFrom()) { continue; } @@ -441,7 +441,7 @@ void DrawPage::unsetupObject() Views.setValues(emptyViews); } catch (...) { - Base::Console().Warning("DP::unsetupObject - %s - error while deleting children\n", + Base::Console().warning("DP::unsetupObject - %s - error while deleting children\n", getNameInDocument()); } diff --git a/src/Mod/TechDraw/App/DrawProjGroup.cpp b/src/Mod/TechDraw/App/DrawProjGroup.cpp index 591ada8f52..fd100ed107 100644 --- a/src/Mod/TechDraw/App/DrawProjGroup.cpp +++ b/src/Mod/TechDraw/App/DrawProjGroup.cpp @@ -92,7 +92,7 @@ DrawProjGroup::DrawProjGroup() //TODO: this duplicates code in DVP std::vector DrawProjGroup::getAllSources() const { - // Base::Console().Message("DPG::getAllSources()\n"); + // Base::Console().message("DPG::getAllSources()\n"); const std::vector links = Source.getValues(); std::vector xLinks; XSource.getLinks(xLinks); @@ -169,7 +169,7 @@ void DrawProjGroup::onChanged(const App::Property* prop) App::DocumentObjectExecReturn* DrawProjGroup::execute() { - // Base::Console().Message("DPG::execute() - %s - waitingForChildren: %d\n", + // Base::Console().message("DPG::execute() - %s - waitingForChildren: %d\n", // getNameInDocument(), waitingForChildren()); if (!keepUpdated()) return App::DocumentObject::StdReturn; @@ -227,7 +227,7 @@ short DrawProjGroup::mustExecute() const void DrawProjGroup::reportReady() { - // Base::Console().Message("DPG::reportReady - waitingForChildren: %d\n", waitingForChildren()); + // Base::Console().message("DPG::reportReady - waitingForChildren: %d\n", waitingForChildren()); if (waitingForChildren()) { //not ready yet return; @@ -255,7 +255,7 @@ TechDraw::DrawPage* DrawProjGroup::getPage() const { return findParentPage(); } //does the unscaled DPG fit on the page? bool DrawProjGroup::checkFit() const { - // Base::Console().Message("DPG::checkFit() - %s\n", getNameInDocument()); + // Base::Console().message("DPG::checkFit() - %s\n", getNameInDocument()); if (waitingForChildren()) { //assume everything fits since we don't know what size the children are return true; @@ -268,7 +268,7 @@ bool DrawProjGroup::checkFit() const bool DrawProjGroup::checkFit(DrawPage* page) const { - // Base::Console().Message("DPG::checkFit(page) - %s\n", getNameInDocument()); + // Base::Console().message("DPG::checkFit(page) - %s\n", getNameInDocument()); if (waitingForChildren()) { return true; } @@ -283,7 +283,7 @@ bool DrawProjGroup::checkFit(DrawPage* page) const //calculate a scale that fits all views on page double DrawProjGroup::autoScale() const { - // Base::Console().Message("DPG::autoScale() - %s\n", getNameInDocument()); + // Base::Console().message("DPG::autoScale() - %s\n", getNameInDocument()); auto page = findParentPage(); if (!page) { throw Base::RuntimeError("No page is assigned to this feature"); @@ -293,7 +293,7 @@ double DrawProjGroup::autoScale() const double DrawProjGroup::autoScale(double w, double h) const { - // Base::Console().Message("DPG::autoScale(%.3f, %.3f) - %s\n", w, h, getNameInDocument()); + // Base::Console().message("DPG::autoScale(%.3f, %.3f) - %s\n", w, h, getNameInDocument()); //get the space used by views + white space at 1:1 scale QRectF bigBox = getRect(false);//unscaled box @@ -309,7 +309,7 @@ QRectF DrawProjGroup::getRect() const { return getRect(true); } QRectF DrawProjGroup::getRect(bool scaled) const { - // Base::Console().Message("DPG::getRect - views: %d\n", Views.getValues().size()); + // Base::Console().message("DPG::getRect - views: %d\n", Views.getValues().size()); std::array viewPtrs; arrangeViewPointers(viewPtrs); double totalWidth, totalHeight; @@ -359,7 +359,7 @@ App::DocumentObject* DrawProjGroup::getProjObj(const char* viewProjType) const auto projPtr(freecad_cast(it)); if (!projPtr) { //if an element in Views is not a DPGI, something really bad has happened somewhere - Base::Console().Error("PROBLEM - DPG::getProjObj - non DPGI entry in Views! %s / %s\n", + Base::Console().error("PROBLEM - DPG::getProjObj - non DPGI entry in Views! %s / %s\n", getNameInDocument(), viewProjType); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); } @@ -377,7 +377,7 @@ DrawProjGroupItem* DrawProjGroup::getProjItem(const char* viewProjType) const auto result(dynamic_cast(docObj)); if (!result && docObj) { //should never have a item in DPG that is not a DPGI. - Base::Console().Error("PROBLEM - DPG::getProjItem finds non-DPGI in Group %s / %s\n", + Base::Console().error("PROBLEM - DPG::getProjItem finds non-DPGI in Group %s / %s\n", getNameInDocument(), viewProjType); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); } @@ -409,7 +409,7 @@ bool DrawProjGroup::hasProjection(const char* viewProjType) const auto view(dynamic_cast(it)); if (!view) { //should never have a item in DPG that is not a DPGI. - Base::Console().Error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n", + Base::Console().error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n", getNameInDocument(), viewProjType); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); } @@ -423,12 +423,12 @@ bool DrawProjGroup::hasProjection(const char* viewProjType) const bool DrawProjGroup::canDelete(const char* viewProjType) const { - // Base::Console().Message("DPG::canDelete(%s)\n", viewProjType); + // Base::Console().message("DPG::canDelete(%s)\n", viewProjType); for (const auto it : Views.getValues()) { auto view(dynamic_cast(it)); if (!view) { //should never have a item in DPG that is not a DPGI. - Base::Console().Error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n", + Base::Console().error("PROBLEM - DPG::hasProjection finds non-DPGI in Group %s / %s\n", getNameInDocument(), viewProjType); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); } @@ -453,13 +453,13 @@ bool DrawProjGroup::canDelete(const char* viewProjType) const App::DocumentObject* DrawProjGroup::addProjection(const char* viewProjType) { - // Base::Console().Message("DPG::addProjection(%s)\n", viewProjType ? viewProjType : "null"); + // Base::Console().message("DPG::addProjection(%s)\n", viewProjType ? viewProjType : "null"); DrawProjGroupItem* view(nullptr); std::pair vecs; DrawPage* dp = findParentPage(); if (!dp) - Base::Console().Error("DPG:addProjection - %s - DPG is not on a page!\n", + Base::Console().error("DPG:addProjection - %s - DPG is not on a page!\n", getNameInDocument()); if (checkViewProjType(viewProjType) && !hasProjection(viewProjType)) { @@ -467,7 +467,7 @@ App::DocumentObject* DrawProjGroup::addProjection(const char* viewProjType) view = getDocument()->addObject(FeatName.c_str()); if (!view) { //should never happen that we create a DPGI that isn't a DPGI!! - Base::Console().Error("PROBLEM - DPG::addProjection - created a non DPGI! %s / %s\n", + Base::Console().error("PROBLEM - DPG::addProjection - created a non DPGI! %s / %s\n", getNameInDocument(), viewProjType); throw Base::TypeError("Error: new projection is not a DPGI!"); } @@ -523,7 +523,7 @@ int DrawProjGroup::removeProjection(const char* viewProjType) } else { //if an element in Views is not a DPGI, something really bad has happened somewhere - Base::Console().Error( + Base::Console().error( "PROBLEM - DPG::removeProjection - tries to remove non DPGI! %s / %s\n", getNameInDocument(), viewProjType); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); @@ -547,7 +547,7 @@ int DrawProjGroup::purgeProjections() } else { //if an element in Views is not a DPGI, something really bad has happened somewhere - Base::Console().Error("PROBLEM - DPG::purgeProjection - tries to remove non DPGI! %s\n", + Base::Console().error("PROBLEM - DPG::purgeProjection - tries to remove non DPGI! %s\n", getNameInDocument()); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); } @@ -568,13 +568,13 @@ std::pair DrawProjGroup::getDirsFromFront(DrawPr std::pair DrawProjGroup::getDirsFromFront(ProjDirection viewType) { - // Base::Console().Message("DPG::getDirsFromFront(%s)\n", viewType.c_str()); + // Base::Console().message("DPG::getDirsFromFront(%s)\n", viewType.c_str()); std::pair result; Base::Vector3d projDir, rotVec; DrawProjGroupItem* anch = getAnchor(); if (!anch) { - Base::Console().Warning("DPG::getDirsFromFront - %s - No Anchor!\n", Label.getValue()); + Base::Console().warning("DPG::getDirsFromFront - %s - No Anchor!\n", Label.getValue()); throw Base::RuntimeError("Project Group missing Anchor projection item"); } @@ -594,7 +594,7 @@ gp_Dir DrawProjGroup::vec2dir(Base::Vector3d v) //this can be improved. this implementation positions views too far apart. Base::Vector3d DrawProjGroup::getXYPosition(const char* viewTypeCStr) { - // Base::Console().Message("DPG::getXYPosition(%s)\n", Label.getValue()); + // Base::Console().message("DPG::getXYPosition(%s)\n", Label.getValue()); // Third Angle: FTL T FTRight 0 1 2 // L F Right Rear 3 4 5 6 // FBL B FBRight 7 8 9 @@ -761,7 +761,7 @@ int DrawProjGroup::getViewIndex(const char* viewTypeCStr) const projType = dp->ProjectionType.getValueAsString(); } else { - Base::Console().Warning( + Base::Console().warning( "DPG: %s - can not find parent page. Using default Projection Type. (1)\n", getNameInDocument()); int projConv = getDefProjConv(); @@ -835,9 +835,9 @@ void DrawProjGroup::arrangeViewPointers( projType = dp->ProjectionType.getValueAsString(); } else { - Base::Console().Error("DPG:arrangeViewPointers - %s - DPG is not on a page!\n", + Base::Console().error("DPG:arrangeViewPointers - %s - DPG is not on a page!\n", getNameInDocument()); - Base::Console().Warning( + Base::Console().warning( "DPG:arrangeViewPointers - using system default Projection Type\n", getNameInDocument()); int projConv = getDefProjConv(); @@ -850,7 +850,7 @@ void DrawProjGroup::arrangeViewPointers( // Iterate through views and populate viewPtrs if (strcmp(projType, "Third Angle") != 0 && strcmp(projType, "First Angle") != 0) { - Base::Console().Warning("DPG: %s - unknown Projection convention: %s\n", + Base::Console().warning("DPG: %s - unknown Projection convention: %s\n", getNameInDocument(), projType); throw Base::ValueError( "Unknown Projection convention in DrawProjGroup::arrangeViewPointers"); @@ -869,7 +869,7 @@ void DrawProjGroup::arrangeViewPointers( auto oView(freecad_cast(it)); if (!oView) { //if an element in Views is not a DPGI, something really bad has happened somewhere - Base::Console().Error( + Base::Console().error( "PROBLEM - DPG::arrangeViewPointers - non DPGI in Views! %s\n", getNameInDocument()); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); @@ -908,7 +908,7 @@ void DrawProjGroup::arrangeViewPointers( viewPtrs[thirdAngle ? 9 : 0] = oView; } else { - Base::Console().Warning("DPG: %s - unknown view type: %s. \n", + Base::Console().warning("DPG: %s - unknown view type: %s. \n", getNameInDocument(), viewTypeCStr); throw Base::TypeError( "Unknown view type in DrawProjGroup::arrangeViewPointers."); @@ -942,7 +942,7 @@ void DrawProjGroup::makeViewBbs(std::array(it)); if (!view) { @@ -956,7 +956,7 @@ void DrawProjGroup::recomputeChildren() void DrawProjGroup::autoPositionChildren() { - // Base::Console().Message("DPG::autoPositionChildren() - %s - waiting: %d\n", + // Base::Console().message("DPG::autoPositionChildren() - %s - waiting: %d\n", // getNameInDocument(), waitingForChildren()); for (const auto it : Views.getValues()) { auto view(freecad_cast(it)); @@ -975,7 +975,7 @@ void DrawProjGroup::autoPositionChildren() */ void DrawProjGroup::updateChildrenScale() { - // Base::Console().Message("DPG::updateChildrenScale() - waiting: %d\n", waitingForChildren()); + // Base::Console().message("DPG::updateChildrenScale() - waiting: %d\n", waitingForChildren()); for (const auto it : Views.getValues()) { auto view(freecad_cast(it)); if (!view) { @@ -998,7 +998,7 @@ void DrawProjGroup::updateChildrenSource() auto view(freecad_cast(it)); if (!view) { //if an element in Views is not a DPGI, something really bad has happened somewhere - Base::Console().Error( + Base::Console().error( "PROBLEM - DPG::updateChildrenSource - non DPGI entry in Views! %s\n", getNameInDocument()); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); @@ -1022,7 +1022,7 @@ void DrawProjGroup::updateChildrenLock() auto view(freecad_cast(it)); if (!view) { //if an element in Views is not a DPGI, something really bad has happened somewhere - Base::Console().Error( + Base::Console().error( "PROBLEM - DPG::updateChildrenLock - non DPGI entry in Views! %s\n", getNameInDocument()); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); @@ -1037,7 +1037,7 @@ void DrawProjGroup::updateChildrenEnforce(void) auto view(freecad_cast(it)); if (!view) { //if an element in Views is not a DPGI, something really bad has happened somewhere - Base::Console().Error( + Base::Console().error( "PROBLEM - DPG::updateChildrenEnforce - non DPGI entry in Views! %s\n", getNameInDocument()); throw Base::TypeError("Error: projection in DPG list is not a DPGI!"); @@ -1183,7 +1183,7 @@ int DrawProjGroup::getDefProjConv() const { return Preferences::projectionAngle( */ void DrawProjGroup::dumpISO(const char* title) { - Base::Console().Message("DPG ISO: %s\n", title); + Base::Console().message("DPG ISO: %s\n", title); for (auto& docObj : Views.getValues()) { Base::Vector3d dir; Base::Vector3d axis; @@ -1192,7 +1192,7 @@ void DrawProjGroup::dumpISO(const char* title) dir = v->Direction.getValue(); axis = v->getXDirection(); - Base::Console().Message("%s: %s/%s\n", t.c_str(), DrawUtil::formatVector(dir).c_str(), + Base::Console().message("%s: %s/%s\n", t.c_str(), DrawUtil::formatVector(dir).c_str(), DrawUtil::formatVector(axis).c_str()); } } diff --git a/src/Mod/TechDraw/App/DrawProjGroupItem.cpp b/src/Mod/TechDraw/App/DrawProjGroupItem.cpp index 489e72afa3..1bba85f636 100644 --- a/src/Mod/TechDraw/App/DrawProjGroupItem.cpp +++ b/src/Mod/TechDraw/App/DrawProjGroupItem.cpp @@ -108,7 +108,7 @@ bool DrawProjGroupItem::showLock() const App::DocumentObjectExecReturn *DrawProjGroupItem::execute() { -// Base::Console().Message("DPGI::execute() - %s / %s\n", getNameInDocument(), Label.getValue()); +// Base::Console().message("DPGI::execute() - %s / %s\n", getNameInDocument(), Label.getValue()); if (!keepUpdated()) { return DrawView::execute(); } @@ -135,7 +135,7 @@ App::DocumentObjectExecReturn *DrawProjGroupItem::execute() void DrawProjGroupItem::postHlrTasks() { -// Base::Console().Message("DPGI::postHlrTasks() - %s\n", getNameInDocument()); +// Base::Console().message("DPGI::postHlrTasks() - %s\n", getNameInDocument()); DrawViewPart::postHlrTasks(); DrawProjGroup* pGroup = getPGroup(); @@ -154,7 +154,7 @@ void DrawProjGroupItem::autoPosition() if (!pGroup) { return; } -// Base::Console().Message("DPGI::autoPosition(%s)\n", Label.getValue()); +// Base::Console().message("DPGI::autoPosition(%s)\n", Label.getValue()); if (LockPosition.getValue()) { return; } @@ -171,7 +171,7 @@ void DrawProjGroupItem::autoPosition() void DrawProjGroupItem::onDocumentRestored() { -// Base::Console().Message("DPGI::onDocumentRestored() - %s\n", getNameInDocument()); +// Base::Console().message("DPGI::onDocumentRestored() - %s\n", getNameInDocument()); DrawView::onDocumentRestored(); App::DocumentObjectExecReturn* rc = DrawProjGroupItem::execute(); if (rc) { @@ -191,7 +191,7 @@ bool DrawProjGroupItem::isAnchor() const Base::Vector3d DrawProjGroupItem::getXDirection() const { -// Base::Console().Message("DPGI::getXDirection() - %s\n", Label.getValue()); +// Base::Console().message("DPGI::getXDirection() - %s\n", Label.getValue()); Base::Vector3d result(1.0, 0.0, 0.0); //default X App::Property* prop = getPropertyByName("XDirection"); if (prop) { @@ -210,14 +210,14 @@ Base::Vector3d DrawProjGroupItem::getXDirection() const } } else { //not sure this branch can actually happen - Base::Console().Message("DPGI::getXDirection - unexpected branch taken!\n"); + Base::Console().message("DPGI::getXDirection - unexpected branch taken!\n"); prop = getPropertyByName("RotationVector"); if (prop) { result = RotationVector.getValue(); } else { - Base::Console().Message("DPGI::getXDirection - missing RotationVector and XDirection\n"); + Base::Console().message("DPGI::getXDirection - missing RotationVector and XDirection\n"); } } return result; @@ -227,7 +227,7 @@ Base::Vector3d DrawProjGroupItem::getLegacyX(const Base::Vector3d& pt, const Base::Vector3d& axis, const bool flip) const { -// Base::Console().Message("DPGI::getLegacyX() - %s\n", Label.getValue()); +// Base::Console().message("DPGI::getLegacyX() - %s\n", Label.getValue()); App::Property* prop = getPropertyByName("RotationVector"); if (prop) { Base::Vector3d result = RotationVector.getValue(); @@ -312,7 +312,7 @@ void DrawProjGroupItem::unsetupObject() } if (getPGroup()->getAnchor() == this && !getPGroup()->isUnsetting()) { - Base::Console().Warning("Warning - DPG (%s/%s) may be corrupt - Anchor deleted\n", + Base::Console().warning("Warning - DPG (%s/%s) may be corrupt - Anchor deleted\n", getPGroup()->getNameInDocument(), getPGroup()->Label.getValue()); getPGroup()->Anchor.setValue(nullptr); //this catches situation where DPGI is deleted w/o DPG::removeProjection } diff --git a/src/Mod/TechDraw/App/DrawProjectSplit.cpp b/src/Mod/TechDraw/App/DrawProjectSplit.cpp index 7853e729b6..dbf69c2f21 100644 --- a/src/Mod/TechDraw/App/DrawProjectSplit.cpp +++ b/src/Mod/TechDraw/App/DrawProjectSplit.cpp @@ -98,7 +98,7 @@ std::vector DrawProjectSplit::getEdgesForWalker(TopoDS_Shape shape, if (!DrawUtil::isZeroEdge(e, 2.0 * EWTOLERANCE)) { nonZero.push_back(e); } else { - Base::Console().Message("DPS::getEdgesForWalker found ZeroEdge!\n"); + Base::Console().message("DPS::getEdgesForWalker found ZeroEdge!\n"); } } @@ -140,7 +140,7 @@ bool DrawProjectSplit::isOnEdge(TopoDS_Edge e, TopoDS_Vertex v, double& param, b double dist = DrawUtil::simpleMinDist(v, e); if (dist < 0.0) { - Base::Console().Error("DPS::isOnEdge - simpleMinDist failed: %.3f\n", dist); + Base::Console().error("DPS::isOnEdge - simpleMinDist failed: %.3f\n", dist); return false; } else if (dist < Precision::Confusion()) { const gp_Pnt pt = BRep_Tool::Pnt(v); //have to duplicate method 3 to get param @@ -222,7 +222,7 @@ std::vector DrawProjectSplit::split1Edge(TopoDS_Edge e, std::vector double last = BRepLProp_CurveTool::LastParameter(adapt); if (first > last) { //TODO parms.reverse(); - Base::Console().Message("DPS::split1Edge - edge is backwards!\n"); + Base::Console().message("DPS::split1Edge - edge is backwards!\n"); return result; } std::vector parms; @@ -245,7 +245,7 @@ std::vector DrawProjectSplit::split1Edge(TopoDS_Edge e, std::vector } } catch (Standard_Failure&) { - Base::Console().Message("DPS::split1Edge failed building edge segment\n"); + Base::Console().message("DPS::split1Edge failed building edge segment\n"); } } return result; @@ -322,7 +322,7 @@ std::vector DrawProjectSplit::removeDuplicateEdges(std::vector DrawProjectSplit::scrubEdges(const std::vector& origEdges, std::vector &closedEdges) { -// Base::Console().Message("DPS::scrubEdges() - BaseGeom in: %d\n", origEdges.size()); +// Base::Console().message("DPS::scrubEdges() - BaseGeom in: %d\n", origEdges.size()); //make a copy of the input edges so the loose tolerances of face finding are //not applied to the real edge geometry. See TopoDS_Shape::TShape(). std::vector copyEdges; @@ -420,7 +420,7 @@ std::vector DrawProjectSplit::scrubEdges(const std::vector DrawProjectSplit::scrubEdges(std::vector& origEdges, std::vector &closedEdges) { -// Base::Console().Message("DPS::scrubEdges() - TopoDS_Edges in: %d\n", origEdges.size()); +// Base::Console().message("DPS::scrubEdges() - TopoDS_Edges in: %d\n", origEdges.size()); std::vector openEdges; // We must have at least 2 edges to perform the General Fuse operation @@ -428,7 +428,7 @@ std::vector DrawProjectSplit::scrubEdges(std::vector& if (origEdges.empty()) { //how did this happen? if Scale is zero, all the edges will be zero length, //but Scale property has constraint, so this shouldn't happen! - //Base::Console().Message("DPS::scrubEdges(2) - origEdges is empty\n"); + //Base::Console().message("DPS::scrubEdges(2) - origEdges is empty\n"); } else { TopoDS_Edge &edge = origEdges.front(); @@ -466,7 +466,7 @@ std::vector DrawProjectSplit::scrubEdges(std::vector& Standard_SStream errorStream; bopBuilder.DumpErrors(errorStream); const std::string &errorStr = errorStream.str(); - Base::Console().Error("DrawProjectSplit::scrubEdges - OCC fuse failed with error(s):\n%s\n", errorStr.c_str()); + Base::Console().error("DrawProjectSplit::scrubEdges - OCC fuse failed with error(s):\n%s\n", errorStr.c_str()); return std::vector(); } @@ -474,7 +474,7 @@ std::vector DrawProjectSplit::scrubEdges(std::vector& Standard_SStream warnStream; bopBuilder.DumpWarnings(warnStream); const std::string &warnStr = warnStream.str(); - Base::Console().Warning("DrawProjectSplit::scrubEdges - OCC fuse raised warning(s):\n%s\n", warnStr.c_str()); + Base::Console().warning("DrawProjectSplit::scrubEdges - OCC fuse raised warning(s):\n%s\n", warnStr.c_str()); } const TopoDS_Shape &bopResult = bopBuilder.Shape(); @@ -529,7 +529,7 @@ vertexMap DrawProjectSplit::getUniqueVertexes(std::vector inEdges) std::vector DrawProjectSplit::pruneUnconnected(vertexMap verts, std::vector edges) { -// Base::Console().Message("DPS::pruneUnconnected() - edges in: %d\n", edges.size()); +// Base::Console().message("DPS::pruneUnconnected() - edges in: %d\n", edges.size()); //check if edge ends are used at least twice => edge is joined to another edge std::vector newPile; std::vector deadEnds; @@ -589,7 +589,7 @@ bool DrawProjectSplit::sameEndPoints(const TopoDS_Edge &e1, const TopoDS_Edge &e //eliminate edges that overlap another edge std::vector DrawProjectSplit::removeOverlapEdges(const std::vector &inEdges) { -// Base::Console().Message("DPS::removeOverlapEdges() - %d edges in\n", inEdges.size()); +// Base::Console().message("DPS::removeOverlapEdges() - %d edges in\n", inEdges.size()); std::vector outEdges; std::vector overlapEdges; std::vector skipThisEdge(inEdges.size(), false); @@ -634,7 +634,7 @@ std::vector DrawProjectSplit::removeOverlapEdges(const std::vector< outEdges.insert(outEdges.end(), overlapEdges.begin(), overlapEdges.end()); } -// Base::Console().Message("DPS::removeOverlapEdges() - %d edges out\n", outEdges.size()); +// Base::Console().message("DPS::removeOverlapEdges() - %d edges out\n", outEdges.size()); return outEdges; } @@ -720,10 +720,10 @@ bool DrawProjectSplit::boxesIntersect(const TopoDS_Edge &edge0, const TopoDS_Edg //this is an aid to debugging and isn't used in normal processing. void DrawProjectSplit::dumpVertexMap(vertexMap verts) { - Base::Console().Message("DPS::dumpVertexMap - %d verts\n", verts.size()); + Base::Console().message("DPS::dumpVertexMap - %d verts\n", verts.size()); int iVert = 0; for (auto& item : verts) { - Base::Console().Message("%d: %s - %d\n",iVert, + Base::Console().message("%d: %s - %d\n",iVert, DrawUtil::formatVector(item.first).c_str(), item.second); iVert++; } diff --git a/src/Mod/TechDraw/App/DrawRichAnno.cpp b/src/Mod/TechDraw/App/DrawRichAnno.cpp index 24af1a1c02..ebbc353a9f 100644 --- a/src/Mod/TechDraw/App/DrawRichAnno.cpp +++ b/src/Mod/TechDraw/App/DrawRichAnno.cpp @@ -78,7 +78,7 @@ short DrawRichAnno::mustExecute() const App::DocumentObjectExecReturn *DrawRichAnno::execute() { -// Base::Console().Message("DRA::execute() - @ (%.3f, %.3f)\n", X.getValue(), Y.getValue()); +// Base::Console().message("DRA::execute() - @ (%.3f, %.3f)\n", X.getValue(), Y.getValue()); if (!keepUpdated()) { return App::DocumentObject::StdReturn; } @@ -97,7 +97,7 @@ DrawView* DrawRichAnno::getBaseView() const //more than 1 DrawPage claims a DrawRichAnno. DrawPage* DrawRichAnno::findParentPage() const { -// Base::Console().Message("DRA::findParentPage()\n"); +// Base::Console().message("DRA::findParentPage()\n"); if (!AnnoParent.getValue()) { return DrawView::findParentPage(); } diff --git a/src/Mod/TechDraw/App/DrawSVGTemplate.cpp b/src/Mod/TechDraw/App/DrawSVGTemplate.cpp index 3734327708..4150d95230 100644 --- a/src/Mod/TechDraw/App/DrawSVGTemplate.cpp +++ b/src/Mod/TechDraw/App/DrawSVGTemplate.cpp @@ -102,7 +102,7 @@ void DrawSVGTemplate::onSettingDocument() //? should this check for creation of a template or a page? void DrawSVGTemplate::slotCreatedObject(const App::DocumentObject& obj) { - // Base::Console().Message("DSVGT::slotCreatedObject()\n"); + // Base::Console().message("DSVGT::slotCreatedObject()\n"); if (!obj.isDerivedFrom()) { // we don't care return; @@ -112,7 +112,7 @@ void DrawSVGTemplate::slotCreatedObject(const App::DocumentObject& obj) void DrawSVGTemplate::slotDeletedObject(const App::DocumentObject& obj) { - // Base::Console().Message("DSVGT::slotDeletedObject()\n"); + // Base::Console().message("DSVGT::slotDeletedObject()\n"); if (!obj.isDerivedFrom()) { // we don't care return; @@ -206,12 +206,12 @@ bool DrawSVGTemplate::getTemplateDocument(std::string sourceFile, QDomDocument& } QFile templateFile(QString::fromStdString(sourceFile)); if (!templateFile.open(QIODevice::ReadOnly)) { - Base::Console().Error("DrawSVGTemplate::processTemplate can't read embedded template %s!\n", PageResult.getValue()); + Base::Console().error("DrawSVGTemplate::processTemplate can't read embedded template %s!\n", PageResult.getValue()); return false; } if (!templateDocument.setContent(&templateFile)) { - Base::Console().Error("DrawSVGTemplate::processTemplate - failed to parse file: %s\n", + Base::Console().error("DrawSVGTemplate::processTemplate - failed to parse file: %s\n", PageResult.getValue()); return false; } diff --git a/src/Mod/TechDraw/App/DrawTile.cpp b/src/Mod/TechDraw/App/DrawTile.cpp index a970831d2c..aba1b00668 100644 --- a/src/Mod/TechDraw/App/DrawTile.cpp +++ b/src/Mod/TechDraw/App/DrawTile.cpp @@ -69,7 +69,7 @@ short DrawTile::mustExecute() const App::DocumentObjectExecReturn *DrawTile::execute() { -// Base::Console().Message("DT::execute()\n"); +// Base::Console().message("DT::execute()\n"); return DocumentObject::execute(); } diff --git a/src/Mod/TechDraw/App/DrawTileWeld.cpp b/src/Mod/TechDraw/App/DrawTileWeld.cpp index 2f0b8d3910..f060344f80 100644 --- a/src/Mod/TechDraw/App/DrawTileWeld.cpp +++ b/src/Mod/TechDraw/App/DrawTileWeld.cpp @@ -78,7 +78,7 @@ void DrawTileWeld::onChanged(const App::Property* prop) void DrawTileWeld::replaceFileIncluded(std::string newSymbolFile) { -// Base::Console().Message("DTW::replaceFileIncluded(%s)\n", newSymbolFile.c_str()); +// Base::Console().message("DTW::replaceFileIncluded(%s)\n", newSymbolFile.c_str()); if (newSymbolFile.empty()) { return; } diff --git a/src/Mod/TechDraw/App/DrawUtil.cpp b/src/Mod/TechDraw/App/DrawUtil.cpp index f3ca7ea551..efeaaef384 100644 --- a/src/Mod/TechDraw/App/DrawUtil.cpp +++ b/src/Mod/TechDraw/App/DrawUtil.cpp @@ -78,7 +78,7 @@ using namespace TechDraw; /*static*/ int DrawUtil::getIndexFromName(const std::string& geomName) { - // Base::Console().Message("DU::getIndexFromName(%s)\n", geomName.c_str()); + // Base::Console().message("DU::getIndexFromName(%s)\n", geomName.c_str()); boost::regex re("\\d+$");// one of more digits at end of string boost::match_results what; boost::match_flag_type flags = boost::match_default; @@ -189,7 +189,7 @@ double DrawUtil::simpleMinDist(TopoDS_Shape s1, TopoDS_Shape s2) { BRepExtrema_DistShapeShape extss(s1, s2); if (!extss.IsDone()) { - Base::Console().Message("DU::simpleMinDist - BRepExtrema_DistShapeShape failed"); + Base::Console().message("DU::simpleMinDist - BRepExtrema_DistShapeShape failed"); return -1; } int count = extss.NbSolution(); @@ -245,7 +245,7 @@ double DrawUtil::angleWithX(TopoDS_Edge e, TopoDS_Vertex v, double tolerance) param = adapt.LastParameter(); } else { //TARFU - Base::Console().Message("Error: DU::angleWithX - v is neither first nor last \n"); + Base::Console().message("Error: DU::angleWithX - v is neither first nor last \n"); } gp_Pnt paramPoint; gp_Vec derivative; @@ -284,7 +284,7 @@ double DrawUtil::incidenceAngleAtVertex(TopoDS_Edge e, TopoDS_Vertex v, double t offsetPoint = Base::Vector3d(gOffsetPoint.X(), gOffsetPoint.Y(), gOffsetPoint.Z()); } else { //TARFU - // Base::Console().Message("DU::incidenceAngle - v is neither first nor last \n"); + // Base::Console().message("DU::incidenceAngle - v is neither first nor last \n"); } incidenceVec = anglePoint - offsetPoint; incidenceAngle = atan2(incidenceVec.y, incidenceVec.x); @@ -434,7 +434,7 @@ bool DrawUtil::apparentIntersection(TopoDS_Edge& edge0, TopoDS_Edge& edge1, gp_P gp_Vec D(gStart1.XYZ()); gp_Vec e(gEnd0.XYZ() - gStart0.XYZ());//direction of line0 gp_Vec f(gEnd1.XYZ() - gStart1.XYZ());//direction of line1 - Base::Console().Message( + Base::Console().message( "DU::apparentInter - e: %s f: %s\n", formatVector(e).c_str(), formatVector(f).c_str()); //check for cases the algorithm doesn't handle well @@ -450,7 +450,7 @@ bool DrawUtil::apparentIntersection(TopoDS_Edge& edge0, TopoDS_Edge& edge1, gp_P } gp_Vec g(D - C);//between a point on each line - Base::Console().Message("DU::apparentInter - C: %s D: %s g: %s\n", + Base::Console().message("DU::apparentInter - C: %s D: %s g: %s\n", formatVector(C).c_str(), formatVector(D).c_str(), formatVector(g).c_str()); @@ -459,7 +459,7 @@ bool DrawUtil::apparentIntersection(TopoDS_Edge& edge0, TopoDS_Edge& edge1, gp_P double h = fxg.Magnitude(); gp_Vec fxe = f.Crossed(e); double k = fxe.Magnitude(); - Base::Console().Message("DU::apparentInter - h: %.3f k: %.3f\n", h, k); + Base::Console().message("DU::apparentInter - h: %.3f k: %.3f\n", h, k); if (fpCompare(k, 0.0)) { //no intersection return false; @@ -492,7 +492,7 @@ bool DrawUtil::intersect2Lines3d(Base::Vector3d point0, Base::Vector3d dir0, Bas dir1n.Normalize(); if (fabs(dir0n.Dot(dir1n)) == 1.0) { //parallel lines, no intersection - Base::Console().Message("DU::intersect2 - parallel lines, no intersection\n"); + Base::Console().message("DU::intersect2 - parallel lines, no intersection\n"); return false; } @@ -857,7 +857,7 @@ double DrawUtil::getWidthInDirection(gp_Dir direction, TopoDS_Shape& shape) if (shapeBox.IsVoid()) { //this really shouldn't happen here as null shapes should have been caught //long before this - Base::Console().Error("DU::getWidthInDirection - shapeBox is void\n"); + Base::Console().error("DU::getWidthInDirection - shapeBox is void\n"); return 0.0; } shapeBox.Get(xMin, yMin, zMin, xMax, yMax, zMax); @@ -894,7 +894,7 @@ gp_Vec DrawUtil::maskDirection(gp_Vec inVec, gp_Dir directionToMask) return {inVec.X(), inVec.Y(), 0.0}; } - Base::Console().Message("DU:maskDirection - directionToMask is not cardinal\n"); + Base::Console().message("DU:maskDirection - directionToMask is not cardinal\n"); return {}; } @@ -989,7 +989,7 @@ Base::Vector3d DrawUtil::Intersect2d(Base::Vector3d p1, Base::Vector3d d1, Base: double det = A1 * B2 - A2 * B1; if (fpCompare(det, 0.0, Precision::Confusion())) { - Base::Console().Message("Lines are parallel\n"); + Base::Console().message("Lines are parallel\n"); return Base::Vector3d(0.0, 0.0, 0.0); } @@ -1013,7 +1013,7 @@ Base::Vector2d DrawUtil::Intersect2d(Base::Vector2d p1, Base::Vector2d d1, Base: double det = A1 * B2 - A2 * B1; if (fpCompare(det, 0.0, Precision::Confusion())) { - Base::Console().Message("Lines are parallel\n"); + Base::Console().message("Lines are parallel\n"); return Base::Vector2d(0.0, 0.0); } @@ -1055,7 +1055,7 @@ QPointF DrawUtil::invertY(QPointF v) //! Note: the centering operation is not considered here Base::Vector3d DrawUtil::toAppSpace(const DrawViewPart& dvp, const Base::Vector3d &qtPoint) { -// Base::Console().Message("DGU::toPaperSpace(%s)\n", formatVector(qtPoint).c_str()); +// Base::Console().message("DGU::toPaperSpace(%s)\n", formatVector(qtPoint).c_str()); // From Y+ is down to Y+ is up Base::Vector3d appPoint = invertY(qtPoint); @@ -1081,7 +1081,7 @@ Base::Vector3d DrawUtil::toAppSpace(const DrawViewPart& dvp, const QPointF& qtP //obs? was used in CSV prototype of Cosmetics std::vector DrawUtil::split(std::string csvLine) { - // Base::Console().Message("DU::split - csvLine: %s\n", csvLine.c_str()); + // Base::Console().message("DU::split - csvLine: %s\n", csvLine.c_str()); std::vector result; std::stringstream lineStream(csvLine); std::string cell; @@ -1095,7 +1095,7 @@ std::vector DrawUtil::split(std::string csvLine) //obs? was used in CSV prototype of Cosmetics std::vector DrawUtil::tokenize(std::string csvLine, std::string delimiter) { - // Base::Console().Message("DU::tokenize - csvLine: %s delimit: %s\n", csvLine.c_str(), delimiter.c_str()); + // Base::Console().message("DU::tokenize - csvLine: %s delimit: %s\n", csvLine.c_str(), delimiter.c_str()); std::string s(csvLine); size_t pos = 0; std::vector tokens; @@ -1111,7 +1111,7 @@ std::vector DrawUtil::tokenize(std::string csvLine, std::string del Base::Color DrawUtil::pyTupleToColor(PyObject* pColor) { - // Base::Console().Message("DU::pyTupleToColor()\n"); + // Base::Console().message("DU::pyTupleToColor()\n"); double red = 0.0, green = 0.0, blue = 0.0, alpha = 0.0; if (!PyTuple_Check(pColor)) { return Base::Color(red, green, blue, alpha); @@ -1135,7 +1135,7 @@ Base::Color DrawUtil::pyTupleToColor(PyObject* pColor) PyObject* DrawUtil::colorToPyTuple(Base::Color color) { - // Base::Console().Message("DU::pyTupleToColor()\n"); + // Base::Console().message("DU::pyTupleToColor()\n"); PyObject* pTuple = PyTuple_New(4); PyObject* pRed = PyFloat_FromDouble(color.r); PyObject* pGreen = PyFloat_FromDouble(color.g); @@ -1197,7 +1197,7 @@ bool DrawUtil::isCrazy(TopoDS_Edge e) } } - // Base::Console().Message("DU::isCrazy - returns: %d ratio: %.3f\n", false, ratio); + // Base::Console().message("DU::isCrazy - returns: %d ratio: %.3f\n", false, ratio); return false; } @@ -1831,7 +1831,7 @@ void DrawUtil::findCircularArcRectangleIntersections(const Base::Vector2d& circl //create empty outSpec file if inSpec void DrawUtil::copyFile(std::string inSpec, std::string outSpec) { - // Base::Console().Message("DU::copyFile(%s, %s)\n", inSpec.c_str(), outSpec.c_str()); + // Base::Console().message("DU::copyFile(%s, %s)\n", inSpec.c_str(), outSpec.c_str()); if (inSpec.empty()) { // create an empty file Base::FileInfo fi(outSpec); @@ -1844,7 +1844,7 @@ void DrawUtil::copyFile(std::string inSpec, std::string outSpec) } bool rc = fi.copyTo(outSpec.c_str()); if (!rc) { - Base::Console().Message( + Base::Console().message( "DU::copyFile - failed - in: %s out:%s\n", inSpec.c_str(), outSpec.c_str()); } } @@ -1883,12 +1883,12 @@ bool DrawUtil::isGuiUp() // various debugging routines. void DrawUtil::dumpVertexes(const char* text, const TopoDS_Shape& s) { - Base::Console().Message("DUMP - %s\n", text); + Base::Console().message("DUMP - %s\n", text); TopExp_Explorer expl(s, TopAbs_VERTEX); for (int i = 1; expl.More(); expl.Next(), i++) { const TopoDS_Vertex& v = TopoDS::Vertex(expl.Current()); gp_Pnt pnt = BRep_Tool::Pnt(v); - Base::Console().Message("v%d: (%.3f, %.3f, %.3f)\n", i, pnt.X(), pnt.Y(), pnt.Z()); + Base::Console().message("v%d: (%.3f, %.3f, %.3f)\n", i, pnt.X(), pnt.Y(), pnt.Z()); } } @@ -1897,7 +1897,7 @@ void DrawUtil::countFaces(const char* text, const TopoDS_Shape& s) TopTools_IndexedMapOfShape mapOfFaces; TopExp::MapShapes(s, TopAbs_FACE, mapOfFaces); int num = mapOfFaces.Extent(); - Base::Console().Message("COUNT - %s has %d Faces\n", text, num); + Base::Console().message("COUNT - %s has %d Faces\n", text, num); } //count # of unique Wires in shape. @@ -1906,7 +1906,7 @@ void DrawUtil::countWires(const char* text, const TopoDS_Shape& s) TopTools_IndexedMapOfShape mapOfWires; TopExp::MapShapes(s, TopAbs_WIRE, mapOfWires); int num = mapOfWires.Extent(); - Base::Console().Message("COUNT - %s has %d wires\n", text, num); + Base::Console().message("COUNT - %s has %d wires\n", text, num); } void DrawUtil::countEdges(const char* text, const TopoDS_Shape& s) @@ -1914,12 +1914,12 @@ void DrawUtil::countEdges(const char* text, const TopoDS_Shape& s) TopTools_IndexedMapOfShape mapOfEdges; TopExp::MapShapes(s, TopAbs_EDGE, mapOfEdges); int num = mapOfEdges.Extent(); - Base::Console().Message("COUNT - %s has %d edges\n", text, num); + Base::Console().message("COUNT - %s has %d edges\n", text, num); } void DrawUtil::dumpEdges(const char* text, const TopoDS_Shape& s) { - Base::Console().Message("DUMP - %s\n", text); + Base::Console().message("DUMP - %s\n", text); TopExp_Explorer expl(s, TopAbs_EDGE); for (int i = 1; expl.More(); expl.Next(), i++) { const TopoDS_Edge& e = TopoDS::Edge(expl.Current()); @@ -1929,9 +1929,9 @@ void DrawUtil::dumpEdges(const char* text, const TopoDS_Shape& s) void DrawUtil::dump1Vertex(const char* text, const TopoDS_Vertex& v) { - // Base::Console().Message("DUMP - dump1Vertex - %s\n",text); + // Base::Console().message("DUMP - dump1Vertex - %s\n",text); gp_Pnt pnt = BRep_Tool::Pnt(v); - Base::Console().Message("%s: (%.3f, %.3f, %.3f)\n", text, pnt.X(), pnt.Y(), pnt.Z()); + Base::Console().message("%s: (%.3f, %.3f, %.3f)\n", text, pnt.X(), pnt.Y(), pnt.Z()); } void DrawUtil::dumpEdge(const char* label, int i, TopoDS_Edge e) @@ -1943,9 +1943,9 @@ void DrawUtil::dumpEdge(const char* label, int i, TopoDS_Edge e) const gp_Pnt& vStart = propStart.Value(); BRepLProp_CLProps propEnd(adapt, end, 0, Precision::Confusion()); const gp_Pnt& vEnd = propEnd.Value(); - //Base::Console().Message("%s edge:%d start:(%.3f, %.3f, %.3f)/%0.3f end:(%.2f, %.3f, %.3f)/%.3f\n", label, i, + //Base::Console().message("%s edge:%d start:(%.3f, %.3f, %.3f)/%0.3f end:(%.2f, %.3f, %.3f)/%.3f\n", label, i, // vStart.X(), vStart.Y(), vStart.Z(), start, vEnd.X(), vEnd.Y(), vEnd.Z(), end); - Base::Console().Message( + Base::Console().message( "%s edge:%d start:(%.3f, %.3f, %.3f) end:(%.2f, %.3f, %.3f) Orient: %d\n", label, i, @@ -1957,7 +1957,7 @@ void DrawUtil::dumpEdge(const char* label, int i, TopoDS_Edge e) vEnd.Z(), static_cast(e.Orientation())); double edgeLength = GCPnts_AbscissaPoint::Length(adapt, Precision::Confusion()); - Base::Console().Message(">>>>>>> length: %.3f distance: %.3f ratio: %.3f type: %d\n", + Base::Console().message(">>>>>>> length: %.3f distance: %.3f ratio: %.3f type: %d\n", edgeLength, vStart.Distance(vEnd), edgeLength / vStart.Distance(vEnd), @@ -1991,7 +1991,7 @@ void DrawUtil::dumpCS(const char* text, const gp_Ax2& CS) gp_Dir baseX = CS.XDirection(); gp_Dir baseY = CS.YDirection(); gp_Pnt baseOrg = CS.Location(); - Base::Console().Message("DU::dumpCS - %s Loc: %s Axis: %s X: %s Y: %s\n", + Base::Console().message("DU::dumpCS - %s Loc: %s Axis: %s X: %s Y: %s\n", text, DrawUtil::formatVector(baseOrg).c_str(), DrawUtil::formatVector(baseAxis).c_str(), @@ -2005,7 +2005,7 @@ void DrawUtil::dumpCS3(const char* text, const gp_Ax3& CS) gp_Dir baseX = CS.XDirection(); gp_Dir baseY = CS.YDirection(); gp_Pnt baseOrg = CS.Location(); - Base::Console().Message("DU::dumpCS3 - %s Loc: %s Axis: %s X: %s Y: %s\n", + Base::Console().message("DU::dumpCS3 - %s Loc: %s Axis: %s X: %s Y: %s\n", text, DrawUtil::formatVector(baseOrg).c_str(), DrawUtil::formatVector(baseAxis).c_str(), diff --git a/src/Mod/TechDraw/App/DrawView.cpp b/src/Mod/TechDraw/App/DrawView.cpp index 91e16505ab..2704543c09 100644 --- a/src/Mod/TechDraw/App/DrawView.cpp +++ b/src/Mod/TechDraw/App/DrawView.cpp @@ -115,7 +115,7 @@ DrawView::~DrawView() App::DocumentObjectExecReturn *DrawView::execute() { -// Base::Console().Message("DV::execute() - %s touched: %d\n", getNameInDocument(), isTouched()); +// Base::Console().message("DV::execute() - %s touched: %d\n", getNameInDocument(), isTouched()); if (!findParentPage()) { return App::DocumentObject::execute(); } @@ -470,7 +470,7 @@ double DrawView::autoScale() const //compare 1:1 rect of view to pagesize(pw, h) double DrawView::autoScale(double pw, double ph) const { -// Base::Console().Message("DV::autoScale(Page: %.3f, %.3f) - %s\n", pw, ph, getNameInDocument()); +// Base::Console().message("DV::autoScale(Page: %.3f, %.3f) - %s\n", pw, ph, getNameInDocument()); QRectF viewBox = getRect(); //getRect is scaled (ie current actual size) if (!viewBox.isValid()) { return 1.0; @@ -487,7 +487,7 @@ double DrawView::autoScale(double pw, double ph) const bool DrawView::checkFit() const { -// Base::Console().Message("DV::checkFit() - %s\n", getNameInDocument()); +// Base::Console().message("DV::checkFit() - %s\n", getNameInDocument()); auto page = findParentPage(); return checkFit(page); } @@ -495,7 +495,7 @@ bool DrawView::checkFit() const //!check if View is too big for page bool DrawView::checkFit(TechDraw::DrawPage* p) const { -// Base::Console().Message("DV::checkFit(page) - %s\n", getNameInDocument()); +// Base::Console().message("DV::checkFit(page) - %s\n", getNameInDocument()); bool result = true; double width = 0.0; @@ -516,7 +516,7 @@ bool DrawView::checkFit(TechDraw::DrawPage* p) const void DrawView::setPosition(double x, double y, bool force) { -// Base::Console().Message("DV::setPosition(%.3f, %.3f) - \n", x,y, getNameInDocument()); +// Base::Console().message("DV::setPosition(%.3f, %.3f) - \n", x,y, getNameInDocument()); if ( (!isLocked()) || (force) ) { double currX = X.getValue(); @@ -633,7 +633,7 @@ void DrawView::handleChangedPropertyType(Base::XMLReader &reader, const char * T bool DrawView::keepUpdated() { -// Base::Console().Message("DV::keepUpdated() - %s\n", getNameInDocument()); +// Base::Console().message("DV::keepUpdated() - %s\n", getNameInDocument()); if (overrideKeepUpdated()) { return true; } @@ -688,7 +688,7 @@ double DrawView::prefScale() void DrawView::requestPaint() { -// Base::Console().Message("DV::requestPaint() - %s\n", getNameInDocument()); +// Base::Console().message("DV::requestPaint() - %s\n", getNameInDocument()); signalGuiPaint(this); } @@ -703,11 +703,11 @@ void DrawView::showProgressMessage(std::string featureName, std::string text) //! the unique name within the document (ex ActiveView001), and use it to update the Label property. void DrawView::translateLabel(std::string context, std::string baseName, std::string uniqueName) { -// Base::Console().Message("DV::translateLabel - context: %s baseName: %s uniqueName: %s\n", +// Base::Console().message("DV::translateLabel - context: %s baseName: %s uniqueName: %s\n", // context.c_str(), baseName.c_str(), uniqueName.c_str()); Label.setValue(DU::translateArbitrary(context, baseName, uniqueName)); -// Base::Console().Message("DV::translateLabel - new label: %s\n", Label.getValue()); +// Base::Console().message("DV::translateLabel - new label: %s\n", Label.getValue()); } PyObject *DrawView::getPyObject(void) diff --git a/src/Mod/TechDraw/App/DrawViewArch.cpp b/src/Mod/TechDraw/App/DrawViewArch.cpp index e5366bddfb..b62ed19756 100644 --- a/src/Mod/TechDraw/App/DrawViewArch.cpp +++ b/src/Mod/TechDraw/App/DrawViewArch.cpp @@ -101,7 +101,7 @@ App::DocumentObjectExecReturn *DrawViewArch::execute() //if (sourceObj is not ArchSection) return App::Property* proxy = sourceObj->getPropertyByName("Proxy"); if (!proxy) { - Base::Console().Error("DVA::execute - %s is not an ArchSection\n", sourceObj->Label.getValue()); + Base::Console().error("DVA::execute - %s is not an ArchSection\n", sourceObj->Label.getValue()); //this is definitely not an ArchSection return DrawView::execute(); } diff --git a/src/Mod/TechDraw/App/DrawViewDetail.cpp b/src/Mod/TechDraw/App/DrawViewDetail.cpp index 9d69e0d113..4e7f322d0e 100644 --- a/src/Mod/TechDraw/App/DrawViewDetail.cpp +++ b/src/Mod/TechDraw/App/DrawViewDetail.cpp @@ -104,7 +104,7 @@ DrawViewDetail::~DrawViewDetail() { //don't delete this object while it still has dependent tasks running if (m_detailFuture.isRunning()) { - Base::Console().Message("%s is waiting for detail cut to finish\n", Label.getValue()); + Base::Console().message("%s is waiting for detail cut to finish\n", Label.getValue()); m_detailFuture.waitForFinished(); } } @@ -268,13 +268,13 @@ void DrawViewDetail::makeDetailShape(const TopoDS_Shape& shape3d, DrawViewPart* BRepBuilderAPI_MakeFace mkFace(gpln, -radius, radius, -radius, radius); extrusionFace = mkFace.Face(); if (extrusionFace.IsNull()) { - Base::Console().Warning("DVD::makeDetailShape - %s - failed to create tool base face\n", + Base::Console().warning("DVD::makeDetailShape - %s - failed to create tool base face\n", getNameInDocument()); return; } tool = BRepPrimAPI_MakePrism(extrusionFace, extrudeDir, false, true).Shape(); if (tool.IsNull()) { - Base::Console().Warning("DVD::makeDetailShape - %s - failed to create tool (prism)\n", + Base::Console().warning("DVD::makeDetailShape - %s - failed to create tool (prism)\n", getNameInDocument()); return; } @@ -285,7 +285,7 @@ void DrawViewDetail::makeDetailShape(const TopoDS_Shape& shape3d, DrawViewPart* BRepPrimAPI_MakeCylinder mkTool(cs, radius, extrudeLength); tool = mkTool.Shape(); if (tool.IsNull()) { - Base::Console().Warning("DVD::detailExec - %s - failed to create tool (cylinder)\n", + Base::Console().warning("DVD::detailExec - %s - failed to create tool (cylinder)\n", getNameInDocument()); return; } diff --git a/src/Mod/TechDraw/App/DrawViewDimExtent.cpp b/src/Mod/TechDraw/App/DrawViewDimExtent.cpp index 46e04d3dd8..d5c489e149 100644 --- a/src/Mod/TechDraw/App/DrawViewDimExtent.cpp +++ b/src/Mod/TechDraw/App/DrawViewDimExtent.cpp @@ -64,7 +64,7 @@ DrawViewDimExtent::DrawViewDimExtent(void) App::DocumentObjectExecReturn *DrawViewDimExtent::execute(void) { -// Base::Console().Message("DVDE::execute() - %s\n", getNameInDocument()); +// Base::Console().message("DVDE::execute() - %s\n", getNameInDocument()); if (!keepUpdated()) { return App::DocumentObject::StdReturn; } @@ -94,7 +94,7 @@ App::DocumentObjectExecReturn *DrawViewDimExtent::execute(void) //! validate 2D references - only checks if the target exists bool DrawViewDimExtent::checkReferences2D() const { -// Base::Console().Message("DVDE::checkReferences2d() - %s\n", getNameInDocument()); +// Base::Console().message("DVDE::checkReferences2d() - %s\n", getNameInDocument()); const std::vector &objects = References2D.getValues(); if (objects.empty()) { return false; @@ -111,7 +111,7 @@ bool DrawViewDimExtent::checkReferences2D() const } pointPair DrawViewDimExtent::getPointsExtent(ReferenceVector references) { -// Base::Console().Message("DVD::getPointsExtent() - %s\n", getNameInDocument()); +// Base::Console().message("DVD::getPointsExtent() - %s\n", getNameInDocument()); App::DocumentObject* refObject = references.front().getObject(); int direction = DirExtent.getValue(); if (refObject->isDerivedFrom()) { diff --git a/src/Mod/TechDraw/App/DrawViewDimension.cpp b/src/Mod/TechDraw/App/DrawViewDimension.cpp index 81b3d28ef9..02f634d17d 100644 --- a/src/Mod/TechDraw/App/DrawViewDimension.cpp +++ b/src/Mod/TechDraw/App/DrawViewDimension.cpp @@ -481,7 +481,7 @@ App::DocumentObjectExecReturn* DrawViewDimension::execute() } if (!m_referencesCorrect) { // this test needs Phase 2 of auto correct to be useful - Base::Console().Log("The references for %s have changed and autocorrect could not match the geometry\n", Label.getValue()); + Base::Console().log("The references for %s have changed and autocorrect could not match the geometry\n", Label.getValue()); } resetLinear(); @@ -549,26 +549,26 @@ bool DrawViewDimension::okToProceed() // TODO: translate these messages and figure out how to present them to // the user since we can't pop up a message box here. // this case is probably temporary during restore - // Base::Console().Message("DVD::okToProceed - no view for dimension\n"); + // Base::Console().message("DVD::okToProceed - no view for dimension\n"); return false; } if (!(has2DReferences() || has3DReferences())) { // no references, can't do anything - // Base::Console().Message("DVD::okToProceed - Dimension object has no valid references\n"); + // Base::Console().message("DVD::okToProceed - Dimension object has no valid references\n"); return false; } if (!getViewPart()->hasGeometry()) { // can't do anything until Source has geometry - // Base::Console().Message("DVD::okToProceed - Dimension object has no geometry\n"); + // Base::Console().message("DVD::okToProceed - Dimension object has no geometry\n"); return false; } // is this check still relevant or is it replaced by the autocorrect and // validate methods? if (References3D.getValues().empty() && !checkReferences2D()) { - // Base::Console().Warning("%s has invalid 2D References\n", getNameInDocument()); + // Base::Console().warning("%s has invalid 2D References\n", getNameInDocument()); return false; } return validateReferenceForm(); @@ -667,7 +667,7 @@ double DrawViewDimension::getDimValue() if (MeasureType.isValue("True")) { // True Values if (!measurement->has3DReferences()) { - Base::Console().Warning("%s - True dimension has no 3D References\n", + Base::Console().warning("%s - True dimension has no 3D References\n", getNameInDocument()); return result; } @@ -676,7 +676,7 @@ double DrawViewDimension::getDimValue() else { // Projected Values if (!checkReferences2D()) { - Base::Console().Warning("DVD::getDimValue - %s - 2D references are corrupt (5)\n", + Base::Console().warning("DVD::getDimValue - %s - 2D references are corrupt (5)\n", getNameInDocument()); return result; } @@ -1094,7 +1094,7 @@ arcPoints DrawViewDimension::arcPointsFromBaseGeom(TechDraw::BaseGeomPtr base) else { // fubar - can't have non-circular spline as target of Diameter dimension, but this is // already checked, so something has gone badly wrong. - Base::Console().Error("%s: can not make a Circle from this B-spline edge\n", + Base::Console().error("%s: can not make a Circle from this B-spline edge\n", getNameInDocument()); throw Base::RuntimeError("Bad B-spline geometry for arc dimension"); } @@ -1535,7 +1535,7 @@ RefType DrawViewDimension::getRefType() const if (subNames.empty()) { // something went wrong, there were no subNames. - Base::Console().Message("DVD::getRefType - %s - there are no subNames.\n", + Base::Console().message("DVD::getRefType - %s - there are no subNames.\n", getNameInDocument()); return RefType::invalidRef; } @@ -1927,14 +1927,14 @@ void DrawViewDimension::clear3DMeasurements() void DrawViewDimension::dumpRefs2D(const char* text) const { - Base::Console().Message("DUMP - %s\n", text); + Base::Console().message("DUMP - %s\n", text); const std::vector& objects = References2D.getValues(); const std::vector& subElements = References2D.getSubValues(); auto objIt = objects.begin(); auto subIt = subElements.begin(); int i = 0; for (; objIt != objects.end(); objIt++, subIt++, i++) { - Base::Console().Message("DUMP - ref: %d object: %s subElement: %s\n", + Base::Console().message("DUMP - ref: %d object: %s subElement: %s\n", i, (*objIt)->getNameInDocument(), (*subIt).c_str()); @@ -2142,7 +2142,7 @@ Base::BoundBox3d DrawViewDimension::getSavedBox() if (bbxCorners.empty()) { // need to advise caller if BoxCorners not filled in yet. zero length // diagonal? - Base::Console().Message("DVD::getSavedBox - no corners!\n"); + Base::Console().message("DVD::getSavedBox - no corners!\n"); return Base::BoundBox3d(); } return Base::BoundBox3d(bbxCorners.front().x, diff --git a/src/Mod/TechDraw/App/DrawViewDraft.cpp b/src/Mod/TechDraw/App/DrawViewDraft.cpp index b73d64dbb9..7b98e2f94c 100644 --- a/src/Mod/TechDraw/App/DrawViewDraft.cpp +++ b/src/Mod/TechDraw/App/DrawViewDraft.cpp @@ -79,7 +79,7 @@ short DrawViewDraft::mustExecute() const App::DocumentObjectExecReturn *DrawViewDraft::execute() { -// Base::Console().Message("DVDr::execute() \n"); +// Base::Console().message("DVDr::execute() \n"); if (!keepUpdated()) { return App::DocumentObject::StdReturn; } diff --git a/src/Mod/TechDraw/App/DrawViewImage.cpp b/src/Mod/TechDraw/App/DrawViewImage.cpp index 8a3da9d447..4276ce538c 100644 --- a/src/Mod/TechDraw/App/DrawViewImage.cpp +++ b/src/Mod/TechDraw/App/DrawViewImage.cpp @@ -88,7 +88,7 @@ QRectF DrawViewImage::getRect() const { return {0.0, 0.0, Width.getValue(), Heig void DrawViewImage::replaceImageIncluded(std::string newImageFile) { - // Base::Console().Message("DVI::replaceImageIncluded(%s)\n", newImageFile.c_str()); + // Base::Console().message("DVI::replaceImageIncluded(%s)\n", newImageFile.c_str()); if (newImageFile.empty()) { return; } @@ -104,7 +104,7 @@ void DrawViewImage::replaceImageIncluded(std::string newImageFile) void DrawViewImage::setupObject() { - // Base::Console().Message("DVI::setupObject()\n"); + // Base::Console().message("DVI::setupObject()\n"); replaceImageIncluded(ImageFile.getValue()); } diff --git a/src/Mod/TechDraw/App/DrawViewMulti.cpp b/src/Mod/TechDraw/App/DrawViewMulti.cpp index 5f80098291..3bebdbd4bc 100644 --- a/src/Mod/TechDraw/App/DrawViewMulti.cpp +++ b/src/Mod/TechDraw/App/DrawViewMulti.cpp @@ -76,7 +76,7 @@ short DrawViewMulti::mustExecute() const void DrawViewMulti::onChanged(const App::Property* prop) { if (!isRestoring()) { - //Base::Console().Message("TRACE - DVM::onChanged(%s) - %s\n", prop->getName(), Label.getValue()); + //Base::Console().message("TRACE - DVM::onChanged(%s) - %s\n", prop->getName(), Label.getValue()); if (prop == &Sources) { const std::vector& links = Sources.getValues(); if (!links.empty()) { @@ -96,7 +96,7 @@ App::DocumentObjectExecReturn *DrawViewMulti::execute() const std::vector& links = Sources.getValues(); if (links.empty()) { - Base::Console().Log("INFO - DVM::execute - No Sources - creation?\n"); + Base::Console().log("INFO - DVM::execute - No Sources - creation?\n"); return DrawView::execute(); } diff --git a/src/Mod/TechDraw/App/DrawViewPart.cpp b/src/Mod/TechDraw/App/DrawViewPart.cpp index 00175978c3..abc3157730 100644 --- a/src/Mod/TechDraw/App/DrawViewPart.cpp +++ b/src/Mod/TechDraw/App/DrawViewPart.cpp @@ -158,11 +158,11 @@ DrawViewPart::~DrawViewPart() { //don't delete this object while it still has dependent threads running if (m_hlrFuture.isRunning()) { - Base::Console().Message("%s is waiting for HLR to finish\n", Label.getValue()); + Base::Console().message("%s is waiting for HLR to finish\n", Label.getValue()); m_hlrFuture.waitForFinished(); } if (m_faceFuture.isRunning()) { - Base::Console().Message("%s is waiting for face finding to finish\n", Label.getValue()); + Base::Console().message("%s is waiting for face finding to finish\n", Label.getValue()); m_faceFuture.waitForFinished(); } removeAllReferencesFromGeom(); @@ -172,7 +172,7 @@ DrawViewPart::~DrawViewPart() //! XSource property lists TopoDS_Shape DrawViewPart::getSourceShape(bool fuse, bool allow2d) const { -// Base::Console().Message("DVP::getSourceShape()\n"); +// Base::Console().message("DVP::getSourceShape()\n"); const std::vector& links = getAllSources(); if (links.empty()) { return {}; @@ -194,7 +194,7 @@ TopoDS_Shape DrawViewPart::getShapeForDetail() const //! combine the regular links and xlinks into a single list std::vector DrawViewPart::getAllSources() const { - // Base::Console().Message("DVP::getAllSources()\n"); + // Base::Console().message("DVP::getAllSources()\n"); std::vector links = Source.getValues(); std::vector xLinks = XSource.getValues(); @@ -209,7 +209,7 @@ std::vector DrawViewPart::getAllSources() const //! add them directly to the geometry without going through HLR void DrawViewPart::addPoints() { -// Base::Console().Message("DVP::addPoints()\n"); +// Base::Console().message("DVP::addPoints()\n"); // get all the 2d shapes in the sources, then pick through them for vertices. std::vector shapesAll = ShapeExtractor::getShapes2d(getAllSources()); for (auto& shape : shapesAll) { @@ -227,7 +227,7 @@ void DrawViewPart::addPoints() App::DocumentObjectExecReturn* DrawViewPart::execute() { - // Base::Console().Message("DVP::execute() - %s\n", getNameInDocument()); + // Base::Console().message("DVP::execute() - %s\n", getNameInDocument()); if (!keepUpdated()) { return DrawView::execute(); } @@ -238,7 +238,7 @@ App::DocumentObjectExecReturn* DrawViewPart::execute() TopoDS_Shape shape = getSourceShape(); if (shape.IsNull()) { - Base::Console().Message("DVP::execute - %s - Source shape is Null.\n", getNameInDocument()); + Base::Console().message("DVP::execute - %s - Source shape is Null.\n", getNameInDocument()); return DrawView::execute(); } @@ -278,12 +278,12 @@ void DrawViewPart::onChanged(const App::Property* prop) // Otherwise bad things will happen because there'll be a normalization for direction calculations later. Base::Vector3d dir = Direction.getValue(); if (DrawUtil::fpCompare(dir.Length(), 0.0)) { - Base::Console().Warning("%s Direction is null. Using (0, -1, 0).\n", Label.getValue()); + Base::Console().warning("%s Direction is null. Using (0, -1, 0).\n", Label.getValue()); Direction.setValue(Base::Vector3d(0.0, -1.0, 0.0)); } Base::Vector3d xdir = XDirection.getValue(); if (DrawUtil::fpCompare(xdir.Length(), 0.0)) { - Base::Console().Warning("%s XDirection is null. Using (1, 0, 0).\n", Label.getValue()); + Base::Console().warning("%s XDirection is null. Using (1, 0, 0).\n", Label.getValue()); XDirection.setValue(Base::Vector3d(1.0, 0.0, 0.0)); } @@ -399,7 +399,7 @@ void DrawViewPart::onHlrFinished() } if (!hasGeometry()) { - Base::Console().Error("TechDraw did not retrieve any geometry for %s/%s\n", + Base::Console().error("TechDraw did not retrieve any geometry for %s/%s\n", getNameInDocument(), Label.getValue()); } @@ -437,7 +437,7 @@ void DrawViewPart::onHlrFinished() } catch (Standard_Failure& e) { waitingForFaces(false); - Base::Console().Error("DVP::partExec - %s - extractFaces failed - %s **\n", + Base::Console().error("DVP::partExec - %s - extractFaces failed - %s **\n", getNameInDocument(), e.GetMessageString()); throw Base::RuntimeError("DVP::onHlrFinished - error extracting faces"); } @@ -511,7 +511,7 @@ void DrawViewPart::extractFaces() geometryObject->getVisibleFaceEdges(SmoothVisible.getValue(), SeamVisible.getValue()); if (goEdges.empty()) { - // Base::Console().Message("DVP::extractFaces - %s - no face edges available!\n", getNameInDocument()); //debug + // Base::Console().message("DVP::extractFaces - %s - no face edges available!\n", getNameInDocument()); //debug return; } @@ -530,7 +530,7 @@ void DrawViewPart::findFacesNew(const std::vector &goEdges) if (cleanEdges.empty() && closedEdges.empty()) { //how does this happen? something wrong somewhere - // Base::Console().Message("DVP::findFacesNew - no clean or closed wires\n"); //debug + // Base::Console().message("DVP::findFacesNew - no clean or closed wires\n"); //debug return; } @@ -561,7 +561,7 @@ void DrawViewPart::findFacesNew(const std::vector &goEdges) } if (sortedWires.empty()) { - Base::Console().Warning( + Base::Console().warning( "DVP::findFacesNew - %s - Can't make faces from projected edges\n", getNameInDocument()); } @@ -684,7 +684,7 @@ void DrawViewPart::findFacesOld(const std::vector &goEdges) EdgeWalker eWalker; sortedWires = eWalker.execute(newEdges); if (sortedWires.empty()) { - Base::Console().Warning( + Base::Console().warning( "DVP::findFacesOld - %s -Can't make faces from projected edges\n", getNameInDocument()); return; @@ -707,7 +707,7 @@ void DrawViewPart::findFacesOld(const std::vector &goEdges) //continue processing after extractFaces thread completes void DrawViewPart::onFacesFinished() { - // Base::Console().Message("DVP::onFacesFinished() - %s\n", getNameInDocument()); + // Base::Console().message("DVP::onFacesFinished() - %s\n", getNameInDocument()); waitingForFaces(false); QObject::disconnect(connectFaceWatcher); showProgressMessage(getNameInDocument(), "has finished extracting faces"); @@ -794,7 +794,7 @@ const std::vector DrawViewPart::getVertexGeometry() const //! TechDraw vertex names run from 0 to n-1 TechDraw::VertexPtr DrawViewPart::getVertex(std::string vertexName) const { - // Base::Console().Message("DVP::getVertex(%s)\n", vertexName.c_str()); + // Base::Console().message("DVP::getVertex(%s)\n", vertexName.c_str()); auto vertexIndex = DrawUtil::getIndexFromName(vertexName); auto vertex = getProjVertexByIndex(vertexIndex); return vertex; @@ -949,7 +949,7 @@ double DrawViewPart::getBoxY() const QRectF DrawViewPart::getRect() const { - // Base::Console().Message("DVP::getRect() - %s\n", getNameInDocument()); + // Base::Console().message("DVP::getRect() - %s\n", getNameInDocument()); double x = getBoxX(); double y = getBoxY(); return QRectF(0.0, 0.0, x, y); @@ -987,7 +987,7 @@ TopoDS_Shape DrawViewPart::getEdgeCompound() const // used in calculating the length of a section line double DrawViewPart::getSizeAlongVector(Base::Vector3d alignmentVector) { - // Base::Console().Message("DVP::GetSizeAlongVector(%s)\n", DrawUtil::formatVector(alignmentVector).c_str()); + // Base::Console().message("DVP::GetSizeAlongVector(%s)\n", DrawUtil::formatVector(alignmentVector).c_str()); double alignmentAngle = atan2(alignmentVector.y, alignmentVector.x) * -1.0; gp_Ax2 OXYZ;//shape has already been projected and we will rotate around Z if (getEdgeCompound().IsNull()) { @@ -1006,7 +1006,7 @@ double DrawViewPart::getSizeAlongVector(Base::Vector3d alignmentVector) //used to project a pt (ex SectionOrigin) onto paper plane Base::Vector3d DrawViewPart::projectPoint(const Base::Vector3d& pt, bool invert) const { - // Base::Console().Message("DVP::projectPoint(%s, %d\n", + // Base::Console().message("DVP::projectPoint(%s, %d\n", // DrawUtil::formatVector(pt).c_str(), invert); Base::Vector3d stdOrg(0.0, 0.0, 0.0); gp_Ax2 viewAxis = getProjectionCS(stdOrg); @@ -1064,7 +1064,7 @@ bool DrawViewPart::hasGeometry() const //in the derived view. gp_Ax2 DrawViewPart::localVectorToCS(const Base::Vector3d localUnit) const { - // Base::Console().Message("DVP::localVectorToCS(%s)\n", DU::formatVector((localUnit)).c_str()); + // Base::Console().message("DVP::localVectorToCS(%s)\n", DU::formatVector((localUnit)).c_str()); double angle = atan2(localUnit.y, localUnit.x);//radians gp_Ax1 rotateAxisDir(gp_Pnt(0.0, 0.0, 0.0), getProjectionCS().Direction()); gp_Vec gOldX = getProjectionCS().XDirection(); @@ -1084,14 +1084,14 @@ gp_Ax2 DrawViewPart::localVectorToCS(const Base::Vector3d localUnit) const Base::Vector3d DrawViewPart::localVectorToDirection(const Base::Vector3d localUnit) const { - // Base::Console().Message("DVP::localVectorToDirection() - localUnit: %s\n", DrawUtil::formatVector(localUnit).c_str()); + // Base::Console().message("DVP::localVectorToDirection() - localUnit: %s\n", DrawUtil::formatVector(localUnit).c_str()); gp_Ax2 cs = localVectorToCS(localUnit); return Base::convertTo(cs.Direction()); } gp_Ax2 DrawViewPart::getProjectionCS(const Base::Vector3d pt) const { - // Base::Console().Message("DVP::getProjectionCS() - %s - %s\n", getNameInDocument(), Label.getValue()); + // Base::Console().message("DVP::getProjectionCS() - %s - %s\n", getNameInDocument(), Label.getValue()); Base::Vector3d direction = Direction.getValue(); gp_Dir gDir(direction.x, direction.y, direction.z); Base::Vector3d xDir = getXDirection(); @@ -1102,14 +1102,14 @@ gp_Ax2 DrawViewPart::getProjectionCS(const Base::Vector3d pt) const viewAxis = gp_Ax2(gOrg, gDir, gXDir); } catch (...) { - Base::Console().Warning("DVP - %s - failed to create projection CS\n", getNameInDocument()); + Base::Console().warning("DVP - %s - failed to create projection CS\n", getNameInDocument()); } return viewAxis; } gp_Ax2 DrawViewPart::getRotatedCS(const Base::Vector3d basePoint) const { - // Base::Console().Message("DVP::getRotatedCS() - %s - %s\n", getNameInDocument(), Label.getValue()); + // Base::Console().message("DVP::getRotatedCS() - %s - %s\n", getNameInDocument(), Label.getValue()); gp_Ax2 unrotated = getProjectionCS(basePoint); gp_Ax1 rotationAxis(Base::convertTo(basePoint), unrotated.Direction()); double angleRad = Base::toRadians(Rotation.getValue()); @@ -1122,7 +1122,7 @@ gp_Ax2 DrawViewPart::getViewAxis(const Base::Vector3d& pt, const Base::Vector3d& { (void)direction; (void)flip; - Base::Console().Message("DVP::getViewAxis - deprecated. Use getProjectionCS.\n"); + Base::Console().message("DVP::getViewAxis - deprecated. Use getProjectionCS.\n"); return getProjectionCS(pt); } @@ -1198,7 +1198,7 @@ bool DrawViewPart::newFaceFinder() //! hatches, geomhatches, dimensions, ... void DrawViewPart::unsetupObject() { -// Base::Console().Message("DVP::unsetupObject()\n"); +// Base::Console().message("DVP::unsetupObject()\n"); nowUnsetting = true; App::Document* doc = getDocument(); std::string docName = doc->getName(); @@ -1256,7 +1256,7 @@ void DrawViewPart::unsetupObject() bool DrawViewPart::checkXDirection() const { - // Base::Console().Message("DVP::checkXDirection()\n"); + // Base::Console().message("DVP::checkXDirection()\n"); Base::Vector3d xDir = XDirection.getValue(); if (DrawUtil::fpCompare(xDir.Length(), 0.0)) { return false; @@ -1266,7 +1266,7 @@ bool DrawViewPart::checkXDirection() const Base::Vector3d DrawViewPart::getXDirection() const { - // Base::Console().Message("DVP::getXDirection() - %s\n", Label.getValue()); + // Base::Console().message("DVP::getXDirection() - %s\n", Label.getValue()); Base::Vector3d result(1.0, 0.0, 0.0);//default X App::Property* prop = getPropertyByName("XDirection"); if (prop) {//have an XDirection property @@ -1329,7 +1329,7 @@ void DrawViewPart::spin(double angle) std::pair DrawViewPart::getDirsFromFront(ProjDirection viewType) { - // Base::Console().Message("DVP::getDirsFromFront(%s)\n", viewType.c_str()); + // Base::Console().message("DVP::getDirsFromFront(%s)\n", viewType.c_str()); std::pair result; Base::Vector3d projDir, rotVec; @@ -1461,7 +1461,7 @@ void DrawViewPart::removeReferenceVertex(std::string tag) //! remove reference vertexes from the view geometry void DrawViewPart::removeAllReferencesFromGeom() { - // Base::Console().Message("DVP::removeAllReferencesFromGeom()\n"); + // Base::Console().message("DVP::removeAllReferencesFromGeom()\n"); if (!m_referenceVerts.empty()) { std::vector gVerts = getVertexGeometry(); std::vector newVerts; @@ -1476,7 +1476,7 @@ void DrawViewPart::removeAllReferencesFromGeom() void DrawViewPart::resetReferenceVerts() { - // Base::Console().Message("DVP::resetReferenceVerts() %s\n", getNameInDocument()); + // Base::Console().message("DVP::resetReferenceVerts() %s\n", getNameInDocument()); removeAllReferencesFromGeom(); addReferencesToGeom(); } @@ -1544,11 +1544,11 @@ bool DrawViewPart::isCenterLine(const std::string& element) void DrawViewPart::dumpVerts(std::string text) { if (!geometryObject) { - Base::Console().Message("no verts to dump yet\n"); + Base::Console().message("no verts to dump yet\n"); return; } std::vector gVerts = getVertexGeometry(); - Base::Console().Message("%s - dumping %d vertGeoms\n", text.c_str(), gVerts.size()); + Base::Console().message("%s - dumping %d vertGeoms\n", text.c_str(), gVerts.size()); for (auto& gv : gVerts) { gv->dump(); } @@ -1557,7 +1557,7 @@ void DrawViewPart::dumpVerts(std::string text) void DrawViewPart::dumpCosVerts(std::string text) { std::vector cVerts = CosmeticVertexes.getValues(); - Base::Console().Message("%s - dumping %d CosmeticVertexes\n", text.c_str(), cVerts.size()); + Base::Console().message("%s - dumping %d CosmeticVertexes\n", text.c_str(), cVerts.size()); for (auto& cv : cVerts) { cv->dump("a CV"); } @@ -1566,7 +1566,7 @@ void DrawViewPart::dumpCosVerts(std::string text) void DrawViewPart::dumpCosEdges(std::string text) { std::vector cEdges = CosmeticEdges.getValues(); - Base::Console().Message("%s - dumping %d CosmeticEdge\n", text.c_str(), cEdges.size()); + Base::Console().message("%s - dumping %d CosmeticEdge\n", text.c_str(), cEdges.size()); for (auto& ce : cEdges) { ce->dump("a CE"); } diff --git a/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp b/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp index b5859cbf9f..f8969f92ea 100644 --- a/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp +++ b/src/Mod/TechDraw/App/DrawViewPartPyImp.cpp @@ -620,7 +620,7 @@ PyObject* DrawViewPartPy::getCosmeticEdge(PyObject *args) PyObject* DrawViewPartPy::getCosmeticEdgeBySelection(PyObject *args) { -// Base::Console().Message("DVPPI::getCosmeticEdgeBySelection()\n"); +// Base::Console().message("DVPPI::getCosmeticEdgeBySelection()\n"); char* name; if (!PyArg_ParseTuple(args, "s", &name)) { return nullptr; @@ -640,7 +640,7 @@ PyObject* DrawViewPartPy::getCosmeticEdgeBySelection(PyObject *args) PyObject* DrawViewPartPy::removeCosmeticEdge(PyObject *args) { -// Base::Console().Message("DVPPI::removeCosmeticEdge()\n"); +// Base::Console().message("DVPPI::removeCosmeticEdge()\n"); char* tag; if (!PyArg_ParseTuple(args, "s", &tag)) { return nullptr; @@ -656,7 +656,7 @@ PyObject* DrawViewPartPy::removeCosmeticEdge(PyObject *args) PyObject* DrawViewPartPy::makeCenterLine(PyObject *args) { -// Base::Console().Message("DVPPI::makeCenterLine()\n"); +// Base::Console().message("DVPPI::makeCenterLine()\n"); PyObject* pSubs; CenterLine::Mode mode = CenterLine::Mode::VERTICAL; std::vector subs; @@ -719,7 +719,7 @@ PyObject* DrawViewPartPy::getCenterLine(PyObject *args) PyObject* DrawViewPartPy::getCenterLineBySelection(PyObject *args) { -// Base::Console().Message("DVPPI::getCenterLineBySelection()\n"); +// Base::Console().message("DVPPI::getCenterLineBySelection()\n"); char* tag; if (!PyArg_ParseTuple(args, "s", &tag)) { return nullptr; @@ -738,7 +738,7 @@ PyObject* DrawViewPartPy::getCenterLineBySelection(PyObject *args) PyObject* DrawViewPartPy::removeCenterLine(PyObject *args) { -// Base::Console().Message("DVPPI::removeCenterLine()\n"); +// Base::Console().message("DVPPI::removeCenterLine()\n"); char* tag; if (!PyArg_ParseTuple(args, "s", &tag)) { return nullptr; @@ -754,7 +754,7 @@ PyObject* DrawViewPartPy::removeCenterLine(PyObject *args) PyObject* DrawViewPartPy::formatGeometricEdge(PyObject *args) { -// Base::Console().Message("DVPPI::formatGeometricEdge()\n"); +// Base::Console().message("DVPPI::formatGeometricEdge()\n"); int idx = -1; int style = Qt::SolidLine; Base::Color color = LineFormat::getDefEdgeColor(); diff --git a/src/Mod/TechDraw/App/DrawViewSection.cpp b/src/Mod/TechDraw/App/DrawViewSection.cpp index 8f6e5dd597..c7404766db 100644 --- a/src/Mod/TechDraw/App/DrawViewSection.cpp +++ b/src/Mod/TechDraw/App/DrawViewSection.cpp @@ -389,7 +389,7 @@ TopoDS_Shape DrawViewSection::getShapeToCut() } } else { - Base::Console().Message("DVS::getShapeToCut - base is weird\n"); + Base::Console().message("DVS::getShapeToCut - base is weird\n"); return {}; } return shapeToCut; @@ -427,7 +427,7 @@ App::DocumentObjectExecReturn* DrawViewSection::execute() Base::Vector3d orgPnt = SectionOrigin.getValue(); if (!isReallyInBox(gp_Pnt(orgPnt.x, orgPnt.y, orgPnt.z), centerBox)) { - Base::Console().Warning("DVS: SectionOrigin doesn't intersect part in %s\n", + Base::Console().warning("DVS: SectionOrigin doesn't intersect part in %s\n", getNameInDocument()); } @@ -496,7 +496,7 @@ void DrawViewSection::sectionExec(TopoDS_Shape& baseShape) waitingForCut(true); } catch (...) { - Base::Console().Message("DVS::sectionExec - failed to make section cut"); + Base::Console().message("DVS::sectionExec - failed to make section cut"); return; } } @@ -528,7 +528,7 @@ void DrawViewSection::makeSectionCut(const TopoDS_Shape& baseShape) const TopoDS_Solid& s = TopoDS::Solid(expl.Current()); FCBRepAlgoAPI_Cut mkCut(s, m_cuttingTool); if (!mkCut.IsDone()) { - Base::Console().Warning("DVS: Section cut has failed in %s\n", getNameInDocument()); + Base::Console().warning("DVS: Section cut has failed in %s\n", getNameInDocument()); continue; } builder.Add(cutPieces, mkCut.Shape()); @@ -558,7 +558,7 @@ void DrawViewSection::makeSectionCut(const TopoDS_Shape& baseShape) testBox.SetGap(0.0); if (testBox.IsVoid()) {// prism & input don't intersect. rawShape is // garbage, don't bother. - Base::Console().Warning("DVS::makeSectionCut - prism & input don't intersect - %s\n", + Base::Console().warning("DVS::makeSectionCut - prism & input don't intersect - %s\n", Label.getValue()); return; } @@ -599,7 +599,7 @@ TopoDS_Shape DrawViewSection::prepareShape(const TopoDS_Shape& rawShape, double } } catch (Standard_Failure& e1) { - Base::Console().Warning("DVS::prepareShape - failed to build shape %s - %s **\n", + Base::Console().warning("DVS::prepareShape - failed to build shape %s - %s **\n", getNameInDocument(), e1.GetMessageString()); } @@ -724,7 +724,7 @@ TopoDS_Compound DrawViewSection::findSectionPlaneIntersections(const TopoDS_Shap { if (shape.IsNull()) { // this shouldn't happen - Base::Console().Warning( + Base::Console().warning( "DrawViewSection::findSectionPlaneInter - %s - input shape is Null\n", getNameInDocument()); return {}; @@ -786,7 +786,7 @@ TopoDS_Compound DrawViewSection::mapToPage(const TopoDS_Shape& shapeToAlign) // stdZ); // project the faces in the shapeToAlign, build new faces from the resulting // wires and combine everything into a compound of faces - // Base::Console().Message("DVS::mapToPage() - shapeToAlign.null: %d\n", + // Base::Console().message("DVS::mapToPage() - shapeToAlign.null: %d\n", // shapeToAlign.IsNull()); if (debugSection()) { BRepTools::Write(shapeToAlign, "DVSShapeToAlign.brep");// debug @@ -849,7 +849,7 @@ TopoDS_Compound DrawViewSection::mapToPage(const TopoDS_Shape& shapeToAlign) // this may or may not be significant. In the offset or noparallel // strategies, a profile segment that is parallel to the SectionNormal // will not generate a face. - Base::Console().Log("DVS::mapToPage - %s - section face has no valid wires.\n", + Base::Console().log("DVS::mapToPage - %s - section face has no valid wires.\n", getNameInDocument()); continue; } @@ -900,7 +900,7 @@ TopoDS_Shape DrawViewSection::makeFaceFromWires(std::vector& inWire } if (!mkFace.IsDone()) { - Base::Console().Warning("DVS::makeFaceFromWires - %s - failed to make section face.\n", + Base::Console().warning("DVS::makeFaceFromWires - %s - failed to make section face.\n", getNameInDocument()); return {}; } @@ -918,7 +918,7 @@ TopoDS_Shape DrawViewSection::makeFaceFromWires(std::vector& inWire // turn OCC section faces into TD geometry std::vector DrawViewSection::makeTDSectionFaces(const TopoDS_Compound& topoDSFaces) { - // Base::Console().Message("DVS::makeTDSectionFaces()\n"); + // Base::Console().message("DVS::makeTDSectionFaces()\n"); std::vector tdSectionFaces; TopExp_Explorer sectionExpl(topoDSFaces, TopAbs_FACE); for (; sectionExpl.More(); sectionExpl.Next()) { @@ -976,7 +976,7 @@ Base::Vector3d DrawViewSection::getSectionDirectionOnBaseView() // find the points and directions to make the change point marks. ChangePointVector DrawViewSection::getChangePointsFromSectionLine() { - // Base::Console().Message("Dvs::getChangePointsFromSectionLine()\n"); + // Base::Console().message("Dvs::getChangePointsFromSectionLine()\n"); ChangePointVector result; std::vector allPoints; auto* baseDvp = freecad_cast(BaseView.getValue()); @@ -1151,7 +1151,7 @@ gp_Ax2 DrawViewSection::getSectionCS() const sectionCS = gp_Ax2(gOrigin, gNormal, gXDir); } catch (...) { - Base::Console().Error("DVS::getSectionCS - %s - failed to create section CS\n", + Base::Console().error("DVS::getSectionCS - %s - failed to create section CS\n", getNameInDocument()); } return sectionCS; @@ -1291,7 +1291,7 @@ void DrawViewSection::makeLineSets() std::string fileSpec = PatIncluded.getValue(); Base::FileInfo fi(fileSpec); if (!fi.isReadable()) { - Base::Console().Message("%s can not read hatch file: %s\n", + Base::Console().message("%s can not read hatch file: %s\n", getNameInDocument(), fileSpec.c_str()); return; diff --git a/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp b/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp index e7ab9d3da6..36bd382ffd 100644 --- a/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp +++ b/src/Mod/TechDraw/App/DrawViewSpreadsheet.cpp @@ -163,7 +163,7 @@ std::string DrawViewSpreadsheet::getSheetImage() std::string sColStart, sColEnd; if (boost::regex_search(scellstart, what, re)) { if (what.size() < 3) { - Base::Console().Error("%s - start cell (%s) is invalid\n", getNameInDocument(), + Base::Console().error("%s - start cell (%s) is invalid\n", getNameInDocument(), CellStart.getValue()); return std::string(); } @@ -175,7 +175,7 @@ std::string DrawViewSpreadsheet::getSheetImage() iRowStart = std::stoi(rowPart); } catch (...) { - Base::Console().Error("%s - start cell (%s) invalid row\n", + Base::Console().error("%s - start cell (%s) invalid row\n", getNameInDocument(), rowPart.c_str()); return std::string(); } @@ -183,7 +183,7 @@ std::string DrawViewSpreadsheet::getSheetImage() if (boost::regex_search(scellend, what, re)) { if (what.size() < 3) { - Base::Console().Error("%s - end cell (%s) is invalid\n", getNameInDocument(), CellEnd.getValue()); + Base::Console().error("%s - end cell (%s) is invalid\n", getNameInDocument(), CellEnd.getValue()); } else { colPart = what[1]; sColEnd = colPart; @@ -192,7 +192,7 @@ std::string DrawViewSpreadsheet::getSheetImage() iRowEnd = std::stoi(rowPart); } catch (...) { - Base::Console().Error("%s - end cell (%s) invalid row\n", + Base::Console().error("%s - end cell (%s) invalid row\n", getNameInDocument(), rowPart.c_str()); return std::string(); } @@ -204,7 +204,7 @@ std::string DrawViewSpreadsheet::getSheetImage() //validate range start column in sheet's available columns int iAvailColStart = colInList(availcolumns, sColStart); if (iAvailColStart < 0) { //not found range start column in availcolumns list - Base::Console().Error("DVS - %s - start Column (%s) is invalid\n", + Base::Console().error("DVS - %s - start Column (%s) is invalid\n", getNameInDocument(), sColStart.c_str()); return std::string(); } @@ -212,7 +212,7 @@ std::string DrawViewSpreadsheet::getSheetImage() //validate range end column in sheet's available columns int iAvailColEnd = colInList(availcolumns, sColEnd); if (iAvailColEnd < 0) { - Base::Console().Error("DVS - %s - end Column (%s) is invalid\n", + Base::Console().error("DVS - %s - end Column (%s) is invalid\n", getNameInDocument(), sColEnd.c_str()); return std::string(); } @@ -220,7 +220,7 @@ std::string DrawViewSpreadsheet::getSheetImage() //check for logical range if ( (iAvailColStart > iAvailColEnd) || (iRowStart > iRowEnd) ) { - Base::Console().Error("%s - cell range is illogical\n", getNameInDocument()); + Base::Console().error("%s - cell range is illogical\n", getNameInDocument()); return std::string(); } @@ -286,7 +286,7 @@ std::string DrawViewSpreadsheet::getSheetImage() DrawUtil::encodeXmlSpecialChars(temp); field << temp; } else { - Base::Console().Error("DVSS: Unknown property type\n"); + Base::Console().error("DVSS: Unknown property type\n"); } celltext = field.str(); } diff --git a/src/Mod/TechDraw/App/DrawViewSymbol.cpp b/src/Mod/TechDraw/App/DrawViewSymbol.cpp index 56727ea298..66752c7d20 100644 --- a/src/Mod/TechDraw/App/DrawViewSymbol.cpp +++ b/src/Mod/TechDraw/App/DrawViewSymbol.cpp @@ -196,9 +196,9 @@ bool DrawViewSymbol::loadQDomDocument(QDomDocument& symbolDocument) bool rc = symbolDocument.setContent(qba, nsProcess, &errorMsg, &errorLine, &errorCol); if (!rc) { //invalid SVG message - Base::Console().Warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n", + Base::Console().warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n", getNameInDocument()); - Base::Console().Log("DrawViewSymbol - %s - len: %d rc: %d error: %s line: %d col: %d\n", + Base::Console().log("DrawViewSymbol - %s - len: %d rc: %d error: %s line: %d col: %d\n", getNameInDocument(), strlen(symbol), rc, qPrintable(errorMsg), errorLine, errorCol); } @@ -207,9 +207,9 @@ bool DrawViewSymbol::loadQDomDocument(QDomDocument& symbolDocument) QDomDocument::ParseResult rc = symbolDocument.setContent(qba); // Use the default ParseOptions if (!rc) { //invalid SVG message - Base::Console().Warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n", + Base::Console().warning("DrawViewSymbol - %s - SVG for Symbol is not valid. See log.\n", getNameInDocument()); - Base::Console().Log("DrawViewSymbol - %s - len: %d error: %s line: %d col: %d\n", + Base::Console().log("DrawViewSymbol - %s - len: %d error: %s line: %d col: %d\n", getNameInDocument(), strlen(symbol), qPrintable(rc.errorMessage), rc.errorLine, rc.errorColumn); } diff --git a/src/Mod/TechDraw/App/DrawWeldSymbol.cpp b/src/Mod/TechDraw/App/DrawWeldSymbol.cpp index d6e98175f3..fe50e74475 100644 --- a/src/Mod/TechDraw/App/DrawWeldSymbol.cpp +++ b/src/Mod/TechDraw/App/DrawWeldSymbol.cpp @@ -62,11 +62,11 @@ DrawWeldSymbol::DrawWeldSymbol() //but if this is a restore of an existing DWS, the tiles will loaded elsewhere void DrawWeldSymbol::onSettingDocument() { -// Base::Console().Message("DWS::onSettingDocument() - doc: %s\n", getDocument()->getName()); +// Base::Console().message("DWS::onSettingDocument() - doc: %s\n", getDocument()->getName()); App::Document* doc = getDocument(); if (doc->testStatus(App::Document::Status::Restoring)) { -// Base::Console().Message("DWS::onSettingDocument() - restoring!\n"); +// Base::Console().message("DWS::onSettingDocument() - restoring!\n"); return; } @@ -113,7 +113,7 @@ short DrawWeldSymbol::mustExecute() const App::DocumentObjectExecReturn *DrawWeldSymbol::execute() { -// Base::Console().Message("DWS::execute()\n"); +// Base::Console().message("DWS::execute()\n"); if (!keepUpdated()) { return DrawView::execute(); } @@ -124,7 +124,7 @@ App::DocumentObjectExecReturn *DrawWeldSymbol::execute() std::vector DrawWeldSymbol::getTiles() const { -// Base::Console().Message("DWS::getTiles()\n"); +// Base::Console().message("DWS::getTiles()\n"); std::vector result; std::vector tiles = getInList(); diff --git a/src/Mod/TechDraw/App/EdgeWalker.cpp b/src/Mod/TechDraw/App/EdgeWalker.cpp index 3d3f1f4891..57e438e659 100644 --- a/src/Mod/TechDraw/App/EdgeWalker.cpp +++ b/src/Mod/TechDraw/App/EdgeWalker.cpp @@ -68,13 +68,13 @@ void edgeVisitor::next_edge(Edge e) void edgeVisitor::begin_face() { -// Base::Console().Message("EV::begin_face()\n"); +// Base::Console().message("EV::begin_face()\n"); wireEdges.clear(); } void edgeVisitor::end_face() { -// Base::Console().Message("EV::end_face()\n"); +// Base::Console().message("EV::end_face()\n"); graphWires.push_back(wireEdges); } @@ -103,7 +103,7 @@ EdgeWalker::~EdgeWalker() //loads a list of unique edges into the traversal mechanism bool EdgeWalker::loadEdges(std::vector& edges) { -// Base::Console().Message("EW::loadEdges(we) - WEdgesIn: %d\n", edges.size()); +// Base::Console().message("EW::loadEdges(we) - WEdgesIn: %d\n", edges.size()); int idx = 0; for (auto& e: edges) { std::pair p; @@ -119,7 +119,7 @@ bool EdgeWalker::loadEdges(std::vector& edges) bool EdgeWalker::loadEdges(std::vector edges) { -// Base::Console().Message("EW::loadEdges(TopoDS) - edges: %d\n", edges.size()); +// Base::Console().message("EW::loadEdges(TopoDS) - edges: %d\n", edges.size()); if (edges.empty()) { throw Base::ValueError("EdgeWalker has no edges to load\n"); } @@ -146,7 +146,7 @@ bool EdgeWalker::setSize(std::size_t size) bool EdgeWalker::prepare() { - //Base::Console().Message("TRACE - EW::prepare()\n"); + //Base::Console().message("TRACE - EW::prepare()\n"); // Initialize the interior edge index property_map::type e_index = get(edge_index, m_g); graph_traits::edges_size_type edge_count = 0; @@ -183,14 +183,14 @@ std::vector EdgeWalker::execute(std::vector edgeList, ewWireList EdgeWalker::getResult() { - //Base::Console().Message("TRACE - EW::getResult()\n"); + //Base::Console().message("TRACE - EW::getResult()\n"); // Return value is a list of many wires each of which is a list of many WE return m_eV.getResult(); } std::vector EdgeWalker::getResultWires() { - //Base::Console().Message("TRACE - EW::getResultWires()\n"); + //Base::Console().message("TRACE - EW::getResultWires()\n"); std::vector fw; ewWireList result = m_eV.getResult(); if (result.wires.empty()) { @@ -213,7 +213,7 @@ std::vector EdgeWalker::getResultWires() std::vector EdgeWalker::getResultNoDups() { - //Base::Console().Message("TRACE - EW::getResultNoDups()\n"); + //Base::Console().message("TRACE - EW::getResultNoDups()\n"); std::vector fw; ewWireList result = m_eV.getResult(); if (result.wires.empty()) { @@ -240,7 +240,7 @@ std::vector EdgeWalker::getResultNoDups() //! make a clean wire with sorted, oriented, connected, etc edges TopoDS_Wire EdgeWalker::makeCleanWire(std::vector edges, double tol) { - //Base::Console().Message("TRACE - EW::makeCleanWire()\n"); + //Base::Console().message("TRACE - EW::makeCleanWire()\n"); TopoDS_Wire result; BRepBuilderAPI_MakeWire mkWire; ShapeFix_ShapeTolerance sTol; @@ -269,7 +269,7 @@ TopoDS_Wire EdgeWalker::makeCleanWire(std::vector edges, double tol std::vector EdgeWalker:: makeUniqueVList(std::vector edges) { -// Base::Console().Message("TRACE - EW::makeUniqueVList() - edgesIn: %d\n", edges.size()); +// Base::Console().message("TRACE - EW::makeUniqueVList() - edgesIn: %d\n", edges.size()); std::vector uniqueVert; for(auto& e:edges) { Base::Vector3d v1 = DrawUtil::vertex2Vector(TopExp::FirstVertex(e)); @@ -293,7 +293,7 @@ std::vector EdgeWalker:: makeUniqueVList(std::vector uniqueVert.push_back(TopExp::LastVertex(e)); } } -// Base::Console().Message("EW::makeUniqueVList - verts out: %d\n", uniqueVert.size()); +// Base::Console().message("EW::makeUniqueVList - verts out: %d\n", uniqueVert.size()); return uniqueVert; } @@ -301,7 +301,7 @@ std::vector EdgeWalker:: makeUniqueVList(std::vector std::vector EdgeWalker::makeWalkerEdges(std::vector edges, std::vector verts) { -// Base::Console().Message("TRACE - EW::makeWalkerEdges() - edges: %d verts: %d\n", edges.size(), verts.size()); +// Base::Console().message("TRACE - EW::makeWalkerEdges() - edges: %d verts: %d\n", edges.size(), verts.size()); m_saveInEdges = edges; std::vector walkerEdges; for (const auto& e:edges) { @@ -323,13 +323,13 @@ std::vector EdgeWalker::makeWalkerEdges(std::vector edg walkerEdges.push_back(we); } - //Base::Console().Message("TRACE - EW::makeWalkerEdges - returns we: %d\n", walkerEdges.size()); + //Base::Console().message("TRACE - EW::makeWalkerEdges - returns we: %d\n", walkerEdges.size()); return walkerEdges; } size_t EdgeWalker::findUniqueVert(TopoDS_Vertex vx, std::vector &uniqueVert) { -// Base::Console().Message("TRACE - EW::findUniqueVert()\n"); +// Base::Console().message("TRACE - EW::findUniqueVert()\n"); std::size_t idx = 0; Base::Vector3d vx3d = DrawUtil::vertex2Vector(vx); for(auto& v : uniqueVert) { @@ -352,7 +352,7 @@ std::vector EdgeWalker::sortStrip(std::vector fw, bool } std::vector sortedWires = sortWiresBySize(closedWires, false); //biggest 1st if (sortedWires.empty()) { - Base::Console().Message("EW::sortStrip - no sorted Wires!\n"); + Base::Console().message("EW::sortStrip - no sorted Wires!\n"); return sortedWires; } @@ -366,7 +366,7 @@ std::vector EdgeWalker::sortStrip(std::vector fw, bool // sort (closed) wires in order of enclosed area std::vector EdgeWalker::sortWiresBySize(std::vector& w, bool ascend) { - //Base::Console().Message("TRACE - EW::sortWiresBySize()\n"); + //Base::Console().message("TRACE - EW::sortWiresBySize()\n"); std::vector wires = w; std::sort(wires.begin(), wires.end(), EdgeWalker::wireCompare); if (ascend) { @@ -386,7 +386,7 @@ std::vector EdgeWalker::sortWiresBySize(std::vector& w std::vector EdgeWalker::makeEmbedding(const std::vector edges, const std::vector uniqueVList) { -// Base::Console().Message("TRACE - EW::makeEmbedding(edges: %d, verts: %d)\n", +// Base::Console().message("TRACE - EW::makeEmbedding(edges: %d, verts: %d)\n", // edges.size(), uniqueVList.size()); std::vector result; @@ -425,7 +425,7 @@ std::vector EdgeWalker::makeEmbedding(const std::vector //! get incidence row as edge indices for v'th vertex std::vector EdgeWalker::getEmbeddingRowIx(int v) { -// //Base::Console().Message("TRACE - EW::getEmbeddingRowIx(%d)\n", v); +// //Base::Console().message("TRACE - EW::getEmbeddingRowIx(%d)\n", v); std::vector result; embedItem ei = m_embedding[v]; for (auto& ii: ei.incidenceList) { @@ -437,7 +437,7 @@ std::vector EdgeWalker::getEmbeddingRowIx(int v) //! get incidence row as edgeDescriptors for v'th vertex std::vector EdgeWalker::getEmbeddingRow(int v) { -// //Base::Console().Message("TRACE - EW::getEmbeddingRow(%d)\n", v); +// //Base::Console().message("TRACE - EW::getEmbeddingRow(%d)\n", v); std::vector result; embedItem ei = m_embedding[v]; for (auto& ii: ei.incidenceList) { @@ -564,7 +564,7 @@ std::string embedItem::dump() std::vector embedItem::sortIncidenceList (std::vector &list, bool ascend) { - //Base::Console().Message("TRACE - eI::sortIncidenceList()\n"); + //Base::Console().message("TRACE - eI::sortIncidenceList()\n"); std::vector< incidenceItem > tempList = list; std::sort(tempList.begin(), tempList.end(), incidenceItem::iiCompare); if (ascend) { diff --git a/src/Mod/TechDraw/App/Geometry.cpp b/src/Mod/TechDraw/App/Geometry.cpp index 3023677532..493d48914c 100644 --- a/src/Mod/TechDraw/App/Geometry.cpp +++ b/src/Mod/TechDraw/App/Geometry.cpp @@ -292,7 +292,7 @@ std::vector BaseGeom::findEndPoints() result.emplace_back(p.X(), p.Y(), p.Z()); } else { //TODO: this should throw something - Base::Console().Message("Geometry::findEndPoints - OCC edge not found\n"); + Base::Console().message("Geometry::findEndPoints - OCC edge not found\n"); throw Base::RuntimeError("no OCC edge in Geometry::findEndPoints"); } return result; @@ -306,7 +306,7 @@ Base::Vector3d BaseGeom::getStartPoint() return verts[0]; } else { //TODO: this should throw something - Base::Console().Message("Geometry::getStartPoint - start point not found!\n"); + Base::Console().message("Geometry::getStartPoint - start point not found!\n"); Base::Vector3d badResult(0.0, 0.0, 0.0); return badResult; } @@ -319,7 +319,7 @@ Base::Vector3d BaseGeom::getEndPoint() if (verts.size() != 2) { //TODO: this should throw something - Base::Console().Message("Geometry::getEndPoint - end point not found!\n"); + Base::Console().message("Geometry::getEndPoint - end point not found!\n"); Base::Vector3d badResult(0.0, 0.0, 0.0); return badResult; } @@ -433,7 +433,7 @@ bool BaseGeom::closed() // return a BaseGeom similar to this, but inverted with respect to Y axis BaseGeomPtr BaseGeom::inverted() { -// Base::Console().Message("BG::inverted()\n"); +// Base::Console().message("BG::inverted()\n"); TopoDS_Shape invertedShape = ShapeUtils::invertGeometry(occEdge); TopoDS_Edge invertedEdge = TopoDS::Edge(invertedShape); return baseFactory(invertedEdge); @@ -462,7 +462,7 @@ std::string BaseGeom::geomTypeName() BaseGeomPtr BaseGeom::baseFactory(TopoDS_Edge edge, bool isCosmetic) { if (edge.IsNull()) { - Base::Console().Message("BG::baseFactory - input edge is NULL \n"); + Base::Console().message("BG::baseFactory - input edge is NULL \n"); } //weed out rubbish edges before making geometry if (!isCosmetic && !validateEdge(edge)) { @@ -529,18 +529,18 @@ BaseGeomPtr BaseGeom::baseFactory(TopoDS_Edge edge, bool isCosmetic) } } } else { -// Base::Console().Message("Geom::baseFactory - circEdge is Null\n"); +// Base::Console().message("Geom::baseFactory - circEdge is Null\n"); result = bspline; } break; } catch (const Standard_Failure& e) { - Base::Console().Log("Geom::baseFactory - OCC error - %s - while making spline\n", + Base::Console().log("Geom::baseFactory - OCC error - %s - while making spline\n", e.GetMessageString()); break; } catch (...) { - Base::Console().Log("Geom::baseFactory - unknown error occurred while making spline\n"); + Base::Console().log("Geom::baseFactory - unknown error occurred while making spline\n"); break; } break; } // end bspline case @@ -577,7 +577,7 @@ TopoDS_Edge BaseGeom::completeEdge(const TopoDS_Edge &edge) { } } catch (Standard_Failure &e) { - Base::Console().Error("BaseGeom::completeEdge OCC error: %s\n", e.GetMessageString()); + Base::Console().error("BaseGeom::completeEdge OCC error: %s\n", e.GetMessageString()); } return TopoDS_Edge(); @@ -621,7 +621,7 @@ std::vector BaseGeom::intersection(TechDraw::BaseGeomPtr geom2) TopoShape BaseGeom::asTopoShape(double scale) { -// Base::Console().Message("BG::asTopoShape(%.3f) - dump: %s\n", scale, dump().c_str()); +// Base::Console().message("BG::asTopoShape(%.3f) - dump: %s\n", scale, dump().c_str()); TopoDS_Shape unscaledShape = ShapeUtils::scaleShape(getOCCEdge(), 1.0 / scale); TopoDS_Edge unscaledEdge = TopoDS::Edge(unscaledShape); return unscaledEdge; @@ -655,7 +655,7 @@ Ellipse::Ellipse(Base::Vector3d c, double mnr, double mjr) GC_MakeEllipse me(gp_Ax2(gp_Pnt(c.x, c.y, c.z), gp_Dir(0.0, 0.0, 1.0)), major, minor); if (!me.IsDone()) { - Base::Console().Message("G:Ellipse - failed to make Ellipse\n"); + Base::Console().message("G:Ellipse - failed to make Ellipse\n"); } const Handle(Geom_Ellipse) gEllipse = me.Value(); BRepBuilderAPI_MakeEdge mkEdge(gEllipse, 0.0, 2 * std::numbers::pi); @@ -683,7 +683,7 @@ AOE::AOE(const TopoDS_Edge &e) : Ellipse(e) a = v3.DotCross(v1, v2); } catch (const Standard_Failure& e) { - Base::Console().Error("Geom::AOE::AOE - OCC error - %s - while making AOE in ctor\n", + Base::Console().error("Geom::AOE::AOE - OCC error - %s - while making AOE in ctor\n", e.GetMessageString()); } @@ -1298,7 +1298,7 @@ Vertex::Vertex(double x, double y) Vertex::Vertex(Base::Vector3d v) : Vertex(v.x, v.y) { -// Base::Console().Message("V::V(%s)\n", +// Base::Console().message("V::V(%s)\n", // DrawUtil::formatVector(v).c_str()); } @@ -1372,7 +1372,7 @@ void Vertex::Restore(Base::XMLReader &reader) void Vertex::dump(const char* title) { - Base::Console().Message("TD::Vertex - %s - point: %s vis: %d cosmetic: %d cosLink: %d cosTag: %s\n", + Base::Console().message("TD::Vertex - %s - point: %s vis: %d cosmetic: %d cosLink: %d cosTag: %s\n", title, DrawUtil::formatVector(pnt).c_str(), hlrVisible, cosmetic, cosmeticLink, cosmeticTag.c_str()); } @@ -1452,7 +1452,7 @@ BaseGeomPtrVector GeometryUtils::chainGeoms(BaseGeomPtrVector geoms) TopoDS_Edge GeometryUtils::edgeFromGeneric(TechDraw::GenericPtr g) { -// Base::Console().Message("GU::edgeFromGeneric()\n"); +// Base::Console().message("GU::edgeFromGeneric()\n"); //TODO: note that this isn't quite right as g can be a polyline! //sb points.first, points.last //and intermediates should be added to Point @@ -1571,7 +1571,7 @@ bool GeometryUtils::getCircleParms(const TopoDS_Edge& occEdge, double& radius, B return true; } catch (Standard_Failure& err) { - Base::Console().Message("Geo::getCircleParms - failed to make a circle\n"); + Base::Console().message("Geo::getCircleParms - failed to make a circle\n"); } return false; @@ -1756,7 +1756,7 @@ TopoDS_Face GeometryUtils::makePerforatedFace(FacePtr bigCheese, const std::vec faceShape = Part::FaceMakerCheese::makeFace(cheeseIngredients); } catch (const Standard_Failure&) { - Base::Console().Warning("Area - could not make holes in face\n"); + Base::Console().warning("Area - could not make holes in face\n"); return flippedFace; } diff --git a/src/Mod/TechDraw/App/GeometryMatcher.cpp b/src/Mod/TechDraw/App/GeometryMatcher.cpp index 0f7d26badd..4002f4151c 100644 --- a/src/Mod/TechDraw/App/GeometryMatcher.cpp +++ b/src/Mod/TechDraw/App/GeometryMatcher.cpp @@ -160,7 +160,7 @@ bool GeometryMatcher::compareLines(const TopoDS_Edge& edge1, const TopoDS_Edge& // how does the edge that was NOT null in compareEdges become null here? // should not happen, but does! if (edge1.IsNull() || edge2.IsNull()) { - // Base::Console().Message("GM::compareLine - an input edge is null\n"); + // Base::Console().message("GM::compareLine - an input edge is null\n"); return false; } return compareEndPoints(edge1, edge2); @@ -232,7 +232,7 @@ bool GeometryMatcher::compareBSplines(const TopoDS_Edge& edge1, const TopoDS_Edg circleEdge2 = GeometryUtils::asCircle(edge2, isArc2); } catch (Base::RuntimeError&) { - Base::Console().Error("GeometryMatcher failed to make circles from splines\n"); + Base::Console().error("GeometryMatcher failed to make circles from splines\n"); return false; } if (!isArc1 && !isArc2) { diff --git a/src/Mod/TechDraw/App/GeometryObject.cpp b/src/Mod/TechDraw/App/GeometryObject.cpp index 021cb13534..eeb6e192d3 100644 --- a/src/Mod/TechDraw/App/GeometryObject.cpp +++ b/src/Mod/TechDraw/App/GeometryObject.cpp @@ -162,7 +162,7 @@ void GeometryObject::projectShape(const TopoDS_Shape& inShape, const gp_Ax2& vie brep_hlr->Hide(); } catch (const Standard_Failure& e) { - Base::Console().Error("GO::projectShape - OCC error - %s - while projecting shape\n", + Base::Console().error("GO::projectShape - OCC error - %s - while projecting shape\n", e.GetMessageString()); throw Base::RuntimeError("GeometryObject::projectShape - OCC error"); } @@ -250,7 +250,7 @@ void GeometryObject::projectShape(const TopoDS_Shape& inShape, const gp_Ax2& vie //convert the hlr output into TD Geometry void GeometryObject::makeTDGeometry() { -// Base::Console().Message("GO::makeTDGeometry()\n"); +// Base::Console().message("GO::makeTDGeometry()\n"); extractGeometry(EdgeClass::HARD, //always show the hard&outline visible lines true); extractGeometry(EdgeClass::OUTLINE, @@ -289,7 +289,7 @@ void GeometryObject::makeTDGeometry() //!set up a hidden line remover and project a shape with it void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, const gp_Ax2& viewAxis) { -// Base::Console().Message("GO::projectShapeWithPolygonAlgo()\n"); +// Base::Console().message("GO::projectShapeWithPolygonAlgo()\n"); // Clear previous Geometry clear(); @@ -329,7 +329,7 @@ void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, cons brep_hlrPoly->Update(); } catch (const Standard_Failure& e) { - Base::Console().Error( + Base::Console().error( "GO::projectShapeWithPolygonAlgo - OCC error - %s - while projecting shape\n", e.GetMessageString()); throw Base::RuntimeError("GeometryObject::projectShapeWithPolygonAlgo - OCC error"); @@ -377,7 +377,7 @@ void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, cons hidOutline =ShapeUtils::invertGeometry(hidOutline); } catch (const Standard_Failure& e) { - Base::Console().Error( + Base::Console().error( "GO::projectShapeWithPolygonAlgo - OCC error - %s - while extracting edges\n", e.GetMessageString()); throw Base::RuntimeError("GeometryObject::projectShapeWithPolygonAlgo - OCC error occurred " @@ -397,7 +397,7 @@ void GeometryObject::projectShapeWithPolygonAlgo(const TopoDS_Shape& input, cons //TODO: allow use of perspective projector TopoDS_Shape GeometryObject::projectSimpleShape(const TopoDS_Shape& shape, const gp_Ax2& CS) { - // Base::Console().Message("GO::()\n"); + // Base::Console().message("GO::()\n"); if (shape.IsNull()) { throw Base::ValueError("GO::projectSimpleShape - input shape is NULL"); } @@ -431,7 +431,7 @@ TopoDS_Shape GeometryObject::simpleProjection(const TopoDS_Shape& shape, const g TopoDS_Shape GeometryObject::projectFace(const TopoDS_Shape& face, const gp_Ax2& CS) { - // Base::Console().Message("GO::projectFace()\n"); + // Base::Console().message("GO::projectFace()\n"); if (face.IsNull()) { throw Base::ValueError("GO::projectFace - input Face is NULL"); } @@ -454,7 +454,7 @@ TopoDS_Shape GeometryObject::projectFace(const TopoDS_Shape& face, const gp_Ax2& //!add edges meeting filter criteria for category, visibility void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible) { - // Base::Console().Message("GO::extractGeometry(%d, %d)\n", category, hlrVisible); + // Base::Console().message("GO::extractGeometry(%d, %d)\n", category, hlrVisible); TopoDS_Shape filtEdges; if (hlrVisible) { switch (category) { @@ -474,7 +474,7 @@ void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible) filtEdges = visIso; break; default: - Base::Console().Warning( + Base::Console().warning( "GeometryObject::ExtractGeometry - unsupported hlrVisible EdgeClass: %d\n", static_cast(category)); return; @@ -498,7 +498,7 @@ void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible) filtEdges = hidIso; break; default: - Base::Console().Warning( + Base::Console().warning( "GeometryObject::ExtractGeometry - unsupported hidden EdgeClass: %d\n", static_cast(category)); return; @@ -512,7 +512,7 @@ void GeometryObject::extractGeometry(EdgeClass category, bool hlrVisible) void GeometryObject::addGeomFromCompound(TopoDS_Shape edgeCompound, EdgeClass category, bool hlrVisible) { -// Base::Console().Message("GO::addGeomFromCompound(%d, %d)\n", category, hlrVisible); +// Base::Console().message("GO::addGeomFromCompound(%d, %d)\n", category, hlrVisible); if (edgeCompound.IsNull()) { return; // There is no OpenCascade Geometry to be calculated } @@ -669,7 +669,7 @@ int GeometryObject::addCosmeticVertex(Base::Vector3d pos, std::string tagString) // insertGeomForCE(ce) int GeometryObject::addCosmeticEdge(CosmeticEdge* ce) { - // Base::Console().Message("GO::addCosmeticEdge(%X) 0\n", ce); + // Base::Console().message("GO::addCosmeticEdge(%X) 0\n", ce); double scale = m_parent->getScale(); TechDraw::BaseGeomPtr e = ce->scaledGeometry(scale); e->setCosmetic(true); @@ -684,7 +684,7 @@ int GeometryObject::addCosmeticEdge(CosmeticEdge* ce) //this should be made obsolete and the variant with tag used instead int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end) { - // Base::Console().Message("GO::addCosmeticEdge() 1 - deprec?\n"); + // Base::Console().message("GO::addCosmeticEdge() 1 - deprec?\n"); gp_Pnt gp1(start.x, start.y, start.z); gp_Pnt gp2(end.x, end.y, end.z); TopoDS_Edge occEdge = BRepBuilderAPI_MakeEdge(gp1, gp2); @@ -700,7 +700,7 @@ int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end) int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end, std::string tagString) { - // Base::Console().Message("GO::addCosmeticEdge() 2\n"); + // Base::Console().message("GO::addCosmeticEdge() 2\n"); gp_Pnt gp1(start.x, start.y, start.z); gp_Pnt gp2(end.x, end.y, end.z); TopoDS_Edge occEdge = BRepBuilderAPI_MakeEdge(gp1, gp2); @@ -716,7 +716,7 @@ int GeometryObject::addCosmeticEdge(Base::Vector3d start, Base::Vector3d end, st int GeometryObject::addCosmeticEdge(TechDraw::BaseGeomPtr base, std::string tagString) { - // Base::Console().Message("GO::addCosmeticEdge(%X, %s) 3\n", base, tagString.c_str()); + // Base::Console().message("GO::addCosmeticEdge(%X, %s) 3\n", base, tagString.c_str()); base->setCosmetic(true); base->setHlrVisible(true); base->source(SourceType::COSMETICEDGE); @@ -730,7 +730,7 @@ int GeometryObject::addCosmeticEdge(TechDraw::BaseGeomPtr base, std::string tagS int GeometryObject::addCenterLine(TechDraw::BaseGeomPtr base, std::string tag) // int s, int si) { - // Base::Console().Message("GO::addCenterLine()\n"); + // Base::Console().message("GO::addCenterLine()\n"); base->setCosmetic(true); base->setCosmeticTag(tag); base->source(SourceType::CENTERLINE); @@ -802,7 +802,7 @@ bool GeometryObject::isWithinArc(double theta, double first, double last, bool c //note bbx is scaled Base::BoundBox3d GeometryObject::calcBoundingBox() const { - // Base::Console().Message("GO::calcBoundingBox() - edges: %d\n", edgeGeom.size()); + // Base::Console().message("GO::calcBoundingBox() - edges: %d\n", edgeGeom.size()); Bnd_Box testBox; testBox.SetGap(0.0); if (!edgeGeom.empty()) { diff --git a/src/Mod/TechDraw/App/HatchLine.cpp b/src/Mod/TechDraw/App/HatchLine.cpp index c5a6b33975..b155943208 100644 --- a/src/Mod/TechDraw/App/HatchLine.cpp +++ b/src/Mod/TechDraw/App/HatchLine.cpp @@ -230,7 +230,7 @@ void PATLineSpec::load(std::string& lineSpec) { std::vector values = split(lineSpec); if (values.size() < 5) { - Base::Console().Message( "PATLineSpec::load(%s) invalid entry in pattern\n", lineSpec.c_str() ); + Base::Console().message( "PATLineSpec::load(%s) invalid entry in pattern\n", lineSpec.c_str() ); return; } m_angle = values[0]; @@ -256,7 +256,7 @@ std::vector PATLineSpec::split(std::string line) result.push_back(std::stod(cell)); } catch (const std::invalid_argument& ia) { - Base::Console().Warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what()); + Base::Console().warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what()); result.push_back(0.0); } } @@ -265,17 +265,17 @@ std::vector PATLineSpec::split(std::string line) void PATLineSpec::dump(const char* title) { - Base::Console().Message( "DUMP: %s\n", title); - Base::Console().Message( "Angle: %.3f\n", m_angle); - Base::Console().Message( "Origin: %s\n", DrawUtil::formatVector(m_origin).c_str()); - Base::Console().Message( "Offset: %.3f\n", m_offset); - Base::Console().Message( "Interval: %.3f\n", m_interval); + Base::Console().message( "DUMP: %s\n", title); + Base::Console().message( "Angle: %.3f\n", m_angle); + Base::Console().message( "Origin: %s\n", DrawUtil::formatVector(m_origin).c_str()); + Base::Console().message( "Offset: %.3f\n", m_offset); + Base::Console().message( "Interval: %.3f\n", m_interval); // std::stringstream ss; // for (auto& d: m_dashParms) { // ss << d << ", "; // } // ss << "end"; -// Base::Console().Message( "DashSpec: %s\n", ss.str().c_str()); +// Base::Console().message( "DashSpec: %s\n", ss.str().c_str()); m_dashParms.dump("dashspec"); } @@ -287,7 +287,7 @@ std::vector PATLineSpec::getSpecsForPattern(std::string& parmFile, Base::ifstream inFile; inFile.open(fi, std::ifstream::in); if(!inFile.is_open()) { - Base::Console().Message("Cannot open input file.\n"); + Base::Console().message("Cannot open input file.\n"); return std::vector(); } @@ -309,7 +309,7 @@ std::vector PATLineSpec::getSpecsForPattern(std::string& parmFile, bool PATLineSpec::findPatternStart(std::ifstream& inFile, std::string& parmName) { -// Base::Console().Message("HL::findPatternStart() - parmName: %s\n", parmName.c_str()); +// Base::Console().message("HL::findPatternStart() - parmName: %s\n", parmName.c_str()); while (inFile.good() ){ std::string line; std::getline(inFile, line); @@ -364,7 +364,7 @@ std::vector PATLineSpec::getPatternList(std::string& parmFile) Base::ifstream inFile; inFile.open (fi, std::ifstream::in); if(!inFile.is_open()) { - Base::Console().Message( "Cannot open input file.\n"); + Base::Console().message( "Cannot open input file.\n"); return result; } @@ -457,7 +457,7 @@ void DashSpec::dump(const char* title) for (auto& p: m_parms) { ss << p << ", "; } - Base::Console().Message("DUMP - DashSpec - %s\n", ss.str().c_str()); + Base::Console().message("DUMP - DashSpec - %s\n", ss.str().c_str()); } diff --git a/src/Mod/TechDraw/App/LandmarkDimension.cpp b/src/Mod/TechDraw/App/LandmarkDimension.cpp index c82bcedc25..fbe292531c 100644 --- a/src/Mod/TechDraw/App/LandmarkDimension.cpp +++ b/src/Mod/TechDraw/App/LandmarkDimension.cpp @@ -87,7 +87,7 @@ short LandmarkDimension::mustExecute() const App::DocumentObjectExecReturn *LandmarkDimension::execute() { - // Base::Console().Message("LD::execute() - %s\n", getNameInDocument()); + // Base::Console().message("LD::execute() - %s\n", getNameInDocument()); if (!okToProceed()) { return App::DocumentObject::StdReturn; } @@ -96,7 +96,7 @@ App::DocumentObjectExecReturn *LandmarkDimension::execute() References2D.setValue(dvp); std::vector features = References3D.getValues(); - // Base::Console().Message("LD::execute - features: %d\n", features.size()); + // Base::Console().message("LD::execute - features: %d\n", features.size()); //if distance, required size = 2 //if angle, required size = 3; //not implemented yet unsigned int requiredSize = 2; @@ -127,7 +127,7 @@ App::DocumentObjectExecReturn *LandmarkDimension::execute() index++; } } - // Base::Console().Message("LD::execute - front: %s back: %s\n", + // Base::Console().message("LD::execute - front: %s back: %s\n", // DrawUtil::formatVector(points.front()).c_str(), // DrawUtil::formatVector(points.back()).c_str()); setLinearPoints(points.front(), points.back()); diff --git a/src/Mod/TechDraw/App/LineFormat.cpp b/src/Mod/TechDraw/App/LineFormat.cpp index 107ef127a8..f1fc7e9a7a 100644 --- a/src/Mod/TechDraw/App/LineFormat.cpp +++ b/src/Mod/TechDraw/App/LineFormat.cpp @@ -84,8 +84,8 @@ LineFormat::LineFormat(const int style, void LineFormat::dump(const char* title) { - Base::Console().Message("LF::dump - %s \n", title); - Base::Console().Message("LF::dump - %s \n", toString().c_str()); + Base::Console().message("LF::dump - %s \n", title); + Base::Console().message("LF::dump - %s \n", toString().c_str()); } std::string LineFormat::toString() const diff --git a/src/Mod/TechDraw/App/LineGenerator.cpp b/src/Mod/TechDraw/App/LineGenerator.cpp index e5a7bd0387..ca767c406b 100644 --- a/src/Mod/TechDraw/App/LineGenerator.cpp +++ b/src/Mod/TechDraw/App/LineGenerator.cpp @@ -90,7 +90,7 @@ QPen LineGenerator::getBestPen(size_t isoNumber, Qt::PenStyle qtStyle, double wi //! 1-15 and ANSI lines are 1-4(?) The line width is the nominal width in mm. QPen LineGenerator::getLinePen(size_t lineNumber, double nominalLineWidth) { -// Base::Console().Message("LG::getLinePen(%d, %.3f)\n", +// Base::Console().message("LG::getLinePen(%d, %.3f)\n", // lineNumber, nominalLineWidth); QPen linePen; linePen.setWidthF(nominalLineWidth); @@ -219,7 +219,7 @@ std::map LineGenerator::loadElements() Base::FileInfo fi(parmFile); Base::ifstream inFile(fi, std::ifstream::in); if(!inFile.is_open()) { - Base::Console().Message( "Cannot open line element def file: %s\n", parmFile.c_str()); + Base::Console().message( "Cannot open line element def file: %s\n", parmFile.c_str()); return result; } std::string line; @@ -245,7 +245,7 @@ std::vector< std::vector > LineGenerator::getLineDefinitions() Base::FileInfo fi(Preferences::currentLineDefFile()); Base::ifstream inFile(fi, std::ifstream::in); if(!inFile.is_open()) { - Base::Console().Message( "Cannot open line def file: %s\n", fi.filePath().c_str()); + Base::Console().message( "Cannot open line def file: %s\n", fi.filePath().c_str()); return lineDefs; } @@ -309,7 +309,7 @@ std::vector LineGenerator::getLineDescriptions() Base::FileInfo fi(Preferences::currentLineDefFile()); Base::ifstream inFile(fi, std::ifstream::in); if(!inFile.is_open()) { - Base::Console().Message( "Cannot open line def file: %s\n", fi.filePath().c_str()); + Base::Console().message( "Cannot open line def file: %s\n", fi.filePath().c_str()); return lineDescs; } diff --git a/src/Mod/TechDraw/App/LineGroup.cpp b/src/Mod/TechDraw/App/LineGroup.cpp index 22f43147ad..ea2bded890 100644 --- a/src/Mod/TechDraw/App/LineGroup.cpp +++ b/src/Mod/TechDraw/App/LineGroup.cpp @@ -93,12 +93,12 @@ void LineGroup::setWeight(std::string s, double weight) void LineGroup::dump(const char* title) { - Base::Console().Message( "DUMP: %s\n", title); - Base::Console().Message( "Name: %s\n", m_name.c_str()); - Base::Console().Message( "Thin: %.3f\n", m_thin); - Base::Console().Message( "Graphic: %.3f\n", m_graphic); - Base::Console().Message( "Thick: %.3f\n", m_thick); - Base::Console().Message( "Extra: %.3f\n", m_extra); + Base::Console().message( "DUMP: %s\n", title); + Base::Console().message( "Name: %s\n", m_name.c_str()); + Base::Console().message( "Thin: %.3f\n", m_thin); + Base::Console().message( "Graphic: %.3f\n", m_graphic); + Base::Console().message( "Thick: %.3f\n", m_thick); + Base::Console().message( "Extra: %.3f\n", m_extra); } //static support function: split comma separated string of values into vector of numbers @@ -119,7 +119,7 @@ std::vector LineGroup::split(std::string line) result.push_back(std::stod(cell)); } catch (const std::invalid_argument& ia) { - Base::Console().Warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what()); + Base::Console().warning("Invalid number in cell: %s (%s) \n", cell.c_str(), ia.what()); result.push_back(0.0); } } @@ -133,7 +133,7 @@ std::string LineGroup::getRecordFromFile(std::string parmFile, int groupNumber) Base::FileInfo fi(parmFile); Base::ifstream inFile(fi, std::ifstream::in); if(!inFile.is_open()) { - Base::Console().Message( "Cannot open LineGroup file: %s\n", parmFile.c_str()); + Base::Console().message( "Cannot open LineGroup file: %s\n", parmFile.c_str()); return record; } // parse file to get the groupNumber'th line @@ -151,7 +151,7 @@ std::string LineGroup::getRecordFromFile(std::string parmFile, int groupNumber) } } //endwhile // nothing was found - Base::Console().Error("LineGroup: the LineGroup file has only %s entries but entry number %s is set\n" + Base::Console().error("LineGroup: the LineGroup file has only %s entries but entry number %s is set\n" , std::to_string(counter).c_str() , std::to_string(groupNumber).c_str()); return std::string(); // return an empty string @@ -168,7 +168,7 @@ LineGroup* LineGroup::lineGroupFactory(int groupNumber) std::vector values = LineGroup::split(lgRecord); if (values.size() < 4) { - Base::Console().Error( "LineGroup::invalid entry in %s\n", lgFileName.c_str() ); + Base::Console().error( "LineGroup::invalid entry in %s\n", lgFileName.c_str() ); } else { lg->setWeight("Thin", values[0]); lg->setWeight("Graphic", values[1]); @@ -204,7 +204,7 @@ std::string LineGroup::getGroupNamesFromFile(std::string FileName) Base::FileInfo fi(FileName); Base::ifstream inFile(fi, std::ifstream::in); if (!inFile.is_open()) { - Base::Console().Message("Cannot open LineGroup file: %s\n", FileName.c_str()); + Base::Console().message("Cannot open LineGroup file: %s\n", FileName.c_str()); return record; } // parse the file @@ -223,7 +223,7 @@ std::string LineGroup::getGroupNamesFromFile(std::string FileName) } } //endwhile if (record.empty()) { - Base::Console().Message("LineGroup error: no group found in file %s\n", FileName.c_str()); + Base::Console().message("LineGroup error: no group found in file %s\n", FileName.c_str()); } return record; } diff --git a/src/Mod/TechDraw/App/Preferences.cpp b/src/Mod/TechDraw/App/Preferences.cpp index 49299e5e58..f65a583042 100644 --- a/src/Mod/TechDraw/App/Preferences.cpp +++ b/src/Mod/TechDraw/App/Preferences.cpp @@ -203,7 +203,7 @@ QString Preferences::defaultTemplate() QString templateFileName = QString::fromStdString(prefFileName); Base::FileInfo fi(prefFileName); if (!fi.isReadable()) { - Base::Console().Warning("Template File: %s is not readable\n", prefFileName.c_str()); + Base::Console().warning("Template File: %s is not readable\n", prefFileName.c_str()); templateFileName = QString::fromStdString(defaultFileName); } return templateFileName; @@ -219,7 +219,7 @@ QString Preferences::defaultTemplateDir() QString templateDir = QString::fromStdString(prefTemplateDir); Base::FileInfo fi(prefTemplateDir); if (!fi.isReadable()) { - Base::Console().Warning("Template Directory: %s is not readable\n", + Base::Console().warning("Template Directory: %s is not readable\n", prefTemplateDir.c_str()); templateDir = QString::fromStdString(defaultDir); } @@ -236,7 +236,7 @@ std::string Preferences::lineGroupFile() } Base::FileInfo fi(lgFileName); if (!fi.isReadable()) { - Base::Console().Warning("Line Group File: %s is not readable\n", lgFileName.c_str()); + Base::Console().warning("Line Group File: %s is not readable\n", lgFileName.c_str()); lgFileName = defaultFileName; } return lgFileName; @@ -278,7 +278,7 @@ QString Preferences::defaultSymbolDir() QString symbolDir = QString::fromStdString(prefSymbolDir); Base::FileInfo fi(prefSymbolDir); if (!fi.isReadable()) { - Base::Console().Warning("Symbol Directory: %s is not readable\n", + Base::Console().warning("Symbol Directory: %s is not readable\n", prefSymbolDir.c_str()); symbolDir = QString::fromStdString(defaultDir); } @@ -295,7 +295,7 @@ std::string Preferences::svgFile() } Base::FileInfo fi(prefHatchFile); if (!fi.isReadable()) { - Base::Console().Warning("Svg Hatch File: %s is not readable\n", prefHatchFile.c_str()); + Base::Console().warning("Svg Hatch File: %s is not readable\n", prefHatchFile.c_str()); prefHatchFile = defaultFileName; } return prefHatchFile; @@ -311,7 +311,7 @@ std::string Preferences::patFile() } Base::FileInfo fi(prefHatchFile); if (!fi.isReadable()) { - Base::Console().Warning("Pat Hatch File: %s is not readable\n", prefHatchFile.c_str()); + Base::Console().warning("Pat Hatch File: %s is not readable\n", prefHatchFile.c_str()); prefHatchFile = defaultFileName; } @@ -328,7 +328,7 @@ std::string Preferences::bitmapFill() } Base::FileInfo fi(prefBitmapFile); if (!fi.isReadable()) { - Base::Console().Warning("Bitmap Fill File: %s is not readable\n", prefBitmapFile.c_str()); + Base::Console().warning("Bitmap Fill File: %s is not readable\n", prefBitmapFile.c_str()); prefBitmapFile = defaultFileName; } return prefBitmapFile; @@ -373,7 +373,7 @@ bool Preferences::monochrome() //! set monochrome display on/off void Preferences::monochrome(bool state) { - Base::Console().Message("Pref::useLightText - set to %d\n", state); + Base::Console().message("Pref::useLightText - set to %d\n", state); getPreferenceGroup("Colors")->SetBool("Monochrome", state); } @@ -465,7 +465,7 @@ int Preferences::lineStandard() // this message will appear many times if the parameter is invalid. int parameterValue = getPreferenceGroup("Standards")->GetInt("LineStandard", 1); if (parameterValue < 0) { - Base::Console().Warning(qPrintable(QApplication::translate( + Base::Console().warning(qPrintable(QApplication::translate( "Preferences", "The LineStandard parameter is invalid. Using zero instead.", nullptr))); return 0; } diff --git a/src/Mod/TechDraw/App/PropertyCenterLineList.cpp b/src/Mod/TechDraw/App/PropertyCenterLineList.cpp index e1e99217aa..94141bc5fa 100644 --- a/src/Mod/TechDraw/App/PropertyCenterLineList.cpp +++ b/src/Mod/TechDraw/App/PropertyCenterLineList.cpp @@ -157,7 +157,7 @@ void PropertyCenterLineList::Restore(Base::XMLReader &reader) newG->Restore(reader); if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) { - Base::Console().Error("CenterLine \"%s\" within a PropertyCenterLineList was subject to a partial restore.\n", reader.localName()); + Base::Console().error("CenterLine \"%s\" within a PropertyCenterLineList was subject to a partial restore.\n", reader.localName()); if(isOrderRelevant()) { // Pushes the best try by the CenterLine class values.push_back(newG); diff --git a/src/Mod/TechDraw/App/PropertyCosmeticEdgeList.cpp b/src/Mod/TechDraw/App/PropertyCosmeticEdgeList.cpp index b264b6dd44..c02ef0f36e 100644 --- a/src/Mod/TechDraw/App/PropertyCosmeticEdgeList.cpp +++ b/src/Mod/TechDraw/App/PropertyCosmeticEdgeList.cpp @@ -67,7 +67,7 @@ int PropertyCosmeticEdgeList::getSize() const //_lValueList is not const. so why do we pass a const parameter? void PropertyCosmeticEdgeList::setValue(CosmeticEdge* lValue) { -// Base::Console().Message("PCEL::setValue() - current values: %d lValue: %s\n", _lValueList.size(), lValue ? "valid" : "null"); +// Base::Console().message("PCEL::setValue() - current values: %d lValue: %s\n", _lValueList.size(), lValue ? "valid" : "null"); if (lValue) { aboutToSetValue(); _lValueList.resize(1); @@ -78,7 +78,7 @@ void PropertyCosmeticEdgeList::setValue(CosmeticEdge* lValue) void PropertyCosmeticEdgeList::setValues(const std::vector& lValue) { -// Base::Console().Message("PCEL::seValues() - in values: %d current values: %d\n", lValue.size(), _lValueList.size()); +// Base::Console().message("PCEL::seValues() - in values: %d current values: %d\n", lValue.size(), _lValueList.size()); aboutToSetValue(); _lValueList.resize(lValue.size()); if (!lValue.empty()) { @@ -161,7 +161,7 @@ void PropertyCosmeticEdgeList::Restore(Base::XMLReader &reader) newG->Restore(reader); if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) { - Base::Console().Error("CosmeticEdge \"%s\" within a PropertyCosmeticEdgeList was subject to a partial restore.\n", reader.localName()); + Base::Console().error("CosmeticEdge \"%s\" within a PropertyCosmeticEdgeList was subject to a partial restore.\n", reader.localName()); if(isOrderRelevant()) { // Pushes the best try by the CosmeticEdge class values.push_back(newG); diff --git a/src/Mod/TechDraw/App/PropertyCosmeticVertexList.cpp b/src/Mod/TechDraw/App/PropertyCosmeticVertexList.cpp index 451c0f3322..08d27e07c5 100644 --- a/src/Mod/TechDraw/App/PropertyCosmeticVertexList.cpp +++ b/src/Mod/TechDraw/App/PropertyCosmeticVertexList.cpp @@ -159,7 +159,7 @@ void PropertyCosmeticVertexList::Restore(Base::XMLReader &reader) newG->Restore(reader); if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) { - Base::Console().Error("CosmeticVertex \"%s\" within a PropertyCosmeticVertexList was subject to a partial restore.\n", reader.localName()); + Base::Console().error("CosmeticVertex \"%s\" within a PropertyCosmeticVertexList was subject to a partial restore.\n", reader.localName()); if(isOrderRelevant()) { // Pushes the best try by the CosmeticVertex class values.push_back(newG); diff --git a/src/Mod/TechDraw/App/PropertyGeomFormatList.cpp b/src/Mod/TechDraw/App/PropertyGeomFormatList.cpp index 76daf0a951..e7c6644fb2 100644 --- a/src/Mod/TechDraw/App/PropertyGeomFormatList.cpp +++ b/src/Mod/TechDraw/App/PropertyGeomFormatList.cpp @@ -171,7 +171,7 @@ void PropertyGeomFormatList::Restore(Base::XMLReader &reader) newG->Restore(reader); if(reader.testStatus(Base::XMLReader::ReaderStatus::PartialRestoreInObject)) { - Base::Console().Error("GeomFormat \"%s\" within a PropertyGeomFormatList was subject to a partial restore.\n", reader.localName()); + Base::Console().error("GeomFormat \"%s\" within a PropertyGeomFormatList was subject to a partial restore.\n", reader.localName()); if(isOrderRelevant()) { // Pushes the best try by the GeomFormat class values.push_back(newG); diff --git a/src/Mod/TechDraw/App/ShapeExtractor.cpp b/src/Mod/TechDraw/App/ShapeExtractor.cpp index 48f46dffff..c50f8d81cf 100644 --- a/src/Mod/TechDraw/App/ShapeExtractor.cpp +++ b/src/Mod/TechDraw/App/ShapeExtractor.cpp @@ -248,7 +248,7 @@ std::vector ShapeExtractor::getXShapes(const App::Link* xLink) } xSourceShapes.push_back(shape); } else { - Base::Console().Message("SE::getXShapes - no shape from getXShape\n"); + Base::Console().message("SE::getXShapes - no shape from getXShape\n"); } } } else { @@ -297,7 +297,7 @@ TopoDS_Shape ShapeExtractor::getShapeFromXLink(const App::Link* xLink) } } catch (...) { - Base::Console().Error("ShapeExtractor failed to retrieve shape from %s\n", xLink->getNameInDocument()); + Base::Console().error("ShapeExtractor failed to retrieve shape from %s\n", xLink->getNameInDocument()); return TopoDS_Shape(); } if (checkShape(linkedObject, ts.getShape())) { @@ -361,7 +361,7 @@ TopoDS_Shape ShapeExtractor::getShapesFused(const std::vectorgetNameInDocument()); return false; diff --git a/src/Mod/TechDraw/App/ShapeUtils.cpp b/src/Mod/TechDraw/App/ShapeUtils.cpp index c5586ab14f..e9ccc22472 100644 --- a/src/Mod/TechDraw/App/ShapeUtils.cpp +++ b/src/Mod/TechDraw/App/ShapeUtils.cpp @@ -83,7 +83,7 @@ using DU = DrawUtil; gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d& direction, const bool flip) { - // Base::Console().Message("GO::getViewAxis() - 1 - use only with getLegacyX\n"); + // Base::Console().message("GO::getViewAxis() - 1 - use only with getLegacyX\n"); (void)flip; gp_Ax2 viewAxis; gp_Pnt inputCenter(origin.x, origin.y, origin.z); @@ -113,7 +113,7 @@ gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d& direction, const Base::Vector3d& xAxis, const bool flip) { - // Base::Console().Message("GO::getViewAxis() - 2\n"); + // Base::Console().message("GO::getViewAxis() - 2\n"); (void)flip; gp_Pnt inputCenter(origin.x, origin.y, origin.z); return gp_Ax2(inputCenter, @@ -126,7 +126,7 @@ gp_Ax2 ShapeUtils::getViewAxis(const Base::Vector3d origin, const Base::Vector3d gp_Ax2 ShapeUtils::legacyViewAxis1(const Base::Vector3d origin, const Base::Vector3d& direction, const bool flip) { - // Base::Console().Message("GO::legacyViewAxis1()\n"); + // Base::Console().message("GO::legacyViewAxis1()\n"); gp_Pnt inputCenter(origin.x, origin.y, origin.z); Base::Vector3d stdZ(0.0, 0.0, 1.0); Base::Vector3d stdOrg(0.0, 0.0, 0.0); @@ -180,7 +180,7 @@ gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape) //! Returns the centroid of shape, as viewed according to direction gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const Base::Vector3d& direction) { - // Base::Console().Message("GO::findCentroid() - 1\n"); + // Base::Console().message("GO::findCentroid() - 1\n"); Base::Vector3d origin(0.0, 0.0, 0.0); gp_Ax2 viewAxis = getViewAxis(origin, direction); return findCentroid(shape, viewAxis); @@ -189,7 +189,7 @@ gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const Base::Vector3d& //! Returns the centroid of shape, as viewed according to direction gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const gp_Ax2& viewAxis) { - // Base::Console().Message("GO::findCentroid() - 2\n"); + // Base::Console().message("GO::findCentroid() - 2\n"); gp_Trsf tempTransform; tempTransform.SetTransformation(viewAxis); @@ -212,14 +212,14 @@ gp_Pnt ShapeUtils::findCentroid(const TopoDS_Shape& shape, const gp_Ax2& viewAxi Base::Vector3d ShapeUtils::findCentroidVec(const TopoDS_Shape& shape, const Base::Vector3d& direction) { - // Base::Console().Message("GO::findCentroidVec() - 1\n"); + // Base::Console().message("GO::findCentroidVec() - 1\n"); gp_Pnt p = ShapeUtils::findCentroid(shape, direction); return Base::Vector3d(p.X(), p.Y(), p.Z()); } Base::Vector3d ShapeUtils::findCentroidVec(const TopoDS_Shape& shape, const gp_Ax2& cs) { - // Base::Console().Message("GO::findCentroidVec() - 2\n"); + // Base::Console().message("GO::findCentroidVec() - 2\n"); gp_Pnt p = ShapeUtils::findCentroid(shape, cs); return Base::Vector3d(p.X(), p.Y(), p.Z()); } diff --git a/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp b/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp index 8353303525..ec0172c29e 100644 --- a/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp +++ b/src/Mod/TechDraw/Gui/AppTechDrawGui.cpp @@ -93,7 +93,7 @@ void loadTechDrawResource() QString fontFile = QString::fromStdString(fontDir + font); int rc = QFontDatabase::addApplicationFont(fontFile); if (rc < 0) { - Base::Console().Warning( + Base::Console().warning( "TechDraw failed to load font file: %d from: %s\n", rc, qPrintable(fontFile)); } } @@ -121,7 +121,7 @@ PyMOD_INIT_FUNC(TechDrawGui) } PyObject* mod = TechDrawGui::initModule(); - Base::Console().Log("Loading TechDrawGui module... done\n"); + Base::Console().log("Loading TechDrawGui module... done\n"); // instantiating the commands CreateTechDrawCommands(); diff --git a/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp b/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp index 57fcb501b0..af59c2f0b3 100644 --- a/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp +++ b/src/Mod/TechDraw/Gui/AppTechDrawGuiPy.cpp @@ -92,7 +92,7 @@ private: str += " "; if (msg) {str += msg;} else {str += "No OCCT Exception Message";} - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::Exception(Part::PartExceptionOCCError, str); } catch (const Base::Exception &e) { @@ -108,7 +108,7 @@ private: str += "C++ exception thrown ("; str += e.what(); str += ")"; - Base::Console().Error("%s\n", str.c_str()); + Base::Console().error("%s\n", str.c_str()); throw Py::RuntimeError(str); } return Py::None(); //only here to prevent warning re no return value diff --git a/src/Mod/TechDraw/Gui/Command.cpp b/src/Mod/TechDraw/Gui/Command.cpp index fe54d0df88..507df68de5 100644 --- a/src/Mod/TechDraw/Gui/Command.cpp +++ b/src/Mod/TechDraw/Gui/Command.cpp @@ -731,7 +731,7 @@ CmdTechDrawSectionGroup::CmdTechDrawSectionGroup() : Command("TechDraw_SectionGr void CmdTechDrawSectionGroup::activated(int iMsg) { - // Base::Console().Message("CMD::SectionGrp - activated(%d)\n", iMsg); + // Base::Console().message("CMD::SectionGrp - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -749,7 +749,7 @@ void CmdTechDrawSectionGroup::activated(int iMsg) execComplexSection(this); break; default: - Base::Console().Message("CMD::SectionGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::SectionGrp - invalid iMsg: %d\n", iMsg); }; } diff --git a/src/Mod/TechDraw/Gui/CommandAnnotate.cpp b/src/Mod/TechDraw/Gui/CommandAnnotate.cpp index ff85579ace..0e9b173265 100644 --- a/src/Mod/TechDraw/Gui/CommandAnnotate.cpp +++ b/src/Mod/TechDraw/Gui/CommandAnnotate.cpp @@ -212,7 +212,7 @@ CmdTechDrawCosmeticVertexGroup::CmdTechDrawCosmeticVertexGroup() void CmdTechDrawCosmeticVertexGroup::activated(int iMsg) { -// Base::Console().Message("CMD::CosmeticVertexGroup - activated(%d)\n", iMsg); +// Base::Console().message("CMD::CosmeticVertexGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -233,7 +233,7 @@ void CmdTechDrawCosmeticVertexGroup::activated(int iMsg) execQuadrants(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; updateActive(); Gui::Selection().clearSelection(); @@ -305,7 +305,7 @@ bool CmdTechDrawCosmeticVertexGroup::isActive() void execCosmeticVertex(Gui::Command* cmd) { -// Base::Console().Message("execCosmeticVertex()\n"); +// Base::Console().message("execCosmeticVertex()\n"); TechDraw::DrawPage* page = DrawGuiUtil::findPage(cmd); if (!page) { return; @@ -329,7 +329,7 @@ void execCosmeticVertex(Gui::Command* cmd) void execMidpoints(Gui::Command* cmd) { -// Base::Console().Message("execMidpoints()\n"); +// Base::Console().message("execMidpoints()\n"); TechDraw::DrawViewPart * dvp = nullptr; std::vector selectedEdges = CommandHelpers::getSelectedSubElements(cmd, dvp, "Edge"); @@ -356,7 +356,7 @@ void execMidpoints(Gui::Command* cmd) void execQuadrants(Gui::Command* cmd) { -// Base::Console().Message("execQuadrants()\n"); +// Base::Console().message("execQuadrants()\n"); TechDraw::DrawViewPart* dvp = nullptr; std::vector selectedEdges = CommandHelpers::getSelectedSubElements(cmd, dvp, "Edge"); @@ -423,7 +423,7 @@ void CmdTechDrawCosmeticVertex::activated(int iMsg) TechDraw::DrawViewPart* baseFeat = nullptr; baseFeat = dynamic_cast((*shapes.begin())); if (!baseFeat) { - Base::Console().Message("CMD::CosmeticVertex - 1st shape is not DVP. WTF?\n"); + Base::Console().message("CMD::CosmeticVertex - 1st shape is not DVP. WTF?\n"); return; } @@ -588,7 +588,7 @@ CmdTechDrawCenterLineGroup::CmdTechDrawCenterLineGroup() void CmdTechDrawCenterLineGroup::activated(int iMsg) { -// Base::Console().Message("CMD::CenterLineGroup - activated(%d)\n", iMsg); +// Base::Console().message("CMD::CenterLineGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog *dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -609,7 +609,7 @@ void CmdTechDrawCenterLineGroup::activated(int iMsg) exec2PointCenterLine(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -1348,18 +1348,18 @@ void CmdTechDrawCosmeticEraser::activated(int iMsg) } else if (source == SourceType::CENTERLINE) { cl2Delete.push_back(tag); } else { - Base::Console().Message( + Base::Console().message( "CMD::CosmeticEraser - edge: %d is confused - source: %d\n", idx, static_cast(source)); } } } else if (geomType == "Vertex") { TechDraw::VertexPtr tdv = objFeat->getProjVertexByIndex(idx); if (!tdv) - Base::Console().Message("CMD::eraser - geom: %d not found!\n", idx); + Base::Console().message("CMD::eraser - geom: %d not found!\n", idx); std::string delTag = tdv->getCosmeticTag(); if (delTag.empty()) - Base::Console().Warning("Vertex%d is not cosmetic! Can not erase.\n", idx); + Base::Console().warning("Vertex%d is not cosmetic! Can not erase.\n", idx); cv2Delete.push_back(delTag); } else { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"), diff --git a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp index f41011cfd3..f86bbe92cb 100644 --- a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp +++ b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp @@ -427,7 +427,7 @@ public: void mouseReleaseEvent(QMouseEvent* event) override { - // Base::Console().Warning("mouseReleaseEvent TH\n"); + // Base::Console().warning("mouseReleaseEvent TH\n"); if (event->button() == Qt::RightButton) { if (!dims.empty()) { Gui::Selection().clearSelection(); @@ -446,7 +446,7 @@ public: if (removedRef.hasGeometry()) { finalize = false; - //Base::Console().Warning("RmvSelection \n"); + //Base::Console().warning("RmvSelection \n"); // Remove the reference from the vector ReferenceVector& selVector = getSelectionVector(removedRef); selVector.erase(std::remove(selVector.begin(), selVector.end(), removedRef), selVector.end()); @@ -463,7 +463,7 @@ public: if (addedRef.hasGeometry()) { finalize = false; - //Base::Console().Warning("AddSelection\n"); + //Base::Console().warning("AddSelection\n"); //add the geometry to its type vector. Temporarily if not selAllowed if (addedRef.getSubName() == "") { // Behavior deactivated for now because I found it annoying. @@ -510,7 +510,7 @@ public: void onSelectionChanged(const Gui::SelectionChanges& msg) override { - //Base::Console().Warning("onSelectionChanged %d - --%s--\n", (int)msg.Type, msg.pSubName); + //Base::Console().warning("onSelectionChanged %d - --%s--\n", (int)msg.Type, msg.pSubName); if (msg.Type == Gui::SelectionChanges::ClrSelection) { //clearAndRestartCommand(); @@ -526,13 +526,13 @@ public: } /*if (msg.Type == Gui::SelectionChanges::SetPreselect) { - Base::Console().Warning("SetPreselect\n"); + Base::Console().warning("SetPreselect\n"); std::string geomName = DrawUtil::getGeomTypeFromName(msg.pSubName); edgeOrPointPreselected = geomName == "Edge" || geomName == "Vertex"; return; } else if (msg.Type == Gui::SelectionChanges::RmvPreselect) { - Base::Console().Warning("RmvPreselect\n"); + Base::Console().warning("RmvPreselect\n"); edgeOrPointPreselected = false; return; }*/ @@ -633,7 +633,7 @@ protected: void finalizeCommand() { - //Base::Console().Warning("finalizeCommand \n"); + //Base::Console().warning("finalizeCommand \n"); finishDimensionMove(); @@ -752,7 +752,7 @@ protected: bool makeAppropriateDimension() { bool selAllowed = false; - //Base::Console().Warning("makeAppropriateDimension %d %d %d %d %d %d\n", selPoints.size(), selLine.size(), selCircleArc.size(), selEllipseArc.size(), selSplineAndCo.size(), selFaces.size()); + //Base::Console().warning("makeAppropriateDimension %d %d %d %d %d %d\n", selPoints.size(), selLine.size(), selCircleArc.size(), selEllipseArc.size(), selSplineAndCo.size(), selFaces.size()); GeomSelectionSizes selection(selPoints.size(), selLine.size(), selCircleArc.size(), selEllipseArc.size(), selSplineAndCo.size(), selFaces.size()); if (selection.hasFaces()) { @@ -1971,7 +1971,7 @@ CmdTechDrawExtentGroup::CmdTechDrawExtentGroup() void CmdTechDrawExtentGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtentGrp - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtentGrp - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), @@ -1990,7 +1990,7 @@ void CmdTechDrawExtentGroup::activated(int iMsg) execExtent(this, "DistanceY"); break; default: - Base::Console().Message("CMD::ExtGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::ExtGrp - invalid iMsg: %d\n", iMsg); }; } diff --git a/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp b/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp index 97c7ed3439..5c6b4299ea 100644 --- a/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp +++ b/src/Mod/TechDraw/Gui/CommandExtensionDims.cpp @@ -323,7 +323,7 @@ CmdTechDrawExtensionInsertPrefixGroup::CmdTechDrawExtensionInsertPrefixGroup() void CmdTechDrawExtensionInsertPrefixGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionLinePPGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionLinePPGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -347,7 +347,7 @@ void CmdTechDrawExtensionInsertPrefixGroup::activated(int iMsg) execRemovePrefixChar(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -546,7 +546,7 @@ CmdTechDrawExtensionIncreaseDecreaseGroup::CmdTechDrawExtensionIncreaseDecreaseG void CmdTechDrawExtensionIncreaseDecreaseGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionIncreaseDecreaseGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionIncreaseDecreaseGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -564,7 +564,7 @@ void CmdTechDrawExtensionIncreaseDecreaseGroup::activated(int iMsg) execIncreaseDecreaseDecimal(this, -1); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -806,7 +806,7 @@ void CmdTechDrawExtensionPosObliqueChainDimension::activated(int iMsg) { Q_UNUSED(iMsg); execPosObliqueChainDimension(this); - ///Base::Console().Message("TechDraw_ExtensionPosObliqueChainDimension started\n"); + ///Base::Console().message("TechDraw_ExtensionPosObliqueChainDimension started\n"); } bool CmdTechDrawExtensionPosObliqueChainDimension::isActive() @@ -838,7 +838,7 @@ CmdTechDrawExtensionPosChainDimensionGroup::CmdTechDrawExtensionPosChainDimensio void CmdTechDrawExtensionPosChainDimensionGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionPosChainDimensionGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionPosChainDimensionGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -859,7 +859,7 @@ void CmdTechDrawExtensionPosChainDimensionGroup::activated(int iMsg) execPosObliqueChainDimension(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -1133,7 +1133,7 @@ void CmdTechDrawExtensionCascadeObliqueDimension::activated(int iMsg) { Q_UNUSED(iMsg); execCascadeObliqueDimension(this); - ///Base::Console().Message("TechDraw_ExtensionPosObliqueChainDimension started\n"); + ///Base::Console().message("TechDraw_ExtensionPosObliqueChainDimension started\n"); } bool CmdTechDrawExtensionCascadeObliqueDimension::isActive() @@ -1166,7 +1166,7 @@ CmdTechDrawExtensionCascadeDimensionGroup::CmdTechDrawExtensionCascadeDimensionG void CmdTechDrawExtensionCascadeDimensionGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionCascadeDimansionGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionCascadeDimansionGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -1187,7 +1187,7 @@ void CmdTechDrawExtensionCascadeDimensionGroup::activated(int iMsg) execCascadeObliqueDimension(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -1542,7 +1542,7 @@ CmdTechDrawExtensionCreateChainDimensionGroup::CmdTechDrawExtensionCreateChainDi void CmdTechDrawExtensionCreateChainDimensionGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionCascadeDimansionGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionCascadeDimansionGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -1563,7 +1563,7 @@ void CmdTechDrawExtensionCreateChainDimensionGroup::activated(int iMsg) execCreateObliqueChainDimension(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -1935,7 +1935,7 @@ CmdTechDrawExtensionCreateCoordDimensionGroup::CmdTechDrawExtensionCreateCoordDi void CmdTechDrawExtensionCreateCoordDimensionGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionCascadeDimansionGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionCascadeDimansionGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -1956,7 +1956,7 @@ void CmdTechDrawExtensionCreateCoordDimensionGroup::activated(int iMsg) execCreateObliqueCoordDimension(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -2192,7 +2192,7 @@ CmdTechDrawExtensionChamferDimensionGroup::CmdTechDrawExtensionChamferDimensionG void CmdTechDrawExtensionChamferDimensionGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionIncreaseDecreaseGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionIncreaseDecreaseGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -2210,7 +2210,7 @@ void CmdTechDrawExtensionChamferDimensionGroup::activated(int iMsg) execCreateVertChamferDimension(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } diff --git a/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp b/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp index cd78167175..01e6446265 100644 --- a/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp +++ b/src/Mod/TechDraw/Gui/CommandExtensionPack.cpp @@ -183,7 +183,7 @@ void CmdTechDrawExtensionHoleCircle::activated(int iMsg) { Q_UNUSED(iMsg); execHoleCircle(this); - //Base::Console().Message("HoleCircle started\n"); + //Base::Console().message("HoleCircle started\n"); } bool CmdTechDrawExtensionHoleCircle::isActive() @@ -307,7 +307,7 @@ void CmdTechDrawExtensionCircleCenterLinesGroup::activated(int iMsg) execHoleCircle(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -612,7 +612,7 @@ CmdTechDrawExtensionThreadsGroup::CmdTechDrawExtensionThreadsGroup() void CmdTechDrawExtensionThreadsGroup::activated(int iMsg) { - // Base::Console().Message("CMD::TechDrawExtensionThreadsGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::TechDrawExtensionThreadsGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -636,7 +636,7 @@ void CmdTechDrawExtensionThreadsGroup::activated(int iMsg) execThreadBoltBottom(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -851,7 +851,7 @@ CmdTechDrawExtensionVertexAtIntersection::CmdTechDrawExtensionVertexAtIntersecti void CmdTechDrawExtensionVertexAtIntersection::activated(int iMsg) { Q_UNUSED(iMsg); - //Base::Console().Message("VertexAtIntersection started\n"); + //Base::Console().message("VertexAtIntersection started\n"); std::vector selection; TechDraw::DrawViewPart* objFeat{nullptr}; if (!_checkSel(this, selection, objFeat, QT_TRANSLATE_NOOP("Command","TechDraw Cosmetic Intersection Vertex(es)"))) { @@ -953,7 +953,7 @@ CmdTechDrawExtensionDrawCosmArc::CmdTechDrawExtensionDrawCosmArc() void CmdTechDrawExtensionDrawCosmArc::activated(int iMsg) { Q_UNUSED(iMsg); - //Base::Console().Message("Cosmetic Arc started\n"); + //Base::Console().message("Cosmetic Arc started\n"); execDrawCosmArc(this); } @@ -1016,7 +1016,7 @@ CmdTechDrawExtensionDrawCosmCircle::CmdTechDrawExtensionDrawCosmCircle() void CmdTechDrawExtensionDrawCosmCircle::activated(int iMsg) { Q_UNUSED(iMsg); - //Base::Console().Message("Cosmetic Circle started\n"); + //Base::Console().message("Cosmetic Circle started\n"); execDrawCosmCircle(this); } @@ -1081,7 +1081,7 @@ CmdTechDrawExtensionDrawCosmCircle3Points::CmdTechDrawExtensionDrawCosmCircle3Po void CmdTechDrawExtensionDrawCosmCircle3Points::activated(int iMsg) { Q_UNUSED(iMsg); - //Base::Console().Message("Cosmetic Circle 3 Points started\n"); + //Base::Console().message("Cosmetic Circle 3 Points started\n"); execDrawCosmCircle3Points(this); } @@ -1115,7 +1115,7 @@ CmdTechDrawExtensionDrawCirclesGroup::CmdTechDrawExtensionDrawCirclesGroup() void CmdTechDrawExtensionDrawCirclesGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionDrawCirclesGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionDrawCirclesGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -1136,7 +1136,7 @@ void CmdTechDrawExtensionDrawCirclesGroup::activated(int iMsg) execDrawCosmCircle3Points(this); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -1364,7 +1364,7 @@ CmdTechDrawExtensionLinePPGroup::CmdTechDrawExtensionLinePPGroup() void CmdTechDrawExtensionLinePPGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtensionLinePPGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtensionLinePPGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -1382,7 +1382,7 @@ void CmdTechDrawExtensionLinePPGroup::activated(int iMsg) execLineParallelPerpendicular(this, false); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } @@ -1603,7 +1603,7 @@ void CmdTechDrawExtensionExtendLine::activated(int iMsg) { Q_UNUSED(iMsg); execExtendShortenLine(this, true); - ///Base::Console().Message("ExtendLine started\n"); + ///Base::Console().message("ExtendLine started\n"); } bool CmdTechDrawExtensionExtendLine::isActive() @@ -1638,7 +1638,7 @@ void CmdTechDrawExtensionShortenLine::activated(int iMsg) { Q_UNUSED(iMsg); execExtendShortenLine(this, false); - ///Base::Console().Message("ShortenLine started\n"); + ///Base::Console().message("ShortenLine started\n"); } bool CmdTechDrawExtensionShortenLine::isActive() @@ -1670,7 +1670,7 @@ CmdTechDrawExtendShortenLineGroup::CmdTechDrawExtendShortenLineGroup() void CmdTechDrawExtendShortenLineGroup::activated(int iMsg) { - // Base::Console().Message("CMD::ExtendShortenLineGroup - activated(%d)\n", iMsg); + // Base::Console().message("CMD::ExtendShortenLineGroup - activated(%d)\n", iMsg); Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); if (dlg) { QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Task In Progress"), @@ -1688,7 +1688,7 @@ void CmdTechDrawExtendShortenLineGroup::activated(int iMsg) execExtendShortenLine(this, false); break; default: - Base::Console().Message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); + Base::Console().message("CMD::CVGrp - invalid iMsg: %d\n", iMsg); }; } diff --git a/src/Mod/TechDraw/Gui/CommandStack.cpp b/src/Mod/TechDraw/Gui/CommandStack.cpp index 31b3c0b6e7..c6a9f50e9a 100644 --- a/src/Mod/TechDraw/Gui/CommandStack.cpp +++ b/src/Mod/TechDraw/Gui/CommandStack.cpp @@ -93,7 +93,7 @@ void CmdTechDrawStackGroup::activated(int iMsg) execStackDown(this); break; default: - Base::Console().Message("CMD::StackGrp - invalid iMsg: %d\n",iMsg); + Base::Console().message("CMD::StackGrp - invalid iMsg: %d\n",iMsg); }; } diff --git a/src/Mod/TechDraw/Gui/DimensionValidators.cpp b/src/Mod/TechDraw/Gui/DimensionValidators.cpp index ab3f776c7b..3fcc6a4641 100644 --- a/src/Mod/TechDraw/Gui/DimensionValidators.cpp +++ b/src/Mod/TechDraw/Gui/DimensionValidators.cpp @@ -491,7 +491,7 @@ DimensionGeometry TechDraw::isValidSingleFace3d(DrawViewPart* dvp, const Referen TopoDS_Shape refShape = ref.getGeometry(); if (refShape.IsNull() || refShape.ShapeType() != TopAbs_FACE) { - Base::Console().Warning("Geometry for reference is not a face.\n"); + Base::Console().warning("Geometry for reference is not a face.\n"); return DimensionGeometry::isInvalid; } diff --git a/src/Mod/TechDraw/Gui/DlgPageChooser.cpp b/src/Mod/TechDraw/Gui/DlgPageChooser.cpp index 0480a86ab9..60a2918b7e 100644 --- a/src/Mod/TechDraw/Gui/DlgPageChooser.cpp +++ b/src/Mod/TechDraw/Gui/DlgPageChooser.cpp @@ -103,7 +103,7 @@ std::string DlgPageChooser::getSelection() const void DlgPageChooser::accept() { if (ui->lwPages->selectedItems().empty()) { - Base::Console().Message("Page Chooser: no page was selected\n"); + Base::Console().message("Page Chooser: no page was selected\n"); } QDialog::accept(); } diff --git a/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp b/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp index 88ce40a69e..7d9b4dc759 100644 --- a/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp +++ b/src/Mod/TechDraw/Gui/DrawGuiUtil.cpp @@ -219,7 +219,7 @@ void DrawGuiUtil::loadLineGroupChoices(QComboBox* combo) QIcon DrawGuiUtil::iconForLine(size_t lineNumber, TechDraw::LineGenerator* generator) { - // Base::Console().Message("DGU::iconForLine(lineNumber: %d)\n", lineNumber); + // Base::Console().message("DGU::iconForLine(lineNumber: %d)\n", lineNumber); constexpr int iconSize {64}; constexpr int borderSize {4}; constexpr double iconLineWeight {1.0}; @@ -565,24 +565,24 @@ bool DrawGuiUtil::needView(Gui::Command* cmd, bool partOnly) void DrawGuiUtil::dumpRectF(const char* text, const QRectF& r) { - Base::Console().Message("DUMP - dumpRectF - %s\n", text); + Base::Console().message("DUMP - dumpRectF - %s\n", text); double left = r.left(); double right = r.right(); double top = r.top(); double bottom = r.bottom(); - Base::Console().Message("Extents: L: %.3f, R: %.3f, T: %.3f, B: %.3f\n", + Base::Console().message("Extents: L: %.3f, R: %.3f, T: %.3f, B: %.3f\n", left, right, top, bottom); - Base::Console().Message("Size: W: %.3f H: %.3f\n", r.width(), r.height()); - Base::Console().Message("Centre: (%.3f, %.3f)\n", r.center().x(), r.center().y()); + Base::Console().message("Size: W: %.3f H: %.3f\n", r.width(), r.height()); + Base::Console().message("Centre: (%.3f, %.3f)\n", r.center().x(), r.center().y()); } void DrawGuiUtil::dumpPointF(const char* text, const QPointF& p) { - Base::Console().Message("DUMP - dumpPointF - %s\n", text); - Base::Console().Message("Point: (%.3f, %.3f)\n", p.x(), p.y()); + Base::Console().message("DUMP - dumpPointF - %s\n", text); + Base::Console().message("Point: (%.3f, %.3f)\n", p.x(), p.y()); } std::pair DrawGuiUtil::get3DDirAndRot() @@ -647,7 +647,7 @@ std::pair DrawGuiUtil::getProjDirFromFace(App::D auto ts = Part::Feature::getShape(obj, faceName.c_str(), true); if (ts.IsNull() || ts.ShapeType() != TopAbs_FACE) { - Base::Console().Warning("getProjDirFromFace(%s) is not a Face\n", faceName.c_str()); + Base::Console().warning("getProjDirFromFace(%s) is not a Face\n", faceName.c_str()); return dirs; } @@ -813,7 +813,7 @@ void DrawGuiUtil::rotateToAlign(const QGIVertex* p1, const QGIVertex* p2, const { QGIViewPart* view = static_cast(p1->parentItem()); if(view != static_cast(p2->parentItem())) { - Base::Console().Error("Vertexes have to be from the same view!"); + Base::Console().error("Vertexes have to be from the same view!"); } Base::Vector2d oldDirection = p2->vector2dBetweenPoints(p1); diff --git a/src/Mod/TechDraw/Gui/Grabber3d.cpp b/src/Mod/TechDraw/Gui/Grabber3d.cpp index d370c70bfb..f63a4095f8 100644 --- a/src/Mod/TechDraw/Gui/Grabber3d.cpp +++ b/src/Mod/TechDraw/Gui/Grabber3d.cpp @@ -37,22 +37,22 @@ void Grabber3d::quickView(View3DInventor* view3d, const QColor bgColor, QImage &image) { -// Base::Console().Message("G3d::quickView()); +// Base::Console().message("G3d::quickView()); if (!Gui::getMainWindow()) { //this should already be checked in the caller - Base::Console().Warning("G3d::quickView - no Main Window - returning\n"); + Base::Console().warning("G3d::quickView - no Main Window - returning\n"); return; } if (!view3d) { //this should also already be checked in the caller - Base::Console().Warning("G3d::quickView - no 3D view for ActiveView - returning\n"); + Base::Console().warning("G3d::quickView - no 3D view for ActiveView - returning\n"); return; } View3DInventorViewer* viewer = view3d->getViewer(); if (!viewer) { - Base::Console().Warning("G3d::quickView - could not create viewer - returning\n"); + Base::Console().warning("G3d::quickView - could not create viewer - returning\n"); return; } diff --git a/src/Mod/TechDraw/Gui/MDIViewPage.cpp b/src/Mod/TechDraw/Gui/MDIViewPage.cpp index 9fc4e8593e..9344c82ee0 100644 --- a/src/Mod/TechDraw/Gui/MDIViewPage.cpp +++ b/src/Mod/TechDraw/Gui/MDIViewPage.cpp @@ -143,7 +143,7 @@ void MDIViewPage::setDocumentName(const std::string& name) { m_documentName = na void MDIViewPage::closeEvent(QCloseEvent* event) { - // Base::Console().Message("MDIVP::closeEvent()\n"); + // Base::Console().message("MDIVP::closeEvent()\n"); MDIView::closeEvent(event); if (!event->isAccepted()) { return; @@ -432,7 +432,7 @@ PyObject* MDIViewPage::getPyObject() void MDIViewPage::contextMenuEvent(QContextMenuEvent* event) { - // Base::Console().Message("MDIVP::contextMenuEvent() - reason: %d\n", event->reason()); + // Base::Console().message("MDIVP::contextMenuEvent() - reason: %d\n", event->reason()); if (isContextualMenuEnabled) { QMenu menu; menu.addAction(m_toggleFrameAction); diff --git a/src/Mod/TechDraw/Gui/PATPathMaker.cpp b/src/Mod/TechDraw/Gui/PATPathMaker.cpp index 076d297492..b17c949734 100644 --- a/src/Mod/TechDraw/Gui/PATPathMaker.cpp +++ b/src/Mod/TechDraw/Gui/PATPathMaker.cpp @@ -64,7 +64,7 @@ void PATPathMaker::lineSetToFillItems(LineSet& ls) m_fillItems.push_back(fillItem); if (m_segCount > m_maxSeg) { - Base::Console().Warning("PAT segment count exceeded: %ld\n", m_segCount); + Base::Console().warning("PAT segment count exceeded: %ld\n", m_segCount); break; } } @@ -155,7 +155,7 @@ QPainterPath PATPathMaker::dashedPPath(const std::vector dashPattern, co while (travel < lineLength) { bool stop = false; if (m_segCount > 10000) { - Base::Console().Warning("PAT segment count exceeded: %ld\n", m_segCount); + Base::Console().warning("PAT segment count exceeded: %ld\n", m_segCount); break; } diff --git a/src/Mod/TechDraw/Gui/PagePrinter.cpp b/src/Mod/TechDraw/Gui/PagePrinter.cpp index 024cdee61e..a2efc27f11 100644 --- a/src/Mod/TechDraw/Gui/PagePrinter.cpp +++ b/src/Mod/TechDraw/Gui/PagePrinter.cpp @@ -343,7 +343,7 @@ void PagePrinter::print(ViewProviderPage* vpPage, QPrinter* printer) void PagePrinter::printPdf(ViewProviderPage* vpPage, const std::string& file) { if (file.empty()) { - Base::Console().Warning("PagePrinter - no file specified\n"); + Base::Console().warning("PagePrinter - no file specified\n"); return; } @@ -398,7 +398,7 @@ void PagePrinter::printPdf(ViewProviderPage* vpPage, const std::string& file) void PagePrinter::saveSVG(ViewProviderPage* vpPage, const std::string& file) { if (file.empty()) { - Base::Console().Warning("PagePrinter - no file specified\n"); + Base::Console().warning("PagePrinter - no file specified\n"); return; } auto filespec = Base::Tools::escapeEncodeFilename(file); diff --git a/src/Mod/TechDraw/Gui/PathBuilder.cpp b/src/Mod/TechDraw/Gui/PathBuilder.cpp index 11e26758b3..44c2f202c5 100644 --- a/src/Mod/TechDraw/Gui/PathBuilder.cpp +++ b/src/Mod/TechDraw/Gui/PathBuilder.cpp @@ -123,7 +123,7 @@ QPainterPath PathBuilder::geomToPainterPath(BaseGeomPtr baseGeom, double rot) co Rez::guiX(geom->pnts[0].x), Rez::guiX(geom->pnts[0].y)); } else {//can only handle lines, quads, cubes - Base::Console().Error("Bad pole count (%d) for BezierSegment\n", geom->poles); + Base::Console().error("Bad pole count (%d) for BezierSegment\n", geom->poles); auto itBez = geom->pnts.begin() + 1; for (; itBez != geom->pnts.end(); itBez++) { path.lineTo(Rez::guiX((*itBez).x), @@ -149,7 +149,7 @@ QPainterPath PathBuilder::geomToPainterPath(BaseGeomPtr baseGeom, double rot) co Rez::guiX(geom->pnts[3].x), Rez::guiX(geom->pnts[3].y)); } else {//can only handle lines, quads, cubes - Base::Console().Error("Bad pole count (%d) for BezierSegment\n", geom->poles); + Base::Console().error("Bad pole count (%d) for BezierSegment\n", geom->poles); auto itBez = geom->pnts.begin() + 1; for (; itBez != geom->pnts.end(); itBez++) { path.lineTo(Rez::guiX((*itBez).x), @@ -184,7 +184,7 @@ QPainterPath PathBuilder::geomToPainterPath(BaseGeomPtr baseGeom, double rot) co Rez::guiX(it->pnts[0].x), Rez::guiX(it->pnts[0].y)); } else {//can only handle lines, quads, cubes - Base::Console().Error( + Base::Console().error( "Bad pole count (%d) for BezierSegment of B-spline geometry\n", it->poles); path.lineTo(it->pnts[1].x, it->pnts[1].y);//show something for debugging @@ -213,7 +213,7 @@ QPainterPath PathBuilder::geomToPainterPath(BaseGeomPtr baseGeom, double rot) co Rez::guiX(it->pnts[3].x), Rez::guiX(it->pnts[3].y)); } else { - Base::Console().Error( + Base::Console().error( "Bad pole count (%d) for BezierSegment of B-spline geometry\n", it->poles); path.lineTo(it->pnts[1].x, it->pnts[1].y);//show something for debugging @@ -242,7 +242,7 @@ QPainterPath PathBuilder::geomToPainterPath(BaseGeomPtr baseGeom, double rot) co } } break; default: { - Base::Console().Error("Error - geomToPainterPath - UNKNOWN geomType: %d\n", + Base::Console().error("Error - geomToPainterPath - UNKNOWN geomType: %d\n", static_cast(baseGeom->getGeomType())); } break; }//sb end of switch diff --git a/src/Mod/TechDraw/Gui/PreferencesGui.cpp b/src/Mod/TechDraw/Gui/PreferencesGui.cpp index 2fd2ac9c0f..77080c40ca 100644 --- a/src/Mod/TechDraw/Gui/PreferencesGui.cpp +++ b/src/Mod/TechDraw/Gui/PreferencesGui.cpp @@ -185,7 +185,7 @@ QString PreferencesGui::weldingDirectory() QString qSymbolDir = QString::fromUtf8(symbolDir.c_str()); Base::FileInfo fi(symbolDir); if (!fi.isReadable()) { - Base::Console().Warning("Welding Directory: %s is not readable\n", symbolDir.c_str()); + Base::Console().warning("Welding Directory: %s is not readable\n", symbolDir.c_str()); qSymbolDir = QString::fromUtf8(defaultDir.c_str()); } return qSymbolDir; diff --git a/src/Mod/TechDraw/Gui/QGCustomText.cpp b/src/Mod/TechDraw/Gui/QGCustomText.cpp index 016c4db2cf..b40693a2e2 100644 --- a/src/Mod/TechDraw/Gui/QGCustomText.cpp +++ b/src/Mod/TechDraw/Gui/QGCustomText.cpp @@ -114,7 +114,7 @@ double QGCustomText::getWidth() } QVariant QGCustomText::itemChange(GraphicsItemChange change, const QVariant &value) { -// Base::Console().Message("QGCT::itemChange - this: %X change: %d\n", this, change); +// Base::Console().message("QGCT::itemChange - this: %X change: %d\n", this, change); if (change == ItemSelectedHasChanged && scene()) { if(isSelected()) { setPrettySel(); diff --git a/src/Mod/TechDraw/Gui/QGEPath.cpp b/src/Mod/TechDraw/Gui/QGEPath.cpp index 26aa18299e..5c89dea90e 100644 --- a/src/Mod/TechDraw/Gui/QGEPath.cpp +++ b/src/Mod/TechDraw/Gui/QGEPath.cpp @@ -52,13 +52,13 @@ using DGU = DrawGuiUtil; QGMarker::QGMarker(int idx) : QGIVertex(idx), m_dragging(false) { -// Base::Console().Message("QGMarker::QGMarker(%d)\n", idx); +// Base::Console().message("QGMarker::QGMarker(%d)\n", idx); setFlag(QGraphicsItem::ItemIsMovable, true); } void QGMarker::mousePressEvent(QGraphicsSceneMouseEvent * event) { -// Base::Console().Message("QGMarker::mousePressEvent() - focustype: %d\n", +// Base::Console().message("QGMarker::mousePressEvent() - focustype: %d\n", // scene()->focusItem()->type() - QGraphicsItem::UserType); if (event->button() == Qt::RightButton) { //we're done @@ -97,7 +97,7 @@ void QGMarker::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) void QGMarker::mouseDoubleClickEvent(QGraphicsSceneMouseEvent * event) { -// Base::Console().Message("QGMarker::mouseDoubleClickEvent(%d)\n", getProjIndex()); +// Base::Console().message("QGMarker::mouseDoubleClickEvent(%d)\n", getProjIndex()); if (event->button() == Qt::RightButton) { //we're done // we are finished our edit session Q_EMIT endEdit(); @@ -109,7 +109,7 @@ void QGMarker::mouseDoubleClickEvent(QGraphicsSceneMouseEvent * event) void QGMarker::keyPressEvent(QKeyEvent * event) { -// Base::Console().Message("QGMarker::keyPressEvent(%d)\n", getProjIndex()); +// Base::Console().message("QGMarker::keyPressEvent(%d)\n", getProjIndex()); if (event->key() == Qt::Key_Escape) { m_dragging = false; Q_EMIT endEdit(); @@ -160,7 +160,7 @@ QGEPath::QGEPath() : QVariant QGEPath::itemChange(GraphicsItemChange change, const QVariant &value) { -// Base::Console().Message("QGEP::itemChange(%d) - type: %d\n", change, type() - QGraphicsItem::UserType); +// Base::Console().message("QGEP::itemChange(%d) - type: %d\n", change, type() - QGraphicsItem::UserType); if (change == ItemSelectedHasChanged && scene()) { if(isSelected()) { Q_EMIT selected(true); @@ -205,7 +205,7 @@ void QGEPath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) //! this begins an edit session for a path described by pathPoints. void QGEPath::startPathEdit(const std::vector& pathPoints) { -// Base::Console().Message("QGEPath::startPathEdit()\n"); +// Base::Console().message("QGEPath::startPathEdit()\n"); inEdit(true); m_ghostPoints = pathPoints; showMarkers(m_ghostPoints); @@ -213,13 +213,13 @@ void QGEPath::startPathEdit(const std::vector& pathPoints) void QGEPath::showMarkers(const std::vector& points) { -// Base::Console().Message("QGEPath::showMarkers()\n"); +// Base::Console().message("QGEPath::showMarkers()\n"); if (!inEdit()) { return; } if (points.empty()) { - Base::Console().Message("QGEP::showMarkers - no deltas\n"); + Base::Console().message("QGEP::showMarkers - no deltas\n"); return; } @@ -262,7 +262,7 @@ void QGEPath::showMarkers(const std::vector& points) void QGEPath::clearMarkers() { -// Base::Console().Message("QGEPath::clearMarkers()\n"); +// Base::Console().message("QGEPath::clearMarkers()\n"); if (m_markers.empty()) { return; } @@ -282,7 +282,7 @@ void QGEPath::clearMarkers() // end of node marker drag void QGEPath::onDragFinished(QPointF dragEndPos, int markerIndex) { -// Base::Console().Message("QGEPath::onDragFinished(%s, %d)\n", +// Base::Console().message("QGEPath::onDragFinished(%s, %d)\n", // TechDraw::DrawUtil::formatVector(dragEndPos).c_str(), // markerIndex); if ((int) m_ghostPoints.size() > markerIndex) { @@ -304,13 +304,13 @@ void QGEPath::onDoubleClick(QPointF pos, int markerIndex) { Q_UNUSED(pos); Q_UNUSED(markerIndex); -// Base::Console().Message("QGEPath::onDoubleClick()\n"); +// Base::Console().message("QGEPath::onDoubleClick()\n"); onEndEdit(); } void QGEPath::onEndEdit() { -// Base::Console().Message("QGEPath::onEndEdit()\n"); +// Base::Console().message("QGEPath::onEndEdit()\n"); if (m_ghost) { scene()->removeItem(m_ghost); //stop ghost from messing up brect } @@ -324,7 +324,7 @@ void QGEPath::onEndEdit() //announce points editing is finished void QGEPath::updateParent() { -// Base::Console().Message("QGEPath::updateParent() - inEdit: %d pts: %d\n", inEdit(), m_ghostPoints.size()); +// Base::Console().message("QGEPath::updateParent() - inEdit: %d pts: %d\n", inEdit(), m_ghostPoints.size()); // dumpGhostPoints("QGEP::updateParent"); QPointF attach = m_ghostPoints.front(); if (!inEdit()) { @@ -335,7 +335,7 @@ void QGEPath::updateParent() //! the ghost is the red line drawn when creating or editing the points void QGEPath::drawGhost() { -// Base::Console().Message("QGEPath::drawGhost()\n"); +// Base::Console().message("QGEPath::drawGhost()\n"); if (!m_ghost->scene()) { m_ghost->setParentItem(this); } @@ -381,7 +381,7 @@ void QGEPath::dumpGhostPoints(const char* text) { int idb = 0; for (auto& d: m_ghostPoints) { - Base::Console().Message("%s - point: %d %s\n", text, + Base::Console().message("%s - point: %d %s\n", text, idb, TechDraw::DrawUtil::formatVector(d).c_str()); idb++; } @@ -391,7 +391,7 @@ void QGEPath::dumpMarkerPos(const char* text) { int idb = 0; for (auto& m: m_markers) { - Base::Console().Message("QGEP - %s - markerPos: %d %s\n", text, + Base::Console().message("QGEP - %s - markerPos: %d %s\n", text, idb, TechDraw::DrawUtil::formatVector(m->pos()).c_str()); idb++; } diff --git a/src/Mod/TechDraw/Gui/QGIArrow.cpp b/src/Mod/TechDraw/Gui/QGIArrow.cpp index 1c82859f61..1b38f98074 100644 --- a/src/Mod/TechDraw/Gui/QGIArrow.cpp +++ b/src/Mod/TechDraw/Gui/QGIArrow.cpp @@ -315,7 +315,7 @@ double QGIArrow::getOverlapAdjust(ArrowType style, double size) // ex for fork and tick, adjustment sb zero. 0.25 is good for filled triangle, 0.1 for open arrow. // open circle sb = radius // NOTE: this may need to be adjusted to account for line thickness too. -// Base::Console().Message("QGIA::getOverlapAdjust(%d, %.3f) \n", style, size); +// Base::Console().message("QGIA::getOverlapAdjust(%d, %.3f) \n", style, size); switch(style) { case ArrowType::FILLED_ARROW: return 0.50 * size; diff --git a/src/Mod/TechDraw/Gui/QGIBreakLine.cpp b/src/Mod/TechDraw/Gui/QGIBreakLine.cpp index 32a0629029..9f04ed3a27 100644 --- a/src/Mod/TechDraw/Gui/QGIBreakLine.cpp +++ b/src/Mod/TechDraw/Gui/QGIBreakLine.cpp @@ -129,7 +129,7 @@ void QGIBreakLine::drawLargeZigZag() // start needs to be Rez'd and +Y up QPainterPath QGIBreakLine::makeHorizontalZigZag(Base::Vector3d start) const { - // Base::Console().Message("QGIBL::makeHorizontalZigZag(%s)\n", DU::formatVector(start).c_str()); + // Base::Console().message("QGIBL::makeHorizontalZigZag(%s)\n", DU::formatVector(start).c_str()); QPainterPath pPath; double step = (m_right - m_left) / segments; Base::Vector3d xOffset = Base::Vector3d(step, 0.0, 0.0); // 1/2 wave length @@ -150,7 +150,7 @@ QPainterPath QGIBreakLine::makeHorizontalZigZag(Base::Vector3d start) const QPainterPath QGIBreakLine::makeVerticalZigZag(Base::Vector3d start) const { - // Base::Console().Message("QGIBL::makeVerticalZigZag(%s)\n", DU::formatVector(start).c_str()); + // Base::Console().message("QGIBL::makeVerticalZigZag(%s)\n", DU::formatVector(start).c_str()); QPainterPath pPath; double step = (m_top - m_bottom) / segments; Base::Vector3d xOffset = Base::Vector3d(zigzagWidth, 0.0, 0.0); // amplitude @@ -209,7 +209,7 @@ QPainterPath QGIBreakLine::pathFromPoints(Base::Vector3d start, Base::Vector3d e void QGIBreakLine::setBounds(double left, double top, double right, double bottom) { - // Base::Console().Message("QGIBL::setBounds(%.3f, %.3f, %.3f, %.3f\n", left, top, right, bottom); + // Base::Console().message("QGIBL::setBounds(%.3f, %.3f, %.3f, %.3f\n", left, top, right, bottom); m_left = left; m_right = right; m_top = top; diff --git a/src/Mod/TechDraw/Gui/QGIDatumLabel.cpp b/src/Mod/TechDraw/Gui/QGIDatumLabel.cpp index 811da80a8f..176f1491e6 100644 --- a/src/Mod/TechDraw/Gui/QGIDatumLabel.cpp +++ b/src/Mod/TechDraw/Gui/QGIDatumLabel.cpp @@ -259,7 +259,7 @@ void QGIDatumLabel::mousePressEvent(QGraphicsSceneMouseEvent* event) void QGIDatumLabel::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { - // Base::Console().Message("QGIDL::mouseReleaseEvent()\n"); + // Base::Console().message("QGIDL::mouseReleaseEvent()\n"); m_ctrl = false; if (m_dragState == DragState::Dragging) { m_dragState = DragState::NoDrag; @@ -530,7 +530,7 @@ double QGIDatumLabel::getTolAdjust() void QGIDatumLabel::setPrettySel() { - // Base::Console().Message("QGIDL::setPrettySel()\n"); + // Base::Console().message("QGIDL::setPrettySel()\n"); m_dimText->setPrettySel(); m_tolTextOver->setPrettySel(); m_tolTextUnder->setPrettySel(); @@ -541,7 +541,7 @@ void QGIDatumLabel::setPrettySel() void QGIDatumLabel::setPrettyPre() { - // Base::Console().Message("QGIDL::setPrettyPre()\n"); + // Base::Console().message("QGIDL::setPrettyPre()\n"); m_dimText->setPrettyPre(); m_tolTextOver->setPrettyPre(); m_tolTextUnder->setPrettyPre(); @@ -552,7 +552,7 @@ void QGIDatumLabel::setPrettyPre() void QGIDatumLabel::setPrettyNormal() { - // Base::Console().Message("QGIDL::setPrettyNormal()\n"); + // Base::Console().message("QGIDL::setPrettyNormal()\n"); m_dimText->setPrettyNormal(); m_tolTextOver->setPrettyNormal(); m_tolTextUnder->setPrettyNormal(); @@ -563,7 +563,7 @@ void QGIDatumLabel::setPrettyNormal() void QGIDatumLabel::setColor(QColor color) { - // Base::Console().Message("QGIDL::setColor(%s)\n", qPrintable(c.name())); + // Base::Console().message("QGIDL::setColor(%s)\n", qPrintable(c.name())); m_colNormal = color; m_dimText->setColor(m_colNormal); m_tolTextOver->setColor(m_colNormal); diff --git a/src/Mod/TechDraw/Gui/QGIDecoration.cpp b/src/Mod/TechDraw/Gui/QGIDecoration.cpp index 98717bb881..fcf00bc731 100644 --- a/src/Mod/TechDraw/Gui/QGIDecoration.cpp +++ b/src/Mod/TechDraw/Gui/QGIDecoration.cpp @@ -118,7 +118,7 @@ void QGIDecoration::makeMark(Base::Vector3d v) void QGIDecoration::mousePressEvent(QGraphicsSceneMouseEvent * event) { -// Base::Console().Message("QGID::mousePressEvent() - %s\n", getViewName()); +// Base::Console().message("QGID::mousePressEvent() - %s\n", getViewName()); m_dragState = DragState::DragStarted; QGraphicsItem::mousePressEvent(event); @@ -134,7 +134,7 @@ void QGIDecoration::mouseMoveEvent(QGraphicsSceneMouseEvent * event) void QGIDecoration::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) { -// Base::Console().Message("QGID::mouseReleaseEvent() - %s\n", getViewName()); +// Base::Console().message("QGID::mouseReleaseEvent() - %s\n", getViewName()); if (m_dragState == DragState::Dragging) { onDragFinished(); } diff --git a/src/Mod/TechDraw/Gui/QGIFace.cpp b/src/Mod/TechDraw/Gui/QGIFace.cpp index e2785dd8fb..480737e0ed 100644 --- a/src/Mod/TechDraw/Gui/QGIFace.cpp +++ b/src/Mod/TechDraw/Gui/QGIFace.cpp @@ -104,7 +104,7 @@ QColor QGIFace::getDefaultFillColor() /// redraw this face void QGIFace::draw() { -// Base::Console().Message("QGIF::draw - pen style: %d\n", m_pen.style()); +// Base::Console().message("QGIF::draw - pen style: %d\n", m_pen.style()); m_svgHatchArea->hide(); m_imageSvgHatchArea->hide(); @@ -148,7 +148,7 @@ void QGIFace::draw() /// show the face style & colour in normal configuration void QGIFace::setPrettyNormal() { -// Base::Console().Message("QGIF::setPrettyNormal() - hatched: %d\n", isHatched()); +// Base::Console().message("QGIF::setPrettyNormal() - hatched: %d\n", isHatched()); if (isHatched() && (m_mode == FillMode::BitmapFill) ) { //hatch with bitmap fill m_brush.setStyle(Qt::TexturePattern); @@ -161,21 +161,21 @@ void QGIFace::setPrettyNormal() { /// show the face style & colour in preselect configuration void QGIFace::setPrettyPre() { -// Base::Console().Message("QGIF::setPrettyPre()\n"); +// Base::Console().message("QGIF::setPrettyPre()\n"); m_brush.setStyle(Qt::SolidPattern); QGIPrimPath::setPrettyPre(); } /// show the face style & colour in selected configuration void QGIFace::setPrettySel() { -// Base::Console().Message("QGIF::setPrettySel()\n"); +// Base::Console().message("QGIF::setPrettySel()\n"); m_brush.setStyle(Qt::SolidPattern); QGIPrimPath::setPrettySel(); } /// show or hide the edges of this face. Usually just for debugging void QGIFace::setDrawEdges(bool state) { -// Base::Console().Message("QGIF::setDrawEdges(%d)\n", b); +// Base::Console().message("QGIF::setDrawEdges(%d)\n", b); if (state) { setStyle(Qt::DashLine); } else { @@ -194,7 +194,7 @@ void QGIFace::loadSvgHatch(std::string fileSpec) QString qfs(QString::fromUtf8(fileSpec.data(), fileSpec.size())); QFile file(qfs); if (!file.open(QFile::ReadOnly | QFile::Text)) { - Base::Console().Error("QGIFace could not read %s\n", fileSpec.c_str()); + Base::Console().error("QGIFace could not read %s\n", fileSpec.c_str()); return; } m_svgXML = file.readAll(); @@ -287,7 +287,7 @@ void QGIFace::makeMark(double x, double y) // NOLINT readability-identifier-len /// make an array of svg tiles to cover this face void QGIFace::buildSvgHatch() { -// Base::Console().Message("QGIF::buildSvgHatch() - offset: %s\n", DrawUtil::formatVector(getHatchOffset()).c_str()); +// Base::Console().message("QGIF::buildSvgHatch() - offset: %s\n", DrawUtil::formatVector(getHatchOffset()).c_str()); double wTile = SVGSIZEW * m_fillScale; double hTile = SVGSIZEH * m_fillScale; double faceWidth = path().boundingRect().width(); @@ -306,7 +306,7 @@ void QGIFace::buildSvgHatch() QByteArray after = QString::fromStdString(SVGCOLPREFIX + m_svgCol).toUtf8(); QByteArray colorXML = m_svgXML.replace(before, after); if (!m_sharedRender->load(colorXML)) { - Base::Console().Message("QGIF::buildSvgHatch - failed to load svg string\n"); + Base::Console().message("QGIF::buildSvgHatch - failed to load svg string\n"); return; } long int tileCount = 0; @@ -320,7 +320,7 @@ void QGIFace::buildSvgHatch() -overlayWidth + ih*hTile + getHatchOffset().y); tileCount++; if (tileCount > m_maxTile) { - Base::Console().Warning("SVG tile count exceeded: %ld. Change hatch scale or raise limit.\n", tileCount); + Base::Console().warning("SVG tile count exceeded: %ld. Change hatch scale or raise limit.\n", tileCount); break; } } @@ -359,7 +359,7 @@ void QGIFace::buildPixHatch() // don't really understand. // render svg tile onto a QImage if (!m_sharedRender->load(colorXML)) { - Base::Console().Message("QGIF::buildSvgHatch - failed to load svg string\n"); + Base::Console().message("QGIF::buildSvgHatch - failed to load svg string\n"); return; } @@ -367,7 +367,7 @@ void QGIFace::buildPixHatch() svgImage.fill(Qt::transparent); QPainter painter(&svgImage); if (svgImage.isNull()) { - Base::Console().Error("QGIF::buildPixHatch - svgImage is null\n"); + Base::Console().error("QGIF::buildPixHatch - svgImage is null\n"); return; } @@ -377,7 +377,7 @@ void QGIFace::buildPixHatch() QPixmap tilePixmap(round(wTile), round(hTile)); tilePixmap = QPixmap::fromImage(svgImage); if (tilePixmap.isNull()) { - Base::Console().Error("QGIF::buildPixHatch - tilePixmap is null\n"); + Base::Console().error("QGIF::buildPixHatch - tilePixmap is null\n"); return; } @@ -403,7 +403,7 @@ void QGIFace::buildPixHatch() QRectF(0, 0, wTile, hTile)); //source rect tileCount++; if (tileCount > m_maxTile) { - Base::Console().Warning("Pixmap tile count exceeded: %ld\n",tileCount); + Base::Console().warning("Pixmap tile count exceeded: %ld\n",tileCount); break; } } @@ -457,7 +457,7 @@ QPixmap QGIFace::textureFromBitmap(std::string fileSpec) const QString qfs(QString::fromUtf8(fileSpec.data(), fileSpec.size())); QFile file(qfs); if (!file.open(QFile::ReadOnly)) { - Base::Console().Error("QGIFace could not read %s\n", fileSpec.c_str()); + Base::Console().error("QGIFace could not read %s\n", fileSpec.c_str()); return pix; } QByteArray bytes = file.readAll(); diff --git a/src/Mod/TechDraw/Gui/QGIGhostHighlight.cpp b/src/Mod/TechDraw/Gui/QGIGhostHighlight.cpp index 8077026d6c..71620938ff 100644 --- a/src/Mod/TechDraw/Gui/QGIGhostHighlight.cpp +++ b/src/Mod/TechDraw/Gui/QGIGhostHighlight.cpp @@ -58,7 +58,7 @@ QGIGhostHighlight::~QGIGhostHighlight() void QGIGhostHighlight::mousePressEvent(QGraphicsSceneMouseEvent * event) { -// Base::Console().Message("QGIGhostHighlight::mousePress() - %X\n", this); +// Base::Console().message("QGIGhostHighlight::mousePress() - %X\n", this); if ( (event->button() == Qt::LeftButton) && (flags() & QGraphicsItem::ItemIsMovable) ) { m_dragging = true; @@ -69,7 +69,7 @@ void QGIGhostHighlight::mousePressEvent(QGraphicsSceneMouseEvent * event) void QGIGhostHighlight::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) { -// Base::Console().Message("QGIGhostHighlight::mouseRelease() - pos: %s scenePos: %s\n", +// Base::Console().message("QGIGhostHighlight::mouseRelease() - pos: %s scenePos: %s\n", // DrawUtil::formatVector(pos()).c_str(), // DrawUtil::formatVector(mapToScene(pos())).c_str()); if (m_dragging) { diff --git a/src/Mod/TechDraw/Gui/QGIHighlight.cpp b/src/Mod/TechDraw/Gui/QGIHighlight.cpp index 2195fd08ff..a2886b657c 100644 --- a/src/Mod/TechDraw/Gui/QGIHighlight.cpp +++ b/src/Mod/TechDraw/Gui/QGIHighlight.cpp @@ -66,7 +66,7 @@ QGIHighlight::~QGIHighlight() void QGIHighlight::onDragFinished() { -// Base::Console().Message("QGIH::onDragFinished - pos: %s\n", +// Base::Console().message("QGIH::onDragFinished - pos: %s\n", // DrawUtil::formatVector(pos()).c_str()); QGraphicsItem* parent = parentItem(); auto qgivp = dynamic_cast(parent); diff --git a/src/Mod/TechDraw/Gui/QGILeaderLine.cpp b/src/Mod/TechDraw/Gui/QGILeaderLine.cpp index e222b120a7..923a17e29d 100644 --- a/src/Mod/TechDraw/Gui/QGILeaderLine.cpp +++ b/src/Mod/TechDraw/Gui/QGILeaderLine.cpp @@ -109,7 +109,7 @@ QGILeaderLine::QGILeaderLine() void QGILeaderLine::setLeaderFeature(TechDraw::DrawLeaderLine* feat) { - // Base::Console().Message("QGILL::setLeaderFeature()\n"); + // Base::Console().message("QGILL::setLeaderFeature()\n"); setViewFeature(static_cast(feat)); float x = Rez::guiX(feat->X.getValue()); @@ -124,7 +124,7 @@ void QGILeaderLine::setLeaderFeature(TechDraw::DrawLeaderLine* feat) QVariant QGILeaderLine::itemChange(GraphicsItemChange change, const QVariant& value) { - // Base::Console().Message("QGILL::itemChange(%d)\n", change); + // Base::Console().message("QGILL::itemChange(%d)\n", change); if (change == ItemSelectedHasChanged && scene()) { if (isSelected()) { setPrettySel(); @@ -168,7 +168,7 @@ void QGILeaderLine::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) void QGILeaderLine::hoverEnterEvent(QGraphicsSceneHoverEvent* event) { - // Base::Console().Message("QGILL::hoverEnter() - selected; %d\n", isSelected()); + // Base::Console().message("QGILL::hoverEnter() - selected; %d\n", isSelected()); m_hasHover = true; if (!isSelected()) { setPrettyPre(); @@ -178,7 +178,7 @@ void QGILeaderLine::hoverEnterEvent(QGraphicsSceneHoverEvent* event) void QGILeaderLine::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) { - // Base::Console().Message("QGILL::hoverLeave() - selected; %d\n", isSelected()); + // Base::Console().message("QGILL::hoverLeave() - selected; %d\n", isSelected()); m_hasHover = false; if (!isSelected()) { setPrettyNormal(); @@ -188,7 +188,7 @@ void QGILeaderLine::hoverLeaveEvent(QGraphicsSceneHoverEvent* event) void QGILeaderLine::setNormalColorAll() { - // Base::Console().Message("QGILL::setNormalColorAll - normal color: %s\n", qPrintable(getNormalColor().name())); + // Base::Console().message("QGILL::setNormalColorAll - normal color: %s\n", qPrintable(getNormalColor().name())); QColor qc = prefNormalColor(); m_line->setNormalColor(qc); m_editPath->setNormalColor(qc); @@ -200,7 +200,7 @@ void QGILeaderLine::setNormalColorAll() void QGILeaderLine::setPrettyNormal() { - // Base::Console().Message("QGILL::setPrettyNormal()\n"); + // Base::Console().message("QGILL::setPrettyNormal()\n"); m_line->setPrettyNormal(); m_arrow1->setPrettyNormal(); m_arrow2->setPrettyNormal(); @@ -208,7 +208,7 @@ void QGILeaderLine::setPrettyNormal() void QGILeaderLine::setPrettyPre() { - // Base::Console().Message("QGILL::setPrettyPre()\n"); + // Base::Console().message("QGILL::setPrettyPre()\n"); m_line->setPrettyPre(); m_arrow1->setPrettyPre(); m_arrow2->setPrettyPre(); @@ -216,7 +216,7 @@ void QGILeaderLine::setPrettyPre() void QGILeaderLine::setPrettySel() { - // Base::Console().Message("QGILL::setPrettySel()\n"); + // Base::Console().message("QGILL::setPrettySel()\n"); m_line->setPrettySel(); m_arrow1->setPrettySel(); m_arrow2->setPrettySel(); @@ -225,7 +225,7 @@ void QGILeaderLine::setPrettySel() void QGILeaderLine::closeEdit() { - // Base::Console().Message("QGIL::closeEdit()\n"); + // Base::Console().message("QGIL::closeEdit()\n"); if (m_editPath) { m_editPath->onEndEdit();//tell QEPath that edit session ended } @@ -236,7 +236,7 @@ void QGILeaderLine::closeEdit() //! signaled from QEPath void QGILeaderLine::onLineEditFinished(QPointF tipDisplace, std::vector scenePoints) { - // Base::Console().Message("QGILL::onLineEditFinished(%s, %d)\n", + // Base::Console().message("QGILL::onLineEditFinished(%s, %d)\n", // TechDraw::DrawUtil::formatVector(tipDisplace).c_str(), // scenePoints.size()); @@ -299,7 +299,7 @@ void QGILeaderLine::startPathEdit() void QGILeaderLine::saveState() { - // Base::Console().Message("QGILL::saveState()\n"); + // Base::Console().message("QGILL::saveState()\n"); auto featLeader = getLeaderFeature(); if (featLeader) { m_savePoints = featLeader->WayPoints.getValues(); @@ -310,7 +310,7 @@ void QGILeaderLine::saveState() void QGILeaderLine::restoreState() { - // Base::Console().Message("QGILL::restoreState()\n"); + // Base::Console().message("QGILL::restoreState()\n"); auto featLeader = getLeaderFeature(); if (featLeader) { featLeader->WayPoints.setValues(m_savePoints); @@ -324,11 +324,11 @@ void QGILeaderLine::restoreState() void QGILeaderLine::updateView(bool update) { - // Base::Console().Message("QGILL::updateView()\n"); + // Base::Console().message("QGILL::updateView()\n"); Q_UNUSED(update); auto featLeader(dynamic_cast(getViewObject())); if (!featLeader) { - Base::Console().Warning("QGILL::updateView - no feature!\n"); + Base::Console().warning("QGILL::updateView - no feature!\n"); return; } @@ -391,7 +391,7 @@ void QGILeaderLine::draw() std::vector qPoints = getWayPointsFromFeature(); if (qPoints.empty() ) { - Base::Console().Message("QGILL::draw - no points\n"); + Base::Console().message("QGILL::draw - no points\n"); return; } @@ -416,7 +416,7 @@ QPainterPath QGILeaderLine::makeLeaderPath(std::vector qPoints) QPainterPath result; DrawLeaderLine* featLeader = getLeaderFeature(); if (!featLeader) { - // Base::Console().Message("QGILL::makeLeaderPath - featLeader is nullptr\n"); + // Base::Console().message("QGILL::makeLeaderPath - featLeader is nullptr\n"); return result; } @@ -466,7 +466,7 @@ QPointF QGILeaderLine::getAttachFromFeature() { TechDraw::DrawLeaderLine* featLeader = getLeaderFeature(); if (!featLeader) { - // Base::Console().Message("QGIL::getAttachFromLeader - no feature\n"); + // Base::Console().message("QGIL::getAttachFromLeader - no feature\n"); return {}; } double x = Rez::guiX(featLeader->X.getValue()); @@ -479,7 +479,7 @@ std::vector QGILeaderLine::getWayPointsFromFeature() { DrawLeaderLine* featLeader = getLeaderFeature(); if (!featLeader) { - // Base::Console().Message("QGILL::getWayPointsFromFeature - featLeader is nullptr\n"); + // Base::Console().message("QGILL::getWayPointsFromFeature - featLeader is nullptr\n"); return {}; } @@ -505,7 +505,7 @@ std::vector QGILeaderLine::getWayPointsFromFeature() } if (qPoints.empty()) { - Base::Console().Warning("QGILeaderLine::getWayPointsFromFeature - no points\n"); + Base::Console().warning("QGILeaderLine::getWayPointsFromFeature - no points\n"); } return qPoints; } @@ -602,7 +602,7 @@ Base::Vector3d QGILeaderLine::getAttachPoint() void QGILeaderLine::abandonEdit() { - // Base::Console().Message("QGIL::abandonEdit()\n"); + // Base::Console().message("QGIL::abandonEdit()\n"); m_editPath->clearMarkers(); m_editPath->hide(); restoreState(); @@ -629,7 +629,7 @@ double QGILeaderLine::getEdgeFuzz() const QColor QGILeaderLine::prefNormalColor() { - // Base::Console().Message("QGILL::getNormalColor()\n"); + // Base::Console().message("QGILL::getNormalColor()\n"); setNormalColor(PreferencesGui::leaderQColor()); auto vp = freecad_cast(getViewProvider(getViewObject())); diff --git a/src/Mod/TechDraw/Gui/QGIPrimPath.cpp b/src/Mod/TechDraw/Gui/QGIPrimPath.cpp index 6bee0cf657..50f6113b90 100644 --- a/src/Mod/TechDraw/Gui/QGIPrimPath.cpp +++ b/src/Mod/TechDraw/Gui/QGIPrimPath.cpp @@ -175,14 +175,14 @@ QColor QGIPrimPath::getSelectColor() void QGIPrimPath::setWidth(double w) { -// Base::Console().Message("QGIPP::setWidth(%.3f)\n", w); +// Base::Console().message("QGIPP::setWidth(%.3f)\n", w); m_pen.setWidthF(w); } void QGIPrimPath::setStyle(Qt::PenStyle s) { // TODO: edge lines for faces are drawn with setStyle(Qt::NoPen) and trigger this message. -// Base::Console().Warning("QGIPP::setStyle(Qt: %d) is deprecated. Use setLinePen instead\n", s); +// Base::Console().warning("QGIPP::setStyle(Qt: %d) is deprecated. Use setLinePen instead\n", s); m_styleNormal = s; m_pen.setStyle(s); } @@ -190,7 +190,7 @@ void QGIPrimPath::setStyle(Qt::PenStyle s) void QGIPrimPath::setStyle(int s) { // TODO: edge lines for faces are drawn with setStyle(Qt::NoPen) and trigger this message. -// Base::Console().Warning("QGIPP::setStyle(int: %d) is deprecated. Use setLinePen instead\n", s); +// Base::Console().warning("QGIPP::setStyle(int: %d) is deprecated. Use setLinePen instead\n", s); m_styleNormal = static_cast(s); m_pen.setStyle(m_styleNormal); } diff --git a/src/Mod/TechDraw/Gui/QGIProjGroup.cpp b/src/Mod/TechDraw/Gui/QGIProjGroup.cpp index 3d9b6ab3f8..5c5259bf9e 100644 --- a/src/Mod/TechDraw/Gui/QGIProjGroup.cpp +++ b/src/Mod/TechDraw/Gui/QGIProjGroup.cpp @@ -195,12 +195,12 @@ QGIView * QGIProjGroup::getAnchorQItem() const //QGIPG does not rotate. Only individual views rotate void QGIProjGroup::rotateView() { - Base::Console().Warning("QGIPG: Projection Groups do not rotate. Change ignored\n"); + Base::Console().warning("QGIPG: Projection Groups do not rotate. Change ignored\n"); } void QGIProjGroup::drawBorder() { //QGIProjGroup does not have a border! -// Base::Console().Message("TRACE - QGIProjGroup::drawBorder - doing nothing!!\n"); +// Base::Console().message("TRACE - QGIProjGroup::drawBorder - doing nothing!!\n"); } diff --git a/src/Mod/TechDraw/Gui/QGIRichAnno.cpp b/src/Mod/TechDraw/Gui/QGIRichAnno.cpp index 482a4174d1..80b83787f3 100644 --- a/src/Mod/TechDraw/Gui/QGIRichAnno.cpp +++ b/src/Mod/TechDraw/Gui/QGIRichAnno.cpp @@ -83,7 +83,7 @@ QGIRichAnno::QGIRichAnno() : void QGIRichAnno::updateView(bool update) { -// Base::Console().Message("QGIRA::updateView() - %s\n", getViewName()); +// Base::Console().message("QGIRA::updateView() - %s\n", getViewName()); Q_UNUSED(update); auto annoFeat( dynamic_cast(getViewObject()) ); if (!annoFeat) { @@ -122,19 +122,19 @@ void QGIRichAnno::drawBorder() void QGIRichAnno::draw() { -// Base::Console().Log("QGIRA::draw() - %s - parent: %X\n", getFeature()->getNameInDocument(), parentItem()); +// Base::Console().log("QGIRA::draw() - %s - parent: %X\n", getFeature()->getNameInDocument(), parentItem()); if (!isVisible()) -// Base::Console().Message("QGIRA::draw - not visible\n"); +// Base::Console().message("QGIRA::draw - not visible\n"); return; TechDraw::DrawRichAnno* annoFeat = getFeature(); if (!annoFeat) -// Base::Console().Message("QGIRA::draw - no feature\n"); +// Base::Console().message("QGIRA::draw - no feature\n"); return; auto vp = static_cast(getViewProvider(getFeature())); if (!vp) { -// Base::Console().Message("QGIRA::draw - no viewprovider\n"); +// Base::Console().message("QGIRA::draw - no viewprovider\n"); return; } @@ -145,7 +145,7 @@ void QGIRichAnno::draw() void QGIRichAnno::setTextItem() { -// Base::Console().Message("QGIRA::setTextItem() - %s - exportingSvg: %d\n", getViewName(), getExportingSvg()); +// Base::Console().message("QGIRA::setTextItem() - %s - exportingSvg: %d\n", getViewName(), getExportingSvg()); TechDraw::DrawRichAnno* annoFeat = getFeature(); // convert the text size diff --git a/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp b/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp index f098cbf208..5844424b2d 100644 --- a/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp +++ b/src/Mod/TechDraw/Gui/QGISVGTemplate.cpp @@ -248,7 +248,7 @@ void QGISVGTemplate::createClickHandles() QFile file(templateFilename); if (!file.open(QIODevice::ReadOnly)) { - Base::Console().Error( + Base::Console().error( "QGISVGTemplate::createClickHandles - error opening template file %s\n", svgTemplate->PageResult.getValue()); return; @@ -256,7 +256,7 @@ void QGISVGTemplate::createClickHandles() QDomDocument templateDocument; if (!templateDocument.setContent(&file)) { - Base::Console().Message("QGISVGTemplate::createClickHandles - xml loading error\n"); + Base::Console().message("QGISVGTemplate::createClickHandles - xml loading error\n"); return; } file.close(); diff --git a/src/Mod/TechDraw/Gui/QGISectionLine.cpp b/src/Mod/TechDraw/Gui/QGISectionLine.cpp index 57c4b316af..68a66ea1a8 100644 --- a/src/Mod/TechDraw/Gui/QGISectionLine.cpp +++ b/src/Mod/TechDraw/Gui/QGISectionLine.cpp @@ -321,7 +321,7 @@ void QGISectionLine::extensionEndsISO() void QGISectionLine::makeChangePointMarks() { -// Base::Console().Message("QGISL::makeChangePointMarks()\n"); +// Base::Console().message("QGISL::makeChangePointMarks()\n"); double segmentLength = 0.50 * QGIArrow::getPrefArrowSize(); QPen cPointPen; //TODO: this should really be 2.0 * thickLineWidth, but we only have one diff --git a/src/Mod/TechDraw/Gui/QGITile.cpp b/src/Mod/TechDraw/Gui/QGITile.cpp index a2a02d1684..52cac650ca 100644 --- a/src/Mod/TechDraw/Gui/QGITile.cpp +++ b/src/Mod/TechDraw/Gui/QGITile.cpp @@ -107,7 +107,7 @@ void QGITile::makeSymbol() return; } if (!m_qgSvg->load(&qba)) { - Base::Console().Error("Error - Could not load SVG renderer with **%s**\n", qPrintable(m_svgPath)); + Base::Console().error("Error - Could not load SVG renderer with **%s**\n", qPrintable(m_svgPath)); return; } m_qgSvg->setScale(getSymbolFactor()); diff --git a/src/Mod/TechDraw/Gui/QGIView.cpp b/src/Mod/TechDraw/Gui/QGIView.cpp index 1730222d95..8bd5cf7472 100644 --- a/src/Mod/TechDraw/Gui/QGIView.cpp +++ b/src/Mod/TechDraw/Gui/QGIView.cpp @@ -162,7 +162,7 @@ void QGIView::alignTo(QGraphicsItem*item, const QString &alignment) QVariant QGIView::itemChange(GraphicsItemChange change, const QVariant &value) { - // Base::Console().Message("QGIV::itemChange(%d)\n", change); + // Base::Console().message("QGIV::itemChange(%d)\n", change); if(change == ItemPositionChange && scene()) { QPointF newPos = value.toPointF(); //position within parent! @@ -448,7 +448,7 @@ void QGIView::mouseReleaseEvent(QGraphicsSceneMouseEvent * event) void QGIView::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { - // Base::Console().Message("QGIV::hoverEnterEvent()\n"); + // Base::Console().message("QGIV::hoverEnterEvent()\n"); Q_UNUSED(event); // TODO don't like this but only solution at the minute (MLP) if (isSelected()) { @@ -474,7 +474,7 @@ void QGIView::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) //sets position in /Gui(graphics), not /App void QGIView::setPosition(qreal xPos, qreal yPos) { - // Base::Console().Message("QGIV::setPosition(%.3f, %.3f) (gui)\n", x, y); + // Base::Console().message("QGIV::setPosition(%.3f, %.3f) (gui)\n", x, y); double newX = xPos; double newY = -yPos; double oldX = pos().x(); @@ -503,7 +503,7 @@ QGIViewClip* QGIView::getClipGroup() void QGIView::updateView(bool forceUpdate) { - // Base::Console().Message("QGIV::updateView() - %s\n", getViewObject()->getNameInDocument()); + // Base::Console().message("QGIV::updateView() - %s\n", getViewObject()->getNameInDocument()); //allow/prevent dragging if (getViewObject()->isLocked()) { @@ -584,7 +584,7 @@ void QGIView::toggleCache(bool state) void QGIView::draw() { - // Base::Console().Message("QGIV::draw()\n"); + // Base::Console().message("QGIV::draw()\n"); double xFeat, yFeat; if (getViewObject()) { xFeat = Rez::guiX(getViewObject()->X.getValue()); @@ -603,7 +603,7 @@ void QGIView::draw() void QGIView::drawCaption() { - // Base::Console().Message("QGIV::drawCaption()\n"); + // Base::Console().message("QGIV::drawCaption()\n"); prepareGeometryChange(); QRectF displayArea = customChildrenBoundingRect(); m_caption->setDefaultTextColor(m_colCurrent); @@ -629,7 +629,7 @@ void QGIView::drawCaption() void QGIView::drawBorder() { - // Base::Console().Message("QGIV::drawBorder() - %s\n", getViewName()); + // Base::Console().message("QGIV::drawBorder() - %s\n", getViewName()); auto feat = getViewObject(); if (!feat) return; @@ -824,7 +824,7 @@ void QGIView::removeChild(QGIView* child) bool QGIView::getFrameState() { - // Base::Console().Message("QGIV::getFrameState() - %s\n", getViewName()); + // Base::Console().message("QGIV::getFrameState() - %s\n", getViewName()); TechDraw::DrawView* dv = getViewObject(); if (!dv) return true; @@ -932,7 +932,7 @@ int QGIView::calculateFontPixelWidth(const QFont &font) const double QGIView::DefaultFontSizeInMM = 5.0; void QGIView::dumpRect(const char* text, QRectF rect) { - Base::Console().Message("DUMP - %s - rect: (%.3f, %.3f) x (%.3f, %.3f)\n", text, + Base::Console().message("DUMP - %s - rect: (%.3f, %.3f) x (%.3f, %.3f)\n", text, rect.left(), rect.top(), rect.right(), rect.bottom()); } diff --git a/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp b/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp index 8d8a2e3d99..3eea3607aa 100644 --- a/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewAnnotation.cpp @@ -92,7 +92,7 @@ void QGIViewAnnotation::updateView(bool update) void QGIViewAnnotation::draw() { - // Base::Console().Message("QGIVA::draw()\n"); + // Base::Console().message("QGIVA::draw()\n"); if (!isVisible()) { return; } @@ -106,7 +106,7 @@ void QGIViewAnnotation::draw() void QGIViewAnnotation::drawAnnotation() { - // Base::Console().Message("QGIVA::drawAnnotation()\n"); + // Base::Console().message("QGIVA::drawAnnotation()\n"); auto viewAnno(dynamic_cast(getViewObject())); if (!viewAnno) { return; @@ -144,7 +144,7 @@ void QGIViewAnnotation::drawAnnotation() } else if (viewAnno->TextStyle.isValue("Bold-Italic")) { ss << "font-weight:bold; font-style:italic; "; } else { - Base::Console().Warning("%s has invalid TextStyle\n", viewAnno->getNameInDocument()); + Base::Console().warning("%s has invalid TextStyle\n", viewAnno->getNameInDocument()); ss << "font-weight:normal; font-style:normal; "; } ss << "line-height:" << viewAnno->LineSpace.getValue() << "%; "; diff --git a/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp b/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp index 0276439c22..3060f1212f 100644 --- a/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewBalloon.cpp @@ -331,7 +331,7 @@ bool QGIViewBalloon::getGroupSelection() //Set selection state for this and its children void QGIViewBalloon::setGroupSelection(bool isSelected) { - // Base::Console().Message("QGIVB::setGroupSelection(%d)\n", b); + // Base::Console().message("QGIVB::setGroupSelection(%d)\n", b); setSelected(isSelected); balloonLabel->setSelected(isSelected); balloonLines->setSelected(isSelected); @@ -341,7 +341,7 @@ void QGIViewBalloon::setGroupSelection(bool isSelected) void QGIViewBalloon::select(bool state) { - // Base::Console().Message("QGIVBall::select(%d)\n", state); + // Base::Console().message("QGIVBall::select(%d)\n", state); setSelected(state); draw(); } @@ -354,7 +354,7 @@ void QGIViewBalloon::hover(bool state) void QGIViewBalloon::setViewPartFeature(TechDraw::DrawViewBalloon* balloonFeat) { - // Base::Console().Message("QGIVB::setViewPartFeature()\n"); + // Base::Console().message("QGIVB::setViewPartFeature()\n"); if (!balloonFeat) { return; } @@ -540,7 +540,7 @@ void QGIViewBalloon::balloonLabelDragFinished() //from QGVP::mouseReleaseEvent - pos = eventPos in scene coords? void QGIViewBalloon::placeBalloon(QPointF pos) { - // Base::Console().Message("QGIVB::placeBalloon(%s)\n", + // Base::Console().message("QGIVB::placeBalloon(%s)\n", // DrawUtil::formatVector(pos).c_str()); auto balloon(dynamic_cast(getViewObject())); if (!balloon) { @@ -870,7 +870,7 @@ void QGIViewBalloon::setPrettyPre(void) void QGIViewBalloon::setPrettySel(void) { - // Base::Console().Message("QGIVBal::setPrettySel()\n"); + // Base::Console().message("QGIVBal::setPrettySel()\n"); arrow->setPrettySel(); // balloonShape->setFill(Qt::white, Qt::NoBrush); balloonShape->setPrettySel(); @@ -889,7 +889,7 @@ void QGIViewBalloon::setPrettyNormal(void) void QGIViewBalloon::drawBorder(void) { //Dimensions have no border! - // Base::Console().Message("TRACE - QGIViewDimension::drawBorder - doing nothing!\n"); + // Base::Console().message("TRACE - QGIViewDimension::drawBorder - doing nothing!\n"); } void QGIViewBalloon::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, diff --git a/src/Mod/TechDraw/Gui/QGIViewClip.cpp b/src/Mod/TechDraw/Gui/QGIViewClip.cpp index 4c5d9e1351..6e3aaffdb4 100644 --- a/src/Mod/TechDraw/Gui/QGIViewClip.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewClip.cpp @@ -136,7 +136,7 @@ void QGIViewClip::drawClip() qgiv->show(); } } else { - Base::Console().Warning("Logic error? - drawClip() - qgiv for %s not found\n", (*it).c_str()); //gview for feature !exist + Base::Console().warning("Logic error? - drawClip() - qgiv for %s not found\n", (*it).c_str()); //gview for feature !exist } } diff --git a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp index 3b77f2cf06..5be1fb8d5c 100644 --- a/src/Mod/TechDraw/Gui/QGIViewDimension.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewDimension.cpp @@ -161,7 +161,7 @@ bool QGIViewDimension::getGroupSelection() //Set selection state for this and its children void QGIViewDimension::setGroupSelection(bool isSelected) { - // Base::Console().Message("QGIVD::setGroupSelection(%d)\n", b); + // Base::Console().message("QGIVD::setGroupSelection(%d)\n", b); setSelected(isSelected); datumLabel->setSelected(isSelected); dimLines->setSelected(isSelected); @@ -184,7 +184,7 @@ void QGIViewDimension::hover(bool state) void QGIViewDimension::setViewPartFeature(TechDraw::DrawViewDimension* obj) { - // Base::Console().Message("QGIVD::setViewPartFeature()\n"); + // Base::Console().message("QGIVD::setViewPartFeature()\n"); if (!obj) { return; } @@ -220,7 +220,7 @@ void QGIViewDimension::setNormalColorAll() //and so mouse events need to be ignored. Only the QGIDatumLabel mouse events are relevant. void QGIViewDimension::mousePressEvent(QGraphicsSceneMouseEvent* event) { - // Base::Console().Message("QGIVD::mousePressEvent() - %s\n", getViewName()); + // Base::Console().message("QGIVD::mousePressEvent() - %s\n", getViewName()); QGraphicsItem::mousePressEvent(event); } @@ -231,7 +231,7 @@ void QGIViewDimension::mouseMoveEvent(QGraphicsSceneMouseEvent* event) void QGIViewDimension::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { - // Base::Console().Message("QGIVDim::mouseReleaseEvent() - %s\n", getViewName()); + // Base::Console().message("QGIVDim::mouseReleaseEvent() - %s\n", getViewName()); QGraphicsItem::mouseReleaseEvent(event); } @@ -408,7 +408,7 @@ void QGIViewDimension::draw() drawArea(dim, vp); } else { - Base::Console().Error("QGIVD::draw - this DimensionType is unknown: %s\n", dimType); + Base::Console().error("QGIVD::draw - this DimensionType is unknown: %s\n", dimType); } } else { @@ -713,7 +713,7 @@ bool QGIViewDimension::constructDimensionLine( { // The start position > 0 is not expected, the caller must handle this if (startPosition > 0.0) { - Base::Console().Error( + Base::Console().error( "QGIVD::constructDimLine - Start Position must not be positive! Received: %f\n", startPosition); return false; @@ -785,7 +785,7 @@ bool QGIViewDimension::constructDimensionArc( { // The start rotation > 0 is not expected, the caller must handle this if (startRotation > 0.0) { - Base::Console().Error( + Base::Console().error( "QGIVD::constructDimArc - Start Rotation must not be positive! Received: %f\n", startRotation); return false; @@ -1268,7 +1268,7 @@ void QGIViewDimension::drawDistanceExecutive(const Base::Vector2d& startPoint, labelRectangle, arrowCount, standardStyle, flipArrows); } else { - Base::Console().Error( + Base::Console().error( "QGIVD::drawDistanceExecutive - this Standard&Style is not supported: %d\n", standardStyle); arrowCount = 0; @@ -1480,7 +1480,7 @@ void QGIViewDimension::drawDistanceOverride(const Base::Vector2d& startPoint, labelRectangle, arrowCount, standardStyle, flipArrows); } else { - Base::Console().Error( + Base::Console().error( "QGIVD::drawDistanceExecutive - this Standard&Style is not supported: %d\n", standardStyle); arrowCount = 0; @@ -1728,7 +1728,7 @@ void QGIViewDimension::drawRadiusExecutive(const Base::Vector2d& centerPoint, labelPosition, labelRectangle, 1, standardStyle, flipArrow); } else { - Base::Console().Error( + Base::Console().error( "QGIVD::drawRadiusExecutive - this Standard&Style is not supported: %d\n", standardStyle); } @@ -1801,7 +1801,7 @@ void QGIViewDimension::drawAreaExecutive(const Base::Vector2d& centerPoint, doub drawDimensionLine(areaPath, centerPoint, lineAngle, 0.0, labelPosition, labelRectangle, 1, standardStyle, flipArrow, forcePointStyle); } else { - Base::Console().Error( + Base::Console().error( "QGIVD::drawRadiusExecutive - this Standard&Style is not supported: %d\n", standardStyle); } @@ -2004,7 +2004,7 @@ void QGIViewDimension::drawDiameter(TechDraw::DrawViewDimension* dimension, labelRectangle, 2, standardStyle, flipArrows); } else { - Base::Console().Error("QGIVD::drawRadius - this Standard&Style is not supported: %d\n", + Base::Console().error("QGIVD::drawRadius - this Standard&Style is not supported: %d\n", standardStyle); } @@ -2199,7 +2199,7 @@ void QGIViewDimension::drawAngle(TechDraw::DrawViewDimension* dimension, flipArrows); } else { - Base::Console().Error("QGIVD::drawAngle - this Standard&Style is not supported: %d\n", + Base::Console().error("QGIVD::drawAngle - this Standard&Style is not supported: %d\n", standardStyle); arrowCount = 0; } @@ -2325,14 +2325,14 @@ Base::Vector3d QGIViewDimension::findIsoExt(Base::Vector3d dir) const } //tarfu - Base::Console().Message("QGIVD::findIsoExt - %s - input is not iso axis\n", + Base::Console().message("QGIVD::findIsoExt - %s - input is not iso axis\n", getViewObject()->getNameInDocument()); return Base::Vector3d(1, 0, 0); } void QGIViewDimension::onPrettyChanged(int state) { - // Base::Console().Message("QGIVD::onPrettyChange(%d)\n", state); + // Base::Console().message("QGIVD::onPrettyChange(%d)\n", state); if (state == NORMAL) { setPrettyNormal(); } @@ -2368,7 +2368,7 @@ void QGIViewDimension::setPrettyNormal() void QGIViewDimension::drawBorder() { //Dimensions have no border! - // Base::Console().Message("TRACE - QGIViewDimension::drawBorder - doing nothing!\n"); + // Base::Console().message("TRACE - QGIViewDimension::drawBorder - doing nothing!\n"); } double QGIViewDimension::getDefaultExtensionLineOverhang() const diff --git a/src/Mod/TechDraw/Gui/QGIViewPart.cpp b/src/Mod/TechDraw/Gui/QGIViewPart.cpp index b1d179875c..095fa93f14 100644 --- a/src/Mod/TechDraw/Gui/QGIViewPart.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewPart.cpp @@ -111,7 +111,7 @@ QVariant QGIViewPart::itemChange(GraphicsItemChange change, const QVariant& valu bool QGIViewPart::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { - // Base::Console().Message("QGIVP::sceneEventFilter - event: %d watchedtype: %d\n", + // Base::Console().message("QGIVP::sceneEventFilter - event: %d watchedtype: %d\n", // event->type(), watched->type() - QGraphicsItem::UserType); if (event->type() == QEvent::ShortcutOverride) { // if we accept this event, we should get a regular keystroke event next @@ -135,7 +135,7 @@ bool QGIViewPart::sceneEventFilter(QGraphicsItem *watched, QEvent *event) //! selected, remove it from the view. bool QGIViewPart::removeSelectedCosmetic() const { - // Base::Console().Message("QGIVP::removeSelectedCosmetic()\n"); + // Base::Console().message("QGIVP::removeSelectedCosmetic()\n"); auto dvp(dynamic_cast(getViewObject())); if (!dvp) { throw Base::RuntimeError("Graphic has no feature!"); @@ -186,7 +186,7 @@ QPainterPath QGIViewPart::drawPainterPath(TechDraw::BaseGeomPtr baseGeom) const void QGIViewPart::updateView(bool update) { - // Base::Console().Message("QGIVP::updateView() - %s\n", getViewObject()->getNameInDocument()); + // Base::Console().message("QGIVP::updateView() - %s\n", getViewObject()->getNameInDocument()); auto viewPart(dynamic_cast(getViewObject())); if (!viewPart) return; @@ -210,7 +210,7 @@ void QGIViewPart::draw() if (!doc || doc->testStatus(App::Document::Status::Restoring)) { // if the document is still restoring, we may not have all the information // we need to draw the source objects, so we wait until restore is finished. - // Base::Console().Message("QGIVP::draw - document is restoring, do not draw\n"); + // Base::Console().message("QGIVP::draw - document is restoring, do not draw\n"); return; } @@ -231,7 +231,7 @@ void QGIViewPart::drawViewPart() auto viewPart(dynamic_cast(getViewObject())); if (!viewPart) return; - // Base::Console().Message("QGIVP::DVP() - %s / %s\n", viewPart->getNameInDocument(), viewPart->Label.getValue()); + // Base::Console().message("QGIVP::DVP() - %s / %s\n", viewPart->getNameInDocument(), viewPart->Label.getValue()); if (!viewPart->hasGeometry()) { removePrimitives();//clean the slate removeDecorations(); @@ -373,7 +373,7 @@ void QGIViewPart::drawAllEdges() showItem = formatGeomFromCenterLine(cTag, item); } else { - Base::Console().Message("QGIVP::drawVP - cosmetic edge: %d is confused - source: %d\n", + Base::Console().message("QGIVP::drawVP - cosmetic edge: %d is confused - source: %d\n", iEdge, static_cast(source)); } } else { @@ -537,7 +537,7 @@ bool QGIViewPart::showCenterMarks() bool QGIViewPart::formatGeomFromCosmetic(std::string cTag, QGIEdge* item) { - // Base::Console().Message("QGIVP::formatGeomFromCosmetic(%s)\n", cTag.c_str()); + // Base::Console().message("QGIVP::formatGeomFromCosmetic(%s)\n", cTag.c_str()); bool result = true; auto partFeat(dynamic_cast(getViewObject())); TechDraw::CosmeticEdge* ce = partFeat ? partFeat->getCosmeticEdge(cTag) : nullptr; @@ -556,7 +556,7 @@ bool QGIViewPart::formatGeomFromCosmetic(std::string cTag, QGIEdge* item) bool QGIViewPart::formatGeomFromCenterLine(std::string cTag, QGIEdge* item) { -// Base::Console().Message("QGIVP::formatGeomFromCenterLine()\n"); +// Base::Console().message("QGIVP::formatGeomFromCenterLine()\n"); bool result = true; auto partFeat(dynamic_cast(getViewObject())); TechDraw::CenterLine* cl = partFeat ? partFeat->getCenterLine(cTag) : nullptr; @@ -574,7 +574,7 @@ bool QGIViewPart::formatGeomFromCenterLine(std::string cTag, QGIEdge* item) QGIFace* QGIViewPart::drawFace(TechDraw::FacePtr f, int idx) { - // Base::Console().Message("QGIVP::drawFace - %d\n", idx); + // Base::Console().message("QGIVP::drawFace - %d\n", idx); std::vector fWires = f->wires; QPainterPath facePath; for (std::vector::iterator wire = fWires.begin(); wire != fWires.end(); @@ -693,7 +693,7 @@ void QGIViewPart::drawAllSectionLines() void QGIViewPart::drawSectionLine(TechDraw::DrawViewSection* viewSection, bool b) { -// Base::Console().Message("QGIVP::drawSectionLine()\n"); +// Base::Console().message("QGIVP::drawSectionLine()\n"); TechDraw::DrawViewPart* viewPart = static_cast(getViewObject()); if (!viewPart) return; @@ -715,7 +715,7 @@ void QGIViewPart::drawSectionLine(TechDraw::DrawViewSection* viewSection, bool b Base::Vector3d l1 = Rez::guiX(sLineEnds.first) * scale; Base::Vector3d l2 = Rez::guiX(sLineEnds.second) * scale; if (l1.IsEqual(l2, EWTOLERANCE) ) { - Base::Console().Message("QGIVP::drawSectionLine - line endpoints are equal. No section line created.\n"); + Base::Console().message("QGIVP::drawSectionLine - line endpoints are equal. No section line created.\n"); return; } @@ -794,7 +794,7 @@ void QGIViewPart::drawComplexSectionLine(TechDraw::DrawViewSection* viewSection, Base::Vector3d vStart = Rez::guiX(ends.first);//already scaled by dcs Base::Vector3d vEnd = Rez::guiX(ends.second); if (vStart.IsEqual(vEnd, EWTOLERANCE) ) { - Base::Console().Message("QGIVP::drawComplexSectionLine - line endpoints are equal. No section line created.\n"); + Base::Console().message("QGIVP::drawComplexSectionLine - line endpoints are equal. No section line created.\n"); return; } @@ -1029,7 +1029,7 @@ void QGIViewPart::drawMatting() //! if this is a broken view, draw the break lines. void QGIViewPart::drawBreakLines() { - // Base::Console().Message("QGIVP::drawBreakLines()\n"); + // Base::Console().message("QGIVP::drawBreakLines()\n"); auto dbv = dynamic_cast(getViewObject()); if (!dbv) { @@ -1141,7 +1141,7 @@ QGIViewPart::faceIsGeomHatched(int i, std::vector geom void QGIViewPart::dumpPath(const char* text, QPainterPath path) { QPainterPath::Element elem; - Base::Console().Message(">>>%s has %d elements\n", text, path.elementCount()); + Base::Console().message(">>>%s has %d elements\n", text, path.elementCount()); const char* typeName; for (int iElem = 0; iElem < path.elementCount(); iElem++) { elem = path.elementAt(iElem); @@ -1157,7 +1157,7 @@ void QGIViewPart::dumpPath(const char* text, QPainterPath path) else { typeName = "CurveData"; } - Base::Console().Message(">>>>> element %d: type:%d/%s pos(%.3f, %.3f) M:%d L:%d C:%d\n", + Base::Console().message(">>>>> element %d: type:%d/%s pos(%.3f, %.3f) M:%d L:%d C:%d\n", iElem, static_cast(elem.type), typeName, elem.x, elem.y, static_cast(elem.isMoveTo()), static_cast(elem.isLineTo()), static_cast(elem.isCurveTo())); } diff --git a/src/Mod/TechDraw/Gui/QGIViewSection.cpp b/src/Mod/TechDraw/Gui/QGIViewSection.cpp index 241de17f39..147ca1a16e 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSection.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewSection.cpp @@ -48,7 +48,7 @@ void QGIViewSection::draw() void QGIViewSection::drawSectionFace() { - // Base::Console().Message("QGIVS::drawSectionFace()\n"); + // Base::Console().message("QGIVS::drawSectionFace()\n"); auto section( dynamic_cast(getViewObject()) ); if (!section) { return; @@ -118,7 +118,7 @@ void QGIViewSection::drawSectionFace() } } } else { - Base::Console().Warning("QGIVS::draw - unknown CutSurfaceDisplay: %d\n", + Base::Console().warning("QGIVS::draw - unknown CutSurfaceDisplay: %d\n", section->CutSurfaceDisplay.getValue()); } diff --git a/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp b/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp index e63bfd3a79..ddaaa66fad 100644 --- a/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp +++ b/src/Mod/TechDraw/Gui/QGIViewSymbol.cpp @@ -139,7 +139,7 @@ void QGIViewSymbol::symbolToSvg(QByteArray qba) prepareGeometryChange(); if (!m_svgItem->load(&qba)) { - Base::Console().Error("Error - Could not load Symbol into SVG renderer for %s\n", + Base::Console().error("Error - Could not load Symbol into SVG renderer for %s\n", getViewName()); } m_svgItem->centerAt(0., 0.); diff --git a/src/Mod/TechDraw/Gui/QGIWeldSymbol.cpp b/src/Mod/TechDraw/Gui/QGIWeldSymbol.cpp index 51e785053c..790abcce55 100644 --- a/src/Mod/TechDraw/Gui/QGIWeldSymbol.cpp +++ b/src/Mod/TechDraw/Gui/QGIWeldSymbol.cpp @@ -123,7 +123,7 @@ void QGIWeldSymbol::updateView(bool update) TechDraw::DrawWeldSymbol *feature = getFeature(); if (!feature) { - Base::Console().Warning("QGIWS::updateView - no feature!\n"); + Base::Console().warning("QGIWS::updateView - no feature!\n"); return; } @@ -161,7 +161,7 @@ void QGIWeldSymbol::draw() void QGIWeldSymbol::drawTile(TechDraw::DrawTileWeld* tileFeat) { if (!tileFeat) { - Base::Console().Message("QGIWS::drawTile - tile is null\n"); + Base::Console().message("QGIWS::drawTile - tile is null\n"); return; } diff --git a/src/Mod/TechDraw/Gui/QGSPage.cpp b/src/Mod/TechDraw/Gui/QGSPage.cpp index 3a37b37193..72766ab4b6 100644 --- a/src/Mod/TechDraw/Gui/QGSPage.cpp +++ b/src/Mod/TechDraw/Gui/QGSPage.cpp @@ -205,7 +205,7 @@ void QGSPage::addChildrenToPage() void QGSPage::attachTemplate(TechDraw::DrawTemplate* obj) { - // Base::Console().Message("QGSP::attachTemplate()\n"); + // Base::Console().message("QGSP::attachTemplate()\n"); setPageTemplate(obj); } @@ -324,7 +324,7 @@ int QGSPage::addQView(QGIView* view) view->updateView(true); } else { - Base::Console().Message("QGSP::addQView - qview already exists\n"); + Base::Console().message("QGSP::addQView - qview already exists\n"); } return 0; } @@ -667,7 +667,7 @@ QGIView* QGSPage::addViewDimension(TechDraw::DrawViewDimension* dimFeat) void QGSPage::addDimToParent(QGIViewDimension* dim, QGIView* parent) { - // Base::Console().Message("QGSP::addDimToParent()\n"); + // Base::Console().message("QGSP::addDimToParent()\n"); assert(dim); assert(parent);//blow up if we don't have Dimension or Parent QPointF posRef(0., 0.); @@ -1141,11 +1141,11 @@ void QGSPage::postProcessXml(QTemporaryFile& temporaryFile, QString fileName, QS QDomDocument exportDoc(QStringLiteral("SvgDoc")); QFile file(temporaryFile.fileName()); if (!file.open(QIODevice::ReadOnly)) { - Base::Console().Error("QGSPage::ppsvg - tempfile open error\n"); + Base::Console().error("QGSPage::ppsvg - tempfile open error\n"); return; } if (!exportDoc.setContent(&file)) { - Base::Console().Error("QGSPage::ppsvg - xml error\n"); + Base::Console().error("QGSPage::ppsvg - xml error\n"); file.close(); return; } @@ -1220,7 +1220,7 @@ void QGSPage::postProcessXml(QTemporaryFile& temporaryFile, QString fileName, QS // Time to save our product QFile outFile(fileName); if (!outFile.open(QIODevice::WriteOnly | QIODevice::Text)) { - Base::Console().Error("QGSP::ppxml - failed to open file for writing: %s\n", + Base::Console().error("QGSP::ppxml - failed to open file for writing: %s\n", qPrintable(fileName)); } diff --git a/src/Mod/TechDraw/Gui/QGTracker.cpp b/src/Mod/TechDraw/Gui/QGTracker.cpp index c1313ded2b..80be154b8a 100644 --- a/src/Mod/TechDraw/Gui/QGTracker.cpp +++ b/src/Mod/TechDraw/Gui/QGTracker.cpp @@ -112,7 +112,7 @@ void QGTracker::mousePressEvent(QGraphicsSceneMouseEvent *event) double someLimit = Rez::guiX(1.0); QPointF manhat = myScenePos - m_lastClick; - if (manhat.manhattanLength() >= someLimit) { + if (manhat.manhattanLength() >= someLimit) { if (event->button() == Qt::LeftButton) { if (event->modifiers() & Qt::ControlModifier) { myScenePos = snapToAngle(myScenePos); @@ -243,7 +243,7 @@ void QGTracker::onMousePress(QPointF pos) //just return pos to caller getPickedQGIV(pos); setCursor(Qt::CrossCursor); //why cross?? - + if (mode == TrackerMode::Point) { setPoint(m_points); //first point is mouse click scene pos terminateDrawing(); @@ -419,7 +419,7 @@ void QGTracker::setCircleFromPoints(std::vector pts) void QGTracker::setPoint(std::vector pts) { if (pts.empty()) { - Base::Console().Message("QGTracker::setPoint - no pts!\n"); + Base::Console().message("QGTracker::setPoint - no pts!\n"); return; } prepareGeometryChange(); diff --git a/src/Mod/TechDraw/Gui/QGVNavStyle.cpp b/src/Mod/TechDraw/Gui/QGVNavStyle.cpp index e145b30814..35280cdf94 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyle.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyle.cpp @@ -109,7 +109,7 @@ void QGVNavStyle::handleFocusOutEvent(QFocusEvent* event) void QGVNavStyle::handleKeyPressEvent(QKeyEvent* event) { - // Base::Console().Message("QGNS::handleKeyPressEvent(%d)\n", event->key()); + // Base::Console().message("QGNS::handleKeyPressEvent(%d)\n", event->key()); if (event->modifiers().testFlag(Qt::ControlModifier)) { switch (event->key()) { case Qt::Key_Plus: { @@ -214,7 +214,7 @@ void QGVNavStyle::handleLeaveEvent(QEvent* event) void QGVNavStyle::handleMousePressEvent(QMouseEvent* event) { - // Base::Console().Message("QGVNS::handleMousePressEvent()\n"); + // Base::Console().message("QGVNS::handleMousePressEvent()\n"); if (!panningActive && (event->button() == Qt::MiddleButton)) { startPan(event->pos()); event->accept(); @@ -223,7 +223,7 @@ void QGVNavStyle::handleMousePressEvent(QMouseEvent* event) void QGVNavStyle::handleMouseMoveEvent(QMouseEvent* event) { - // Base::Console().Message("QGVNS::handleMouseMoveEvent()\n"); + // Base::Console().message("QGVNS::handleMouseMoveEvent()\n"); if (getViewer()->isBalloonPlacing()) { balloonCursorMovement(event); return; @@ -239,7 +239,7 @@ void QGVNavStyle::handleMouseMoveEvent(QMouseEvent* event) //button that caused the event (typically RMB) void QGVNavStyle::handleMouseReleaseEvent(QMouseEvent* event) { - // Base::Console().Message("QGVNS::handleMouseReleaseEvent()\n"); + // Base::Console().message("QGVNS::handleMouseReleaseEvent()\n"); if (getViewer()->isBalloonPlacing()) { placeBalloon(event->pos()); } @@ -253,7 +253,7 @@ void QGVNavStyle::handleMouseReleaseEvent(QMouseEvent* event) bool QGVNavStyle::allowContextMenu(QContextMenuEvent* event) { Q_UNUSED(event) - // Base::Console().Message("QGVNS::allowContextMenu()\n"); + // Base::Console().message("QGVNS::allowContextMenu()\n"); // if (event->reason() == QContextMenuEvent::Mouse) { // //must check for a button combination involving context menu button // } @@ -305,7 +305,7 @@ void QGVNavStyle::zoom(double factor) void QGVNavStyle::startZoom(QPoint p) { - // Base::Console().Message("QGVNS::startZoom(%s)\n", TechDraw::DrawUtil::formatVector(p).c_str()); + // Base::Console().message("QGVNS::startZoom(%s)\n", TechDraw::DrawUtil::formatVector(p).c_str()); zoomOrigin = p; zoomingActive = true; m_zoomPending = false; @@ -314,7 +314,7 @@ void QGVNavStyle::startZoom(QPoint p) void QGVNavStyle::stopZoom() { - // Base::Console().Message("QGVNS::stopZoom()\n"); + // Base::Console().message("QGVNS::stopZoom()\n"); zoomingActive = false; m_zoomPending = false; getViewer()->resetCursor(); @@ -371,7 +371,7 @@ void QGVNavStyle::pan(QPoint p) void QGVNavStyle::stopPan() { - // Base::Console().Message("QGVNS::stopPan()\n"); + // Base::Console().message("QGVNS::stopPan()\n"); panningActive = false; m_panPending = false; getViewer()->resetCursor(); @@ -391,7 +391,7 @@ void QGVNavStyle::stopClick() void QGVNavStyle::placeBalloon(QPoint p) { - // Base::Console().Message("QGVNS::placeBalloon()\n"); + // Base::Console().message("QGVNS::placeBalloon()\n"); getViewer()->getBalloonCursor()->hide(); //balloon was created in Command.cpp. Why are we doing it again? getViewer()->getScene()->createBalloon(getViewer()->mapToScene(p), diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleBlender.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleBlender.cpp index 665669f906..0892ec74ef 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleBlender.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleBlender.cpp @@ -54,12 +54,12 @@ void QGVNavStyleBlender::handleKeyReleaseEvent(QKeyEvent *event) void QGVNavStyleBlender::handleMousePressEvent(QMouseEvent *event) { Q_UNUSED(event) -// Base::Console().Message("QGVNSBlender::handleMousePressEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); +// Base::Console().message("QGVNSBlender::handleMousePressEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); } void QGVNavStyleBlender::handleMouseMoveEvent(QMouseEvent *event) { -// Base::Console().Message("QGVNSBlender::handleMouseMoveEvent() - buttons: %d modifiers: %X\n", +// Base::Console().message("QGVNSBlender::handleMouseMoveEvent() - buttons: %d modifiers: %X\n", // QGuiApplication::mouseButtons() & Qt::MiddleButton, // QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier)); @@ -91,7 +91,7 @@ void QGVNavStyleBlender::handleMouseMoveEvent(QMouseEvent *event) void QGVNavStyleBlender::handleMouseReleaseEvent(QMouseEvent *event) { -// Base::Console().Message("QGVNSBlender::handleMouseReleaseEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); +// Base::Console().message("QGVNSBlender::handleMouseReleaseEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); if (getViewer()->isBalloonPlacing()) { placeBalloon(event->pos()); } @@ -115,7 +115,7 @@ void QGVNavStyleBlender::handleMouseReleaseEvent(QMouseEvent *event) bool QGVNavStyleBlender::allowContextMenu(QContextMenuEvent *event) { -// Base::Console().Message("QGVNSBlender::allowContextMenu()\n"); +// Base::Console().message("QGVNSBlender::allowContextMenu()\n"); if (event->reason() == QContextMenuEvent::Mouse) { //must check for a button combination involving context menu button if (QGuiApplication::mouseButtons() & Qt::LeftButton) { diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleCAD.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleCAD.cpp index 3752ae195c..87587a3da0 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleCAD.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleCAD.cpp @@ -62,7 +62,7 @@ void QGVNavStyleCAD::handleKeyReleaseEvent(QKeyEvent *event) void QGVNavStyleCAD::handleMousePressEvent(QMouseEvent *event) { -// Base::Console().Message("QGVNSCAD::handleMousePressEvent() - button: %d\n", event->button()); +// Base::Console().message("QGVNSCAD::handleMousePressEvent() - button: %d\n", event->button()); if (event->button() == Qt::MiddleButton) { startClick(Qt::MiddleButton); //for MMB center view } @@ -131,7 +131,7 @@ void QGVNavStyleCAD::handleMouseMoveEvent(QMouseEvent *event) void QGVNavStyleCAD::handleMouseReleaseEvent(QMouseEvent *event) { -// Base::Console().Message("QGVNSCAD::handleMouseReleaseEvent() - button: %d\n", event->button()); +// Base::Console().message("QGVNSCAD::handleMouseReleaseEvent() - button: %d\n", event->button()); if (getViewer()->isBalloonPlacing()) { placeBalloon(event->pos()); } @@ -174,7 +174,7 @@ void QGVNavStyleCAD::handleMouseReleaseEvent(QMouseEvent *event) bool QGVNavStyleCAD::allowContextMenu(QContextMenuEvent *event) { -// Base::Console().Message("QGVNSCAD::allowContextMenu()\n"); +// Base::Console().message("QGVNSCAD::allowContextMenu()\n"); if (event->reason() == QContextMenuEvent::Mouse) { //must check for a button combination involving context menu button if (QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier) || diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleMaya.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleMaya.cpp index cde2c62bd4..4b62b8add5 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleMaya.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleMaya.cpp @@ -118,7 +118,7 @@ void QGVNavStyleMaya::handleMouseReleaseEvent(QMouseEvent *event) bool QGVNavStyleMaya::allowContextMenu(QContextMenuEvent *event) { -// Base::Console().Message("QGVNSM::allowContextMenu()\n"); +// Base::Console().message("QGVNSM::allowContextMenu()\n"); if (event->reason() == QContextMenuEvent::Mouse) { //must check for a button combination involving context menu button if (QApplication::keyboardModifiers() == Qt::AltModifier) { diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleOCC.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleOCC.cpp index 7b689f1aa2..6aa360ac3c 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleOCC.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleOCC.cpp @@ -128,7 +128,7 @@ void QGVNavStyleOCC::handleMouseReleaseEvent(QMouseEvent *event) bool QGVNavStyleOCC::allowContextMenu(QContextMenuEvent *event) { -// Base::Console().Message("QGVNSOCC::allowContextMenu()\n"); +// Base::Console().message("QGVNSOCC::allowContextMenu()\n"); if (event->reason() == QContextMenuEvent::Mouse) { //must check for a button combination involving context menu button if (QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier) ) { diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleOpenSCAD.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleOpenSCAD.cpp index 42e1d41d4b..06edacf6a5 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleOpenSCAD.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleOpenSCAD.cpp @@ -138,7 +138,7 @@ void QGVNavStyleOpenSCAD::handleMouseReleaseEvent(QMouseEvent *event) bool QGVNavStyleOpenSCAD::allowContextMenu(QContextMenuEvent *event) { -// Base::Console().Message("QGVNSCAD::allowContextMenu()\n"); +// Base::Console().message("QGVNSCAD::allowContextMenu()\n"); if (event->reason() == QContextMenuEvent::Mouse) { //must check for a button combination involving context menu button if (QGuiApplication::keyboardModifiers().testFlag(Qt::ShiftModifier)) { diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleRevit.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleRevit.cpp index a6fb0c9fc3..271bb6df3e 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleRevit.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleRevit.cpp @@ -113,7 +113,7 @@ void QGVNavStyleRevit::handleMouseReleaseEvent(QMouseEvent *event) bool QGVNavStyleRevit::allowContextMenu(QContextMenuEvent *event) { -// Base::Console().Message("QGVNSRevit::allowContextMenu()\n"); +// Base::Console().message("QGVNSRevit::allowContextMenu()\n"); if (event->reason() == QContextMenuEvent::Mouse) { //must check for a button combination involving context menu button if (QGuiApplication::mouseButtons() & Qt::LeftButton) { diff --git a/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.cpp b/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.cpp index ec7602e471..f7e46e0cee 100644 --- a/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.cpp +++ b/src/Mod/TechDraw/Gui/QGVNavStyleSolidWorks.cpp @@ -55,7 +55,7 @@ void QGVNavStyleSolidWorks::handleKeyReleaseEvent(QKeyEvent *event) void QGVNavStyleSolidWorks::handleMousePressEvent(QMouseEvent *event) { Q_UNUSED(event) -// Base::Console().Message("QGVNSSolidWorks::handleMousePressEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); +// Base::Console().message("QGVNSSolidWorks::handleMousePressEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); } void QGVNavStyleSolidWorks::handleMouseMoveEvent(QMouseEvent *event) @@ -78,7 +78,7 @@ void QGVNavStyleSolidWorks::handleMouseMoveEvent(QMouseEvent *event) } else if ((QGuiApplication::mouseButtons() & Qt::MiddleButton) && QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier) ) { // pan mode 1 - Ctrl + MMB - // I think this block may be unnecessary since pan mode 2 MMB also captures pan mode 1 + // I think this block may be unnecessary since pan mode 2 MMB also captures pan mode 1 // Ctrl + MMB, but I'll leave it in to make it clear that this is what's intended // also nav style OCC has a similar block if (panningActive) { @@ -95,12 +95,12 @@ void QGVNavStyleSolidWorks::handleMouseMoveEvent(QMouseEvent *event) startPan(event->pos()); } event->accept(); - } + } } void QGVNavStyleSolidWorks::handleMouseReleaseEvent(QMouseEvent *event) { -// Base::Console().Message("QGVNSSolidWorks::handleMouseReleaseEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); +// Base::Console().message("QGVNSSolidWorks::handleMouseReleaseEvent() - button: %d buttons: %d\n", event->button(), event->buttons()); if (getViewer()->isBalloonPlacing()) { placeBalloon(event->pos()); } diff --git a/src/Mod/TechDraw/Gui/SymbolChooser.cpp b/src/Mod/TechDraw/Gui/SymbolChooser.cpp index a89a800ee2..e46628f37a 100644 --- a/src/Mod/TechDraw/Gui/SymbolChooser.cpp +++ b/src/Mod/TechDraw/Gui/SymbolChooser.cpp @@ -57,7 +57,7 @@ SymbolChooser::~SymbolChooser() void SymbolChooser::setUiPrimary() { - // Base::Console().Message("SC::setUiPrimary()\n"); + // Base::Console().message("SC::setUiPrimary()\n"); setWindowTitle(QObject::tr("Select a symbol")); resize(QSize(700, 500)); if (!m_symbolDir.isEmpty()) { @@ -103,7 +103,7 @@ void SymbolChooser::onCancelClicked() void SymbolChooser::onItemClicked(QListWidgetItem* item) { Q_UNUSED(item); - // Base::Console().Message("SCS::onItemClicked(%s)\n", qPrintable(item->text())); + // Base::Console().message("SCS::onItemClicked(%s)\n", qPrintable(item->text())); // Are item and currentItem() the same? Should use item? QListWidgetItem* sourceItem = ui->lwSymbols->currentItem(); QString targetText = sourceItem->text(); @@ -112,14 +112,14 @@ void SymbolChooser::onItemClicked(QListWidgetItem* item) QStringLiteral(".svg"); Q_EMIT symbolSelected(m_symbolPath, m_source); - // Base::Console().Message("SC::onOKClicked - symbol: %s\n", qPrintable(m_symbolPath)); + // Base::Console().message("SC::onOKClicked - symbol: %s\n", qPrintable(m_symbolPath)); accept(); } void SymbolChooser::onDirectoryChanged(const QString& newDir) { ui->lwSymbols->clear(); // Remove all previous symbols - // Base::Console().Message("SC::onDirectoryChanged(%s)\n", qPrintable(newDir)); + // Base::Console().message("SC::onDirectoryChanged(%s)\n", qPrintable(newDir)); m_symbolDir = newDir + QStringLiteral("/"); loadSymbolNames(m_symbolDir); } diff --git a/src/Mod/TechDraw/Gui/TaskActiveView.cpp b/src/Mod/TechDraw/Gui/TaskActiveView.cpp index e013239f0c..99790fa7a7 100644 --- a/src/Mod/TechDraw/Gui/TaskActiveView.cpp +++ b/src/Mod/TechDraw/Gui/TaskActiveView.cpp @@ -88,7 +88,7 @@ void TaskActiveView::changeEvent(QEvent* e) void TaskActiveView::setUiPrimary() { - // Base::Console().Message("TAV::setUiPrimary()\n"); + // Base::Console().message("TAV::setUiPrimary()\n"); setWindowTitle(QObject::tr("ActiveView to TD View")); ui->cbCrop->setChecked(false); enableCrop(false); @@ -101,7 +101,7 @@ void TaskActiveView::blockButtons(bool b) { Q_UNUSED(b); } TechDraw::DrawViewImage* TaskActiveView::createActiveView() { - // Base::Console().Message("TAV::createActiveView()\n"); + // Base::Console().message("TAV::createActiveView()\n"); //make sure there is an 3D MDI to grab!! if (!Gui::getMainWindow()) { @@ -205,7 +205,7 @@ TechDraw::DrawViewImage* TaskActiveView::createActiveView() bool success = image.save(QString::fromStdString(tempName)); if (!success) { - Base::Console().Error("ActiveView could not save file: %s\n", fileSpec.c_str()); + Base::Console().error("ActiveView could not save file: %s\n", fileSpec.c_str()); } tempName = DU::cleanFilespecBackslash(tempName); @@ -263,7 +263,7 @@ void TaskActiveView::enableTaskButtons(bool b) bool TaskActiveView::accept() { - // Base::Console().Message("TAV::accept()\n"); + // Base::Console().message("TAV::accept()\n"); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create ActiveView")); m_imageFeat = createActiveView(); // m_imageFeat->requestPaint(); @@ -280,7 +280,7 @@ bool TaskActiveView::accept() bool TaskActiveView::reject() { - // Base::Console().Message("TAV::reject()\n"); + // Base::Console().message("TAV::reject()\n"); //nothing to remove. Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().recompute()"); diff --git a/src/Mod/TechDraw/Gui/TaskCenterLine.cpp b/src/Mod/TechDraw/Gui/TaskCenterLine.cpp index 2596508963..ab4990a0de 100644 --- a/src/Mod/TechDraw/Gui/TaskCenterLine.cpp +++ b/src/Mod/TechDraw/Gui/TaskCenterLine.cpp @@ -115,7 +115,7 @@ TaskCenterLine::TaskCenterLine(TechDraw::DrawViewPart* partFeat, } else if (geomType == "Vertex") { m_type = Type::VERTEX; } else { - Base::Console().Error("TaskCenterLine - unknown geometry type: %s. Can not proceed.\n", geomType.c_str()); + Base::Console().error("TaskCenterLine - unknown geometry type: %s. Can not proceed.\n", geomType.c_str()); return; } diff --git a/src/Mod/TechDraw/Gui/TaskComplexSection.cpp b/src/Mod/TechDraw/Gui/TaskComplexSection.cpp index a62a1fa41c..55da4ba321 100644 --- a/src/Mod/TechDraw/Gui/TaskComplexSection.cpp +++ b/src/Mod/TechDraw/Gui/TaskComplexSection.cpp @@ -486,7 +486,7 @@ bool TaskComplexSection::apply(bool forceUpdate) if (m_baseView) { if (!DrawComplexSection::canBuild(m_baseView->localVectorToCS(localUnit), m_profileObject)) { - Base::Console().Error( + Base::Console().error( "Can not build Complex Section with this profile and direction (1)\n"); return false; } @@ -496,7 +496,7 @@ bool TaskComplexSection::apply(bool forceUpdate) gp_Ax2 sectionCS(stdOrigin, Base::convertTo(m_saveNormal), Base::convertTo(m_saveXDir)); if (!DrawComplexSection::canBuild(sectionCS, m_profileObject)) { - Base::Console().Error( + Base::Console().error( "Can not build Complex Section with this profile and direction (2)\n"); return false; } diff --git a/src/Mod/TechDraw/Gui/TaskCosVertex.cpp b/src/Mod/TechDraw/Gui/TaskCosVertex.cpp index 01988972e6..6db3c7f74f 100644 --- a/src/Mod/TechDraw/Gui/TaskCosVertex.cpp +++ b/src/Mod/TechDraw/Gui/TaskCosVertex.cpp @@ -104,7 +104,7 @@ void TaskCosVertex::changeEvent(QEvent* event) void TaskCosVertex::setUiPrimary() { -// Base::Console().Message("TCV::setUiPrimary()\n"); +// Base::Console().message("TCV::setUiPrimary()\n"); setWindowTitle(QObject::tr("New Cosmetic Vertex")); if (m_baseFeat) { @@ -149,7 +149,7 @@ void TaskCosVertex::addCosVertex(QPointF qPos) void TaskCosVertex::onTrackerClicked(bool clicked) { Q_UNUSED(clicked); -// Base::Console().Message("TCV::onTrackerClicked() m_pbTrackerState: %d\n", +// Base::Console().message("TCV::onTrackerClicked() m_pbTrackerState: %d\n", // m_pbTrackerState); removeTracker(); @@ -181,7 +181,7 @@ void TaskCosVertex::onTrackerClicked(bool clicked) void TaskCosVertex::startTracker() { -// Base::Console().Message("TCV::startTracker()\n"); +// Base::Console().message("TCV::startTracker()\n"); if (m_trackerMode == QGTracker::TrackerMode::None) { return; } @@ -207,7 +207,7 @@ void TaskCosVertex::onTrackerFinished(std::vector pts, QGIView* qgParen { (void)qgParent; if (pts.empty()) { - Base::Console().Error("TaskCosVertex - no points available\n"); + Base::Console().error("TaskCosVertex - no points available\n"); return; } @@ -255,7 +255,7 @@ void TaskCosVertex::onTrackerFinished(std::vector pts, QGIView* qgParen void TaskCosVertex::removeTracker() { -// Base::Console().Message("TCV::removeTracker()\n"); +// Base::Console().message("TCV::removeTracker()\n"); if (m_tracker && m_tracker->scene()) { m_vpp->getQGSPage()->removeItem(m_tracker); delete m_tracker; diff --git a/src/Mod/TechDraw/Gui/TaskCosmeticCircle.cpp b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.cpp index a1a7604e4f..d9c8f9d2b1 100644 --- a/src/Mod/TechDraw/Gui/TaskCosmeticCircle.cpp +++ b/src/Mod/TechDraw/Gui/TaskCosmeticCircle.cpp @@ -62,7 +62,7 @@ TaskCosmeticCircle::TaskCosmeticCircle(TechDraw::DrawViewPart* partFeat, m_ce = m_partFeat->getCosmeticEdgeBySelection(m_circleName); if (!m_ce) { - Base::Console().Error("TaskCosmeticCircle - bad parameters. Can not proceed.\n"); + Base::Console().error("TaskCosmeticCircle - bad parameters. Can not proceed.\n"); return; } @@ -226,7 +226,7 @@ void TaskCosmeticCircle::enableArcWidgets(bool newState) //****************************************************************************** void TaskCosmeticCircle::createCosmeticCircle(void) { -// Base::Console().Message("TCL::createCosmeticCircle()\n"); +// Base::Console().message("TCL::createCosmeticCircle()\n"); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create Cosmetic Circle")); @@ -261,7 +261,7 @@ void TaskCosmeticCircle::createCosmeticCircle(void) void TaskCosmeticCircle::updateCosmeticCircle(void) { - // Base::Console().Message("TCL::updateCosmeticCircle()\n"); + // Base::Console().message("TCL::updateCosmeticCircle()\n"); double x = ui->qsbCenterX->value().getValue(); double y = ui->qsbCenterY->value().getValue(); double z = ui->qsbCenterZ->value().getValue(); @@ -289,7 +289,7 @@ bool TaskCosmeticCircle::accept() { if (ui->qsbRadius->value().getValue() <= 0.0) { // this won't work! - Base::Console().Error("TaskCosmeticCircle - can not create a circle with radius: %.3f\n", + Base::Console().error("TaskCosmeticCircle - can not create a circle with radius: %.3f\n", ui->qsbRadius->value().getValue()); return false; } diff --git a/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp b/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp index a92d86caa9..cae9f9c5d4 100644 --- a/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp +++ b/src/Mod/TechDraw/Gui/TaskCosmeticLine.cpp @@ -59,7 +59,7 @@ TaskCosmeticLine::TaskCosmeticLine(TechDraw::DrawViewPart* partFeat, m_ce = m_partFeat->getCosmeticEdgeBySelection(m_edgeName); if (!m_ce) { - Base::Console().Error("TaskCosmeticLine - bad parameters. Can not proceed.\n"); + Base::Console().error("TaskCosmeticLine - bad parameters. Can not proceed.\n"); return; } @@ -173,7 +173,7 @@ void TaskCosmeticLine::setUiEdit() //****************************************************************************** void TaskCosmeticLine::createCosmeticLine() { -// Base::Console().Message("TCL::createCosmeticLine()\n"); +// Base::Console().message("TCL::createCosmeticLine()\n"); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create Cosmetic Line")); // ui 2d points are interpreted as unscaled, unrotated, uninverted @@ -207,7 +207,7 @@ void TaskCosmeticLine::createCosmeticLine() void TaskCosmeticLine::updateCosmeticLine() { -// Base::Console().Message("TCL::updateCosmeticLine()\n"); +// Base::Console().message("TCL::updateCosmeticLine()\n"); double x = ui->qsbx1->value().getValue(); double y = ui->qsby1->value().getValue(); double z = ui->qsbz1->value().getValue(); diff --git a/src/Mod/TechDraw/Gui/TaskDetail.cpp b/src/Mod/TechDraw/Gui/TaskDetail.cpp index 38963820aa..473674a785 100644 --- a/src/Mod/TechDraw/Gui/TaskDetail.cpp +++ b/src/Mod/TechDraw/Gui/TaskDetail.cpp @@ -79,7 +79,7 @@ TaskDetail::TaskDetail(TechDraw::DrawViewPart* baseFeat): m_basePage = m_baseFeat->findParentPage(); //it is possible that the basePage could be unparented and have no corresponding Page if (!m_basePage) { - Base::Console().Error("TaskDetail - bad parameters - base page. Can not proceed.\n"); + Base::Console().error("TaskDetail - bad parameters - base page. Can not proceed.\n"); return; } @@ -146,7 +146,7 @@ TaskDetail::TaskDetail(TechDraw::DrawViewDetail* detailFeat): { if (!m_detailFeat) { //should be caught in CMD caller - Base::Console().Error("TaskDetail - bad parameters. Can not proceed.\n"); + Base::Console().error("TaskDetail - bad parameters. Can not proceed.\n"); return; } @@ -163,7 +163,7 @@ TaskDetail::TaskDetail(TechDraw::DrawViewDetail* detailFeat): if (m_baseFeat) { m_baseName = m_baseFeat->getNameInDocument(); } else { - Base::Console().Error("TaskDetail - no BaseView. Can not proceed.\n"); + Base::Console().error("TaskDetail - no BaseView. Can not proceed.\n"); return; } @@ -219,7 +219,7 @@ void TaskDetail::changeEvent(QEvent *e) //save the start conditions void TaskDetail::saveDetailState() { -// Base::Console().Message("TD::saveDetailState()\n"); +// Base::Console().message("TD::saveDetailState()\n"); TechDraw::DrawViewDetail* dvd = getDetailFeat(); m_saveAnchor = dvd->AnchorPoint.getValue(); m_saveRadius = dvd->Radius.getValue(); @@ -228,7 +228,7 @@ void TaskDetail::saveDetailState() void TaskDetail::restoreDetailState() { -// Base::Console().Message("TD::restoreDetailState()\n"); +// Base::Console().message("TD::restoreDetailState()\n"); TechDraw::DrawViewDetail* dvd = getDetailFeat(); dvd->AnchorPoint.setValue(m_saveAnchor); dvd->Radius.setValue(m_saveRadius); @@ -238,7 +238,7 @@ void TaskDetail::restoreDetailState() void TaskDetail::setUiFromFeat() { -// Base::Console().Message("TD::setUIFromFeat()\n"); +// Base::Console().message("TD::setUIFromFeat()\n"); if (m_baseFeat) { std::string baseName = getBaseFeat()->getNameInDocument(); ui->leBaseView->setText(QString::fromStdString(baseName)); @@ -364,9 +364,9 @@ void TaskDetail::onDraggerClicked(bool clicked) void TaskDetail::editByHighlight() { -// Base::Console().Message("TD::editByHighlight()\n"); +// Base::Console().message("TD::editByHighlight()\n"); if (!m_ghost) { - Base::Console().Error("TaskDetail::editByHighlight - no ghost object\n"); + Base::Console().error("TaskDetail::editByHighlight - no ghost object\n"); return; } @@ -382,7 +382,7 @@ void TaskDetail::editByHighlight() //dragEnd is in scene coords. void TaskDetail::onHighlightMoved(QPointF dragEnd) { -// Base::Console().Message("TD::onHighlightMoved(%s) - highlight: %X\n", +// Base::Console().message("TD::onHighlightMoved(%s) - highlight: %X\n", // DrawUtil::formatVector(dragEnd).c_str(), m_ghost); ui->pbDragger->setEnabled(true); @@ -395,7 +395,7 @@ void TaskDetail::onHighlightMoved(QPointF dragEnd) if (dpgi) { DrawProjGroup* dpg = dpgi->getPGroup(); if (!dpg) { - Base::Console().Message("TD::getAnchorScene - projection group is confused\n"); + Base::Console().message("TD::getAnchorScene - projection group is confused\n"); //TODO::throw something. return; } @@ -430,7 +430,7 @@ void TaskDetail::enableTaskButtons(bool button) //***** Feature create & edit stuff ******************************************* void TaskDetail::createDetail() { -// Base::Console().Message("TD::createDetail()\n"); +// Base::Console().message("TD::createDetail()\n"); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create Detail View")); const std::string objectName{"Detail"}; @@ -471,7 +471,7 @@ void TaskDetail::createDetail() void TaskDetail::updateDetail() { -// Base::Console().Message("TD::updateDetail()\n"); +// Base::Console().message("TD::updateDetail()\n"); try { Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Update Detail")); double x = ui->qsbX->rawValue(); @@ -494,7 +494,7 @@ void TaskDetail::updateDetail() } catch (...) { //this is probably due to appl closing while dialog is still open - Base::Console().Error("Task Detail - detail feature update failed.\n"); + Base::Console().error("Task Detail - detail feature update failed.\n"); } } @@ -520,7 +520,7 @@ QPointF TaskDetail::getAnchorScene() DrawProjGroup* dpg = dpgi->getPGroup(); if (!dpg) { - Base::Console().Message("TD::getAnchorScene - projection group is confused\n"); + Base::Console().message("TD::getAnchorScene - projection group is confused\n"); //TODO::throw something. return QPointF(0.0, 0.0); } @@ -541,7 +541,7 @@ QPointF TaskDetail::getAnchorScene() // protects against stale pointers DrawViewPart* TaskDetail::getBaseFeat() { -// Base::Console().Message("TD::getBaseFeat()\n"); +// Base::Console().message("TD::getBaseFeat()\n"); if (m_doc) { App::DocumentObject* baseObj = m_doc->getObject(m_baseName.c_str()); @@ -560,7 +560,7 @@ DrawViewPart* TaskDetail::getBaseFeat() // protects against stale pointers DrawViewDetail* TaskDetail::getDetailFeat() { -// Base::Console().Message("TD::getDetailFeat()\n"); +// Base::Console().message("TD::getDetailFeat()\n"); if (m_baseFeat) { App::DocumentObject* detailObj = m_baseFeat->getDocument()->getObject(m_detailName.c_str()); @@ -581,7 +581,7 @@ DrawViewDetail* TaskDetail::getDetailFeat() bool TaskDetail::accept() { -// Base::Console().Message("TD::accept()\n"); +// Base::Console().message("TD::accept()\n"); Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument()); if (!doc) @@ -597,7 +597,7 @@ bool TaskDetail::accept() bool TaskDetail::reject() { -// Base::Console().Message("TD::reject()\n"); +// Base::Console().message("TD::reject()\n"); Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument()); if (!doc) return false; diff --git a/src/Mod/TechDraw/Gui/TaskDimension.cpp b/src/Mod/TechDraw/Gui/TaskDimension.cpp index 1b745307f7..8774948efd 100644 --- a/src/Mod/TechDraw/Gui/TaskDimension.cpp +++ b/src/Mod/TechDraw/Gui/TaskDimension.cpp @@ -269,7 +269,7 @@ void TaskDimension::onArbitraryChanged() void TaskDimension::onFormatSpecifierOverToleranceChanged() { -// Base::Console().Message("TD::onFormatSpecifierOverToleranceChanged()\n"); +// Base::Console().message("TD::onFormatSpecifierOverToleranceChanged()\n"); // if (m_blockToleranceLoop) { return; } m_parent->getDimFeat()->FormatSpecOverTolerance.setValue(ui->leFormatSpecifierOverTolerance->text().toUtf8().constData()); if (ui->cbArbitraryTolerances->isChecked() ) { @@ -288,7 +288,7 @@ void TaskDimension::onFormatSpecifierOverToleranceChanged() void TaskDimension::onFormatSpecifierUnderToleranceChanged() { -// Base::Console().Message("TD::onFormatSpecifierUnderToleranceChanged()\n"); +// Base::Console().message("TD::onFormatSpecifierUnderToleranceChanged()\n"); m_parent->getDimFeat()->FormatSpecUnderTolerance.setValue(ui->leFormatSpecifierUnderTolerance->text().toUtf8().constData()); if (ui->cbArbitraryTolerances->isChecked() ) { // Don't do anything else if tolerance is Arbitrary diff --git a/src/Mod/TechDraw/Gui/TaskGeomHatch.cpp b/src/Mod/TechDraw/Gui/TaskGeomHatch.cpp index cfa5ea99cc..5069c27905 100644 --- a/src/Mod/TechDraw/Gui/TaskGeomHatch.cpp +++ b/src/Mod/TechDraw/Gui/TaskGeomHatch.cpp @@ -70,7 +70,7 @@ void TaskGeomHatch::initUi() if (nameIndex > -1) { ui->cbName->setCurrentIndex(nameIndex); } else { - Base::Console().Warning("Warning - Pattern name *%s* not found in current PAT File\n", m_name.c_str()); + Base::Console().warning("Warning - Pattern name *%s* not found in current PAT File\n", m_name.c_str()); } connect(ui->cbName, qOverload(&QComboBox::currentIndexChanged), this, &TaskGeomHatch::onNameChanged); @@ -152,7 +152,7 @@ void TaskGeomHatch::onColorChanged() bool TaskGeomHatch::accept() { -// Base::Console().Message("TGH::accept()\n"); +// Base::Console().message("TGH::accept()\n"); updateValues(); Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); m_hatch->recomputeFeature(); //create the hatch lines @@ -204,7 +204,7 @@ void TaskGeomHatch::getParameters() //move values from screen to DocObjs void TaskGeomHatch::updateValues() { -// Base::Console().Message("TGH::updateValues()\n"); +// Base::Console().message("TGH::updateValues()\n"); m_file = (ui->fcFile->fileName()).toUtf8().constData(); m_hatch->FilePattern.setValue(m_file); QString cText = ui->cbName->currentText(); diff --git a/src/Mod/TechDraw/Gui/TaskHatch.cpp b/src/Mod/TechDraw/Gui/TaskHatch.cpp index 78f84ed89f..7affb47ef8 100644 --- a/src/Mod/TechDraw/Gui/TaskHatch.cpp +++ b/src/Mod/TechDraw/Gui/TaskHatch.cpp @@ -72,7 +72,7 @@ TaskHatch::TaskHatch(TechDrawGui::ViewProviderHatch* inVp) : ui(new Ui_TaskHatch), m_vp(inVp) { -// Base::Console().Message("TH::TH() - edit\n"); +// Base::Console().message("TH::TH() - edit\n"); ui->setupUi(this); m_hatch = m_vp->getViewObject(); App::DocumentObject* obj = m_hatch->Source.getValue(); @@ -131,7 +131,7 @@ void TaskHatch::saveHatchState() //restore the start conditions void TaskHatch::restoreHatchState() { -// Base::Console().Message("TH::restoreHatchState()\n"); +// Base::Console().message("TH::restoreHatchState()\n"); if (m_hatch) { m_hatch->HatchPattern.setValue(m_saveFile); m_vp->HatchScale.setValue(m_saveScale); @@ -175,7 +175,7 @@ void TaskHatch::onOffsetChanged() void TaskHatch::apply(bool forceUpdate) { Q_UNUSED(forceUpdate) -// Base::Console().Message("TH::apply() - m_hatch: %X\n", m_hatch); +// Base::Console().message("TH::apply() - m_hatch: %X\n", m_hatch); if (!m_hatch) { createHatch(); } @@ -192,7 +192,7 @@ void TaskHatch::apply(bool forceUpdate) void TaskHatch::createHatch() { -// Base::Console().Message("TH::createHatch()\n"); +// Base::Console().message("TH::createHatch()\n"); App::Document* doc = m_dvp->getDocument(); // TODO: the structured label for Hatch (and GeomHatch) should be retired. @@ -226,14 +226,14 @@ void TaskHatch::createHatch() Base::Vector3d offset(ui->dsbOffsetX->value(), ui->dsbOffsetY->value(), 0.0); m_vp->HatchOffset.setValue(offset); } else { - Base::Console().Error("TaskHatch - Hatch has no ViewProvider\n"); + Base::Console().error("TaskHatch - Hatch has no ViewProvider\n"); } Command::commitCommand(); } void TaskHatch::updateHatch() { -// Base::Console().Message("TH::updateHatch()\n"); +// Base::Console().message("TH::updateHatch()\n"); std::string FeatName = m_hatch->getNameInDocument(); Command::openCommand(QT_TRANSLATE_NOOP("Command", "Update Hatch")); @@ -256,7 +256,7 @@ void TaskHatch::updateHatch() bool TaskHatch::accept() { -// Base::Console().Message("TH::accept()\n"); +// Base::Console().message("TH::accept()\n"); apply(true); Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); @@ -266,7 +266,7 @@ bool TaskHatch::accept() bool TaskHatch::reject() { -// Base::Console().Message("TH::reject()\n"); +// Base::Console().message("TH::reject()\n"); restoreHatchState(); Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()"); return false; diff --git a/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp b/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp index 63639bd15f..aa649c099f 100644 --- a/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp +++ b/src/Mod/TechDraw/Gui/TaskLeaderLine.cpp @@ -87,7 +87,7 @@ TaskLeaderLine::TaskLeaderLine(TechDrawGui::ViewProviderLeader* leadVP) : m_basePage = m_lineFeat->findParentPage(); if (!m_basePage) { - Base::Console().Error("TaskRichAnno - bad parameters (2). Can not proceed.\n"); + Base::Console().error("TaskRichAnno - bad parameters (2). Can not proceed.\n"); return; } App::DocumentObject* obj = m_lineFeat->LeaderParent.getValue(); @@ -108,7 +108,7 @@ TaskLeaderLine::TaskLeaderLine(TechDrawGui::ViewProviderLeader* leadVP) : //TODO: when/if leaders are allowed to be parented to Page, check for m_baseFeat will be removed if (!m_baseFeat || !m_basePage) { - Base::Console().Error("TaskLeaderLine - bad parameters (2). Can not proceed.\n"); + Base::Console().error("TaskLeaderLine - bad parameters (2). Can not proceed.\n"); return; } @@ -420,16 +420,16 @@ void TaskLeaderLine::createLeaderFeature(std::vector sceneDeltas void TaskLeaderLine::dumpTrackerPoints(std::vector& tPoints) const { - Base::Console().Message("TTL::dumpTrackerPoints(%d)\n", tPoints.size()); - Base::Console().Message("TTL::dumpTrackerPoints - attach point: %s\n", DU::formatVector(m_attachPoint).c_str()); + Base::Console().message("TTL::dumpTrackerPoints(%d)\n", tPoints.size()); + Base::Console().message("TTL::dumpTrackerPoints - attach point: %s\n", DU::formatVector(m_attachPoint).c_str()); for (auto& point : tPoints) { - Base::Console().Message("TTL::dumpTrackerPoints - a point: %s\n", DU::formatVector(point).c_str()); + Base::Console().message("TTL::dumpTrackerPoints - a point: %s\n", DU::formatVector(point).c_str()); } } void TaskLeaderLine::updateLeaderFeature() { -// Base::Console().Message("TTL::updateLeaderFeature()\n"); +// Base::Console().message("TTL::updateLeaderFeature()\n"); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Edit Leader")); //waypoints & x, y are updated by QGILeaderLine (for edits only!) commonFeatureUpdate(); @@ -458,7 +458,7 @@ void TaskLeaderLine::commonFeatureUpdate() void TaskLeaderLine::removeFeature() { -// Base::Console().Message("TTL::removeFeature()\n"); +// Base::Console().message("TTL::removeFeature()\n"); if (!m_lineFeat) { return; } @@ -472,7 +472,7 @@ void TaskLeaderLine::removeFeature() m_lineFeat->getNameInDocument()); } catch (...) { - Base::Console().Message("TTL::removeFeature - failed to delete feature\n"); + Base::Console().message("TTL::removeFeature - failed to delete feature\n"); return; } } else { @@ -488,7 +488,7 @@ void TaskLeaderLine::onTrackerClicked(bool clicked) { Q_UNUSED(clicked); if (!m_vpp->getMDIViewPage()) { - Base::Console().Message("TLL::onTrackerClicked - no Mdi, no Tracker!\n"); + Base::Console().message("TLL::onTrackerClicked - no Mdi, no Tracker!\n"); return; } @@ -557,7 +557,7 @@ void TaskLeaderLine::onTrackerClicked(bool clicked) if (!qgLead) { //tarfu - Base::Console().Error("TaskLeaderLine - can't find leader graphic\n"); + Base::Console().error("TaskLeaderLine - can't find leader graphic\n"); //now what? throw will generate "unknown unhandled exception" } else { m_qgLeader = qgLead; @@ -595,7 +595,7 @@ void TaskLeaderLine::onTrackerClicked(bool clicked) void TaskLeaderLine::startTracker() { -// Base::Console().Message("TTL::startTracker()\n"); +// Base::Console().message("TTL::startTracker()\n"); if (!m_vpp->getQGSPage()) { return; } @@ -624,9 +624,9 @@ void TaskLeaderLine::onTrackerFinished(std::vector trackerScenePoints, { //in this case, we already know who the parent is. We don't need QGTracker to tell us. (void) qgParent; - // Base::Console().Message("TTL::onTrackerFinished() - parent: %X\n", qgParent); + // Base::Console().message("TTL::onTrackerFinished() - parent: %X\n", qgParent); if (trackerScenePoints.empty()) { - Base::Console().Error("TaskLeaderLine - no points available\n"); + Base::Console().error("TaskLeaderLine - no points available\n"); return; } @@ -636,7 +636,7 @@ void TaskLeaderLine::onTrackerFinished(std::vector trackerScenePoints, m_attachPoint = Base::Vector3d(mapped.x(), mapped.y(), 0.0); m_sceneDeltas = scenePointsToDeltas(trackerScenePoints); } else { - Base::Console().Message("TTL::onTrackerFinished - can't find parent graphic!\n"); + Base::Console().message("TTL::onTrackerFinished - can't find parent graphic!\n"); //blow up!? throw Base::RuntimeError("TaskLeaderLine - can not find parent graphic"); } @@ -663,7 +663,7 @@ void TaskLeaderLine::onTrackerFinished(std::vector trackerScenePoints, // this is called at every possible exit path? void TaskLeaderLine::removeTracker() { -// Base::Console().Message("TTL::removeTracker()\n"); +// Base::Console().message("TTL::removeTracker()\n"); if (!m_vpp->getQGSPage()) { return; } @@ -677,7 +677,7 @@ void TaskLeaderLine::removeTracker() void TaskLeaderLine::onCancelEditClicked(bool clicked) { Q_UNUSED(clicked); -// Base::Console().Message("TTL::onCancelEditClicked() m_pbTrackerState: %d\n", +// Base::Console().message("TTL::onCancelEditClicked() m_pbTrackerState: %d\n", // m_pbTrackerState); abandonEditSession(); if (m_lineFeat) { @@ -752,7 +752,7 @@ std::vector TaskLeaderLine::scenePointsToDeltas(std::vectorgetDocument(m_partFeat->getDocument()); if (!doc) return false; @@ -247,7 +247,7 @@ bool TaskLineDecor::accept() bool TaskLineDecor::reject() { -// Base::Console().Message("TLD::reject()\n"); +// Base::Console().message("TLD::reject()\n"); Gui::Document* doc = Gui::Application::Instance->getDocument(m_partFeat->getDocument()); if (!doc) return false; @@ -308,7 +308,7 @@ void TaskRestoreLines::initUi() void TaskRestoreLines::onAllPressed() { -// Base::Console().Message("TRL::onAllPressed()\n"); +// Base::Console().message("TRL::onAllPressed()\n"); onGeometryPressed(); onCosmeticPressed(); onCenterPressed(); @@ -316,7 +316,7 @@ void TaskRestoreLines::onAllPressed() void TaskRestoreLines::onGeometryPressed() { -// Base::Console().Message("TRL::onGeometryPressed()\n"); +// Base::Console().message("TRL::onGeometryPressed()\n"); restoreInvisibleGeoms(); ui->l_Geometry->setText(QString::number(0)); ui->l_All->setText(QString::number(countInvisibleLines())); @@ -324,7 +324,7 @@ void TaskRestoreLines::onGeometryPressed() void TaskRestoreLines::onCosmeticPressed() { -// Base::Console().Message("TRL::onCosmeticPressed()\n"); +// Base::Console().message("TRL::onCosmeticPressed()\n"); restoreInvisibleCosmetics(); ui->l_Cosmetic->setText(QString::number(0)); ui->l_All->setText(QString::number(countInvisibleLines())); @@ -332,7 +332,7 @@ void TaskRestoreLines::onCosmeticPressed() void TaskRestoreLines::onCenterPressed() { -// Base::Console().Message("TRL::onCenterPressed()\n"); +// Base::Console().message("TRL::onCenterPressed()\n"); restoreInvisibleCenters(); ui->l_Center->setText(QString::number(0)); ui->l_All->setText(QString::number(countInvisibleLines())); @@ -429,13 +429,13 @@ void TaskRestoreLines::restoreInvisibleCenters() bool TaskRestoreLines::accept() { -// Base::Console().Message("TRL::accept()\n"); +// Base::Console().message("TRL::accept()\n"); return true; } bool TaskRestoreLines::reject() { -// Base::Console().Message("TRL::reject()\n"); +// Base::Console().message("TRL::reject()\n"); return false; } @@ -487,14 +487,14 @@ void TaskDlgLineDecor::clicked(int i) bool TaskDlgLineDecor::accept() { -// Base::Console().Message("TDLD::accept()\n"); +// Base::Console().message("TDLD::accept()\n"); widget->accept(); return true; } bool TaskDlgLineDecor::reject() { -// Base::Console().Message("TDLD::reject()\n"); +// Base::Console().message("TDLD::reject()\n"); widget->reject(); return true; } diff --git a/src/Mod/TechDraw/Gui/TaskLinkDim.cpp b/src/Mod/TechDraw/Gui/TaskLinkDim.cpp index 6f3aede92a..afc00010a9 100644 --- a/src/Mod/TechDraw/Gui/TaskLinkDim.cpp +++ b/src/Mod/TechDraw/Gui/TaskLinkDim.cpp @@ -215,23 +215,23 @@ void TaskLinkDim::onCurrentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem Q_UNUSED(current); Q_UNUSED(previous); // if (previous) { -// Base::Console().Message("TRACE - TLD::onCurrent - text: %s data: %s is previous\n", +// Base::Console().message("TRACE - TLD::onCurrent - text: %s data: %s is previous\n", // qPrintable(previous->text(0)), qPrintable(previous->data(0, Qt::UserRole).toString())); // if (previous->treeWidget() == ui->selector->selectedTreeWidget()) { -// Base::Console().Message("TRACE - TLD::onCurrent - previous belongs to selected\n"); +// Base::Console().message("TRACE - TLD::onCurrent - previous belongs to selected\n"); // } // if (previous->treeWidget() == ui->selector->availableTreeWidget()) { -// Base::Console().Message("TRACE - TLD::onCurrent - previous belongs to available\n"); +// Base::Console().message("TRACE - TLD::onCurrent - previous belongs to available\n"); // } // } // if (current) { -// Base::Console().Message("TRACE - TLD::onCurrent - text: %s data: %s is current\n", +// Base::Console().message("TRACE - TLD::onCurrent - text: %s data: %s is current\n", // qPrintable(current->text(0)), qPrintable(current->data(0, Qt::UserRole).toString())); // if (current->treeWidget() == ui->selector->selectedTreeWidget()) { -// Base::Console().Message("TRACE - TLD::onCurrent - current belongs to selected\n"); +// Base::Console().message("TRACE - TLD::onCurrent - current belongs to selected\n"); // } // if (current->treeWidget() == ui->selector->availableTreeWidget()) { -// Base::Console().Message("TRACE - TLD::onCurrent - current belongs to available\n"); +// Base::Console().message("TRACE - TLD::onCurrent - current belongs to available\n"); // } // } } diff --git a/src/Mod/TechDraw/Gui/TaskRichAnno.cpp b/src/Mod/TechDraw/Gui/TaskRichAnno.cpp index 2ae4c86b6e..831f10be24 100644 --- a/src/Mod/TechDraw/Gui/TaskRichAnno.cpp +++ b/src/Mod/TechDraw/Gui/TaskRichAnno.cpp @@ -75,7 +75,7 @@ TaskRichAnno::TaskRichAnno(TechDrawGui::ViewProviderRichAnno* annoVP) : m_basePage = m_annoFeat->findParentPage(); if (!m_basePage) { - Base::Console().Error("TaskRichAnno - bad parameters (2). Can not proceed.\n"); + Base::Console().error("TaskRichAnno - bad parameters (2). Can not proceed.\n"); return; } @@ -160,7 +160,7 @@ void TaskRichAnno::changeEvent(QEvent *event) void TaskRichAnno::setUiPrimary() { -// Base::Console().Message("TRA::setUiPrimary()\n"); +// Base::Console().message("TRA::setUiPrimary()\n"); enableVPUi(false); setWindowTitle(m_title); @@ -198,7 +198,7 @@ void TaskRichAnno::enableVPUi(bool enable) void TaskRichAnno::setUiEdit() { -// Base::Console().Message("TRA::setUiEdit()); +// Base::Console().message("TRA::setUiEdit()); enableVPUi(true); setWindowTitle(m_title); enableTextUi(true); @@ -224,7 +224,7 @@ void TaskRichAnno::setUiEdit() void TaskRichAnno::onEditorClicked(bool clicked) { -// Base::Console().Message("TL::onEditorClicked(%d)\n", b); +// Base::Console().message("TL::onEditorClicked(%d)\n", b); Q_UNUSED(clicked); m_textDialog = new QDialog(nullptr); QString leadText = ui->teAnnoText->toHtml(); @@ -278,7 +278,7 @@ Base::Color TaskRichAnno::prefLineColor() //****************************************************************************** void TaskRichAnno::createAnnoFeature() { -// Base::Console().Message("TRA::createAnnoFeature()"); +// Base::Console().message("TRA::createAnnoFeature()"); const std::string objectName{QT_TR_NOOP("RichTextAnnotation")}; std::string annoName = m_basePage->getDocument()->getUniqueObjectName(objectName.c_str()); std::string generatedSuffix {annoName.substr(objectName.length())}; @@ -347,7 +347,7 @@ void TaskRichAnno::createAnnoFeature() void TaskRichAnno::updateAnnoFeature() { -// Base::Console().Message("TRA::updateAnnoFeature()\n"); +// Base::Console().message("TRA::updateAnnoFeature()\n"); Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Edit Anno")); commonFeatureUpdate(); Base::Color ac; @@ -362,7 +362,7 @@ void TaskRichAnno::updateAnnoFeature() void TaskRichAnno::commonFeatureUpdate() { -// Base::Console().Message("TRA::commonFeatureUpdate()\n"); +// Base::Console().message("TRA::commonFeatureUpdate()\n"); m_annoFeat->setPosition(Rez::appX(m_attachPoint.x), Rez::appX(- m_attachPoint.y), true); m_annoFeat->AnnoText.setValue(ui->teAnnoText->toHtml().toUtf8()); m_annoFeat->MaxWidth.setValue(ui->dsbMaxWidth->value().getValue()); @@ -371,7 +371,7 @@ void TaskRichAnno::commonFeatureUpdate() void TaskRichAnno::removeFeature() { -// Base::Console().Message("TRA::removeFeature()\n"); +// Base::Console().message("TRA::removeFeature()\n"); if (!m_annoFeat) return; @@ -385,7 +385,7 @@ void TaskRichAnno::removeFeature() m_annoFeat->getNameInDocument()); } catch (...) { - Base::Console().Warning("TRA::removeFeature - failed to delete feature\n"); + Base::Console().warning("TRA::removeFeature - failed to delete feature\n"); return; } } else { @@ -401,7 +401,7 @@ void TaskRichAnno::removeFeature() QPointF TaskRichAnno::calcTextStartPos(double scale) { Q_UNUSED(scale) -// Base::Console().Message("TRA::calcTextStartPos(%.3f)\n", scale); +// Base::Console().message("TRA::calcTextStartPos(%.3f)\n", scale); double textWidth = 100.0; double textHeight = 20.0; double horizGap(20.0); @@ -419,17 +419,17 @@ QPointF TaskRichAnno::calcTextStartPos(double scale) TechDraw::DrawLeaderLine* dll = static_cast(m_baseFeat); points = dll->WayPoints.getValues(); } else { -// Base::Console().Message("TRA::calcTextPos - m_baseFeat is not Leader\n"); +// Base::Console().message("TRA::calcTextPos - m_baseFeat is not Leader\n"); return QPointF(0.0, 0.0); } } else { -// Base::Console().Message("TRA::calcStartPos - no m_baseFeat\n"); +// Base::Console().message("TRA::calcStartPos - no m_baseFeat\n"); if (m_basePage) { double w = Rez::guiX(m_basePage->getPageWidth() / 2.0); double h = Rez::guiX(m_basePage->getPageHeight() / 2.0); return QPointF(w, h); } else { - Base::Console().Message("TRA::calcStartPos - no m_basePage\n"); //shouldn't happen. caught elsewhere + Base::Console().message("TRA::calcStartPos - no m_basePage\n"); //shouldn't happen. caught elsewhere } } @@ -466,9 +466,9 @@ void TaskRichAnno::enableTaskButtons(bool enable) bool TaskRichAnno::accept() { -// Base::Console().Message("TRA::accept()\n"); +// Base::Console().message("TRA::accept()\n"); if (m_inProgressLock) { -// Base::Console().Message("TRA::accept - edit in progress!!\n"); +// Base::Console().message("TRA::accept - edit in progress!!\n"); //TODO: kill MRTE dialog? return true; } @@ -492,9 +492,9 @@ bool TaskRichAnno::accept() bool TaskRichAnno::reject() { -// Base::Console().Message("TRA::reject()\n"); +// Base::Console().message("TRA::reject()\n"); if (m_inProgressLock) { -// Base::Console().Message("TRA::reject - edit in progress!!\n"); +// Base::Console().message("TRA::reject - edit in progress!!\n"); return false; } diff --git a/src/Mod/TechDraw/Gui/TaskSectionView.cpp b/src/Mod/TechDraw/Gui/TaskSectionView.cpp index 7a98c2f53f..735bab1506 100644 --- a/src/Mod/TechDraw/Gui/TaskSectionView.cpp +++ b/src/Mod/TechDraw/Gui/TaskSectionView.cpp @@ -437,7 +437,7 @@ bool TaskSectionView::apply(bool forceUpdate) //this should never happen std::string msg = tr("Nothing to apply. No section direction picked yet").toStdString(); - Base::Console().Error((msg + "\n").c_str()); + Base::Console().error((msg + "\n").c_str()); return false; } if (!m_section) { diff --git a/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp b/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp index 7bb0cd3d64..015e2b796b 100644 --- a/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp +++ b/src/Mod/TechDraw/Gui/TaskWeldingSymbol.cpp @@ -96,7 +96,7 @@ TaskWeldingSymbol::TaskWeldingSymbol(TechDraw::DrawWeldSymbol* weld) : App::DocumentObject* obj = m_weldFeat->Leader.getValue(); if (!obj || !obj->isDerivedFrom() ) { - Base::Console().Error("TaskWeldingSymbol - no leader for welding symbol. Can not proceed.\n"); + Base::Console().error("TaskWeldingSymbol - no leader for welding symbol. Can not proceed.\n"); return; } @@ -162,7 +162,7 @@ void TaskWeldingSymbol::changeEvent(QEvent *event) void TaskWeldingSymbol::setUiPrimary() { -// Base::Console().Message("TWS::setUiPrimary()\n"); +// Base::Console().message("TWS::setUiPrimary()\n"); setWindowTitle(QObject::tr("Create Welding Symbol")); m_currDir = PreferencesGui::weldingDirectory(); ui->fcSymbolDir->setFileName(m_currDir); @@ -181,7 +181,7 @@ void TaskWeldingSymbol::setUiPrimary() void TaskWeldingSymbol::setUiEdit() { -// Base::Console().Message("TWS::setUiEdit()\n"); +// Base::Console().message("TWS::setUiEdit()\n"); setWindowTitle(QObject::tr("Edit Welding Symbol")); m_currDir = PreferencesGui::weldingDirectory(); @@ -370,14 +370,14 @@ void TaskWeldingSymbol::onWeldingChanged() void TaskWeldingSymbol::onDirectorySelected(const QString& newDir) { -// Base::Console().Message("TWS::onDirectorySelected(%s)\n", qPrintable(newDir)); +// Base::Console().message("TWS::onDirectorySelected(%s)\n", qPrintable(newDir)); m_currDir = newDir + QStringLiteral("/"); } void TaskWeldingSymbol::onSymbolSelected(QString symbolPath, QString source) { -// Base::Console().Message("TWS::onSymbolSelected(%s) - source: %s\n", +// Base::Console().message("TWS::onSymbolSelected(%s) - source: %s\n", // qPrintable(symbolPath), qPrintable(source)); QIcon targetIcon(symbolPath); QSize iconSize(32, 32); @@ -399,7 +399,7 @@ void TaskWeldingSymbol::onSymbolSelected(QString symbolPath, void TaskWeldingSymbol::collectArrowData() { -// Base::Console().Message("TWS::collectArrowData()\n"); +// Base::Console().message("TWS::collectArrowData()\n"); m_arrowOut.toBeSaved = true; m_arrowOut.arrowSide = false; m_arrowOut.row = 0; @@ -413,7 +413,7 @@ void TaskWeldingSymbol::collectArrowData() void TaskWeldingSymbol::collectOtherData() { -// Base::Console().Message("TWS::collectOtherData()\n"); +// Base::Console().message("TWS::collectOtherData()\n"); m_otherOut.toBeSaved = true; m_otherOut.arrowSide = false; m_otherOut.row = -1; @@ -427,7 +427,7 @@ void TaskWeldingSymbol::collectOtherData() void TaskWeldingSymbol::getTileFeats() { -// Base::Console().Message("TWS::getTileFeats()\n"); +// Base::Console().message("TWS::getTileFeats()\n"); std::vector tiles = m_weldFeat->getTiles(); m_arrowFeat = nullptr; m_otherFeat = nullptr; @@ -455,7 +455,7 @@ void TaskWeldingSymbol::getTileFeats() //****************************************************************************** TechDraw::DrawWeldSymbol* TaskWeldingSymbol::createWeldingSymbol() { -// Base::Console().Message("TWS::createWeldingSymbol()\n"); +// Base::Console().message("TWS::createWeldingSymbol()\n"); App::Document *doc = Application::Instance->activeDocument()->getDocument(); auto weldSymbol = doc->addObject("WeldSymbol"); if (!weldSymbol) { @@ -486,11 +486,11 @@ void TaskWeldingSymbol::updateWeldingSymbol() void TaskWeldingSymbol::updateTiles() { -// Base::Console().Message("TWS::updateTiles()\n"); +// Base::Console().message("TWS::updateTiles()\n"); getTileFeats(); if (!m_arrowFeat) { - Base::Console().Message("TWS::updateTiles - no arrow tile!\n"); + Base::Console().message("TWS::updateTiles - no arrow tile!\n"); } else { collectArrowData(); if (m_arrowOut.toBeSaved) { @@ -514,7 +514,7 @@ void TaskWeldingSymbol::updateTiles() } if (!m_otherFeat) { -// Base::Console().Message("TWS::updateTiles - no other tile!\n"); +// Base::Console().message("TWS::updateTiles - no other tile!\n"); } else { if (m_otherDirty) { collectOtherData(); @@ -556,7 +556,7 @@ void TaskWeldingSymbol::enableTaskButtons(bool enable) bool TaskWeldingSymbol::accept() { -// Base::Console().Message("TWS::accept()\n"); +// Base::Console().message("TWS::accept()\n"); if (m_createMode) { Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Create WeldSymbol")); m_weldFeat = createWeldingSymbol(); @@ -572,7 +572,7 @@ bool TaskWeldingSymbol::accept() updateTiles(); } catch (...) { - Base::Console().Error("TWS::accept - failed to update symbol\n"); + Base::Console().error("TWS::accept - failed to update symbol\n"); } Gui::Command::updateActive(); @@ -587,7 +587,7 @@ bool TaskWeldingSymbol::accept() bool TaskWeldingSymbol::reject() { -// Base::Console().Message("TWS::reject()\n"); +// Base::Console().message("TWS::reject()\n"); //nothing to remove. Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().recompute()"); diff --git a/src/Mod/TechDraw/Gui/ViewProviderBalloon.cpp b/src/Mod/TechDraw/Gui/ViewProviderBalloon.cpp index 1c5f952823..384f998e67 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderBalloon.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderBalloon.cpp @@ -172,7 +172,7 @@ bool ViewProviderBalloon::canDelete(App::DocumentObject *obj) const bool ViewProviderBalloon::onDelete(const std::vector & parms) { Q_UNUSED(parms) -// Base::Console().Message("VPB::onDelete() - parms: %d\n", parms.size()); +// Base::Console().message("VPB::onDelete() - parms: %d\n", parms.size()); if (Gui::Control().activeDialog()) { // TODO: make this selective so only a dialog involving this vp's // feature is blocked. As is, this will prevent deletion during any diff --git a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp index c04bef344f..34f54d0729 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderDrawingView.cpp @@ -57,7 +57,7 @@ PROPERTY_SOURCE(TechDrawGui::ViewProviderDrawingView, Gui::ViewProviderDocumentO ViewProviderDrawingView::ViewProviderDrawingView() : m_myName(std::string()) { -// Base::Console().Message("VPDV::VPDV\n"); +// Base::Console().message("VPDV::VPDV\n"); initExtension(this); sPixmap = "TechDraw_TreeView"; @@ -78,7 +78,7 @@ ViewProviderDrawingView::~ViewProviderDrawingView() void ViewProviderDrawingView::attach(App::DocumentObject *pcFeat) { -// Base::Console().Message("VPDV::attach(%s)\n", pcFeat->getNameInDocument()); +// Base::Console().message("VPDV::attach(%s)\n", pcFeat->getNameInDocument()); ViewProviderDocumentObject::attach(pcFeat); //NOLINTBEGIN @@ -99,7 +99,7 @@ void ViewProviderDrawingView::attach(App::DocumentObject *pcFeat) // but parent page might. we may not be part of the document yet though! // :( we're not part of the page yet either! } else { - Base::Console().Warning("VPDV::attach has no Feature!\n"); + Base::Console().warning("VPDV::attach has no Feature!\n"); } } @@ -293,7 +293,7 @@ Gui::MDIView *ViewProviderDrawingView::getMDIView() const void ViewProviderDrawingView::onGuiRepaint(const TechDraw::DrawView* dv) { -// Base::Console().Message("VPDV::onGuiRepaint(%s) - this: %x\n", dv->getNameInDocument(), this); +// Base::Console().message("VPDV::onGuiRepaint(%s) - this: %x\n", dv->getNameInDocument(), this); Gui::Document* guiDoc = Gui::Application::Instance->getDocument(getViewObject()->getDocument()); if (!guiDoc) return; @@ -366,12 +366,12 @@ void ViewProviderDrawingView::showProgressMessage(const std::string featureName, .arg(QString::fromStdString(featureName), QString::fromStdString(text)); if (Gui::getMainWindow()) { - //neither of these work! Base::Console().Message() output preempts these messages?? + //neither of these work! Base::Console().message() output preempts these messages?? // Gui::getMainWindow()->showMessage(msg, 3000); // Gui::getMainWindow()->showStatus(Gui::MainWindow::Msg, msg); //Temporary implementation. This works, but the messages are queued up and //not displayed in the report window in real time?? - Base::Console().Message("%s\n", qPrintable(msg)); + Base::Console().message("%s\n", qPrintable(msg)); } } diff --git a/src/Mod/TechDraw/Gui/ViewProviderLeader.cpp b/src/Mod/TechDraw/Gui/ViewProviderLeader.cpp index f604b4eabb..fcd471d082 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderLeader.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderLeader.cpp @@ -79,7 +79,7 @@ ViewProviderLeader::ViewProviderLeader() bool ViewProviderLeader::setEdit(int ModNum) { -// Base::Console().Message("VPL::setEdit(%d)\n", ModNum); +// Base::Console().message("VPL::setEdit(%d)\n", ModNum); if (ModNum != ViewProvider::Default) { return ViewProviderDrawingView::setEdit(ModNum); } @@ -95,7 +95,7 @@ bool ViewProviderLeader::setEdit(int ModNum) bool ViewProviderLeader::doubleClicked() { -// Base::Console().Message("VPL::doubleClicked()\n"); +// Base::Console().message("VPL::doubleClicked()\n"); setEdit(ViewProvider::Default); return true; } diff --git a/src/Mod/TechDraw/Gui/ViewProviderRichAnno.cpp b/src/Mod/TechDraw/Gui/ViewProviderRichAnno.cpp index d6db537377..773ca636c9 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderRichAnno.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderRichAnno.cpp @@ -73,7 +73,7 @@ ViewProviderRichAnno::ViewProviderRichAnno() bool ViewProviderRichAnno::doubleClicked() { -// Base::Console().Message("VPRA::doubleClicked()\n"); +// Base::Console().message("VPRA::doubleClicked()\n"); setEdit(ViewProvider::Default); return true; } diff --git a/src/Mod/TechDraw/Gui/ViewProviderTemplate.cpp b/src/Mod/TechDraw/Gui/ViewProviderTemplate.cpp index 06cc8e5672..88b45e0462 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderTemplate.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderTemplate.cpp @@ -69,7 +69,7 @@ ViewProviderTemplate::ViewProviderTemplate() : m_myName(std::string()) void ViewProviderTemplate::attach(App::DocumentObject* pcFeat) { - // Base::Console().Message("VPT::attach(%s)\n", pcFeat->getNameInDocument()); + // Base::Console().message("VPT::attach(%s)\n", pcFeat->getNameInDocument()); ViewProviderDocumentObject::attach(pcFeat); auto feature = getTemplate(); @@ -164,7 +164,7 @@ QGITemplate* ViewProviderTemplate::getQTemplate() void ViewProviderTemplate::setMarkers(bool state) { - // Base::Console().Message("VPT::setMarkers(%d)\n", state); + // Base::Console().message("VPT::setMarkers(%d)\n", state); QGITemplate* qTemplate = getQTemplate(); QGISVGTemplate* qSvgTemplate = dynamic_cast(qTemplate); if (qSvgTemplate) { diff --git a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp index b6854b30f0..10e6d080c2 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderViewPart.cpp @@ -212,7 +212,7 @@ void ViewProviderViewPart::onChanged(const App::Property* prop) void ViewProviderViewPart::attach(App::DocumentObject *pcFeat) { -// Base::Console().Message("VPVP::attach(%s)\n", pcFeat->getNameInDocument()); +// Base::Console().message("VPVP::attach(%s)\n", pcFeat->getNameInDocument()); TechDraw::DrawViewMulti* dvm = dynamic_cast(pcFeat); TechDraw::DrawViewDetail* dvd = dynamic_cast(pcFeat); if (dvm) { @@ -290,7 +290,7 @@ bool ViewProviderViewPart::setEdit(int ModNum) TechDraw::DrawViewDetail* dvd = dynamic_cast(dvp); if (dvd) { if (!dvd->BaseView.getValue()) { - Base::Console().Error("DrawViewDetail - %s - has no BaseView!\n", dvd->getNameInDocument()); + Base::Console().error("DrawViewDetail - %s - has no BaseView!\n", dvd->getNameInDocument()); return false; } Gui::Control().showDialog(new TaskDlgDetail(dvd)); @@ -357,7 +357,7 @@ void ViewProviderViewPart::handleChangedPropertyType(Base::XMLReader &reader, co bool ViewProviderViewPart::onDelete(const std::vector & subNames) { - // Base::Console().Message("VPVP::onDelete(%d subNames)\n", subNames.size()); + // Base::Console().message("VPVP::onDelete(%d subNames)\n", subNames.size()); // we cannot delete if the view has a section or detail view (void) subNames; QString bodyMessage; diff --git a/src/Mod/TechDraw/Gui/ViewProviderWeld.cpp b/src/Mod/TechDraw/Gui/ViewProviderWeld.cpp index a0678bbcc6..154fb47f5b 100644 --- a/src/Mod/TechDraw/Gui/ViewProviderWeld.cpp +++ b/src/Mod/TechDraw/Gui/ViewProviderWeld.cpp @@ -94,7 +94,7 @@ std::vector ViewProviderWeld::claimChildren() const bool ViewProviderWeld::setEdit(int ModNum) { -// Base::Console().Message("VPW::setEdit(%d)\n", ModNum); +// Base::Console().message("VPW::setEdit(%d)\n", ModNum); if (ModNum != ViewProvider::Default ) { return ViewProviderDrawingView::setEdit(ModNum); } @@ -109,7 +109,7 @@ bool ViewProviderWeld::setEdit(int ModNum) bool ViewProviderWeld::doubleClicked() { -// Base::Console().Message("VPW::doubleClicked()\n"); +// Base::Console().message("VPW::doubleClicked()\n"); setEdit(ViewProvider::Default); return true; } diff --git a/src/Mod/TechDraw/Gui/Widgets/CompassWidget.cpp b/src/Mod/TechDraw/Gui/Widgets/CompassWidget.cpp index 29999791c2..43fae90a78 100644 --- a/src/Mod/TechDraw/Gui/Widgets/CompassWidget.cpp +++ b/src/Mod/TechDraw/Gui/Widgets/CompassWidget.cpp @@ -170,7 +170,7 @@ void CompassWidget::paintEvent(QPaintEvent* event) // set the compass dial and spinbox to a new angle void CompassWidget::setDialAngle(double newAngle) { - // Base::Console().Message("CW::setDialAngle(%.3f)\n", newAngle); + // Base::Console().message("CW::setDialAngle(%.3f)\n", newAngle); m_angle = newAngle; if (compassDial) { compassDial->setAngle(m_angle); @@ -183,7 +183,7 @@ void CompassWidget::setDialAngle(double newAngle) //slot for updates from spinbox on Enter/Return press. void CompassWidget::slotSpinBoxEnter(double newAngle) { - // Base::Console().Message("CW::slotSpinBoxEnter(%.3f)\n", newAngle); + // Base::Console().message("CW::slotSpinBoxEnter(%.3f)\n", newAngle); if (dsbAngle) { m_angle = newAngle; Q_EMIT angleChanged(m_angle); diff --git a/src/Mod/TechDraw/Gui/Widgets/VectorEditWidget.cpp b/src/Mod/TechDraw/Gui/Widgets/VectorEditWidget.cpp index 3f1086883d..4135e54389 100644 --- a/src/Mod/TechDraw/Gui/Widgets/VectorEditWidget.cpp +++ b/src/Mod/TechDraw/Gui/Widgets/VectorEditWidget.cpp @@ -105,7 +105,7 @@ void VectorEditWidget::setLabel(QString newLabel) void VectorEditWidget::setValue(Base::Vector3d newValue) { -// Base::Console().Message("VEW::setValue(%.6f, %.6f, %.6f)\n", newValue.x, newValue.y, newValue.z); +// Base::Console().message("VEW::setValue(%.6f, %.6f, %.6f)\n", newValue.x, newValue.y, newValue.z); m_value = newValue; dsbX->setValue(m_value.x); dsbY->setValue(m_value.y); @@ -115,7 +115,7 @@ void VectorEditWidget::setValue(Base::Vector3d newValue) void VectorEditWidget::setValueNoNotify(Base::Vector3d newValue) { -// Base::Console().Message("VEW::setValueNoNotify(%.6f, %.6f, %.6f)\n", newValue.x, newValue.y, newValue.z); +// Base::Console().message("VEW::setValueNoNotify(%.6f, %.6f, %.6f)\n", newValue.x, newValue.y, newValue.z); m_value = newValue; m_blockNotify = true; dsbX->setValue(m_value.x); @@ -127,7 +127,7 @@ void VectorEditWidget::setValueNoNotify(Base::Vector3d newValue) void VectorEditWidget::slotExpandButtonToggled(bool checked) { -// Base::Console().Message("VEW::slotExpand - checked: %d\n", checked); +// Base::Console().message("VEW::slotExpand - checked: %d\n", checked); if (checked) { vectorEditLayout->addLayout(VectorEditItemLayout); vectorEditLayout->addItem(verticalSpacer); @@ -144,7 +144,7 @@ void VectorEditWidget::slotExpandButtonToggled(bool checked) //to tell the world about the change if it comes from the Ui. void VectorEditWidget::slotXValueChanged(double newValue) { -// Base::Console().Message("VEW::xValueChanged(%.6f) - m_value.x: %.6f\n", newValue, m_value.x); +// Base::Console().message("VEW::xValueChanged(%.6f) - m_value.x: %.6f\n", newValue, m_value.x); if (!m_blockNotify) { //this is a change from the dsb m_value.x = newValue; @@ -154,7 +154,7 @@ void VectorEditWidget::slotXValueChanged(double newValue) } void VectorEditWidget::slotYValueChanged(double newValue) { -// Base::Console().Message("VEW::yValueChanged(%.6f) - m_value.y: %.6f\n", newValue, m_value.y); +// Base::Console().message("VEW::yValueChanged(%.6f) - m_value.y: %.6f\n", newValue, m_value.y); if (!m_blockNotify) { //this is a change from the dsb m_value.y = newValue; @@ -164,7 +164,7 @@ void VectorEditWidget::slotYValueChanged(double newValue) } void VectorEditWidget::slotZValueChanged(double newValue) { -// Base::Console().Message("VEW::zValueChanged(%.6f)\n", newValue); +// Base::Console().message("VEW::zValueChanged(%.6f)\n", newValue); if (!m_blockNotify) { //this is a change from the dsb m_value.z = newValue; @@ -175,7 +175,7 @@ void VectorEditWidget::slotZValueChanged(double newValue) void VectorEditWidget::updateDisplay() { -// Base::Console().Message("VEW::updateDisplay() - m_value: %s\n", DrawUtil::formatVector(m_value).c_str()); +// Base::Console().message("VEW::updateDisplay() - m_value: %s\n", DrawUtil::formatVector(m_value).c_str()); QString qNewDisplayString = QString::fromStdString(DrawUtil::formatVector(m_value)); leVectorDisplay->setText(qNewDisplayString); } diff --git a/src/Mod/Test/Gui/AppTestGui.cpp b/src/Mod/Test/Gui/AppTestGui.cpp index 8f115e0028..f78e70064d 100644 --- a/src/Mod/Test/Gui/AppTestGui.cpp +++ b/src/Mod/Test/Gui/AppTestGui.cpp @@ -36,10 +36,10 @@ class ILoggerBlockerTest: public Base::ILogger public: ~ILoggerBlockerTest() override { - Base::Console().DetachObserver(this); + Base::Console().detachObserver(this); } - const char* Name() override + const char* name() override { return "ILoggerBlockerTest"; } @@ -50,7 +50,7 @@ public: buffer.clear(); } - void SendLog(const std::string& notifiername, + void sendLog(const std::string& notifiername, const std::string& msg, Base::LogStyle level, Base::IntendedRecipient recipient, @@ -84,13 +84,13 @@ public: void runSingleTest(const char* comment, std::string expectedResult) { - Base::Console().Log(comment); + Base::Console().log(comment); flush(); - Base::Console().Log("LOG"); - Base::Console().Message("MSG"); - Base::Console().Warning("WRN"); - Base::Console().Error("ERR"); - Base::Console().Critical("CMS"); + Base::Console().log("LOG"); + Base::Console().message("MSG"); + Base::Console().warning("WRN"); + Base::Console().error("ERR"); + Base::Console().critical("CMS"); if (buffer.str() != expectedResult) { throw Py::RuntimeError("ILoggerTest: " + buffer.str() + " different from " + expectedResult); @@ -135,7 +135,7 @@ public: runSingleTest("Print all", "LOGMSGWRNERRCMS"); { Base::ILoggerBlocker blocker("ILoggerBlockerTest"); - Base::Console().SetEnabledMsgType("ILoggerBlockerTest", + Base::Console().setEnabledMsgType("ILoggerBlockerTest", Base::ConsoleSingleton::MsgType_Log, true); runSingleTest("Log is enabled but a warning is triggered in debug mode", "LOG"); @@ -218,8 +218,8 @@ private: { (void)args; ILoggerBlockerTest iltest; - Base::Console().AttachObserver(static_cast(&iltest)); - Base::Console().SetConnectionMode(Base::ConsoleSingleton::Direct); + Base::Console().attachObserver(static_cast(&iltest)); + Base::Console().setConnectionMode(Base::ConsoleSingleton::Direct); iltest.runTest(); return Py::None(); } @@ -247,7 +247,7 @@ PyMOD_INIT_FUNC(QtUnitGui) // with the Python runtime system PyObject* mod = TestGui::initModule(); - Base::Console().Log("Loading GUI of Test module... done\n"); + Base::Console().log("Loading GUI of Test module... done\n"); // add resources and reloads the translators loadTestResource(); diff --git a/src/Mod/Web/App/AppWeb.cpp b/src/Mod/Web/App/AppWeb.cpp index b5a298ff75..fff8c4c787 100644 --- a/src/Mod/Web/App/AppWeb.cpp +++ b/src/Mod/Web/App/AppWeb.cpp @@ -187,6 +187,6 @@ PyMOD_INIT_FUNC(Web) // // PyObject* mod = Web::initModule(); - Base::Console().Log("Loading Web module... done\n"); + Base::Console().log("Loading Web module... done\n"); PyMOD_Return(mod); } diff --git a/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp b/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp index e4f4e0e6f6..25ecde2108 100644 --- a/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp +++ b/src/Tools/_TEMPLATE_/App/App_TEMPLATE_.cpp @@ -67,6 +67,6 @@ PyMOD_INIT_FUNC(_TEMPLATE_) // // PyObject* mod = _TEMPLATE_::initModule(); - Base::Console().Log("Loading _TEMPLATE_ module... done\n"); + Base::Console().log("Loading _TEMPLATE_ module... done\n"); PyMOD_Return(mod); } diff --git a/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp b/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp index da3fc6cd6f..52d3053a72 100644 --- a/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp +++ b/src/Tools/_TEMPLATE_/Gui/App_TEMPLATE_Gui.cpp @@ -81,6 +81,6 @@ PyMOD_INIT_FUNC(_TEMPLATE_Gui) // // PyObject* mod = _TEMPLATE_Gui::initModule(); - Base::Console().Log("Loading GUI of _TEMPLATE_ module... done\n"); + Base::Console().log("Loading GUI of _TEMPLATE_ module... done\n"); PyMOD_Return(mod); } diff --git a/src/Tools/_TEMPLATE_/Gui/Command.cpp b/src/Tools/_TEMPLATE_/Gui/Command.cpp index 88bc81e8bc..008c0973b5 100644 --- a/src/Tools/_TEMPLATE_/Gui/Command.cpp +++ b/src/Tools/_TEMPLATE_/Gui/Command.cpp @@ -53,7 +53,7 @@ Cmd_TEMPLATE_Test::Cmd_TEMPLATE_Test() void Cmd_TEMPLATE_Test::activated(int) { - Base::Console().Message("Hello, World!\n"); + Base::Console().message("Hello, World!\n"); } void Create_TEMPLATE_Commands(void) diff --git a/src/Tools/bindings/templates/templateModuleAppMain.py b/src/Tools/bindings/templates/templateModuleAppMain.py index 5c16038321..144a39498a 100644 --- a/src/Tools/bindings/templates/templateModuleAppMain.py +++ b/src/Tools/bindings/templates/templateModuleAppMain.py @@ -40,7 +40,7 @@ extern struct PyMethodDef @self.module.Name@_methods[]; extern "C" { void App@self.module.Name@Export init@self.module.Name@() { - Base::Console().Log("Mod: Loading @self.module.Name@ module... done\\n"); + Base::Console().log("Mod: Loading @self.module.Name@ module... done\\n"); PyObject* partModule = Py_InitModule3("@self.module.Name@", @self.module.Name@_methods, module_@self.module.Name@_doc); /* mod name, table ptr */ + for i in self.module.Content.Feature: