[partition] Make convenienceName() available for debugging

- Function for human-readable names is useful in more parts of
   the partition module.
This commit is contained in:
Adriaan de Groot 2019-03-17 18:10:41 -04:00
parent 1ffc0bf77d
commit 5d6d2b8078
2 changed files with 10 additions and 1 deletions

View File

@ -43,7 +43,7 @@
namespace PartUtils
{
static QString
QString
convenienceName( const Partition* const candidate )
{
if ( !candidate->mountPoint().isEmpty() )

View File

@ -46,6 +46,15 @@ enum SizeUnit
GiB
};
/**
* @brief Provides a nice human-readable name for @p candidate
*
* The most-specific human-readable name for the partition @p candidate
* is returned (e.g. device name, or partition path). In the worst
* case, a string representation of (void *)candidate is returned.
*/
QString convenienceName( const Partition* const candidate );
/**
* @brief canBeReplaced checks whether the given Partition satisfies the criteria
* for replacing it with the new OS.