[logUpload] Ran styleScript
This commit is contained in:
parent
c1aa0b581e
commit
c73e9ec89f
@ -163,7 +163,7 @@ uploadServerFromMap( const QVariantMap& map )
|
|||||||
bool bogus = false; // we don't care about type-name lookup success here
|
bool bogus = false; // we don't care about type-name lookup success here
|
||||||
return Branding::UploadServerInfo( names.find( typestring, bogus ),
|
return Branding::UploadServerInfo( names.find( typestring, bogus ),
|
||||||
QUrl( urlstring, QUrl::ParsingMode::StrictMode ),
|
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
|
/** @brief Load the @p map with strings from @p config
|
||||||
|
@ -143,9 +143,9 @@ ViewManager::insertViewStep( int before, ViewStep* step )
|
|||||||
void
|
void
|
||||||
ViewManager::onInstallationFailed( const QString& message, const QString& details )
|
ViewManager::onInstallationFailed( const QString& message, const QString& details )
|
||||||
{
|
{
|
||||||
bool shouldOfferWebPaste
|
bool shouldOfferWebPaste = std::get< 0 >( Calamares::Branding::instance()->uploadServer() )
|
||||||
= std::get<0>(Calamares::Branding::instance()->uploadServer()) != Calamares::Branding::UploadServerType::None
|
!= Calamares::Branding::UploadServerType::None
|
||||||
and std::get<2>(Calamares::Branding::instance()->uploadServer()) != 0;
|
and std::get< 2 >( Calamares::Branding::instance()->uploadServer() ) != 0;
|
||||||
|
|
||||||
cError() << "Installation failed:" << message;
|
cError() << "Installation failed:" << message;
|
||||||
cDebug() << Logger::SubEntry << "- message:" << message;
|
cDebug() << Logger::SubEntry << "- message:" << message;
|
||||||
|
@ -32,9 +32,9 @@ using namespace CalamaresUtils::Units;
|
|||||||
STATICTEST QByteArray
|
STATICTEST QByteArray
|
||||||
logFileContents( const qint64 sizeLimitBytes )
|
logFileContents( const qint64 sizeLimitBytes )
|
||||||
{
|
{
|
||||||
if( sizeLimitBytes != -1 )
|
if ( sizeLimitBytes != -1 )
|
||||||
{
|
{
|
||||||
cDebug() << "Log upload size limit was limited to" << sizeLimitBytes << "bytes";
|
cDebug() << "Log upload size limit was limited to" << sizeLimitBytes << "bytes";
|
||||||
}
|
}
|
||||||
const QString name = Logger::logFile();
|
const QString name = Logger::logFile();
|
||||||
QFile pasteSourceFile( name );
|
QFile pasteSourceFile( name );
|
||||||
@ -43,14 +43,14 @@ logFileContents( const qint64 sizeLimitBytes )
|
|||||||
cWarning() << "Could not open log file" << name;
|
cWarning() << "Could not open log file" << name;
|
||||||
return QByteArray();
|
return QByteArray();
|
||||||
}
|
}
|
||||||
if( sizeLimitBytes == -1 )
|
if ( sizeLimitBytes == -1 )
|
||||||
{
|
{
|
||||||
return pasteSourceFile.readAll();
|
return pasteSourceFile.readAll();
|
||||||
}
|
}
|
||||||
QFileInfo fi( pasteSourceFile );
|
QFileInfo fi( pasteSourceFile );
|
||||||
if ( fi.size() > sizeLimitBytes )
|
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();
|
fi.refresh();
|
||||||
pasteSourceFile.seek( fi.size() - sizeLimitBytes );
|
pasteSourceFile.seek( fi.size() - sizeLimitBytes );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user