mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 16:18:42 +00:00
Insure that Web pages are deleted before the Web Profile to avoir error messages (#3845)
When exiting, GC complains that the Web Profile is released before Web pages that refer to it with the message: "Release of profile requested but WebEnginePage still not deleted. Expect troubles !". The Web pages are now released explicitly in the destructor to insure that they are freed earlier than the Profile. Fixes #3844
This commit is contained in:
@@ -356,6 +356,7 @@ LTMWindow::LTMWindow(Context *context) :
|
||||
LTMWindow::~LTMWindow()
|
||||
{
|
||||
delete popup;
|
||||
if (dataSummary) delete dataSummary->page();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -410,6 +410,10 @@ PythonChart::PythonChart(Context *context, bool ridesummary) : GcChartWindow(con
|
||||
web->setChecked(true);
|
||||
}
|
||||
|
||||
PythonChart::~PythonChart()
|
||||
{
|
||||
if (canvas) delete canvas->page();
|
||||
}
|
||||
|
||||
// switch between rendering to a web page and rendering to a chart page
|
||||
void
|
||||
|
||||
@@ -101,6 +101,7 @@ class PythonChart : public GcChartWindow, public PythonHost {
|
||||
|
||||
public:
|
||||
PythonChart(Context *context, bool ridesummary);
|
||||
~PythonChart();
|
||||
|
||||
// reveal
|
||||
bool hasReveal() { return true; }
|
||||
|
||||
@@ -173,6 +173,7 @@ RideMapWindow::RideMapWindow(Context *context, int mapType) : GcChartWindow(cont
|
||||
RideMapWindow::~RideMapWindow()
|
||||
{
|
||||
delete webBridge;
|
||||
if (view) delete view->page();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -146,6 +146,7 @@ RideSummaryWindow::~RideSummaryWindow()
|
||||
// cancel background thread if needed
|
||||
future.cancel();
|
||||
future.waitForFinished();
|
||||
if (rideSummary) delete rideSummary->page();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -203,6 +203,12 @@ OAuthDialog::OAuthDialog(Context *context, OAuthSite site, CloudService *service
|
||||
}
|
||||
}
|
||||
|
||||
OAuthDialog::~OAuthDialog()
|
||||
{
|
||||
if (view) delete view->page();
|
||||
delete view; // view was constructed without a parent to delete it
|
||||
}
|
||||
|
||||
// just ignore SSL handshake errors at all times
|
||||
void
|
||||
OAuthDialog::onSslErrors(QNetworkReply *reply, const QList<QSslError>&)
|
||||
|
||||
@@ -62,6 +62,7 @@ public:
|
||||
|
||||
// will work with old config via site and new via cloudservice (which is null for calendar and withings for now)
|
||||
OAuthDialog(Context *context, OAuthSite site, CloudService *service, QString baseURL="", QString clientsecret="");
|
||||
~OAuthDialog();
|
||||
|
||||
bool sslLibMissing() { return noSSLlib; }
|
||||
|
||||
|
||||
@@ -981,6 +981,11 @@ GcUpgradeLogDialog::GcUpgradeLogDialog(QDir homeDir) : QDialog(NULL, Qt::Dialog)
|
||||
report->page()->setHtml(reportText);
|
||||
}
|
||||
|
||||
GcUpgradeLogDialog::~GcUpgradeLogDialog()
|
||||
{
|
||||
if (report) delete report->page();
|
||||
}
|
||||
|
||||
void
|
||||
GcUpgradeLogDialog::saveAs()
|
||||
{
|
||||
|
||||
@@ -125,6 +125,7 @@ class GcUpgradeLogDialog : public QDialog
|
||||
|
||||
public:
|
||||
GcUpgradeLogDialog(QDir);
|
||||
~GcUpgradeLogDialog();
|
||||
void enableButtons();
|
||||
void append(QString, int level=0);
|
||||
|
||||
|
||||
@@ -154,6 +154,11 @@ GcCrashDialog::GcCrashDialog(QDir homeDir) : QDialog(NULL, Qt::Dialog), home(hom
|
||||
setHTML();
|
||||
}
|
||||
|
||||
GcCrashDialog::~GcCrashDialog()
|
||||
{
|
||||
if (report) delete report->page();
|
||||
}
|
||||
|
||||
QString GcCrashDialog::versionHTML()
|
||||
{
|
||||
// -- OS ----
|
||||
|
||||
@@ -35,6 +35,7 @@ class GcCrashDialog : public QDialog
|
||||
|
||||
public:
|
||||
GcCrashDialog(QDir);
|
||||
~GcCrashDialog();
|
||||
AthleteDirectoryStructure home;
|
||||
static QString versionHTML();
|
||||
|
||||
|
||||
@@ -131,6 +131,7 @@ void LiveMapWebPageWindow::userUrl()
|
||||
|
||||
LiveMapWebPageWindow::~LiveMapWebPageWindow()
|
||||
{
|
||||
if (view) delete view->page();
|
||||
}
|
||||
|
||||
void LiveMapWebPageWindow::ergFileSelected(ErgFile* f)
|
||||
|
||||
@@ -181,6 +181,7 @@ WebPageWindow::WebPageWindow(Context *context) : GcChartWindow(context), context
|
||||
|
||||
WebPageWindow::~WebPageWindow()
|
||||
{
|
||||
if (view) delete view->page();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user