[tracking] Chase Branding API change

- While here, apply coding style
main
Adriaan de Groot 5 years ago
parent c0a3614f09
commit 0046c3f161

@ -32,9 +32,7 @@ TrackingInstallJob::TrackingInstallJob( const QString& url )
{
}
TrackingInstallJob::~TrackingInstallJob()
{
}
TrackingInstallJob::~TrackingInstallJob() { }
QString
TrackingInstallJob::prettyName() const

@ -36,24 +36,23 @@ TrackingPage::TrackingPage( QWidget* parent )
: QWidget( parent )
, ui( new Ui::TrackingPage )
{
using StringEntry = Calamares::Branding::StringEntry;
ui->setupUi( this );
CALAMARES_RETRANSLATE(
ui->retranslateUi( this ); ui->generalExplanation->setText(
QString product = Calamares::Branding::instance()->shortProductName(); ui->retranslateUi( this );
ui->generalExplanation->setText(
tr( "Install tracking helps %1 to see how many users they have, what hardware they install %1 to and (with "
"the last two options below), get continuous information about preferred applications. To see what "
"will be sent, please click the help icon next to each area." )
.arg( *StringEntry::ShortProductName ) );
.arg( product ) );
ui->installExplanation->setText(
tr( "By selecting this you will send information about your installation and hardware. This information "
"will <b>only be sent once</b> after the installation finishes." ) );
ui->machineExplanation->setText( tr( "By selecting this you will <b>periodically</b> send information about "
"your installation, hardware and applications, to %1." )
.arg( *StringEntry::ShortProductName ) );
.arg( product ) );
ui->userExplanation->setText( tr( "By selecting this you will <b>regularly</b> send information about your "
"installation, hardware, applications and usage patterns, to %1." )
.arg( *StringEntry::ShortProductName ) ); )
.arg( product ) ); )
QButtonGroup* group = new QButtonGroup( this );
group->setExclusive( true );
@ -147,7 +146,7 @@ TrackingPage::setTrackingPolicy( TrackingType t, QString url )
}
else
{
connect( button, &QToolButton::clicked, [url] { QDesktopServices::openUrl( url ); } );
connect( button, &QToolButton::clicked, [ url ] { QDesktopServices::openUrl( url ); } );
cDebug() << "Tracking policy" << int( t ) << "set to" << url;
}
else
@ -168,7 +167,7 @@ TrackingPage::setGeneralPolicy( QString url )
ui->generalPolicyLabel->show();
ui->generalPolicyLabel->setTextInteractionFlags( Qt::TextBrowserInteraction );
ui->generalPolicyLabel->show();
connect( ui->generalPolicyLabel, &QLabel::linkActivated, [url] { QDesktopServices::openUrl( url ); } );
connect( ui->generalPolicyLabel, &QLabel::linkActivated, [ url ] { QDesktopServices::openUrl( url ); } );
}
}

Loading…
Cancel
Save