Console: rename PascalCase named methods to camelCase
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user