Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
Scanner Namespace Reference

Classes

struct  CursorPosition

Functions

std::optional< QList< Package > > readFile (const QString &filePath, Checks checks, LogLevel logLevel)
std::optional< QList< Package > > scanDirectory (const QString &directory, InputFormats inputFormats, Checks checks, LogLevel logLevel)
static void missingPropertyWarning (const QString &filePath, const QString &property)
static bool validatePackage (Package &p, const QString &filePath, Checks checks, LogLevel logLevel)
static std::optional< QStringListtoStringList (const QJsonValue &value)
static std::optional< QStringarrayToMultiLineString (const QJsonValue &value)
static QStringList extractLicenseIdsFromSPDXExpression (QString expression)
static QString locateLicensesDir (const QString &packageDir)
static bool autoDetectLicenseFiles (Package &p)
static bool handleStringOrStringArrayJsonKey (QStringList &outList, const QString &key, QJsonValueConstRef jsonValue, const QString &filePath, LogLevel logLevel)
static std::optional< PackagereadPackage (const QJsonObject &object, const QString &filePath, Checks checks, LogLevel logLevel)
static Package parseChromiumFile (QFile &file, const QString &filePath, LogLevel logLevel)
static CursorPosition mapFromOffset (const QByteArray &content, int offset)

Function Documentation

◆ arrayToMultiLineString()

std::optional< QString > Scanner::arrayToMultiLineString ( const QJsonValue & value)
static

Definition at line 133 of file scanner.cpp.

◆ autoDetectLicenseFiles()

bool Scanner::autoDetectLicenseFiles ( Package & p)
static

Definition at line 195 of file scanner.cpp.

Referenced by readPackage().

Here is the caller graph for this function:

◆ extractLicenseIdsFromSPDXExpression()

QStringList Scanner::extractLicenseIdsFromSPDXExpression ( QString expression)
static

Definition at line 149 of file scanner.cpp.

◆ handleStringOrStringArrayJsonKey()

bool Scanner::handleStringOrStringArrayJsonKey ( QStringList & outList,
const QString & key,
QJsonValueConstRef jsonValue,
const QString & filePath,
LogLevel logLevel )
static

Definition at line 230 of file scanner.cpp.

References SilentLog.

◆ locateLicensesDir()

QString Scanner::locateLicensesDir ( const QString & packageDir)
static

Definition at line 178 of file scanner.cpp.

◆ mapFromOffset()

CursorPosition Scanner::mapFromOffset ( const QByteArray & content,
int offset )
static

Definition at line 514 of file scanner.cpp.

References Scanner::CursorPosition::column, and Scanner::CursorPosition::line.

◆ missingPropertyWarning()

void Scanner::missingPropertyWarning ( const QString & filePath,
const QString & property )
static

Definition at line 21 of file scanner.cpp.

◆ parseChromiumFile()

Package Scanner::parseChromiumFile ( QFile & file,
const QString & filePath,
LogLevel logLevel )
static

Definition at line 433 of file scanner.cpp.

◆ readFile()

std::optional< QList< Package > > Scanner::readFile ( const QString & filePath,
Checks checks,
LogLevel logLevel )

Definition at line 531 of file scanner.cpp.

References SilentLog, and VerboseLog.

◆ readPackage()

std::optional< Package > Scanner::readPackage ( const QJsonObject & object,
const QString & filePath,
Checks checks,
LogLevel logLevel )
static

Definition at line 253 of file scanner.cpp.

References autoDetectLicenseFiles(), Package::securityCritical, and SilentLog.

Here is the call graph for this function:

◆ scanDirectory()

std::optional< QList< Package > > Scanner::scanDirectory ( const QString & directory,
InputFormats inputFormats,
Checks checks,
LogLevel logLevel )

Definition at line 619 of file scanner.cpp.

◆ toStringList()

std::optional< QStringList > Scanner::toStringList ( const QJsonValue & value)
static

Definition at line 120 of file scanner.cpp.

◆ validatePackage()

bool Scanner::validatePackage ( Package & p,
const QString & filePath,
Checks checks,
LogLevel logLevel )
static

Definition at line 27 of file scanner.cpp.

References Package::securityCritical, and SilentLog.