mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[libcalamaresui] Convenience method to check if paste would do anything
This commit is contained in:
parent
63e61e9924
commit
668921543a
2 changed files with 13 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue