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()

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

Definition at line 127 of file scanner.cpp.

◆ autoDetectLicenseFiles()

static bool Scanner::autoDetectLicenseFiles ( Package & p)
static

Definition at line 189 of file scanner.cpp.

Referenced by readPackage().

+ Here is the caller graph for this function:

◆ extractLicenseIdsFromSPDXExpression()

static QStringList Scanner::extractLicenseIdsFromSPDXExpression ( QString expression)
static

Definition at line 143 of file scanner.cpp.

◆ handleStringOrStringArrayJsonKey()

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

Definition at line 218 of file scanner.cpp.

References SilentLog.

◆ locateLicensesDir()

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

Definition at line 172 of file scanner.cpp.

◆ mapFromOffset()

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

Definition at line 501 of file scanner.cpp.

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

◆ missingPropertyWarning()

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

Definition at line 21 of file scanner.cpp.

◆ parseChromiumFile()

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

Definition at line 420 of file scanner.cpp.

◆ readFile()

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

Definition at line 518 of file scanner.cpp.

References SilentLog, and VerboseLog.

◆ readPackage()

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

Definition at line 241 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 606 of file scanner.cpp.

◆ toStringList()

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

Definition at line 114 of file scanner.cpp.

◆ validatePackage()

static 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.