mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 19:35:32 +08:00
refs #335, changed ui to QScopedPointer
This commit is contained in:
committed by
Roland Winklmeier
parent
5eaaf70fcd
commit
bb8b515c87
@@ -38,9 +38,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
CAircraftComponent::~CAircraftComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
{ }
|
||||
|
||||
int CAircraftComponent::countAircrafts() const
|
||||
{
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
#include "blackgui/components/timerbasedcomponent.h"
|
||||
#include "blackgui/components/dockwidgetinfoareacomponent.h"
|
||||
#include "blackmisc/avaircraft.h"
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CAircraftComponent; }
|
||||
namespace BlackGui
|
||||
@@ -72,7 +74,7 @@ namespace BlackGui
|
||||
void ps_countChanged(int count);
|
||||
|
||||
private:
|
||||
Ui::CAircraftComponent *ui;
|
||||
QScopedPointer<Ui::CAircraftComponent> ui;
|
||||
CTimerBasedComponent *m_timerComponent;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -67,9 +67,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
CAtcStationComponent::~CAtcStationComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
{ }
|
||||
|
||||
int CAtcStationComponent::countBookedStations() const
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QModelIndex>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CAtcStationComponent; }
|
||||
|
||||
@@ -111,7 +112,7 @@ namespace BlackGui
|
||||
void ps_countChanged(int count);
|
||||
|
||||
private:
|
||||
Ui::CAtcStationComponent *ui;
|
||||
QScopedPointer<Ui::CAtcStationComponent> ui;
|
||||
CTimerBasedComponent *m_timerComponent;
|
||||
QDateTime m_timestampLastReadOnlineStations = CTimerBasedComponent::epoch(); //!< stations read
|
||||
QDateTime m_timestampOnlineStationsChanged = CTimerBasedComponent::epoch(); //!< stations marked as changed
|
||||
|
||||
@@ -69,9 +69,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
CFlightPlanComponent::~CFlightPlanComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
{ }
|
||||
|
||||
void CFlightPlanComponent::prefillWithAircraftData(const BlackMisc::Aviation::CAircraft &ownAircraft)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace BlackGui
|
||||
BlackMisc::Aviation::CFlightPlan getFlightPlan() const;
|
||||
|
||||
private:
|
||||
Ui::CFlightPlanComponent *ui;
|
||||
QScopedPointer<Ui::CFlightPlanComponent> ui;
|
||||
|
||||
//! My flight plan
|
||||
BlackMisc::Aviation::CFlightPlan m_flightPlan;
|
||||
|
||||
@@ -26,9 +26,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
CLogComponent::~CLogComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
{ }
|
||||
|
||||
void CLogComponent::appendStatusMessageToConsole(const CStatusMessage &statusMessage)
|
||||
{
|
||||
@@ -47,4 +45,4 @@ namespace BlackGui
|
||||
this->ui->tvp_StatusMessages->insert(statusMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
|
||||
#include "runtimebasedcomponent.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CLogComponent; }
|
||||
|
||||
@@ -49,7 +51,7 @@ namespace BlackGui
|
||||
|
||||
|
||||
private:
|
||||
Ui::CLogComponent *ui;
|
||||
QScopedPointer<Ui::CLogComponent> ui;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,9 +56,7 @@ namespace BlackGui
|
||||
* Destructor
|
||||
*/
|
||||
CSettingsComponent::~CSettingsComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
{ }
|
||||
|
||||
/*
|
||||
* Update own ICAO data from GUI
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <QTabWidget>
|
||||
#include <QModelIndex>
|
||||
#include <QTimer>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CSettingsComponent; }
|
||||
|
||||
@@ -156,10 +157,10 @@ namespace BlackGui
|
||||
MicrophoneTest
|
||||
};
|
||||
|
||||
Ui::CSettingsComponent *ui;
|
||||
QTimer *m_timerAudioTests; //!< audio tests: progress bar, disable/enable buttons
|
||||
QScopedPointer<Ui::CSettingsComponent> ui;
|
||||
QTimer *m_timerAudioTests; //!< audio tests: progress bar, disable/enable buttons
|
||||
AudioTest m_audioTestRunning;
|
||||
QColor m_fontColor;
|
||||
QColor m_fontColor;
|
||||
|
||||
//! Audio device lists from settings
|
||||
void initAudioDeviceLists();
|
||||
|
||||
@@ -27,9 +27,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
CSimulatorComponent::~CSimulatorComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
{ }
|
||||
|
||||
void CSimulatorComponent::addOrUpdateByName(const QString &name, const QString &value, const CIcon &icon)
|
||||
{
|
||||
@@ -52,4 +50,4 @@ namespace BlackGui
|
||||
this->ui->tvp_LiveData->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
#include "runtimebasedcomponent.h"
|
||||
#include "blackmisc/icon.h"
|
||||
#include "blackgui/components/dockwidgetinfoareacomponent.h"
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CSimulatorComponent; }
|
||||
namespace BlackGui
|
||||
@@ -25,9 +27,9 @@ namespace BlackGui
|
||||
|
||||
//! Simulator component
|
||||
class CSimulatorComponent :
|
||||
public QTabWidget,
|
||||
public CDockWidgetInfoAreaComponent,
|
||||
public CRuntimeBasedComponent
|
||||
public QTabWidget,
|
||||
public CDockWidgetInfoAreaComponent,
|
||||
public CRuntimeBasedComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -52,7 +54,7 @@ namespace BlackGui
|
||||
void clear();
|
||||
|
||||
private:
|
||||
Ui::CSimulatorComponent *ui;
|
||||
QScopedPointer<Ui::CSimulatorComponent> ui;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,9 +35,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
CUserComponent::~CUserComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
{ }
|
||||
|
||||
int CUserComponent::countClients() const
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <QTabWidget>
|
||||
#include <QTimer>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CUserComponent; }
|
||||
|
||||
@@ -67,7 +68,7 @@ namespace BlackGui
|
||||
void ps_countChanged(int count);
|
||||
|
||||
private:
|
||||
Ui::CUserComponent *ui;
|
||||
QScopedPointer<Ui::CUserComponent> ui;
|
||||
CTimerBasedComponent *m_timerComponent;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user