Console: rename PascalCase named methods to camelCase

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

View File

@@ -55,6 +55,6 @@ PyObject* initModule()
PyMOD_INIT_FUNC(Start)
{
PyObject* mod = Start::initModule();
Base::Console().Log("Loading Start module... done\n");
Base::Console().log("Loading Start module... done\n");
PyMOD_Return(mod);
}

View File

@@ -59,13 +59,13 @@ void CustomFolderModel::loadCustomFolder()
for (const auto& path : paths) {
QDir customFolderDirectory(path);
if (!customFolderDirectory.exists()) {
Base::Console().Warning(
Base::Console().warning(
"BaseApp/Preferences/Mod/Start/CustomFolder: custom folder %s does not exist\n",
customFolderDirectory.absolutePath().toStdString().c_str());
continue;
}
if (!customFolderDirectory.isReadable()) {
Base::Console().Warning(
Base::Console().warning(
"BaseApp/Preferences/Mod/Start/CustomFolder: cannot read custom folder %s\n",
customFolderDirectory.absolutePath().toStdString().c_str());
continue;

View File

@@ -87,7 +87,7 @@ QByteArray loadFCStdThumbnail(const QString& pathToFCStdFile)
}
}
catch (...) {
Base::Console().Log("Failed to load thumbnail for %s\n", pathToFCStdFile.toStdString());
Base::Console().log("Failed to load thumbnail for %s\n", pathToFCStdFile.toStdString());
}
}
return {};
@@ -257,7 +257,7 @@ void DisplayedFilesModel::processNewThumbnail(const QString& file, const QByteAr
Q_EMIT(dataChanged(qmi, qmi, {static_cast<int>(DisplayedFilesModelRoles::image)}));
}
else {
Base::Console().Log("Unrecognized path %s\n", file.toStdString());
Base::Console().log("Unrecognized path %s\n", file.toStdString());
}
}
}

View File

@@ -44,7 +44,7 @@ void ExamplesModel::loadExamples()
beginResetModel();
clear();
if (!_examplesDirectory.isReadable()) {
Base::Console().Warning("Cannot read %s",
Base::Console().warning("Cannot read %s",
_examplesDirectory.absolutePath().toStdString().c_str());
}
auto entries = _examplesDirectory.entryList(QDir::Filter::Files | QDir::Filter::Readable,

View File

@@ -70,22 +70,22 @@ void ThumbnailSource::run()
args << QLatin1String("--output=") + _thumbnailPath << _file;
QProcess process;
Base::Console().Log("Creating thumbnail for %s...\n", _file.toStdString());
Base::Console().log("Creating thumbnail for %s...\n", _file.toStdString());
process.start(f3d, args);
if (!process.waitForFinished()) {
process.kill();
Base::Console().Log("Creating thumbnail for %s timed out\n", _file.toStdString());
Base::Console().log("Creating thumbnail for %s timed out\n", _file.toStdString());
return;
}
if (process.exitStatus() == QProcess::CrashExit) {
Base::Console().Log("Creating thumbnail for %s crashed\n", _file.toStdString());
Base::Console().log("Creating thumbnail for %s crashed\n", _file.toStdString());
return;
}
if (process.exitCode() != 0) {
Base::Console().Log("Creating thumbnail for %s failed\n", _file.toStdString());
Base::Console().log("Creating thumbnail for %s failed\n", _file.toStdString());
return;
}
Base::Console().Log("Creating thumbnail for %s succeeded, wrote to %s\n",
Base::Console().log("Creating thumbnail for %s succeeded, wrote to %s\n",
_file.toStdString(),
_thumbnailPath.toStdString());
}
@@ -110,7 +110,7 @@ std::tuple<int, int, int> extractF3DVersion(const QString& stdoutString)
patch = split[2].toInt();
}
catch (...) {
Base::Console().Log(
Base::Console().log(
"Could not determine F3D version, disabling thumbnail generation\n");
}
}
@@ -188,5 +188,5 @@ void ThumbnailSource::setupF3D()
if (_f3d.major >= 2) {
_f3d.baseArgs = getF3DOptions(f3d);
}
Base::Console().Log("Running f3d version %d.%d\n", _f3d.major, _f3d.minor);
Base::Console().log("Running f3d version %d.%d\n", _f3d.major, _f3d.minor);
}

View File

@@ -119,12 +119,12 @@ PyMOD_INIT_FUNC(StartGui)
static StartGui::StartLauncher* launcher = new StartGui::StartLauncher();
Q_UNUSED(launcher)
Base::Console().Log("Loading GUI of Start module... ");
Base::Console().log("Loading GUI of Start module... ");
PyObject* mod = StartGui::initModule();
auto manipulator = std::make_shared<StartGui::Manipulator>();
Gui::WorkbenchManipulator::installManipulator(manipulator);
loadStartResource();
Base::Console().Log("done\n");
Base::Console().log("done\n");
// register preferences pages
new Gui::PrefPageProducer<StartGui::DlgStartPreferencesImp>(

View File

@@ -378,13 +378,13 @@ void StartView::fileCardSelected(const QModelIndex& index)
Gui::ModuleIO::verifyAndOpenFile(filename);
}
catch (Base::PyException& e) {
Base::Console().Error(e.getMessage().c_str());
Base::Console().error(e.getMessage().c_str());
}
catch (Base::Exception& e) {
Base::Console().Error(e.getMessage().c_str());
Base::Console().error(e.getMessage().c_str());
}
catch (...) {
Base::Console().Error("An unknown error occurred");
Base::Console().error("An unknown error occurred");
}
}