[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();
|
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
|
namespace Paste
|
||||||
{
|
{
|
||||||
|
|
||||||
/** @brief Send the current log file to a pastebin
|
/** @brief Send the current log file to a pastebin
|
||||||
*
|
*
|
||||||
* Returns the (string) URL that the pastebin gives us.
|
* Returns the (string) URL that the pastebin gives us.
|
||||||
*/
|
*/
|
||||||
QString doLogUpload( QObject* parent );
|
QString doLogUpload( QObject* parent );
|
||||||
|
|
||||||
|
/** @brief Is paste enabled?
|
||||||
|
*
|
||||||
|
* Checks the branding instance if paste can be done.
|
||||||
|
*/
|
||||||
|
bool isEnabled();
|
||||||
} // namespace Paste
|
} // namespace Paste
|
||||||
|
|
||||||
} // namespace CalamaresUtils
|
} // namespace CalamaresUtils
|
||||||
|
Loading…
Reference in New Issue
Block a user