Multi diag tools
|
PathList contains a list of paths. More...
#include <PathList.h>
Public Types | |
using | const_iterator = QStringList::const_iterator |
STL-style const iterator. | |
Public Member Functions | |
PathList ()=default | |
Construct a empty path list. | |
PathList (std::initializer_list< QString > list) | |
Construct a path list from list. | |
PathList (const PathList &)=default | |
Copy construct a path list from a other. | |
PathList & | operator= (const PathList &)=default |
Assign a path list to this one by copy. | |
PathList (PathList &&)=default | |
Move construct a path list from a other. | |
PathList & | operator= (PathList &&)=default |
Assign a path list to this one by move. | |
void | appendPath (const QString &path) |
Add a path to the end of this list. More... | |
void | appendPathList (const PathList &pathList) |
Add a path list to the end of this list. More... | |
void | prependPath (const QString &path) |
Add a path to the beginning of this list. More... | |
void | prependPathList (const PathList &pathList) |
Add a path list to the beginning of this list. More... | |
void | clear () |
Clear this path list. | |
QStringList | toStringList () const |
Get a list of strings for this list. | |
bool | isEmpty () const |
Check if this path list is empty. | |
bool | containsPath (const QString &path) const |
Check if this list contains path. | |
const_iterator | begin () const |
Returns a const STL-style iterator pointing to the first item in the list. | |
const_iterator | cbegin () const |
Returns a const STL-style iterator pointing to the first item in the list. | |
const_iterator | end () const |
Returns a const STL-style iterator pointing to the last item in the list. | |
const_iterator | cend () const |
Returns a const STL-style iterator pointing to the last item in the list. | |
Static Public Member Functions | |
static PathList | fromStringList (const QStringList &paths) |
Get a path list from a string list. | |
static PathList | getSystemExecutablePathList () |
Get a list of system executable paths. More... | |
static PathList | getSystemLibraryPathList () |
Get a list of system library paths. More... | |
static PathList | getSystemLibraryKnownPathListLinux () |
Get a list of system library paths for Linux. More... | |
static PathList | getSystemLibraryKnownPathListWindows () |
Get a list of system library paths for Windows. More... | |
PathList contains a list of paths.
Definition at line 34 of file PathList.h.
void Mdt::FileSystem::PathList::appendPath | ( | const QString & | path | ) |
Add a path to the end of this list.
If path allready exists in this list, it will be moved to the end.
Definition at line 33 of file PathList.cpp.
void Mdt::FileSystem::PathList::appendPathList | ( | const PathList & | pathList | ) |
Add a path list to the end of this list.
If a path in pathList allready exists in this list, it will be moved to the end.
If pathList contains a empty path, it will not be added to this list.
Definition at line 41 of file PathList.cpp.
|
static |
Get a list of system executable paths.
Will get paths from the PATH environment variable, which should be set on most operating systems.
Definition at line 80 of file PathList.cpp.
|
static |
Get a list of system library paths for Linux.
Returns a hard-coded list of system library paths that are known to exist on certains Linux distributions
Definition at line 117 of file PathList.cpp.
|
static |
Get a list of system library paths for Windows.
Returns a hard-coded list of system library paths that are known to exist on Windows
Definition at line 131 of file PathList.cpp.
|
static |
Get a list of system library paths.
Definition at line 98 of file PathList.cpp.
void Mdt::FileSystem::PathList::prependPath | ( | const QString & | path | ) |
Add a path to the beginning of this list.
If path allready exists in this list, it will be moved to the beginning.
Definition at line 50 of file PathList.cpp.
void Mdt::FileSystem::PathList::prependPathList | ( | const PathList & | pathList | ) |
Add a path list to the beginning of this list.
If a path in pathList allready exists in this list, it will be moved to the beginning.
If pathList contains a empty path, it will not be added to this list.
Definition at line 58 of file PathList.cpp.