[tracking] hook the install-tracking job into the build.

(it doesn't work yet, though .. multi-threading issues).
main
Adriaan de Groot 7 years ago
parent a0b1410a50
commit 9a43b8a0e8

@ -2,8 +2,9 @@ calamares_add_plugin( tracking
TYPE viewmodule
EXPORT_MACRO PLUGINDLLEXPORT_PRO
SOURCES
TrackingViewStep.cpp
TrackingJobs.cpp
TrackingPage.cpp
TrackingViewStep.cpp
UI
page_trackingstep.ui
RESOURCES

@ -26,11 +26,18 @@
TrackingInstallJob::TrackingInstallJob( const QString& url )
: m_url( url )
, m_networkManager( new QNetworkAccessManager( this ) )
, m_networkManager( nullptr )
, m_semaphore( new QSemaphore( 1 ) )
{
}
TrackingInstallJob::~TrackingInstallJob()
{
Q_ASSERT( m_semaphore->available() == 1 );
delete m_semaphore;
delete m_networkManager;
}
QString TrackingInstallJob::prettyName() const
{
return tr( "Install-tracking" );
@ -48,6 +55,8 @@ QString TrackingInstallJob::prettyStatusMessage() const
Calamares::JobResult TrackingInstallJob::exec()
{
m_networkManager = new QNetworkAccessManager();
QNetworkRequest request;
request.setUrl( QUrl( m_url ) );
// Follows all redirects except unsafe ones (https to http).

@ -132,6 +132,8 @@ TrackingViewStep::jobs() const
.replace( "$DISK", disk );
cDebug() << " .. install-tracking URL" << installUrl;
l.append( Calamares::job_ptr( new TrackingInstallJob( installUrl ) ) );
}
return l;
}

Loading…
Cancel
Save