forked from qt-creator/qt-creator
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: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
4e09ec98c7
commit
2813643cfe
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user