[logUpload] Ran styleScript

This commit is contained in:
Anubhav Choudhary 2021-04-01 01:05:55 -06:00
parent c1aa0b581e
commit c73e9ec89f
3 changed files with 8 additions and 8 deletions

View File

@ -163,7 +163,7 @@ uploadServerFromMap( const QVariantMap& map )
bool bogus = false; // we don't care about type-name lookup success here
return Branding::UploadServerInfo( names.find( typestring, bogus ),
QUrl( urlstring, QUrl::ParsingMode::StrictMode ),
( sizeLimitKiB >=0 ) ? sizeLimitKiB * 1024 : -1 );
( sizeLimitKiB >= 0 ) ? sizeLimitKiB * 1024 : -1 );
}
/** @brief Load the @p map with strings from @p config

View File

@ -143,9 +143,9 @@ ViewManager::insertViewStep( int before, ViewStep* step )
void
ViewManager::onInstallationFailed( const QString& message, const QString& details )
{
bool shouldOfferWebPaste
= std::get<0>(Calamares::Branding::instance()->uploadServer()) != Calamares::Branding::UploadServerType::None
and std::get<2>(Calamares::Branding::instance()->uploadServer()) != 0;
bool shouldOfferWebPaste = std::get< 0 >( Calamares::Branding::instance()->uploadServer() )
!= Calamares::Branding::UploadServerType::None
and std::get< 2 >( Calamares::Branding::instance()->uploadServer() ) != 0;
cError() << "Installation failed:" << message;
cDebug() << Logger::SubEntry << "- message:" << message;

View File

@ -32,7 +32,7 @@ using namespace CalamaresUtils::Units;
STATICTEST QByteArray
logFileContents( const qint64 sizeLimitBytes )
{
if( sizeLimitBytes != -1 )
if ( sizeLimitBytes != -1 )
{
cDebug() << "Log upload size limit was limited to" << sizeLimitBytes << "bytes";
}
@ -43,14 +43,14 @@ logFileContents( const qint64 sizeLimitBytes )
cWarning() << "Could not open log file" << name;
return QByteArray();
}
if( sizeLimitBytes == -1 )
if ( sizeLimitBytes == -1 )
{
return pasteSourceFile.readAll();
}
QFileInfo fi( pasteSourceFile );
if ( fi.size() > sizeLimitBytes )
{
cDebug() << "Only last" << sizeLimitBytes << "bytes of log file (sized" << fi.size() << "bytes) uploaded" ;
cDebug() << "Only last" << sizeLimitBytes << "bytes of log file (sized" << fi.size() << "bytes) uploaded";
fi.refresh();
pasteSourceFile.seek( fi.size() - sizeLimitBytes );
}