本文整理汇总了C++中idevice::ConstPtr::sshParameters方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstPtr::sshParameters方法的具体用法?C++ ConstPtr::sshParameters怎么用?C++ ConstPtr::sshParameters使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idevice::ConstPtr
的用法示例。
在下文中一共展示了ConstPtr::sshParameters方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createDebuggerStartParameters
static DebuggerStartParameters createDebuggerStartParameters(QnxRunConfiguration *runConfig)
{
DebuggerStartParameters params;
Target *target = runConfig->target();
Kit *k = target->kit();
const IDevice::ConstPtr device = DeviceKitInformation::device(k);
if (device.isNull())
return params;
params.startMode = AttachToRemoteServer;
params.useCtrlCStub = true;
params.inferior.executable = runConfig->localExecutableFilePath();
params.remoteExecutable = runConfig->remoteExecutableFilePath();
params.remoteChannel = device->sshParameters().host + QLatin1String(":-1");
params.remoteSetupNeeded = true;
params.closeMode = KillAtClose;
params.inferior.commandLineArguments = runConfig->arguments();
auto aspect = runConfig->extraAspect<DebuggerRunConfigurationAspect>();
if (aspect->useQmlDebugger()) {
params.qmlServerAddress = device->sshParameters().host;
params.qmlServerPort = 0; // QML port is handed out later
}
auto qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
if (qtVersion)
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
return params;
}
示例2: createDebuggerStartParameters
static DebuggerStartParameters createDebuggerStartParameters(QnxRunConfiguration *runConfig)
{
DebuggerStartParameters params;
Target *target = runConfig->target();
Kit *k = target->kit();
const IDevice::ConstPtr device = DeviceKitInformation::device(k);
if (device.isNull())
return params;
params.startMode = AttachToRemoteServer;
params.debuggerCommand = DebuggerKitInformation::debuggerCommand(k).toString();
params.sysRoot = SysRootKitInformation::sysRoot(k).toString();
params.useCtrlCStub = true;
params.runConfiguration = runConfig;
if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
params.toolChainAbi = tc->targetAbi();
params.executable = runConfig->localExecutableFilePath();
params.remoteExecutable = runConfig->remoteExecutableFilePath();
params.remoteChannel = device->sshParameters().host + QLatin1String(":-1");
params.displayName = runConfig->displayName();
params.remoteSetupNeeded = true;
params.closeMode = KillAtClose;
params.processArgs = runConfig->arguments().join(QLatin1Char(' '));
DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<DebuggerRunConfigurationAspect>();
if (aspect->useQmlDebugger()) {
params.languages |= QmlLanguage;
params.qmlServerAddress = device->sshParameters().host;
params.qmlServerPort = 0; // QML port is handed out later
}
if (aspect->useCppDebugger())
params.languages |= CppLanguage;
if (const Project *project = runConfig->target()->project()) {
params.projectSourceDirectory = project->projectDirectory().toString();
if (const BuildConfiguration *buildConfig = runConfig->target()->activeBuildConfiguration())
params.projectBuildDirectory = buildConfig->buildDirectory().toString();
params.projectSourceFiles = project->files(Project::ExcludeGeneratedFiles);
}
QnxQtVersion *qtVersion =
dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k));
if (qtVersion)
params.solibSearchPath = QnxUtils::searchPaths(qtVersion);
return params;
}
示例3: QDialog
StartRemoteDialog::StartRemoteDialog(QWidget *parent)
: QDialog(parent)
, d(new Internal::StartRemoteDialogPrivate)
{
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Remote Analysis"));
d->kitChooser = new KitChooser(this);
d->kitChooser->setKitPredicate([](const Kit *kit) {
const IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return kit->isValid() && device && !device->sshParameters().host().isEmpty();
});
d->executable = new QLineEdit(this);
d->arguments = new QLineEdit(this);
d->workingDirectory = new QLineEdit(this);
d->buttonBox = new QDialogButtonBox(this);
d->buttonBox->setOrientation(Qt::Horizontal);
d->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);
QFormLayout *formLayout = new QFormLayout;
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
formLayout->addRow(tr("Kit:"), d->kitChooser);
formLayout->addRow(tr("Executable:"), d->executable);
formLayout->addRow(tr("Arguments:"), d->arguments);
formLayout->addRow(tr("Working directory:"), d->workingDirectory);
QVBoxLayout *verticalLayout = new QVBoxLayout(this);
verticalLayout->addLayout(formLayout);
verticalLayout->addWidget(d->buttonBox);
QSettings *settings = Core::ICore::settings();
settings->beginGroup(QLatin1String("AnalyzerStartRemoteDialog"));
d->kitChooser->populate();
d->kitChooser->setCurrentKitId(Core::Id::fromSetting(settings->value(QLatin1String("profile"))));
d->executable->setText(settings->value(QLatin1String("executable")).toString());
d->workingDirectory->setText(settings->value(QLatin1String("workingDirectory")).toString());
d->arguments->setText(settings->value(QLatin1String("arguments")).toString());
settings->endGroup();
connect(d->kitChooser, &KitChooser::activated, this, &StartRemoteDialog::validate);
connect(d->executable, &QLineEdit::textChanged, this, &StartRemoteDialog::validate);
connect(d->workingDirectory, &QLineEdit::textChanged, this, &StartRemoteDialog::validate);
connect(d->arguments, &QLineEdit::textChanged, this, &StartRemoteDialog::validate);
connect(d->buttonBox, &QDialogButtonBox::accepted, this, &StartRemoteDialog::accept);
connect(d->buttonBox, &QDialogButtonBox::rejected, this, &StartRemoteDialog::reject);
validate();
}
示例4: startRemoteTool
void QmlProfilerTool::startRemoteTool(ProjectExplorer::RunConfiguration *rc)
{
Id kitId;
quint16 port;
Kit *kit = 0;
{
QSettings *settings = ICore::settings();
kitId = Id::fromSetting(settings->value(QLatin1String("AnalyzerQmlAttachDialog/kitId")));
port = settings->value(QLatin1String("AnalyzerQmlAttachDialog/port"), 3768).toUInt();
QmlProfilerAttachDialog dialog;
dialog.setKitId(kitId);
dialog.setPort(port);
if (dialog.exec() != QDialog::Accepted)
return;
kit = dialog.kit();
port = dialog.port();
settings->setValue(QLatin1String("AnalyzerQmlAttachDialog/kitId"), kit->id().toSetting());
settings->setValue(QLatin1String("AnalyzerQmlAttachDialog/port"), port);
}
AnalyzerConnection connection;
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
if (device) {
Connection toolControl = device->toolControlChannel(IDevice::QmlControlChannel);
QTC_ASSERT(toolControl.is<HostName>(), return);
connection.analyzerHost = toolControl.as<HostName>().host();
connection.connParams = device->sshParameters();
}
connection.analyzerPort = Utils::Port(port);
auto runControl = qobject_cast<QmlProfilerRunControl *>(createRunControl(rc));
runControl->setConnection(connection);
ProjectExplorerPlugin::startRunControl(runControl, ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
}
示例5: QProgressDialog
PublicKeyDeploymentDialog::PublicKeyDeploymentDialog(const IDevice::ConstPtr &deviceConfig,
const QString &publicKeyFileName, QWidget *parent)
: QProgressDialog(parent), d(new PublicKeyDeploymentDialogPrivate)
{
setAutoReset(false);
setAutoClose(false);
setMinimumDuration(0);
setMaximum(1);
d->done = false;
setLabelText(tr("Deploying..."));
setValue(0);
connect(this, &PublicKeyDeploymentDialog::canceled,
this, &PublicKeyDeploymentDialog::handleCanceled);
connect(&d->keyDeployer, &SshKeyDeployer::error,
this, &PublicKeyDeploymentDialog::handleDeploymentError);
connect(&d->keyDeployer, &SshKeyDeployer::finishedSuccessfully,
this, &PublicKeyDeploymentDialog::handleDeploymentSuccess);
d->keyDeployer.deployPublicKey(deviceConfig->sshParameters(), publicKeyFileName);
}
示例6: sshParams
QSsh::SshConnectionParameters StartRemoteDialog::sshParams() const
{
Kit *kit = d->kitChooser->currentKit();
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return device->sshParameters();
}
示例7: kitMatches
bool kitMatches(const Kit *kit) const {
if (!KitChooser::kitMatches(kit))
return false;
const IDevice::ConstPtr device = DeviceKitInformation::device(kit);
return device && !device->sshParameters().host.isEmpty();
}