Skip to content

Commit eaecc59

Browse files
authored
Merge pull request #29 from hjaltisan/EO11237
EO-11237
2 parents d440419 + 0f706d4 commit eaecc59

File tree

9 files changed

+5546
-5902
lines changed

9 files changed

+5546
-5902
lines changed

src/libs/installer/eve_launcher/installer.pb.cc

Lines changed: 2325 additions & 3174 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libs/installer/eve_launcher/installer.pb.h

Lines changed: 1416 additions & 1901 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libs/installer/eve_launcher/uninstaller.pb.cc

Lines changed: 1121 additions & 461 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libs/installer/eve_launcher/uninstaller.pb.h

Lines changed: 531 additions & 156 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/libs/installer/eventlogger.cpp

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,31 @@ void EventLogger::uninstallerStarted(int duration)
294294
sendAllocatedEvent(evt);
295295
}
296296

297-
void EventLogger::uninstallerPageDisplayed(eve_launcher::uninstaller::Page previousPage, eve_launcher::uninstaller::Page currentPage, eve_launcher::uninstaller::PageDisplayed_FlowDirection flow)
297+
void EventLogger::uninstallerIntroductionPageDisplayed()
298298
{
299-
auto evt = new eve_launcher::uninstaller::PageDisplayed;
299+
auto evt = new eve_launcher::uninstaller::IntroductionPageDisplayed;
300+
evt->set_allocated_event_metadata(getEventMetadata());
301+
sendAllocatedEvent(evt);
302+
}
303+
304+
void EventLogger::uninstallerExecutionPageDisplayed()
305+
{
306+
auto evt = new eve_launcher::uninstaller::ExecutionPageDisplayed;
307+
evt->set_allocated_event_metadata(getEventMetadata());
308+
sendAllocatedEvent(evt);
309+
}
310+
311+
void EventLogger::uninstallerFinishedPageDisplayed()
312+
{
313+
auto evt = new eve_launcher::uninstaller::FinishedPageDisplayed;
314+
evt->set_allocated_event_metadata(getEventMetadata());
315+
sendAllocatedEvent(evt);
316+
}
317+
318+
void EventLogger::uninstallerFailedPageDisplayed()
319+
{
320+
auto evt = new eve_launcher::uninstaller::FailedPageDisplayed;
300321
evt->set_allocated_event_metadata(getEventMetadata());
301-
evt->set_previous_page(previousPage);
302-
evt->set_current_page(currentPage);
303-
evt->set_flow(flow);
304322
sendAllocatedEvent(evt);
305323
}
306324

@@ -378,25 +396,53 @@ void EventLogger::uninstallerAnalyticsMessageSent(const QString& message)
378396
}
379397

380398
// installer
381-
void EventLogger::installerStarted(int duration)
399+
void EventLogger::installerStarted(const QString& startMenuItemPath, int duration)
382400
{
383-
qDebug() << "framework | EventLogger::installerStarted |" << duration << "ms";
401+
qDebug() << "framework | EventLogger::installerStarted |" << startMenuItemPath << ", " << duration << "ms";
384402
auto evt = new eve_launcher::installer::Started;
385403
evt->set_allocated_event_metadata(getEventMetadata());
386-
evt->set_duration(duration);
387404
auto inf = pdm_proto::GetData();
388405
evt->set_allocated_system_information(&inf);
406+
QString fileName = QInstaller::getInstallerFileName().split(QLatin1String("/")).last();
407+
qDebug() << "framework | EventLogger::installerStarted | " << fileName;
408+
evt->set_filename(fileName.toStdString());
409+
evt->set_start_menu_item_path(startMenuItemPath.toStdString());
410+
evt->set_duration(duration);
389411
sendAllocatedEvent(evt);
390412
}
391413

392-
void EventLogger::installerPageDisplayed(eve_launcher::installer::Page previousPage, eve_launcher::installer::Page currentPage, eve_launcher::installer::PageDisplayed_FlowDirection flow)
414+
void EventLogger::installerIntroductionPageDisplayed()
393415
{
394-
qDebug() << "framework | EventLogger::installerPageDisplayed |" << previousPage << "|" << currentPage << "|" << flow;
395-
auto evt = new eve_launcher::installer::PageDisplayed;
416+
auto evt = new eve_launcher::installer::IntroductionPageDisplayed;
417+
evt->set_allocated_event_metadata(getEventMetadata());
418+
sendAllocatedEvent(evt);
419+
}
420+
421+
void EventLogger::installerEulaPageDisplayed()
422+
{
423+
auto evt = new eve_launcher::installer::EulaPageDisplayed;
424+
evt->set_allocated_event_metadata(getEventMetadata());
425+
sendAllocatedEvent(evt);
426+
}
427+
428+
void EventLogger::installerExecutionPageDisplayed()
429+
{
430+
auto evt = new eve_launcher::installer::ExecutionPageDisplayed;
431+
evt->set_allocated_event_metadata(getEventMetadata());
432+
sendAllocatedEvent(evt);
433+
}
434+
435+
void EventLogger::installerFinishedPageDisplayed()
436+
{
437+
auto evt = new eve_launcher::installer::FinishedPageDisplayed;
438+
evt->set_allocated_event_metadata(getEventMetadata());
439+
sendAllocatedEvent(evt);
440+
}
441+
442+
void EventLogger::installerFailedPageDisplayed()
443+
{
444+
auto evt = new eve_launcher::installer::FailedPageDisplayed;
396445
evt->set_allocated_event_metadata(getEventMetadata());
397-
evt->set_previous_page(previousPage);
398-
evt->set_current_page(currentPage);
399-
evt->set_flow(flow);
400446
sendAllocatedEvent(evt);
401447
}
402448

@@ -427,16 +473,6 @@ void EventLogger::installerPreparationFinished(int duration)
427473
sendAllocatedEvent(evt);
428474
}
429475

430-
void EventLogger::installerLocationChanged(eve_launcher::installer::LocationChanged_Source source, eve_launcher::installer::LocationChanged_Provider provider, const QString& path)
431-
{
432-
auto evt = new eve_launcher::installer::LocationChanged;
433-
evt->set_allocated_event_metadata(getEventMetadata());
434-
evt->set_source(source);
435-
evt->set_provider(provider);
436-
evt->set_path(path.toStdString());
437-
sendAllocatedEvent(evt);
438-
}
439-
440476
void EventLogger::installerDetailsDisplayed()
441477
{
442478
auto evt = new eve_launcher::installer::DetailsDisplayed;
@@ -511,10 +547,13 @@ void EventLogger::installerSharedCacheMessageClosed(eve_launcher::installer::Mes
511547
sendAllocatedEvent(evt);
512548
}
513549

514-
void EventLogger::installerInstallationStarted()
550+
void EventLogger::installerInstallationStarted(const QString& installPath, eve_launcher::installer::RedistVersion redistVersion)
515551
{
552+
qDebug() << "framework | EventLogger::installerInstallationStarted | " << installPath << ", " << redistVersion;
516553
auto evt = new eve_launcher::installer::InstallationStarted;
517554
evt->set_allocated_event_metadata(getEventMetadata());
555+
evt->set_install_path(installPath.toStdString());
556+
evt->set_redist_version(redistVersion);
518557
sendAllocatedEvent(evt);
519558
}
520559

@@ -526,10 +565,12 @@ void EventLogger::installerInstallationInterrupted(int duration)
526565
sendAllocatedEvent(evt);
527566
}
528567

529-
void EventLogger::installerInstallationFinished(int duration)
568+
void EventLogger::installerInstallationFinished(const QString& sharedCachePath, int duration)
530569
{
570+
qDebug() << "framework | EventLogger::installerInstallationFinished | " << sharedCachePath;
531571
auto evt = new eve_launcher::installer::InstallationFinished;
532572
evt->set_allocated_event_metadata(getEventMetadata());
573+
evt->set_shared_cache_path(sharedCachePath.toStdString());
533574
evt->set_duration(duration);
534575
sendAllocatedEvent(evt);
535576
}
@@ -557,81 +598,42 @@ void EventLogger::installerUninstallerCreationFinished(int duration)
557598
sendAllocatedEvent(evt);
558599
}
559600

560-
void EventLogger::installerComponentInitializationStarted(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion)
601+
void EventLogger::installerComponentInitializationStarted()
561602
{
562603
auto evt = new eve_launcher::installer::ComponentInitializationStarted;
563604
evt->set_allocated_event_metadata(getEventMetadata());
564-
evt->set_component(component);
565-
evt->set_redist_version(redistVersion);
566605
sendAllocatedEvent(evt);
567606
}
568607

569-
void EventLogger::installerComponentInitializationFinished(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion, int duration)
608+
void EventLogger::installerComponentInitializationFinished(int duration)
570609
{
571610
auto evt = new eve_launcher::installer::ComponentInitializationFinished;
572611
evt->set_allocated_event_metadata(getEventMetadata());
573-
evt->set_component(component);
574-
evt->set_redist_version(redistVersion);
575612
evt->set_duration(duration);
576613
sendAllocatedEvent(evt);
577614
}
578615

579-
void EventLogger::installerComponentInstallationStarted(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion)
616+
void EventLogger::installerComponentInstallationStarted()
580617
{
581618
auto evt = new eve_launcher::installer::ComponentInstallationStarted;
582619
evt->set_allocated_event_metadata(getEventMetadata());
583-
evt->set_component(component);
584-
evt->set_redist_version(redistVersion);
585620
sendAllocatedEvent(evt);
586621
}
587622

588-
void EventLogger::installerComponentInstallationFinished(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion, int duration)
623+
void EventLogger::installerComponentInstallationFinished(int duration)
589624
{
590625
auto evt = new eve_launcher::installer::ComponentInstallationFinished;
591626
evt->set_allocated_event_metadata(getEventMetadata());
592-
evt->set_component(component);
593-
evt->set_redist_version(redistVersion);
594-
evt->set_duration(duration);
595-
sendAllocatedEvent(evt);
596-
}
597-
598-
void EventLogger::installerComponentsInitializationStarted()
599-
{
600-
auto evt = new eve_launcher::installer::ComponentsInitializationStarted;
601-
evt->set_allocated_event_metadata(getEventMetadata());
602-
sendAllocatedEvent(evt);
603-
}
604-
605-
void EventLogger::installerComponentsInitializationFinished(int duration)
606-
{
607-
auto evt = new eve_launcher::installer::ComponentsInitializationFinished;
608-
evt->set_allocated_event_metadata(getEventMetadata());
609-
evt->set_duration(duration);
610-
sendAllocatedEvent(evt);
611-
}
612-
613-
void EventLogger::installerComponentsInstallationStarted()
614-
{
615-
auto evt = new eve_launcher::installer::ComponentsInstallationStarted;
616-
evt->set_allocated_event_metadata(getEventMetadata());
617-
sendAllocatedEvent(evt);
618-
}
619-
620-
void EventLogger::installerComponentsInstallationFinished(int duration)
621-
{
622-
auto evt = new eve_launcher::installer::ComponentsInstallationFinished;
623-
evt->set_allocated_event_metadata(getEventMetadata());
624627
evt->set_duration(duration);
625628
sendAllocatedEvent(evt);
626629
}
627630

628-
void EventLogger::installerErrorEncountered(eve_launcher::installer::ErrorEncountered_ErrorCode code, eve_launcher::installer::Page page, eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion)
631+
void EventLogger::installerErrorEncountered(eve_launcher::installer::ErrorEncountered_ErrorCode code, eve_launcher::installer::Page page, eve_launcher::installer::RedistVersion redistVersion)
629632
{
630633
auto evt = new eve_launcher::installer::ErrorEncountered;
631634
evt->set_allocated_event_metadata(getEventMetadata());
632635
evt->set_code(code);
633636
evt->set_page(page);
634-
evt->set_component(component);
635637
evt->set_redist_version(redistVersion);
636638
sendAllocatedEvent(evt);
637639
}

src/libs/installer/eventlogger.h

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ class EventLogger : QObject
2020

2121
// uninstaller
2222
void uninstallerStarted(int duration);
23-
void uninstallerPageDisplayed(eve_launcher::uninstaller::Page previousPage, eve_launcher::uninstaller::Page currentPage, eve_launcher::uninstaller::PageDisplayed_FlowDirection flow);
23+
void uninstallerIntroductionPageDisplayed();
24+
void uninstallerExecutionPageDisplayed();
25+
void uninstallerFinishedPageDisplayed();
26+
void uninstallerFailedPageDisplayed();
2427
void uninstallerShutDown(eve_launcher::uninstaller::Page page, eve_launcher::uninstaller::ShutDown_State state, bool finishButton);
2528
void uninstallerDetailsDisplayed();
2629
void uninstallerDetailsHidden();
@@ -32,12 +35,15 @@ class EventLogger : QObject
3235
void uninstallerAnalyticsMessageSent(const QString& message);
3336

3437
// installer
35-
void installerStarted(int duration);
36-
void installerPageDisplayed(eve_launcher::installer::Page previousPage, eve_launcher::installer::Page currentPage, eve_launcher::installer::PageDisplayed_FlowDirection flow);
38+
void installerStarted(const QString& startMenuItemPath, int duration);
39+
void installerIntroductionPageDisplayed();
40+
void installerEulaPageDisplayed();
41+
void installerExecutionPageDisplayed();
42+
void installerFinishedPageDisplayed();
43+
void installerFailedPageDisplayed();
3744
void installerShutDown(eve_launcher::installer::Page page, eve_launcher::installer::ShutDown_State state, bool finishButton);
3845
void installerPreparationStarted();
3946
void installerPreparationFinished(int duration);
40-
void installerLocationChanged(eve_launcher::installer::LocationChanged_Source source, eve_launcher::installer::LocationChanged_Provider provider, const QString& path);
4147
void installerDetailsDisplayed();
4248
void installerDetailsHidden();
4349
void installerAutoRunEnabled();
@@ -48,21 +54,17 @@ class EventLogger : QObject
4854
void installerProvidedClientFound();
4955
void installerSharedCacheMessageShown();
5056
void installerSharedCacheMessageClosed(eve_launcher::installer::MessageBoxButton messageBoxButton, int timeDisplayed);
51-
void installerInstallationStarted();
57+
void installerInstallationStarted(const QString& installPath, eve_launcher::installer::RedistVersion redistVersion);
5258
void installerInstallationInterrupted(int duration);
53-
void installerInstallationFinished(int duration);
59+
void installerInstallationFinished(const QString& sharedCachePath, int duration);
5460
void installerInstallationFailed(int duration);
5561
void installerUninstallerCreationStarted();
5662
void installerUninstallerCreationFinished(int duration);
57-
void installerComponentInitializationStarted(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion);
58-
void installerComponentInitializationFinished(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion, int duration);
59-
void installerComponentInstallationStarted(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion);
60-
void installerComponentInstallationFinished(eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion, int duration);
61-
void installerComponentsInitializationStarted();
62-
void installerComponentsInitializationFinished(int duration);
63-
void installerComponentsInstallationStarted();
64-
void installerComponentsInstallationFinished(int duration);
65-
void installerErrorEncountered(eve_launcher::installer::ErrorEncountered_ErrorCode code, eve_launcher::installer::Page page, eve_launcher::installer::Component component, eve_launcher::installer::RedistVersion redistVersion);
63+
void installerComponentInitializationStarted();
64+
void installerComponentInitializationFinished(int duration);
65+
void installerComponentInstallationStarted();
66+
void installerComponentInstallationFinished(int duration);
67+
void installerErrorEncountered(eve_launcher::installer::ErrorEncountered_ErrorCode code, eve_launcher::installer::Page page, eve_launcher::installer::RedistVersion redistVersion);
6668
void installerAnalyticsMessageSent(const QString& message);
6769

6870
QString getSession();

src/libs/installer/httpthreadworker.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ void HttpThreadWorker::process(const QByteArray& data, const QString& url, const
3333
QString status = status_code.toString();
3434
qDebug() << "framework | HttpThreadWorker::process | status =" << status;
3535

36-
m_finished++; reply->deleteLater();
36+
m_finished++;
37+
reply->deleteLater();
3738
} );
3839
void (QNetworkReply::*errorSignal)(QNetworkReply::NetworkError) = &QNetworkReply::error;
3940
connect(reply, errorSignal, [this, reply]() {
40-
QString status = QString::fromLatin1("ERROR");
4141
qWarning() << "framework | HttpThreadWorker::process | Failed to send POST";
42-
43-
m_finished++; reply->deleteLater();
42+
reply->deleteLater();
4443
} );
4544

4645
qDebug() << "framework | HttpThreadWorker::process | POST from worker thread " << thread();

0 commit comments

Comments
 (0)