mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
using namespace in header removed, rectified resulting changes
* using namespace in context_runtime.h * in same step also fixed some other using namespace issues
This commit is contained in:
@@ -26,9 +26,9 @@ namespace BlackCore
|
||||
~CContext() {}
|
||||
|
||||
//! Log category
|
||||
static const CLogCategoryList &getLogCategories()
|
||||
static const BlackMisc::CLogCategoryList &getLogCategories()
|
||||
{
|
||||
static const CLogCategoryList cats { CLogCategory::context() };
|
||||
static const BlackMisc::CLogCategoryList cats { BlackMisc::CLogCategory::context() };
|
||||
return cats;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace BlackCore
|
||||
//! Empty context called
|
||||
void logEmptyContextWarning(const QString &functionName) const
|
||||
{
|
||||
CLogMessage(this, CLogCategory::contextSlot()).warning("Empty context called, details: %1") << functionName;
|
||||
BlackMisc::CLogMessage(this, BlackMisc::CLogCategory::contextSlot()).warning("Empty context called, details: %1") << functionName;
|
||||
}
|
||||
|
||||
//! Standard message when status message is returned in empty context
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/context_application_proxy.h"
|
||||
#include "blackcore/input_manager.h"
|
||||
@@ -11,6 +15,8 @@
|
||||
#include <QMetaEnum>
|
||||
#include <QDBusConnection>
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
|
||||
@@ -56,21 +56,21 @@ namespace BlackCore
|
||||
//! \copydoc IContextNetwork::getAtcStationsOnline()
|
||||
virtual const BlackMisc::Aviation::CAtcStationList getAtcStationsOnline() const override
|
||||
{
|
||||
BlackMisc::CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
|
||||
BlackMisc::CLogMessage(this, BlackMisc::CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
|
||||
return this->m_airspace->getAtcStationsOnline();
|
||||
}
|
||||
|
||||
//! \copydoc IContextNetwork::getAtcStationsBooked()
|
||||
virtual const BlackMisc::Aviation::CAtcStationList getAtcStationsBooked() const override
|
||||
{
|
||||
BlackMisc::CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
|
||||
BlackMisc::CLogMessage(this, BlackMisc::CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
|
||||
return this->m_airspace->getAtcStationsBooked();
|
||||
}
|
||||
|
||||
//! \copydoc IContextNetwork::getAircraftInRange()
|
||||
virtual const BlackMisc::Aviation::CAircraftList getAircraftInRange() const override
|
||||
{
|
||||
BlackMisc::CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
|
||||
BlackMisc::CLogMessage(this, BlackMisc::CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
|
||||
return this->m_airspace->getAircraftInRange();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackcore/context_network_proxy.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
@@ -9,6 +13,10 @@
|
||||
#include <QMetaEnum>
|
||||
#include <QDBusConnection>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
@@ -147,12 +155,12 @@ namespace BlackCore
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("testCreateDummyOnlineAtcStations"), number);
|
||||
}
|
||||
|
||||
BlackMisc::CStatusMessage CContextNetworkProxy::connectToNetwork(const Network::CServer &server, uint loginMode)
|
||||
CStatusMessage CContextNetworkProxy::connectToNetwork(const CServer &server, uint loginMode)
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("connectToNetwork"), server, loginMode);
|
||||
}
|
||||
|
||||
BlackMisc::CStatusMessage CContextNetworkProxy::disconnectFromNetwork()
|
||||
CStatusMessage CContextNetworkProxy::disconnectFromNetwork()
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::CStatusMessage>(QLatin1Literal("disconnectFromNetwork"));
|
||||
}
|
||||
@@ -167,7 +175,7 @@ namespace BlackCore
|
||||
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("commandLineEntered"), commandLine);
|
||||
}
|
||||
|
||||
void CContextNetworkProxy::sendTextMessages(const BlackMisc::Network::CTextMessageList &textMessages)
|
||||
void CContextNetworkProxy::sendTextMessages(const CTextMessageList &textMessages)
|
||||
{
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("sendTextMessages"), textMessages);
|
||||
}
|
||||
@@ -177,12 +185,12 @@ namespace BlackCore
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("sendFlightPlan"), flightPlan);
|
||||
}
|
||||
|
||||
BlackMisc::Aviation::CFlightPlan CContextNetworkProxy::loadFlightPlanFromNetwork(const BlackMisc::Aviation::CCallsign &callsign) const
|
||||
CFlightPlan CContextNetworkProxy::loadFlightPlanFromNetwork(const CCallsign &callsign) const
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CFlightPlan>(QLatin1Literal("loadFlightPlanFromNetwork"), callsign);
|
||||
}
|
||||
|
||||
BlackMisc::Aviation::CInformationMessage CContextNetworkProxy::getMetar(const BlackMisc::Aviation::CAirportIcao &airportIcaoCode)
|
||||
CInformationMessage CContextNetworkProxy::getMetar(const CAirportIcao &airportIcaoCode)
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CInformationMessage>(QLatin1Literal("getMetar"), airportIcaoCode);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace BlackCore
|
||||
virtual bool updateIcaoData(const BlackMisc::Aviation::CAircraftIcao &icaoData, const QString &originator) override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::updateSelcal
|
||||
virtual bool updateSelcal(const Aviation::CSelcal &selcal, const QString &originator) override;
|
||||
virtual bool updateSelcal(const BlackMisc::Aviation::CSelcal &selcal, const QString &originator) override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::setAudioOutputVolumes
|
||||
virtual void setAudioOutputVolumes(int outputVolumeCom1, int outputVolumeCom2) override;
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
#include <QMetaEnum>
|
||||
#include <QDBusConnection>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
|
||||
@@ -66,17 +69,17 @@ namespace BlackCore
|
||||
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updatePilot"), pilot, originator);
|
||||
}
|
||||
|
||||
bool CContextOwnAircraftProxy::updateSelcal(const Aviation::CSelcal &selcal, const QString &originator)
|
||||
bool CContextOwnAircraftProxy::updateSelcal(const CSelcal &selcal, const QString &originator)
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateSelcal"), selcal, originator);
|
||||
}
|
||||
|
||||
bool CContextOwnAircraftProxy::updateCallsign(const Aviation::CCallsign &callsign, const QString &originator)
|
||||
bool CContextOwnAircraftProxy::updateCallsign(const CCallsign &callsign, const QString &originator)
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateCallsign"), callsign, originator);
|
||||
}
|
||||
|
||||
bool CContextOwnAircraftProxy::updateIcaoData(const Aviation::CAircraftIcao &icaoData, const QString &originator)
|
||||
bool CContextOwnAircraftProxy::updateIcaoData(const CAircraftIcao &icaoData, const QString &originator)
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<bool>(QLatin1Literal("updateIcaoData"), icaoData, originator);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace BlackCore
|
||||
virtual bool updatePilot(const BlackMisc::Network::CUser &pilot, const QString &originator) override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::updateSelcal
|
||||
virtual bool updateSelcal(const Aviation::CSelcal &selcal, const QString &originator) override;
|
||||
virtual bool updateSelcal(const BlackMisc::Aviation::CSelcal &selcal, const QString &originator) override;
|
||||
|
||||
//! \copydoc IContextOwnAircraft::updateCallsign
|
||||
virtual bool updateCallsign(const BlackMisc::Aviation::CCallsign &callsign, const QString &originator) override;
|
||||
|
||||
@@ -19,8 +19,6 @@
|
||||
#include <QMultiMap>
|
||||
#include <QReadWriteLock>
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
// forward declaration, see review
|
||||
@@ -177,8 +175,8 @@ namespace BlackCore
|
||||
//! initialization of DBus connection (where applicable)
|
||||
void initDBusServer(const QString &dBusAddress);
|
||||
|
||||
//! post init tasks, mainly connecting context signal slots
|
||||
void initPostSetup();
|
||||
//! post init tasks, load simulator and connecting context signal slots
|
||||
void initPostSetup(QMap<QString, int> ×);
|
||||
};
|
||||
} // namespace
|
||||
#endif // guard
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace BlackCore
|
||||
virtual BlackSim::Settings::CSettingsSimulator getSimulatorSettings() const override;
|
||||
|
||||
//! \copydoc IContextSettings::getHotkeys()
|
||||
virtual Settings::CSettingKeyboardHotkeyList getHotkeys() const override;
|
||||
virtual BlackMisc::Settings::CSettingKeyboardHotkeyList getHotkeys() const override;
|
||||
|
||||
//! \copydoc IContextSettings::value
|
||||
virtual BlackMisc::CStatusMessageList value(const QString &path, const QString &command, const BlackMisc::CVariant &value) override;
|
||||
|
||||
Reference in New Issue
Block a user