[libcalamaresui] Convenience method to check if paste would do anything
This commit is contained in:
parent
63e61e9924
commit
668921543a
@ -126,3 +126,10 @@ CalamaresUtils::Paste::doLogUpload( QObject* parent )
|
||||
}
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool
|
||||
CalamaresUtils::Paste::isEnabled()
|
||||
{
|
||||
auto [ type, serverUrl ] = Calamares::Branding::instance()->uploadServer();
|
||||
return type != Calamares::Branding::UploadServerType::None;
|
||||
}
|
||||
|
@ -18,12 +18,17 @@ namespace CalamaresUtils
|
||||
{
|
||||
namespace Paste
|
||||
{
|
||||
|
||||
/** @brief Send the current log file to a pastebin
|
||||
*
|
||||
* Returns the (string) URL that the pastebin gives us.
|
||||
*/
|
||||
QString doLogUpload( QObject* parent );
|
||||
|
||||
/** @brief Is paste enabled?
|
||||
*
|
||||
* Checks the branding instance if paste can be done.
|
||||
*/
|
||||
bool isEnabled();
|
||||
} // namespace Paste
|
||||
|
||||
} // namespace CalamaresUtils
|
||||
|
Loading…
Reference in New Issue
Block a user