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:
Klaus Basan
2014-12-16 21:18:50 +01:00
parent f62f85b263
commit 9e5f228b08
19 changed files with 66 additions and 42 deletions

View File

@@ -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

View File

@@ -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
{

View File

@@ -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();
}

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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;

View File

@@ -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> &times);
};
} // namespace
#endif // guard

View File

@@ -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;