The WorkspaceLibraryScanner class.
More...
#include <workspacelibraryscanner.h>
Inherits QThread.
|
void | run () noexcept override |
|
void | scan () noexcept |
|
void | getLibrariesOfDirectory (const QString &root, QList< std::shared_ptr< Library > > &libs) noexcept |
|
QHash< FilePath, int > | updateLibraries (SQLiteDatabase &db, WorkspaceLibraryDbWriter &writer, const QList< std::shared_ptr< Library > > &libs) |
|
template<typename ElementType > |
int | addElementsToDb (WorkspaceLibraryDbWriter &writer, const FilePath &libPath, const QStringList &dirs, int libId) |
|
template<typename ElementType > |
int | addElementToDb (WorkspaceLibraryDbWriter &writer, int libId, const ElementType &element) |
|
template<typename ElementType > |
void | addTranslationsToDb (WorkspaceLibraryDbWriter &writer, int elementId, const ElementType &element) |
|
template<typename ElementType > |
void | addToCategories (WorkspaceLibraryDbWriter &writer, int elementId, const ElementType &element) |
|
template<typename ElementType > |
void | addResourcesToDb (WorkspaceLibraryDbWriter &writer, int elementId, const ElementType &element) |
|
template<typename ElementType > |
std::unique_ptr< ElementType > | openAndMigrate (const FilePath &fp) |
|
template<> |
int | addElementToDb (WorkspaceLibraryDbWriter &writer, int libId, const ComponentCategory &element) |
|
template<> |
int | addElementToDb (WorkspaceLibraryDbWriter &writer, int libId, const PackageCategory &element) |
|
template<> |
int | addElementToDb (WorkspaceLibraryDbWriter &writer, int libId, const Package &element) |
|
template<> |
int | addElementToDb (WorkspaceLibraryDbWriter &writer, int libId, const Component &element) |
|
template<> |
int | addElementToDb (WorkspaceLibraryDbWriter &writer, int libId, const Device &element) |
|
The WorkspaceLibraryScanner class.
- Warning
- Be very careful with dependencies to other objects as the run() method is executed in a separate thread! Keep the number of dependencies as small as possible and consider thread synchronization and object lifetimes.
◆ WorkspaceLibraryScanner() [1/2]
◆ WorkspaceLibraryScanner() [2/2]
◆ ~WorkspaceLibraryScanner()
◆ getProgressPercent()
int getProgressPercent |
( |
| ) |
const |
|
inlinenoexcept |
◆ startScan()
◆ operator=()
◆ scanStarted
◆ scanLibraryListUpdated
void scanLibraryListUpdated |
( |
int |
libraryCount | ) |
|
|
signal |
◆ scanProgressUpdate
void scanProgressUpdate |
( |
int |
percent | ) |
|
|
signal |
◆ scanSucceeded
void scanSucceeded |
( |
int |
elementCount | ) |
|
|
signal |
◆ scanFailed
void scanFailed |
( |
QString |
errorMsg | ) |
|
|
signal |
◆ scanFinished
◆ run()
◆ scan()
◆ getLibrariesOfDirectory()
void getLibrariesOfDirectory |
( |
const QString & |
root, |
|
|
QList< std::shared_ptr< Library > > & |
libs |
|
) |
| |
|
privatenoexcept |
◆ updateLibraries()
◆ addElementsToDb()
◆ addElementToDb() [1/6]
◆ addTranslationsToDb()
◆ addToCategories()
◆ addResourcesToDb()
◆ openAndMigrate()
std::unique_ptr< ElementType > openAndMigrate |
( |
const FilePath & |
fp | ) |
|
|
private |
◆ addElementToDb() [2/6]
◆ addElementToDb() [3/6]
◆ addElementToDb() [4/6]
◆ addElementToDb() [5/6]
◆ addElementToDb() [6/6]
◆ mLibrariesPath
Path to workspace libraries directory.
◆ mDbFilePath
Path to the SQLite database file.
◆ mSemaphore
◆ mAbort
◆ mLastProgressPercent
The documentation for this class was generated from the following files: