forked from qt-creator/qt-creator
RemoteLinux: 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: Id48e46fdfed83b82071551f4375fab3310ed1f6e
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
b197566eec
commit
3f1fd49c71
@@ -59,7 +59,7 @@ public:
|
|||||||
AbstractRemoteLinuxRunSupport::State state;
|
AbstractRemoteLinuxRunSupport::State state;
|
||||||
DeviceApplicationRunner appRunner;
|
DeviceApplicationRunner appRunner;
|
||||||
DeviceUsedPortsGatherer portsGatherer;
|
DeviceUsedPortsGatherer portsGatherer;
|
||||||
const ProjectExplorer::IDevice::ConstPtr device;
|
const IDevice::ConstPtr device;
|
||||||
Utils::PortList portList;
|
Utils::PortList portList;
|
||||||
const QString remoteFilePath;
|
const QString remoteFilePath;
|
||||||
const QStringList arguments;
|
const QStringList arguments;
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ void GenericDirectUploadService::handleSftpChannelError(const QString &message)
|
|||||||
handleDeploymentDone();
|
handleDeploymentDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GenericDirectUploadService::handleUploadFinished(QSsh::SftpJobId jobId, const QString &errorMsg)
|
void GenericDirectUploadService::handleUploadFinished(SftpJobId jobId, const QString &errorMsg)
|
||||||
{
|
{
|
||||||
Q_UNUSED(jobId);
|
Q_UNUSED(jobId);
|
||||||
|
|
||||||
|
|||||||
@@ -96,13 +96,13 @@ public:
|
|||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
GenericDirectUploadStep::GenericDirectUploadStep(ProjectExplorer::BuildStepList *bsl, Core::Id id)
|
GenericDirectUploadStep::GenericDirectUploadStep(BuildStepList *bsl, Core::Id id)
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
ctor();
|
ctor();
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericDirectUploadStep::GenericDirectUploadStep(ProjectExplorer::BuildStepList *bsl, GenericDirectUploadStep *other)
|
GenericDirectUploadStep::GenericDirectUploadStep(BuildStepList *bsl, GenericDirectUploadStep *other)
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, other)
|
: AbstractRemoteLinuxDeployStep(bsl, other)
|
||||||
{
|
{
|
||||||
ctor();
|
ctor();
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ void GenericLinuxDeviceConfigurationWidget::hostKeyCheckingChanged(bool doCheck)
|
|||||||
{
|
{
|
||||||
SshConnectionParameters sshParams = device()->sshParameters();
|
SshConnectionParameters sshParams = device()->sshParameters();
|
||||||
sshParams.hostKeyCheckingMode
|
sshParams.hostKeyCheckingMode
|
||||||
= doCheck ? QSsh::SshHostKeyCheckingAllowNoMatch : QSsh::SshHostKeyCheckingNone;
|
= doCheck ? SshHostKeyCheckingAllowNoMatch : SshHostKeyCheckingNone;
|
||||||
device()->setSshParameters(sshParams);
|
device()->setSshParameters(sshParams);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ GenericLinuxDeviceConfigurationWizard::~GenericLinuxDeviceConfigurationWizard()
|
|||||||
|
|
||||||
IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
|
IDevice::Ptr GenericLinuxDeviceConfigurationWizard::device()
|
||||||
{
|
{
|
||||||
QSsh::SshConnectionParameters sshParams;
|
SshConnectionParameters sshParams;
|
||||||
sshParams.options &= ~SshConnectionOptions(SshEnableStrictConformanceChecks); // For older SSH servers.
|
sshParams.options &= ~SshConnectionOptions(SshEnableStrictConformanceChecks); // For older SSH servers.
|
||||||
sshParams.host = d->setupPage.hostName();
|
sshParams.host = d->setupPage.hostName();
|
||||||
sshParams.userName = d->setupPage.userName();
|
sshParams.userName = d->setupPage.userName();
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class LinuxPortsGatheringMethod : public ProjectExplorer::PortsGatheringMethod
|
class LinuxPortsGatheringMethod : public PortsGatheringMethod
|
||||||
{
|
{
|
||||||
QByteArray commandLine(QAbstractSocket::NetworkLayerProtocol protocol) const
|
QByteArray commandLine(QAbstractSocket::NetworkLayerProtocol protocol) const
|
||||||
{
|
{
|
||||||
@@ -175,7 +175,7 @@ QString LinuxDevice::displayType() const
|
|||||||
return tr("Generic Linux");
|
return tr("Generic Linux");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IDeviceWidget *LinuxDevice::createWidget()
|
IDeviceWidget *LinuxDevice::createWidget()
|
||||||
{
|
{
|
||||||
return new GenericLinuxDeviceConfigurationWidget(sharedFromThis());
|
return new GenericLinuxDeviceConfigurationWidget(sharedFromThis());
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ LinuxDevice::Ptr LinuxDevice::create()
|
|||||||
return Ptr(new LinuxDevice);
|
return Ptr(new LinuxDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IDevice::Ptr LinuxDevice::clone() const
|
IDevice::Ptr LinuxDevice::clone() const
|
||||||
{
|
{
|
||||||
return Ptr(new LinuxDevice(*this));
|
return Ptr(new LinuxDevice(*this));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ void PackageUploader::uploadPackage(SshConnection *connection,
|
|||||||
m_localFilePath = localFilePath;
|
m_localFilePath = localFilePath;
|
||||||
m_remoteFilePath = remoteFilePath;
|
m_remoteFilePath = remoteFilePath;
|
||||||
m_connection = connection;
|
m_connection = connection;
|
||||||
connect(m_connection, &QSsh::SshConnection::error,
|
connect(m_connection, &SshConnection::error,
|
||||||
this, &PackageUploader::handleConnectionFailure);
|
this, &PackageUploader::handleConnectionFailure);
|
||||||
m_uploader = m_connection->createSftpChannel();
|
m_uploader = m_connection->createSftpChannel();
|
||||||
connect(m_uploader.data(), SIGNAL(initialized()), this,
|
connect(m_uploader.data(), SIGNAL(initialized()), this,
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ public:
|
|||||||
LinuxDeviceDebugSupportPrivate(const AbstractRemoteLinuxRunConfiguration *runConfig,
|
LinuxDeviceDebugSupportPrivate(const AbstractRemoteLinuxRunConfiguration *runConfig,
|
||||||
DebuggerRunControl *runControl)
|
DebuggerRunControl *runControl)
|
||||||
: runControl(runControl),
|
: runControl(runControl),
|
||||||
qmlDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger()),
|
qmlDebugging(runConfig->extraAspect<DebuggerRunConfigurationAspect>()->useQmlDebugger()),
|
||||||
cppDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger()),
|
cppDebugging(runConfig->extraAspect<DebuggerRunConfigurationAspect>()->useCppDebugger()),
|
||||||
gdbServerPort(-1), qmlPort(-1)
|
gdbServerPort(-1), qmlPort(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -93,8 +93,8 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const AbstractR
|
|||||||
if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
|
if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
|
||||||
params.toolChainAbi = tc->targetAbi();
|
params.toolChainAbi = tc->targetAbi();
|
||||||
|
|
||||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
DebuggerRunConfigurationAspect *aspect
|
||||||
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
= runConfig->extraAspect<DebuggerRunConfigurationAspect>();
|
||||||
if (aspect->useQmlDebugger()) {
|
if (aspect->useQmlDebugger()) {
|
||||||
params.languages |= QmlLanguage;
|
params.languages |= QmlLanguage;
|
||||||
params.qmlServerAddress = device->sshParameters().host;
|
params.qmlServerAddress = device->sshParameters().host;
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ namespace RemoteLinux {
|
|||||||
|
|
||||||
using namespace Internal;
|
using namespace Internal;
|
||||||
|
|
||||||
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target,
|
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(Target *target,
|
||||||
const Core::Id id, const QString &defaultDisplayName)
|
const Core::Id id, const QString &defaultDisplayName)
|
||||||
: DeployConfiguration(target, id)
|
: DeployConfiguration(target, id)
|
||||||
{
|
{
|
||||||
setDefaultDisplayName(defaultDisplayName);
|
setDefaultDisplayName(defaultDisplayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target,
|
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(Target *target,
|
||||||
RemoteLinuxDeployConfiguration *source)
|
RemoteLinuxDeployConfiguration *source)
|
||||||
: DeployConfiguration(target, source)
|
: DeployConfiguration(target, source)
|
||||||
{ }
|
{ }
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ void RemoteLinuxEnvironmentReader::start()
|
|||||||
return;
|
return;
|
||||||
m_stop = false;
|
m_stop = false;
|
||||||
m_deviceProcess = device->createProcess(this);
|
m_deviceProcess = device->createProcess(this);
|
||||||
connect(m_deviceProcess, &ProjectExplorer::DeviceProcess::error,
|
connect(m_deviceProcess, &DeviceProcess::error,
|
||||||
this, &RemoteLinuxEnvironmentReader::handleError);
|
this, &RemoteLinuxEnvironmentReader::handleError);
|
||||||
connect(m_deviceProcess, &ProjectExplorer::DeviceProcess::finished,
|
connect(m_deviceProcess, &DeviceProcess::finished,
|
||||||
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
||||||
m_deviceProcess->start(QLatin1String("env"));
|
m_deviceProcess->start(QLatin1String("env"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ public:
|
|||||||
|
|
||||||
bool isRunning;
|
bool isRunning;
|
||||||
IDevice::ConstPtr deviceConfig;
|
IDevice::ConstPtr deviceConfig;
|
||||||
QSsh::SshRemoteProcessRunner *installer;
|
SshRemoteProcessRunner *installer;
|
||||||
QSsh::SshRemoteProcessRunner *killProcess;
|
SshRemoteProcessRunner *killProcess;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -70,13 +70,13 @@ void AbstractRemoteLinuxPackageInstaller::installPackage(const IDevice::ConstPtr
|
|||||||
prepareInstallation();
|
prepareInstallation();
|
||||||
if (!d->installer)
|
if (!d->installer)
|
||||||
d->installer = new SshRemoteProcessRunner(this);
|
d->installer = new SshRemoteProcessRunner(this);
|
||||||
connect(d->installer, &QSsh::SshRemoteProcessRunner::connectionError,
|
connect(d->installer, &SshRemoteProcessRunner::connectionError,
|
||||||
this, &AbstractRemoteLinuxPackageInstaller::handleConnectionError);
|
this, &AbstractRemoteLinuxPackageInstaller::handleConnectionError);
|
||||||
connect(d->installer, &QSsh::SshRemoteProcessRunner::readyReadStandardOutput,
|
connect(d->installer, &SshRemoteProcessRunner::readyReadStandardOutput,
|
||||||
this, &AbstractRemoteLinuxPackageInstaller::handleInstallerOutput);
|
this, &AbstractRemoteLinuxPackageInstaller::handleInstallerOutput);
|
||||||
connect(d->installer, &QSsh::SshRemoteProcessRunner::readyReadStandardError,
|
connect(d->installer, &SshRemoteProcessRunner::readyReadStandardError,
|
||||||
this, &AbstractRemoteLinuxPackageInstaller::handleInstallerErrorOutput);
|
this, &AbstractRemoteLinuxPackageInstaller::handleInstallerErrorOutput);
|
||||||
connect(d->installer, &QSsh::SshRemoteProcessRunner::processClosed,
|
connect(d->installer, &SshRemoteProcessRunner::processClosed,
|
||||||
this, &AbstractRemoteLinuxPackageInstaller::handleInstallationFinished);
|
this, &AbstractRemoteLinuxPackageInstaller::handleInstallationFinished);
|
||||||
|
|
||||||
QString cmdLine = installCommandLine(packageFilePath);
|
QString cmdLine = installCommandLine(packageFilePath);
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *parent, Core::I
|
|||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(ProjectExplorer::Target *parent,
|
RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Target *parent,
|
||||||
RemoteLinuxRunConfiguration *source)
|
RemoteLinuxRunConfiguration *source)
|
||||||
: AbstractRemoteLinuxRunConfiguration(parent, source),
|
: AbstractRemoteLinuxRunConfiguration(parent, source),
|
||||||
d(new RemoteLinuxRunConfigurationPrivate(source->d))
|
d(new RemoteLinuxRunConfigurationPrivate(source->d))
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class RemoteLinuxRunControl::RemoteLinuxRunControlPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool running;
|
bool running;
|
||||||
ProjectExplorer::DeviceApplicationRunner runner;
|
DeviceApplicationRunner runner;
|
||||||
IDevice::ConstPtr device;
|
IDevice::ConstPtr device;
|
||||||
QString remoteExecutable;
|
QString remoteExecutable;
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
RemoteLinuxRunControl::RemoteLinuxRunControl(RunConfiguration *rc)
|
RemoteLinuxRunControl::RemoteLinuxRunControl(RunConfiguration *rc)
|
||||||
: RunControl(rc, ProjectExplorer::NormalRunMode), d(new RemoteLinuxRunControlPrivate)
|
: RunControl(rc, NormalRunMode), d(new RemoteLinuxRunControlPrivate)
|
||||||
{
|
{
|
||||||
setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
|
setIcon(QLatin1String(ProjectExplorer::Constants::ICON_RUN_SMALL));
|
||||||
|
|
||||||
@@ -80,15 +80,15 @@ void RemoteLinuxRunControl::start()
|
|||||||
d->running = true;
|
d->running = true;
|
||||||
emit started();
|
emit started();
|
||||||
d->runner.disconnect(this);
|
d->runner.disconnect(this);
|
||||||
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::reportError,
|
connect(&d->runner, &DeviceApplicationRunner::reportError,
|
||||||
this, &RemoteLinuxRunControl::handleErrorMessage);
|
this, &RemoteLinuxRunControl::handleErrorMessage);
|
||||||
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::remoteStderr,
|
connect(&d->runner, &DeviceApplicationRunner::remoteStderr,
|
||||||
this, &RemoteLinuxRunControl::handleRemoteErrorOutput);
|
this, &RemoteLinuxRunControl::handleRemoteErrorOutput);
|
||||||
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::remoteStdout,
|
connect(&d->runner, &DeviceApplicationRunner::remoteStdout,
|
||||||
this, &RemoteLinuxRunControl::handleRemoteOutput);
|
this, &RemoteLinuxRunControl::handleRemoteOutput);
|
||||||
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::finished,
|
connect(&d->runner, &DeviceApplicationRunner::finished,
|
||||||
this, &RemoteLinuxRunControl::handleRunnerFinished);
|
this, &RemoteLinuxRunControl::handleRunnerFinished);
|
||||||
connect(&d->runner, &ProjectExplorer::DeviceApplicationRunner::reportProgress,
|
connect(&d->runner, &DeviceApplicationRunner::reportProgress,
|
||||||
this, &RemoteLinuxRunControl::handleProgressReport);
|
this, &RemoteLinuxRunControl::handleProgressReport);
|
||||||
d->runner.setEnvironment(d->environment);
|
d->runner.setEnvironment(d->environment);
|
||||||
d->runner.setWorkingDirectory(d->workingDir);
|
d->runner.setWorkingDirectory(d->workingDir);
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ RunControl *RemoteLinuxRunControlFactory::create(RunConfiguration *runConfig, Ru
|
|||||||
}
|
}
|
||||||
|
|
||||||
DebuggerStartParameters params = LinuxDeviceDebugSupport::startParameters(rc);
|
DebuggerStartParameters params = LinuxDeviceDebugSupport::startParameters(rc);
|
||||||
if (mode == ProjectExplorer::DebugRunModeWithBreakOnMain)
|
if (mode == DebugRunModeWithBreakOnMain)
|
||||||
params.breakOnMain = true;
|
params.breakOnMain = true;
|
||||||
DebuggerRunControl * const runControl
|
DebuggerRunControl * const runControl
|
||||||
= DebuggerRunControlFactory::doCreate(params, rc, errorMessage);
|
= DebuggerRunControlFactory::doCreate(params, rc, errorMessage);
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ bool TypeSpecificDeviceConfigurationListModel::deviceMatches(IDevice::ConstPtr d
|
|||||||
{
|
{
|
||||||
if (dev.isNull())
|
if (dev.isNull())
|
||||||
return false;
|
return false;
|
||||||
Core::Id typeId = ProjectExplorer::DeviceTypeKitInformation::deviceTypeId(target()->kit());
|
Core::Id typeId = DeviceTypeKitInformation::deviceTypeId(target()->kit());
|
||||||
return dev->type() == typeId;
|
return dev->type() == typeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user