Commit 2813643c authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

IOS: Remove unneeded qualifications

Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
  next if file =~ %r{src/shared/qbs|/qmljs/}
  s = File.read(file)
  s.scan(/^using namespace (.*);$/) {
    ns = $1
    t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
      before = $1
      char = $2
      if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
        m
      else
        before + char
      end
    }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  }
}

Change-Id: I8ef73f4861069dcd7edf5e73b397d60609d4b476
Reviewed-by: default avatarFawzi Mohamed <fawzi.mohamed@theqtcompany.com>
parent 4e09ec98
......@@ -80,7 +80,7 @@ RunControl *IosAnalyzeSupport::createAnalyzeRunControl(IosRunConfiguration *runC
Target *target = runConfig->target();
if (!target)
return 0;
ProjectExplorer::IDevice::ConstPtr device = DeviceKitInformation::device(target->kit());
IDevice::ConstPtr device = DeviceKitInformation::device(target->kit());
if (device.isNull())
return 0;
AnalyzerStartParameters params;
......
......@@ -350,7 +350,7 @@ bool IosBuildStepFactory::canCreate(BuildStepList *parent, const Id id) const
&& parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD)
return false;
Kit *kit = parent->target()->kit();
Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
return ((deviceType == Constants::IOS_DEVICE_TYPE
|| deviceType == Constants::IOS_SIMULATOR_TYPE)
&& id == IOS_BUILD_STEP_ID);
......@@ -403,7 +403,7 @@ BuildStep *IosBuildStepFactory::restore(BuildStepList *parent, const QVariantMap
QList<Id> IosBuildStepFactory::availableCreationIds(BuildStepList *parent) const
{
Kit *kit = parent->target()->kit();
Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
if (deviceType == Constants::IOS_DEVICE_TYPE
|| deviceType == Constants::IOS_SIMULATOR_TYPE)
return QList<Id>() << Id(IOS_BUILD_STEP_ID);
......
......@@ -233,7 +233,7 @@ void IosConfigurations::updateAutomaticKitList()
qtVersionsForArch[abi.architecture()].append(qtVersion);
}
const DebuggerItem *possibleDebugger = DebuggerItemManager::findByEngineType(Debugger::LldbEngineType);
const DebuggerItem *possibleDebugger = DebuggerItemManager::findByEngineType(LldbEngineType);
QVariant debuggerId = (possibleDebugger ? possibleDebugger->id() : QVariant());
QList<Kit *> existingKits;
......@@ -318,16 +318,16 @@ void IosConfigurations::updateAutomaticKitList()
}
kitAtt->setUnexpandedDisplayName(displayName);
}
kitAtt->setIconPath(Utils::FileName::fromString(
kitAtt->setIconPath(FileName::fromString(
QLatin1String(Constants::IOS_SETTINGS_CATEGORY_ICON)));
DeviceTypeKitInformation::setDeviceTypeId(kitAtt, pDeviceType);
ToolChainKitInformation::setToolChain(kitAtt, pToolchain);
QtKitInformation::setQtVersion(kitAtt, qt);
if ((!Debugger::DebuggerKitInformation::debugger(kitAtt)
|| !Debugger::DebuggerKitInformation::debugger(kitAtt)->isValid()
|| Debugger::DebuggerKitInformation::debugger(kitAtt)->engineType() != Debugger::LldbEngineType)
if ((!DebuggerKitInformation::debugger(kitAtt)
|| !DebuggerKitInformation::debugger(kitAtt)->isValid()
|| DebuggerKitInformation::debugger(kitAtt)->engineType() != LldbEngineType)
&& debuggerId.isValid())
Debugger::DebuggerKitInformation::setDebugger(kitAtt,
DebuggerKitInformation::setDebugger(kitAtt,
debuggerId);
kitAtt->setMutable(DeviceKitInformation::id(), true);
......@@ -335,7 +335,7 @@ void IosConfigurations::updateAutomaticKitList()
kitAtt->setSticky(ToolChainKitInformation::id(), true);
kitAtt->setSticky(DeviceTypeKitInformation::id(), true);
kitAtt->setSticky(SysRootKitInformation::id(), true);
kitAtt->setSticky(Debugger::DebuggerKitInformation::id(), false);
kitAtt->setSticky(DebuggerKitInformation::id(), false);
SysRootKitInformation::setSysRoot(kitAtt, p.sdkPath);
// QmakeProjectManager::QmakeKitInformation::setMkspec(newKit,
......
......@@ -74,7 +74,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
Target *target = runConfig->target();
if (!target)
return 0;
ProjectExplorer::IDevice::ConstPtr device = DeviceKitInformation::device(target->kit());
IDevice::ConstPtr device = DeviceKitInformation::device(target->kit());
if (device.isNull())
return 0;
QmakeProject *project = static_cast<QmakeProject *>(target->project());
......@@ -119,8 +119,8 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
if (!params.breakOnMain)
params.continueAfterAttach = true;
Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<DebuggerRunConfigurationAspect>();
bool cppDebug = aspect->useCppDebugger();
bool qmlDebug = aspect->useQmlDebugger();
if (cppDebug) {
......
......@@ -65,14 +65,14 @@ namespace Internal {
const Core::Id IosDeployStep::Id("Qt4ProjectManager.IosDeployStep");
IosDeployStep::IosDeployStep(ProjectExplorer::BuildStepList *parent)
IosDeployStep::IosDeployStep(BuildStepList *parent)
: BuildStep(parent, Id)
, m_expectFail(false)
{
ctor();
}
IosDeployStep::IosDeployStep(ProjectExplorer::BuildStepList *parent,
IosDeployStep::IosDeployStep(BuildStepList *parent,
IosDeployStep *other)
: BuildStep(parent, other)
, m_expectFail(false)
......@@ -96,8 +96,8 @@ void IosDeployStep::ctor()
void IosDeployStep::updateDisplayNames()
{
ProjectExplorer::IDevice::ConstPtr dev =
ProjectExplorer::DeviceKitInformation::device(target()->kit());
IDevice::ConstPtr dev =
DeviceKitInformation::device(target()->kit());
const QString devName = dev.isNull() ? IosDevice::name() : dev->displayName();
setDefaultDisplayName(tr("Deploy to %1").arg(devName));
setDisplayName(tr("Deploy to %1").arg(devName));
......@@ -106,7 +106,7 @@ void IosDeployStep::updateDisplayNames()
bool IosDeployStep::init()
{
QTC_ASSERT(m_transferStatus == NoTransfer, return false);
m_device = ProjectExplorer::DeviceKitInformation::device(target()->kit());
m_device = DeviceKitInformation::device(target()->kit());
IosRunConfiguration * runConfig = qobject_cast<IosRunConfiguration *>(
this->target()->activeRunConfiguration());
QTC_ASSERT(runConfig, return false);
......@@ -229,12 +229,12 @@ BuildStepConfigWidget *IosDeployStep::createConfigWidget()
bool IosDeployStep::fromMap(const QVariantMap &map)
{
return ProjectExplorer::BuildStep::fromMap(map);
return BuildStep::fromMap(map);
}
QVariantMap IosDeployStep::toMap() const
{
QVariantMap map = ProjectExplorer::BuildStep::toMap();
QVariantMap map = BuildStep::toMap();
return map;
}
......
......@@ -564,7 +564,7 @@ IosDevice::ConstPtr IosKitInformation::device(Kit *kit)
{
if (!kit)
return IosDevice::ConstPtr();
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(kit);
IDevice::ConstPtr dev = DeviceKitInformation::device(kit);
IosDevice::ConstPtr res = dev.dynamicCast<const IosDevice>();
return res;
}
......
......@@ -400,7 +400,7 @@ QList<Id> IosDsymBuildStepFactory::availableCreationIds(BuildStepList *parent) c
&& parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return QList<Id>();
Kit *kit = parent->target()->kit();
Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
if (deviceType == Constants::IOS_DEVICE_TYPE
|| deviceType == Constants::IOS_SIMULATOR_TYPE)
return QList<Id>() << Id(Constants::IOS_DSYM_BUILD_STEP_ID);
......@@ -414,7 +414,7 @@ bool IosDsymBuildStepFactory::canCreate(BuildStepList *parent, const Id id) cons
&& parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return false;
Kit *kit = parent->target()->kit();
Core::Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
Id deviceType = DeviceTypeKitInformation::deviceTypeId(kit);
return ((deviceType == Constants::IOS_DEVICE_TYPE
|| deviceType == Constants::IOS_SIMULATOR_TYPE)
&& id == Constants::IOS_DSYM_BUILD_STEP_ID);
......
......@@ -57,9 +57,9 @@ using namespace ProjectExplorer;
namespace Ios {
namespace Internal {
bool IosManager::supportsIos(ProjectExplorer::Target *target)
bool IosManager::supportsIos(Target *target)
{
if (!qobject_cast<QmakeProjectManager::QmakeProject *>(target->project()))
if (!qobject_cast<QmakeProject *>(target->project()))
return false;
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target->kit());
return version && version->type() == QLatin1String(Ios::Constants::IOSQT);
......
......@@ -89,20 +89,20 @@ QString IosQtVersion::invalidReason() const
return tmp;
}
QList<ProjectExplorer::Abi> IosQtVersion::detectQtAbis() const
QList<Abi> IosQtVersion::detectQtAbis() const
{
QList<ProjectExplorer::Abi> abis = qtAbisFromLibrary(qtCorePaths(versionInfo(), qtVersionString()));
QList<Abi> abis = qtAbisFromLibrary(qtCorePaths(versionInfo(), qtVersionString()));
for (int i = 0; i < abis.count(); ++i) {
abis[i] = Abi(abis.at(i).architecture(),
abis.at(i).os(),
ProjectExplorer::Abi::GenericMacFlavor,
Abi::GenericMacFlavor,
abis.at(i).binaryFormat(),
abis.at(i).wordWidth());
}
return abis;
}
void IosQtVersion::addToEnvironment(const ProjectExplorer::Kit *k, Utils::Environment &env) const
void IosQtVersion::addToEnvironment(const Kit *k, Utils::Environment &env) const
{
Q_UNUSED(k);
Q_UNUSED(env);
......
......@@ -132,7 +132,7 @@ void IosRunConfiguration::deviceChanges() {
enabledCheck();
}
void IosRunConfiguration::proFileUpdated(QmakeProjectManager::QmakeProFileNode *pro, bool success,
void IosRunConfiguration::proFileUpdated(QmakeProFileNode *pro, bool success,
bool parseInProgress)
{
if (m_profilePath != pro->path())
......@@ -151,7 +151,7 @@ QWidget *IosRunConfiguration::createConfigurationWidget()
return new IosRunConfigurationWidget(this);
}
Utils::OutputFormatter *IosRunConfiguration::createOutputFormatter() const
OutputFormatter *IosRunConfiguration::createOutputFormatter() const
{
return new QtSupport::QtOutputFormatter(target()->project());
}
......@@ -211,9 +211,9 @@ QString IosRunConfiguration::applicationName() const
return QString();
}
Utils::FileName IosRunConfiguration::bundleDirectory() const
FileName IosRunConfiguration::bundleDirectory() const
{
Utils::FileName res;
FileName res;
Core::Id devType = DeviceTypeKitInformation::deviceTypeId(target()->kit());
bool isDevice = (devType == Constants::IOS_DEVICE_TYPE);
if (!isDevice && devType != Constants::IOS_SIMULATOR_TYPE) {
......@@ -259,7 +259,7 @@ Utils::FileName IosRunConfiguration::bundleDirectory() const
return res;
}
Utils::FileName IosRunConfiguration::localExecutable() const
FileName IosRunConfiguration::localExecutable() const
{
return bundleDirectory().appendPath(applicationName());
}
......@@ -405,7 +405,7 @@ IosRunConfigurationWidget::~IosRunConfigurationWidget()
QString IosRunConfigurationWidget::argListToString(const QStringList &args) const
{
return Utils::QtcProcess::joinArgs(args);
return QtcProcess::joinArgs(args);
}
QStringList IosRunConfigurationWidget::stringToArgList(const QString &args) const
......
......@@ -132,8 +132,8 @@ bool IosRunConfigurationFactory::canHandle(Target *t) const
QList<RunConfiguration *> IosRunConfigurationFactory::runConfigurationsForNode(Target *t, const Node *n)
{
QList<ProjectExplorer::RunConfiguration *> result;
foreach (ProjectExplorer::RunConfiguration *rc, t->runConfigurations())
QList<RunConfiguration *> result;
foreach (RunConfiguration *rc, t->runConfigurations())
if (IosRunConfiguration *qt4c = qobject_cast<IosRunConfiguration *>(rc))
if (qt4c->profilePath() == n->path())
result << rc;
......@@ -157,7 +157,7 @@ IosRunControlFactory::IosRunControlFactory(QObject *parent)
}
bool IosRunControlFactory::canRun(RunConfiguration *runConfiguration,
ProjectExplorer::RunMode mode) const
RunMode mode) const
{
if (mode != NormalRunMode && mode != DebugRunMode && mode != QmlProfilerRunMode
&& mode != DebugRunModeWithBreakOnMain)
......@@ -166,16 +166,16 @@ bool IosRunControlFactory::canRun(RunConfiguration *runConfiguration,
}
RunControl *IosRunControlFactory::create(RunConfiguration *runConfig,
ProjectExplorer::RunMode mode, QString *errorMessage)
RunMode mode, QString *errorMessage)
{
Q_ASSERT(canRun(runConfig, mode));
IosRunConfiguration *rc = qobject_cast<IosRunConfiguration *>(runConfig);
Q_ASSERT(rc);
RunControl *res = 0;
Core::Id devId = ProjectExplorer::DeviceKitInformation::deviceId(rc->target()->kit());
Core::Id devId = DeviceKitInformation::deviceId(rc->target()->kit());
// The device can only run an application at a time, if an app is running stop it.
if (m_activeRunControls.contains(devId)) {
if (QPointer<ProjectExplorer::RunControl> activeRunControl = m_activeRunControls[devId])
if (QPointer<RunControl> activeRunControl = m_activeRunControls[devId])
activeRunControl->stop();
m_activeRunControls.remove(devId);
}
......
......@@ -59,7 +59,7 @@ namespace Internal {
IosRunner::IosRunner(QObject *parent, IosRunConfiguration *runConfig, bool cppDebug, bool qmlDebug)
: QObject(parent), m_toolHandler(0), m_bundleDir(runConfig->bundleDirectory().toString()),
m_arguments(runConfig->commandLineArguments()),
m_device(ProjectExplorer::DeviceKitInformation::device(runConfig->target()->kit())),
m_device(DeviceKitInformation::device(runConfig->target()->kit())),
m_cppDebug(cppDebug), m_qmlDebug(qmlDebug), m_cleanExit(false),
m_qmlPort(0), m_pid(0)
{
......
......@@ -209,7 +209,7 @@ IosSimulator::ConstPtr IosKitInformation::simulator(Kit *kit)
{
if (!kit)
return IosSimulator::ConstPtr();
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(kit);
IDevice::ConstPtr dev = DeviceKitInformation::device(kit);
IosSimulator::ConstPtr res = dev.dynamicCast<const IosSimulator>();
return res;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment