Doxygen and style

This commit is contained in:
Klaus Basan
2018-07-24 18:02:32 +02:00
parent 541e54d76c
commit f36ebbfa83
5 changed files with 29 additions and 27 deletions

View File

@@ -605,6 +605,7 @@ namespace BlackCore
return this->initFromLocalResourceFiles(this->getSupportedEntities(), inBackground); return this->initFromLocalResourceFiles(this->getSupportedEntities(), inBackground);
} }
//! \cond PRIVATE
CStatusMessageList CDatabaseReader::initFromLocalResourceFiles(CEntityFlags::Entity entities, bool inBackground) CStatusMessageList CDatabaseReader::initFromLocalResourceFiles(CEntityFlags::Entity entities, bool inBackground)
{ {
const bool overrideNewerOnly = true; const bool overrideNewerOnly = true;
@@ -622,6 +623,7 @@ namespace BlackCore
return this->readFromJsonFiles(CDirectoryUtils::staticDbFilesDirectory(), entities, overrideNewerOnly); return this->readFromJsonFiles(CDirectoryUtils::staticDbFilesDirectory(), entities, overrideNewerOnly);
} }
} }
//! \endcond
void CDatabaseReader::setReplyStatus(QNetworkReply::NetworkError status, const QString &message) void CDatabaseReader::setReplyStatus(QNetworkReply::NetworkError status, const QString &message)
{ {

View File

@@ -1600,6 +1600,7 @@ namespace BlackCore
return msgs; return msgs;
} }
//! \cond PRIVATE
CStatusMessageList CWebDataServices::initDbCachesFromLocalResourceFiles(CEntityFlags::Entity entities, bool inBackground) CStatusMessageList CWebDataServices::initDbCachesFromLocalResourceFiles(CEntityFlags::Entity entities, bool inBackground)
{ {
CStatusMessageList msgs; CStatusMessageList msgs;
@@ -1620,4 +1621,5 @@ namespace BlackCore
); );
return msgs; return msgs;
} }
//! \endcond
} // ns } // ns

View File

@@ -27,7 +27,6 @@
#include <QScopedPointer> #include <QScopedPointer>
class QAction; class QAction;
class QWidget;
namespace Ui { class CDbOwnModelSetComponent; } namespace Ui { class CDbOwnModelSetComponent; }
namespace BlackMisc { namespace Simulation { class CAircraftModel; } } namespace BlackMisc { namespace Simulation { class CAircraftModel; } }

View File

@@ -34,7 +34,6 @@ int qt_ntfs_permission_lookup = 0;
namespace BlackMisc namespace BlackMisc
{ {
//! \private //! \private
bool checkPermissions(CAtomicFile::OpenMode mode, const QFileInfo &fileInfo) bool checkPermissions(CAtomicFile::OpenMode mode, const QFileInfo &fileInfo)
{ {

View File

@@ -132,7 +132,7 @@ namespace BlackMisc
if (modelDirs.isEmpty()) if (modelDirs.isEmpty())
{ {
this->clearCachedModels(CSimulatorInfo::xplane()); this->clearCachedModels(CSimulatorInfo::xplane());
emit this->loadingFinished(CStatusMessage(this, CStatusMessage::SeverityError, "Model directories '%1' are empty") << modelDirectories.join(", "), simulator, ParsedData); emit this->loadingFinished(CStatusMessage(this, CStatusMessage::SeverityError, "XPlane model directories '%1' are empty") << modelDirectories.join(", "), simulator, ParsedData);
return; return;
} }
@@ -142,7 +142,7 @@ namespace BlackMisc
m_parserWorker = BlackMisc::CWorker::fromTask(this, "CAircraftModelLoaderXPlane::performParsing", m_parserWorker = BlackMisc::CWorker::fromTask(this, "CAircraftModelLoaderXPlane::performParsing",
[this, modelDirs, excludedDirectoryPatterns, modelConsolidation]() [this, modelDirs, excludedDirectoryPatterns, modelConsolidation]()
{ {
//! \todo KB/MS 2017-09 not high prio, but still needed: according to meeting XP needs to support multiple directories //! \todo KB/MS 2017-09 not high prio, but still needed: according to meet XP needs to support multiple directories
//! \todo KB with T118 now model directories are passed (changed signatures) but the code below needs to support multiple dirs //! \todo KB with T118 now model directories are passed (changed signatures) but the code below needs to support multiple dirs
const QString modelDirectory = modelDirs.front(); const QString modelDirectory = modelDirs.front();
auto models = performParsing(modelDirectory, excludedDirectoryPatterns); auto models = performParsing(modelDirectory, excludedDirectoryPatterns);
@@ -196,7 +196,7 @@ namespace BlackMisc
{ {
if (models.containsModelString(model.getModelString())) if (models.containsModelString(model.getModelString()))
{ {
CLogMessage(static_cast<CAircraftModelLoaderXPlane *>(nullptr)).warning("Model %1 exists already! Potential model string conflict! Ignoring it.") << model.getModelString(); CLogMessage(static_cast<CAircraftModelLoaderXPlane *>(nullptr)).warning("XPlane model '%1' exists already! Potential model string conflict! Ignoring it.") << model.getModelString();
} }
models.push_back(model); models.push_back(model);
} }
@@ -337,7 +337,7 @@ namespace BlackMisc
{ {
if (installedModels.containsModelString(plane.getModelName())) if (installedModels.containsModelString(plane.getModelName()))
{ {
const CStatusMessage msg = CStatusMessage(this).warning("Model %1 exists already! Potential model string conflict! Ignoring it.") << plane.getModelName(); const CStatusMessage msg = CStatusMessage(this).warning("XPlane model '%1' exists already! Potential model string conflict! Ignoring it.") << plane.getModelName();
m_loadingMessages.push_back(msg); m_loadingMessages.push_back(msg);
continue; continue;
} }
@@ -384,7 +384,7 @@ namespace BlackMisc
{ {
if (tokens.size() != 2) if (tokens.size() != 2)
{ {
CLogMessage(this).warning("%1 - %2: EXPORT_NAME command requires 1 argument.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': EXPORT_NAME command requires 1 argument.") << path << lineNum;
return false; return false;
} }
@@ -397,7 +397,7 @@ namespace BlackMisc
} }
else else
{ {
CLogMessage(this).warning("WARNING: Package name %1 already in use by %2 reqested by use by %3") << tokens[1] << p->path << path; CLogMessage(this).warning("XPlane package name '%1' already in use by '%2' reqested by use by '%3'") << tokens[1] << p->path << path;
return false; return false;
} }
} }
@@ -407,13 +407,13 @@ namespace BlackMisc
Q_UNUSED(package); Q_UNUSED(package);
if (tokens.size() != 2) if (tokens.size() != 2)
{ {
CLogMessage(this).warning("%1 - %2: DEPENDENCY command requires 1 argument.") << path << lineNum; CLogMessage(this).warning("'%1' - '%2': DEPENDENCY command requires 1 argument.") << path << lineNum;
return false; return false;
} }
if (std::count_if(m_cslPackages.cbegin(), m_cslPackages.cend(), [&tokens](const CSLPackage & p) { return p.name == tokens[1]; }) == 0) if (std::count_if(m_cslPackages.cbegin(), m_cslPackages.cend(), [&tokens](const CSLPackage & p) { return p.name == tokens[1]; }) == 0)
{ {
CLogMessage(this).warning("WARNING: required package %1 not found. Aborting processing of this package.") << tokens[1]; CLogMessage(this).warning("XPlane required package %1 not found. Aborting processing of this package.") << tokens[1];
return false; return false;
} }
@@ -437,7 +437,7 @@ namespace BlackMisc
{ {
if (tokens.size() != 2) if (tokens.size() != 2)
{ {
CLogMessage(this).warning("%1 - %2: OBJECT command requires 1 argument.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': OBJECT command requires 1 argument.") << path << lineNum;
return false; return false;
} }
@@ -446,7 +446,7 @@ namespace BlackMisc
QString fullPath(relativePath); QString fullPath(relativePath);
if (!doPackageSub(fullPath)) if (!doPackageSub(fullPath))
{ {
CLogMessage(this).warning("%1 - %2: package not found.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2: package not found.") << path << lineNum;
return false; return false;
} }
@@ -454,7 +454,7 @@ namespace BlackMisc
QFile objFile(fullPath); QFile objFile(fullPath);
if (!objFile.open(QIODevice::ReadOnly | QIODevice::Text)) if (!objFile.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
CLogMessage(this).warning("Object %1 does not exist.") << fullPath; CLogMessage(this).warning("XPlane object '%1' does not exist.") << fullPath;
return false; return false;
} }
QTextStream ts(&objFile); QTextStream ts(&objFile);
@@ -499,7 +499,7 @@ namespace BlackMisc
{ {
if (tokens.size() != 2) if (tokens.size() != 2)
{ {
CLogMessage(this).warning("%1 - %2: TEXTURE command requires 1 argument.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': TEXTURE command requires 1 argument.") << path << lineNum;
return false; return false;
} }
@@ -510,14 +510,14 @@ namespace BlackMisc
if (!doPackageSub(absoluteTexPath)) if (!doPackageSub(absoluteTexPath))
{ {
CLogMessage(this).warning("%1 - %2: package not found.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': package not found.") << path << lineNum;
return false; return false;
} }
QFileInfo fileInfo(absoluteTexPath); QFileInfo fileInfo(absoluteTexPath);
if (!fileInfo.exists()) if (!fileInfo.exists())
{ {
CLogMessage(this).warning("Texture %1 does not exist.") << absoluteTexPath; CLogMessage(this).warning("XPlane texture '%1' does not exist.") << absoluteTexPath;
return false; return false;
} }
@@ -531,7 +531,7 @@ namespace BlackMisc
// AIRCAFT <min> <max> <path> // AIRCAFT <min> <max> <path>
if (tokens.size() != 4) if (tokens.size() != 4)
{ {
CLogMessage(this).warning("%1 - %2: AIRCRAFT command requires 3 arguments.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': AIRCRAFT command requires 3 arguments.") << path << lineNum;
} }
// Flyable aircrafts are parsed by a different method. We don't know any aircraft files in CSL packages. // Flyable aircrafts are parsed by a different method. We don't know any aircraft files in CSL packages.
@@ -545,7 +545,7 @@ namespace BlackMisc
// OBJ8_AIRCRAFT <path> // OBJ8_AIRCRAFT <path>
if (tokens.size() != 2) if (tokens.size() != 2)
{ {
CLogMessage(this).warning("%1 - %2: OBJ8_AIRCARFT command requires 1 argument.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': OBJ8_AIRCARFT command requires 1 argument.") << path << lineNum;
} }
package.planes.push_back(CSLPlane()); package.planes.push_back(CSLPlane());
@@ -559,7 +559,7 @@ namespace BlackMisc
// OBJ8 <group> <animate YES|NO> <filename> {<texture filename> {<lit texture filename>}} // OBJ8 <group> <animate YES|NO> <filename> {<texture filename> {<lit texture filename>}}
if (tokens.size() < 4 || tokens.size() > 6) if (tokens.size() < 4 || tokens.size() > 6)
{ {
CLogMessage(this).warning("%1 - %2: OBJ8 command takes 3-5 arguments.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': OBJ8 command takes 3-5 arguments.") << path << lineNum;
} }
if (tokens[1] != "SOLID") { return true; } if (tokens[1] != "SOLID") { return true; }
@@ -569,7 +569,7 @@ namespace BlackMisc
QString fullPath(relativePath); QString fullPath(relativePath);
if (!doPackageSub(fullPath)) if (!doPackageSub(fullPath))
{ {
CLogMessage(this).warning("%1 - %2: package not found.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': package not found.") << path << lineNum;
return false; return false;
} }
@@ -595,14 +595,14 @@ namespace BlackMisc
if (!doPackageSub(absoluteTexPath)) if (!doPackageSub(absoluteTexPath))
{ {
CLogMessage(this).warning("%1 - %2: package not found.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': package not found.") << path << lineNum;
return false; return false;
} }
QFileInfo fileInfo(absoluteTexPath); QFileInfo fileInfo(absoluteTexPath);
if (!fileInfo.exists()) if (!fileInfo.exists())
{ {
CLogMessage(this).warning("Texture %1 does not exist.") << absoluteTexPath; CLogMessage(this).warning("XPlane texture '%1' does not exist.") << absoluteTexPath;
return false; return false;
} }
@@ -625,7 +625,7 @@ namespace BlackMisc
// ICAO <code> // ICAO <code>
if (tokens.size() != 2) if (tokens.size() != 2)
{ {
CLogMessage(this).warning("%1 - %2: ICAO command requires 1 argument.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': ICAO command requires 1 argument.") << path << lineNum;
return false; return false;
} }
@@ -639,7 +639,7 @@ namespace BlackMisc
// AIRLINE <code> <airline> // AIRLINE <code> <airline>
if (tokens.size() != 3) if (tokens.size() != 3)
{ {
CLogMessage(this).warning("%1 - %2: AIRLINE command requires 2 arguments.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': AIRLINE command requires 2 arguments.") << path << lineNum;
return false; return false;
} }
@@ -655,7 +655,7 @@ namespace BlackMisc
// LIVERY <code> <airline> <livery> // LIVERY <code> <airline> <livery>
if (tokens.size() != 4) if (tokens.size() != 4)
{ {
CLogMessage(this).warning("%1 - %2: LIVERY command requires 3 arguments.") << path << lineNum; CLogMessage(this).warning("XPlane '%1' - '%2': LIVERY command requires 3 arguments.") << path << lineNum;
return false; return false;
} }
@@ -747,14 +747,14 @@ namespace BlackMisc
bool result = it.value()(tokens, package, package.path, lineNum); bool result = it.value()(tokens, package, package.path, lineNum);
if (!result) if (!result)
{ {
const CStatusMessage m = CStatusMessage(this).warning("Ignoring CSL package %1") << package.name; const CStatusMessage m = CStatusMessage(this).warning("XPlane ignoring CSL package '%1'") << package.name;
m_loadingMessages.push_back(m); m_loadingMessages.push_back(m);
break; break;
} }
} }
else else
{ {
const CStatusMessage m = CStatusMessage(this).warning("Unrecognized command %1 in %2") << tokens[0] << package.name; const CStatusMessage m = CStatusMessage(this).warning("XPlane unrecognized command '%1' in '%2'") << tokens[0] << package.name;
m_loadingMessages.push_back(m); m_loadingMessages.push_back(m);
break; break;
} }