Console: rename PascalCase named methods to camelCase

This commit is contained in:
bofdahof
2025-05-06 17:50:21 +02:00
committed by Kacper Donat
parent d4ecf95ca5
commit 998f4e4d45
497 changed files with 2423 additions and 2425 deletions
+51 -51
View File
@@ -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<Document*> Application::openDocuments(const std::vector<std::string>
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<Document*> Application::openDocuments(const std::vector<std::string>
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<std::string>().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<std::string>() << "'" << '\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<int>(v.second));
Base::Console().setDefaultLogLevel(static_cast<int>(v.second));
}
#endif
}
else {
*Base::Console().GetLogLevel(v.first.c_str()) = static_cast<int>(v.second);
*Base::Console().getLogLevel(v.first.c_str()) = static_cast<int>(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<std::string> Application::getCmdLineFiles()
std::list<std::string> Application::processFiles(const std::list<std::string>& files)
{
std::list<std::string> 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<std::string> Application::processFiles(const std::list<std::string>& 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<std::string> Application::processFiles(const std::list<std::string>& 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<std::str
ifcopenshellVer = Base::Interpreter().getValue(cmd, "version");
}
catch (const Base::Exception& e) {
Base::Console().Log("%s (safe to ignore, unless using the BIM workbench and IFC).\n", e.what());
Base::Console().log("%s (safe to ignore, unless using the BIM workbench and IFC).\n", e.what());
}
if (ifcopenshellVer) {
+5 -5
View File
@@ -984,19 +984,19 @@ PyObject* Application::sSetLogLevel(PyObject* /*self*/, PyObject* args)
if (strcmp(tag, "Default") == 0) {
#ifndef FC_DEBUG
if (l >= 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;
}
+18 -18
View File
@@ -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<App::DocumentObject*> 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<App::DocumentObject*> 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<App::DocumentObject*>& 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);
}
}
}
+1 -1
View File
@@ -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(),
+8 -8
View File
@@ -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
+1 -1
View File
@@ -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");
}
}
+10 -10
View File
@@ -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");
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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());
}
+5 -5
View File
@@ -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());
}
+1 -1
View File
@@ -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);
}
+3 -3
View File
@@ -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,
+37 -37
View File
@@ -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<LogStyle::Message, IntendedRecipient::Developer, ContentType::Untranslatable>(
instance()
.send<LogStyle::Message, IntendedRecipient::Developer, ContentType::Untranslatable>(
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<LogStyle::Warning, IntendedRecipient::Developer, ContentType::Untranslatable>(
instance()
.send<LogStyle::Warning, IntendedRecipient::Developer, ContentType::Untranslatable>(
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<LogStyle::Warning, IntendedRecipient::User, ContentType::Untranslated>(
instance().send<LogStyle::Warning, IntendedRecipient::User, ContentType::Untranslated>(
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<LogStyle::Warning, IntendedRecipient::User, ContentType::Translated>(
instance().send<LogStyle::Warning, IntendedRecipient::User, ContentType::Translated>(
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<LogStyle::Error, IntendedRecipient::All, ContentType::Untranslated>(
instance().send<LogStyle::Error, IntendedRecipient::All, ContentType::Untranslated>(
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<LogStyle::Error, IntendedRecipient::Developer, ContentType::Untranslatable>(
instance()
.send<LogStyle::Error, IntendedRecipient::Developer, ContentType::Untranslatable>(
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<LogStyle::Error, IntendedRecipient::User, ContentType::Untranslated>(
instance().send<LogStyle::Error, IntendedRecipient::User, ContentType::Untranslated>(
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<LogStyle::Error, IntendedRecipient::User, ContentType::Translated>(
instance().send<LogStyle::Error, IntendedRecipient::User, ContentType::Translated>(
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<LogStyle::Log, IntendedRecipient::Developer, ContentType::Untranslatable>(
instance()
.send<LogStyle::Log, IntendedRecipient::Developer, ContentType::Untranslatable>(
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<LogStyle::Critical, IntendedRecipient::All, ContentType::Untranslated>(
instance().send<LogStyle::Critical, IntendedRecipient::All, ContentType::Untranslated>(
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<LogStyle::Notification, IntendedRecipient::User, ContentType::Untranslated>(
instance()
.send<LogStyle::Notification, IntendedRecipient::User, ContentType::Untranslated>(
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<LogStyle::Notification, IntendedRecipient::User, ContentType::Translated>(
instance()
.send<LogStyle::Notification, IntendedRecipient::User, ContentType::Translated>(
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);
+103 -103
View File
@@ -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.h>
* 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<typename... Args>
void Message(const char* pMsg, Args&&... args);
void message(const char* pMsg, Args&&... args);
/// Prints a warning Message
template<typename... Args>
void Warning(const char* pMsg, Args&&... args);
void warning(const char* pMsg, Args&&... args);
/// Prints a error Message
template<typename... Args>
void Error(const char* pMsg, Args&&... args);
void error(const char* pMsg, Args&&... args);
/// Prints a log Message
template<typename... Args>
void Log(const char* pMsg, Args&&... args);
void log(const char* pMsg, Args&&... args);
/// Prints a Critical Message
template<typename... Args>
void Critical(const char* pMsg, Args&&... args);
void critical(const char* pMsg, Args&&... args);
/// Sends a User Notification
template<typename... Args>
void UserNotification(const char* pMsg, Args&&... args);
void userNotification(const char* pMsg, Args&&... args);
/// Sends an already translated User Notification
template<typename... Args>
void UserTranslatedNotification(const char* pMsg, Args&&... args);
void userTranslatedNotification(const char* pMsg, Args&&... args);
/// Prints a Message with source indication
template<typename... Args>
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<typename... Args>
void Warning(const std::string& notifier, const char* pMsg, Args&&... args);
void warning(const std::string& notifier, const char* pMsg, Args&&... args);
template<typename... Args>
void DeveloperWarning(const std::string& notifier, const char* pMsg, Args&&... args);
void developerWarning(const std::string& notifier, const char* pMsg, Args&&... args);
template<typename... Args>
void UserWarning(const std::string& notifier, const char* pMsg, Args&&... args);
void userWarning(const std::string& notifier, const char* pMsg, Args&&... args);
template<typename... Args>
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<typename... Args>
void Error(const std::string& notifier, const char* pMsg, Args&&... args);
void error(const std::string& notifier, const char* pMsg, Args&&... args);
template<typename... Args>
void DeveloperError(const std::string& notifier, const char* pMsg, Args&&... args);
void developerError(const std::string& notifier, const char* pMsg, Args&&... args);
template<typename... Args>
/// 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<typename... Args>
void UserError(const std::string& notifier, const char* pMsg, Args&&... args);
void userError(const std::string& notifier, const char* pMsg, Args&&... args);
template<typename... Args>
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<typename... Args>
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<typename... Args>
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<typename... Args>
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<typename... Args>
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<LogStyle,
IntendedRecipient = IntendedRecipient::All,
ContentType = ContentType::Untranslated>
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<typename... Args>
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>(args)...);
message(std::string(""), pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
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<LogStyle::Message>(notifier, pMsg, std::forward<Args>(args)...);
send<LogStyle::Message>(notifier, pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
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>(args)...);
warning(std::string(""), pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
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<LogStyle::Warning>(notifier, pMsg, std::forward<Args>(args)...);
send<LogStyle::Warning>(notifier, pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::DeveloperWarning(const std::string& notifier,
void Base::ConsoleSingleton::developerWarning(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Warning, IntendedRecipient::Developer, ContentType::Untranslatable>(
send<LogStyle::Warning, IntendedRecipient::Developer, ContentType::Untranslatable>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::UserWarning(const std::string& notifier,
void Base::ConsoleSingleton::userWarning(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Warning, IntendedRecipient::User, ContentType::Untranslated>(
send<LogStyle::Warning, IntendedRecipient::User, ContentType::Untranslated>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::TranslatedUserWarning(const std::string& notifier,
void Base::ConsoleSingleton::translatedUserWarning(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Warning, IntendedRecipient::User, ContentType::Translated>(
send<LogStyle::Warning, IntendedRecipient::User, ContentType::Translated>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
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>(args)...);
error(std::string(""), pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
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<LogStyle::Error>(notifier, pMsg, std::forward<Args>(args)...);
send<LogStyle::Error>(notifier, pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::DeveloperError(const std::string& notifier,
void Base::ConsoleSingleton::developerError(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Error, IntendedRecipient::Developer, ContentType::Untranslatable>(
send<LogStyle::Error, IntendedRecipient::Developer, ContentType::Untranslatable>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::DestructorError(const std::string& notifier,
void Base::ConsoleSingleton::destructorError(const std::string& notifier,
const char* pMsg,
Args&&... args) noexcept
{
try {
Send<LogStyle::Error, IntendedRecipient::Developer, ContentType::Untranslatable>(
send<LogStyle::Error, IntendedRecipient::Developer, ContentType::Untranslatable>(
notifier,
pMsg,
std::forward<Args>(args)...);
@@ -1096,90 +1096,90 @@ void Base::ConsoleSingleton::DestructorError(const std::string& notifier,
}
template<typename... Args>
void Base::ConsoleSingleton::UserError(const std::string& notifier,
void Base::ConsoleSingleton::userError(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Error, IntendedRecipient::User, ContentType::Untranslated>(
send<LogStyle::Error, IntendedRecipient::User, ContentType::Untranslated>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::TranslatedUserError(const std::string& notifier,
void Base::ConsoleSingleton::translatedUserError(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Error, IntendedRecipient::User, ContentType::Translated>(
send<LogStyle::Error, IntendedRecipient::User, ContentType::Translated>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
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>(args)...);
critical(std::string(""), pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
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<LogStyle::Critical>(notifier, pMsg, std::forward<Args>(args)...);
send<LogStyle::Critical>(notifier, pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
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>(args)...);
userNotification(std::string(""), pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::UserNotification(const std::string& notifier,
void Base::ConsoleSingleton::userNotification(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Notification, IntendedRecipient::User, ContentType::Untranslated>(
send<LogStyle::Notification, IntendedRecipient::User, ContentType::Untranslated>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
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>(args)...);
userTranslatedNotification(std::string(""), pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
void Base::ConsoleSingleton::UserTranslatedNotification(const std::string& notifier,
void Base::ConsoleSingleton::userTranslatedNotification(const std::string& notifier,
const char* pMsg,
Args&&... args)
{
Send<LogStyle::Notification, IntendedRecipient::User, ContentType::Translated>(
send<LogStyle::Notification, IntendedRecipient::User, ContentType::Translated>(
notifier,
pMsg,
std::forward<Args>(args)...);
}
template<typename... Args>
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>(args)...);
log(std::string(""), pMsg, std::forward<Args>(args)...);
}
template<typename... Args>
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<LogStyle::Log>(notifier, pMsg, std::forward<Args>(args)...);
send<LogStyle::Log>(notifier, pMsg, std::forward<Args>(args)...);
}
template<Base::LogStyle category,
Base::IntendedRecipient recipient /*= Base::IntendedRecipient::All*/,
Base::ContentType contenttype /*= Base::ContentType::Untranslated*/,
typename... Args>
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<category, recipient, contenttype>(notifiername, format);
notify<category, recipient, contenttype>(notifiername, format);
}
else {
@@ -1207,7 +1207,7 @@ void Base::ConsoleSingleton::Send(const std::string& notifiername, const char* p
template<Base::LogStyle category,
Base::IntendedRecipient recipient /*= Base::IntendedRecipient::All*/,
Base::ContentType contenttype /*= Base::ContentType::Untranslated*/>
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);
}
+6 -6
View File
@@ -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;
+8 -8
View File
@@ -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 (...) {
+1 -1
View File
@@ -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();
}
+1 -1
View File
@@ -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);
// }
};
+1 -1
View File
@@ -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
}
+1 -1
View File
@@ -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(),
+8 -8
View File
@@ -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<void*>(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<void*>(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<Observer<MsgType>*>::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;
}
+4 -4
View File
@@ -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());
}
}
+3 -3
View File
@@ -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<PyBaseProxy*>(baseProxy)->baseobject == this) {
@@ -462,7 +462,7 @@ PyObject *PyObjectBase::_repr()
std::stringstream a;
a << "<base object at " << _pcTwinPointer << ">";
# 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());
}
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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);
}
+1 -1
View File
@@ -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());
}
}
+4 -4
View File
@@ -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);
@@ -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) {
}
+7 -7
View File
@@ -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);
}
+4 -4
View File
@@ -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");
}
}
+3 -3
View File
@@ -553,7 +553,7 @@ QList<QAction*> 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));
}
}
+33 -33
View File
@@ -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<const App::Document*, Gui::Document*>::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<void*>(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<void*>(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());
}
}
+5 -5
View File
@@ -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);
}
}
+3 -3
View File
@@ -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"
+2 -2
View File
@@ -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());
}
}
}
+1 -1
View File
@@ -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)));
}
+1 -1
View File
@@ -392,7 +392,7 @@ void CallTipsList::extractTipsFromObject(Py::Object& obj, Py::List& list, QMap<Q
Py::Object attr = getAttrWorkaround(obj, attrname);
if (!attr.ptr()) {
Base::Console().Log("Python attribute '%s' returns null!\n", name.c_str());
Base::Console().log("Python attribute '%s' returns null!\n", name.c_str());
continue;
}
+1 -1
View File
@@ -355,7 +355,7 @@ void CoinRiftWidget::paintGL()
camera[eye]->position.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,
+13 -13
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}
+8 -8
View File
@@ -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;
}
}
+10 -10
View File
@@ -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");
}
}
+2 -2
View File
@@ -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;
}
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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;
+13 -13
View File
@@ -645,7 +645,7 @@ Note: your changes will be applied when you next switch workbenches\n"));
auto groupBox7 =
setupCustomMacrosPage->findChild<QGroupBox*>(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<QPushButton*>(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<QComboBox*>(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<QLineEdit*>(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<QPushButton*>(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<QComboBox*>(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<QPushButton*>(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<QLabel*>(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<QComboBox*>(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<QTreeWidget*>(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<QTreeWidget*>(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
+3 -4
View File
@@ -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());
}
}
@@ -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();
+3 -3
View File
@@ -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<Gui::BaseView*>::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<Gui::BaseView*>::iterator it;
+1 -1
View File
@@ -677,7 +677,7 @@ void DocumentRecoveryHandler::checkForPreviousCrashes(const std::function<void(Q
callableFunc(tmp, dirs, it.fileName());
}
else {
Base::Console().Log("Failed to lock file %s\n", fn.toUtf8().constData());
Base::Console().log("Failed to lock file %s\n", fn.toUtf8().constData());
}
}
}
+2 -2
View File
@@ -217,7 +217,7 @@ double EditableDatumLabel::getValue() const
void EditableDatumLabel::setSpinboxValue(double val, const Base::Unit& unit)
{
if (!spinBox) {
Base::Console().DeveloperWarning("EditableDatumLabel::setSpinboxValue", "Spinbox doesn't exist in");
Base::Console().developerWarning("EditableDatumLabel::setSpinboxValue", "Spinbox doesn't exist in");
return;
}
@@ -234,7 +234,7 @@ void EditableDatumLabel::setSpinboxValue(double val, const Base::Unit& unit)
void EditableDatumLabel::setFocusToSpinbox()
{
if (!spinBox) {
Base::Console().DeveloperWarning("EditableDatumLabel::setFocusToSpinbox", "Spinbox doesn't exist in");
Base::Console().developerWarning("EditableDatumLabel::setFocusToSpinbox", "Spinbox doesn't exist in");
return;
}
if (!spinBox->hasFocus()) {
+9 -9
View File
@@ -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);
}
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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) {
+4 -4
View File
@@ -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();
}
+7 -7
View File
@@ -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<QUrl>& 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<const char*> & 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,
+2 -2
View File
@@ -388,11 +388,11 @@ public:
/** Observes its parameter group. */
void OnChange(Base::Subject<const char*> &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:
+28 -28
View File
@@ -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<const NS::Event*>(this->triggering_event())->inventor_event->getPosition();
this->since = static_cast<const NS::Event*>(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<const NS::Event*>(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<const NS::Event*>(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<const NS::Event*>(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<const NS::Event*>(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<NS::IdleState>();
}
}
@@ -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();
}
}
+4 -4
View File
@@ -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"));
}
+6 -6
View File
@@ -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();
+15 -15
View File
@@ -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<App::DocumentObject, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type,
Base::Console().send<type,
Base::IntendedRecipient::Developer,
Base::ContentType::Untranslated>(notifier->getFullLabel(), msg.c_str());
}
else if constexpr( std::is_base_of_v<Gui::ViewProviderDocumentObject, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type,
Base::Console().send<type,
Base::IntendedRecipient::Developer,
Base::ContentType::Untranslated>(notifier->getObject()->getFullLabel(), msg.c_str());
}
else if constexpr( std::is_base_of_v<Gui::Document, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type,
Base::Console().send<type,
Base::IntendedRecipient::Developer,
Base::ContentType::Untranslated>(notifier->getDocument()->Label.getStrValue(), msg.c_str());
}
else if constexpr( std::is_base_of_v<App::Document, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type,
Base::Console().send<type,
Base::IntendedRecipient::Developer,
Base::ContentType::Untranslated>(notifier->Label.getStrValue(), msg.c_str());
}
else {
Base::Console().Send<type,
Base::Console().send<type,
Base::IntendedRecipient::Developer,
Base::ContentType::Untranslated>(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<App::DocumentObject, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->getFullLabel(), msg.toUtf8());
Base::Console().send<type, recipient, content>(notifier->getFullLabel(), msg.toUtf8());
}
else if constexpr( std::is_base_of_v<Gui::ViewProviderDocumentObject, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->getObject()->getFullLabel(), msg.toUtf8());
Base::Console().send<type, recipient, content>(notifier->getObject()->getFullLabel(), msg.toUtf8());
}
else if constexpr( std::is_base_of_v<Gui::Document, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->getDocument()->Label.getStrValue(), msg.toUtf8());
Base::Console().send<type, recipient, content>(notifier->getDocument()->Label.getStrValue(), msg.toUtf8());
}
else if constexpr( std::is_base_of_v<App::Document, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->Label.getStrValue(), msg.toUtf8());
Base::Console().send<type, recipient, content>(notifier->Label.getStrValue(), msg.toUtf8());
}
else {
Base::Console().Send<type, recipient, content>(notifier, msg.toUtf8());
Base::Console().send<type, recipient, content>(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<App::DocumentObject, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->getFullLabel(), msg.c_str());
Base::Console().send<type, recipient, content>(notifier->getFullLabel(), msg.c_str());
}
else if constexpr( std::is_base_of_v<Gui::ViewProviderDocumentObject, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->getObject()->getFullLabel(), msg.c_str());
Base::Console().send<type, recipient, content>(notifier->getObject()->getFullLabel(), msg.c_str());
}
else if constexpr( std::is_base_of_v<Gui::Document, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->getDocument()->Label.getStrValue(), msg.c_str());
Base::Console().send<type, recipient, content>(notifier->getDocument()->Label.getStrValue(), msg.c_str());
}
else if constexpr( std::is_base_of_v<App::Document, std::remove_pointer_t<typename std::decay<TNotifier>::type>> ) {
Base::Console().Send<type, recipient, content>(notifier->Label.getStrValue(), msg.c_str());
Base::Console().send<type, recipient, content>(notifier->Label.getStrValue(), msg.c_str());
}
else {
Base::Console().Send<type, recipient, content>(notifier, msg.c_str());
Base::Console().send<type, recipient, content>(notifier, msg.c_str());
}
}
}
+9 -9
View File
@@ -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 \
+3 -3
View File
@@ -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());
}
// --------------------------------------------------------------------
+5 -5
View File
@@ -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<std::string> 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());
}
}
+1 -1
View File
@@ -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);
}
@@ -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());
}
}
+1 -1
View File
@@ -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());
}
}
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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");
}
}
+2 -2
View File
@@ -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");
}
}
}
+1 -1
View File
@@ -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);
};
+2 -2
View File
@@ -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;
}
+3 -3
View File
@@ -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
+2 -2
View File
@@ -141,11 +141,11 @@ public:
/** Observes its parameter group. */
void OnChange(Base::Subject<const char*> &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 ();
+3 -3
View File
@@ -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");
}
}
}
+4 -4
View File
@@ -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<std::string, std::string>& 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,
+10 -10
View File
@@ -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<const char*>(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");
}
}
+1 -1
View File
@@ -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());
}
/**
+1 -1
View File
@@ -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());
}
+1 -1
View File
@@ -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");
}
}
+1 -1
View File
@@ -75,7 +75,7 @@ TaskSelectLinkProperty::TaskSelectLinkProperty(const char* sFilter,
LinkList = dynamic_cast<App::PropertyLinkList*>(prop);
}
else {
Base::Console().Warning("Unknown Link property type in "
Base::Console().warning("Unknown Link property type in "
"Gui::TaskView::TaskSelectLinkProperty::TaskSelectLinkProperty()");
}
+12 -12
View File
@@ -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;
}
+6 -6
View File
@@ -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, '['<<getTreeName()<<"] " << _msg)
#define TREE_MSG(_msg) _TREE_PRINT(FC_LOGLEVEL_MSG,Notify<Base::LogStyle::Message>,_msg)
#define TREE_WARN(_msg) _TREE_PRINT(FC_LOGLEVEL_WARN,Notify<Base::LogStyle::Warning>,_msg)
#define TREE_ERR(_msg) _TREE_PRINT(FC_LOGLEVEL_ERR,Notify<Base::LogStyle::Error>,_msg)
#define TREE_LOG(_msg) _TREE_PRINT(FC_LOGLEVEL_LOG,Notify<Base::LogStyle::Log>,_msg)
#define TREE_TRACE(_msg) _TREE_PRINT(FC_LOGLEVEL_TRACE,Notify<Base::LogStyle::Log>,_msg)
#define TREE_MSG(_msg) _TREE_PRINT(FC_LOGLEVEL_MSG,notify<Base::LogStyle::Message>,_msg)
#define TREE_WARN(_msg) _TREE_PRINT(FC_LOGLEVEL_WARN,notify<Base::LogStyle::Warning>,_msg)
#define TREE_ERR(_msg) _TREE_PRINT(FC_LOGLEVEL_ERR,notify<Base::LogStyle::Error>,_msg)
#define TREE_LOG(_msg) _TREE_PRINT(FC_LOGLEVEL_LOG,notify<Base::LogStyle::Log>,_msg)
#define TREE_TRACE(_msg) _TREE_PRINT(FC_LOGLEVEL_TRACE,notify<Base::LogStyle::Log>,_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;
+1 -1
View File
@@ -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());
}
}
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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());
}
+18 -18
View File
@@ -262,14 +262,14 @@ public:
if (event->type() == Spaceball::ButtonEvent::ButtonEventType) {
auto buttonEvent = static_cast<Spaceball::ButtonEvent*>(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<Spaceball::MotionEvent*>(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<Spaceball::MotionEvent*>(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<SbVec3f>(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<ViewProvider*> 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);
+8 -8
View File
@@ -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();
+5 -5
View File
@@ -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<Gui::ViewProviderExtension>();
#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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
}
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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);
+10 -10
View File
@@ -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<QWidget*>(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<Gui::Dialog::PreferencePage*>(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;
+3 -3
View File
@@ -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);
}
+12 -12
View File
@@ -1,4 +1,4 @@
/***************************************************************************
/***************************************************************************
* Copyright (c) 2004 Werner Mayer <wmayer[at]users.sourceforge.net> *
* *
* 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<const char*>
@@ -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<QString, StateData> _availableStates;
std::map<QString, QString> _styleCache;
QString _defaultStyle;
+3 -3
View File
@@ -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;
+2 -2
View File
@@ -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");
}
}

Some files were not shown because too many files have changed in this diff Show More