forked from qt-creator/qt-creator
Qnx: Code cosmetics
Qt 5 connects, namespaces, ... Change-Id: I887f75627e4ff53f6c5bde20456b809d8f2ad463 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
#include <utils/pathchooser.h>
|
||||
#include <utils/fancylineedit.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
PathChooserDelegate::PathChooserDelegate(QObject *parent)
|
||||
: QStyledItemDelegate(parent)
|
||||
@@ -58,7 +58,7 @@ QWidget *PathChooserDelegate::createEditor(QWidget *parent, const QStyleOptionVi
|
||||
editor->setAutoFillBackground(true); // To hide the text beneath the editor widget
|
||||
editor->lineEdit()->setMinimumWidth(0);
|
||||
|
||||
connect(editor, SIGNAL(browsingFinished()), this, SLOT(emitCommitData()));
|
||||
connect(editor, &Utils::PathChooser::browsingFinished, this, &PathChooserDelegate::emitCommitData);
|
||||
|
||||
return editor;
|
||||
}
|
||||
@@ -101,3 +101,6 @@ void PathChooserDelegate::emitCommitData()
|
||||
{
|
||||
emit commitData(qobject_cast<QWidget*>(sender()));
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxAbstractRunSupport::QnxAbstractRunSupport(QnxRunConfiguration *runConfig, QObject *parent)
|
||||
: QObject(parent)
|
||||
@@ -47,8 +47,10 @@ QnxAbstractRunSupport::QnxAbstractRunSupport(QnxRunConfiguration *runConfig, QOb
|
||||
m_runner = new DeviceApplicationRunner(this);
|
||||
m_portsGatherer = new DeviceUsedPortsGatherer(this);
|
||||
|
||||
connect(m_portsGatherer, SIGNAL(error(QString)), SLOT(handleError(QString)));
|
||||
connect(m_portsGatherer, SIGNAL(portListReady()), SLOT(handlePortListReady()));
|
||||
connect(m_portsGatherer, &DeviceUsedPortsGatherer::error,
|
||||
this, &QnxAbstractRunSupport::handleError);
|
||||
connect(m_portsGatherer, &DeviceUsedPortsGatherer::portListReady,
|
||||
this, &QnxAbstractRunSupport::handlePortListReady);
|
||||
}
|
||||
|
||||
void QnxAbstractRunSupport::handleAdapterSetupRequested()
|
||||
@@ -124,3 +126,6 @@ bool QnxAbstractRunSupport::setPort(int &port)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
const QLatin1String QNXConfigDataKey("QNXConfiguration.");
|
||||
const QLatin1String QNXConfigCountKey("QNXConfiguration.Count");
|
||||
const QLatin1String QNXConfigsFileVersionKey("Version");
|
||||
@@ -52,8 +51,8 @@ QnxConfigurationManager::QnxConfigurationManager(QObject *parent)
|
||||
m_writer = new Utils::PersistentSettingsWriter(qnxConfigSettingsFileName(),
|
||||
QLatin1String("QnxConfigurations"));
|
||||
restoreConfigurations();
|
||||
connect(Core::ICore::instance(), SIGNAL(saveSettingsRequested()),
|
||||
this, SLOT(saveConfigs()));
|
||||
connect(Core::ICore::instance(), &Core::ICore::saveSettingsRequested,
|
||||
this, &QnxConfigurationManager::saveConfigs);
|
||||
}
|
||||
|
||||
QnxConfigurationManager *QnxConfigurationManager::instance()
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxDebugSupport::QnxDebugSupport(QnxRunConfiguration *runConfig, Debugger::DebuggerRunControl *runControl)
|
||||
: QnxAbstractRunSupport(runConfig, runControl)
|
||||
@@ -57,12 +57,12 @@ QnxDebugSupport::QnxDebugSupport(QnxRunConfiguration *runConfig, Debugger::Debug
|
||||
, m_useQmlDebugger(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger())
|
||||
{
|
||||
const DeviceApplicationRunner *runner = appRunner();
|
||||
connect(runner, SIGNAL(reportError(QString)), SLOT(handleError(QString)));
|
||||
connect(runner, SIGNAL(remoteProcessStarted()), SLOT(handleRemoteProcessStarted()));
|
||||
connect(runner, SIGNAL(finished(bool)), SLOT(handleRemoteProcessFinished(bool)));
|
||||
connect(runner, SIGNAL(reportProgress(QString)), SLOT(handleProgressReport(QString)));
|
||||
connect(runner, SIGNAL(remoteStdout(QByteArray)), SLOT(handleRemoteOutput(QByteArray)));
|
||||
connect(runner, SIGNAL(remoteStderr(QByteArray)), SLOT(handleRemoteOutput(QByteArray)));
|
||||
connect(runner, &DeviceApplicationRunner::reportError, this, &QnxDebugSupport::handleError);
|
||||
connect(runner, &DeviceApplicationRunner::remoteProcessStarted, this, &QnxDebugSupport::handleRemoteProcessStarted);
|
||||
connect(runner, &DeviceApplicationRunner::finished, this, &QnxDebugSupport::handleRemoteProcessFinished);
|
||||
connect(runner, &DeviceApplicationRunner::reportProgress, this, &QnxDebugSupport::handleProgressReport);
|
||||
connect(runner, &DeviceApplicationRunner::remoteStdout, this, &QnxDebugSupport::handleRemoteOutput);
|
||||
connect(runner, &DeviceApplicationRunner::remoteStderr, this, &QnxDebugSupport::handleRemoteOutput);
|
||||
|
||||
connect(m_runControl, &Debugger::DebuggerRunControl::requestRemoteSetup,
|
||||
this, &QnxDebugSupport::handleAdapterSetupRequested);
|
||||
@@ -72,10 +72,10 @@ QnxDebugSupport::QnxDebugSupport(QnxRunConfiguration *runConfig, Debugger::Debug
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
|
||||
|
||||
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
|
||||
connect(m_slog2Info, SIGNAL(output(QString,Utils::OutputFormat)), this, SLOT(handleApplicationOutput(QString,Utils::OutputFormat)));
|
||||
connect(runner, SIGNAL(remoteProcessStarted()), m_slog2Info, SLOT(start()));
|
||||
connect(m_slog2Info, &Slog2InfoRunner::output, this, &QnxDebugSupport::handleApplicationOutput);
|
||||
connect(runner, &DeviceApplicationRunner::remoteProcessStarted, m_slog2Info, &Slog2InfoRunner::start);
|
||||
if (qnxDevice->qnxVersion() > 0x060500)
|
||||
connect(m_slog2Info, SIGNAL(commandMissing()), this, SLOT(printMissingWarning()));
|
||||
connect(m_slog2Info, &Slog2InfoRunner::commandMissing, this, &QnxDebugSupport::printMissingWarning);
|
||||
}
|
||||
|
||||
void QnxDebugSupport::handleAdapterSetupRequested()
|
||||
@@ -210,3 +210,6 @@ void QnxDebugSupport::handleApplicationOutput(const QString &msg, Utils::OutputF
|
||||
if (m_runControl)
|
||||
m_runControl->showMessage(msg, Debugger::AppOutput);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -38,11 +38,13 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
using namespace QtSupport;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(const ProjectExplorer::IDevice::ConstPtr &device,
|
||||
QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(const IDevice::ConstPtr &device,
|
||||
QWidget *parent) :
|
||||
QDialog(parent),
|
||||
m_ui(new Ui::QnxDeployQtLibrariesDialog),
|
||||
@@ -67,27 +69,31 @@ QnxDeployQtLibrariesDialog::QnxDeployQtLibrariesDialog(const ProjectExplorer::ID
|
||||
m_uploadService = new RemoteLinux::GenericDirectUploadService(this);
|
||||
m_uploadService->setDevice(m_device);
|
||||
|
||||
connect(m_uploadService, SIGNAL(progressMessage(QString)), this, SLOT(updateProgress(QString)));
|
||||
connect(m_uploadService, SIGNAL(progressMessage(QString)),
|
||||
m_ui->deployLogWindow, SLOT(appendPlainText(QString)));
|
||||
connect(m_uploadService, SIGNAL(errorMessage(QString)),
|
||||
m_ui->deployLogWindow, SLOT(appendPlainText(QString)));
|
||||
connect(m_uploadService, SIGNAL(warningMessage(QString)),
|
||||
m_ui->deployLogWindow, SLOT(appendPlainText(QString)));
|
||||
connect(m_uploadService, SIGNAL(stdOutData(QString)),
|
||||
m_ui->deployLogWindow, SLOT(appendPlainText(QString)));
|
||||
connect(m_uploadService, SIGNAL(stdErrData(QString)),
|
||||
m_ui->deployLogWindow, SLOT(appendPlainText(QString)));
|
||||
connect(m_uploadService, SIGNAL(finished()), this, SLOT(handleUploadFinished()));
|
||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::progressMessage,
|
||||
this, &QnxDeployQtLibrariesDialog::updateProgress);
|
||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::progressMessage,
|
||||
m_ui->deployLogWindow, &QPlainTextEdit::appendPlainText);
|
||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::errorMessage,
|
||||
m_ui->deployLogWindow, &QPlainTextEdit::appendPlainText);
|
||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::warningMessage,
|
||||
m_ui->deployLogWindow, &QPlainTextEdit::appendPlainText);
|
||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::stdOutData,
|
||||
m_ui->deployLogWindow, &QPlainTextEdit::appendPlainText);
|
||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::stdErrData,
|
||||
m_ui->deployLogWindow, &QPlainTextEdit::appendPlainText);
|
||||
connect(m_uploadService, &AbstractRemoteLinuxDeployService::finished,
|
||||
this, &QnxDeployQtLibrariesDialog::handleUploadFinished);
|
||||
|
||||
m_processRunner = new QSsh::SshRemoteProcessRunner(this);
|
||||
connect(m_processRunner, SIGNAL(connectionError()),
|
||||
this, SLOT(handleRemoteProcessError()));
|
||||
connect(m_processRunner, SIGNAL(processClosed(int)),
|
||||
this, SLOT(handleRemoteProcessCompleted()));
|
||||
connect(m_processRunner, &QSsh::SshRemoteProcessRunner::connectionError,
|
||||
this, &QnxDeployQtLibrariesDialog::handleRemoteProcessError);
|
||||
connect(m_processRunner, &QSsh::SshRemoteProcessRunner::processClosed,
|
||||
this, &QnxDeployQtLibrariesDialog::handleRemoteProcessCompleted);
|
||||
|
||||
connect(m_ui->deployButton, SIGNAL(clicked()), this, SLOT(deployLibraries()));
|
||||
connect(m_ui->closeButton, SIGNAL(clicked()), this, SLOT(close()));
|
||||
connect(m_ui->deployButton, &QAbstractButton::clicked,
|
||||
this, &QnxDeployQtLibrariesDialog::deployLibraries);
|
||||
connect(m_ui->closeButton, &QAbstractButton::clicked,
|
||||
this, &QWidget::close);
|
||||
}
|
||||
|
||||
QnxDeployQtLibrariesDialog::~QnxDeployQtLibrariesDialog()
|
||||
@@ -147,7 +153,7 @@ void QnxDeployQtLibrariesDialog::startUpload()
|
||||
|
||||
m_state = Uploading;
|
||||
|
||||
QList<ProjectExplorer::DeployableFile> filesToUpload = gatherFiles();
|
||||
QList<DeployableFile> filesToUpload = gatherFiles();
|
||||
|
||||
m_ui->deployProgress->setRange(0, filesToUpload.count());
|
||||
|
||||
@@ -214,9 +220,9 @@ void QnxDeployQtLibrariesDialog::handleRemoteProcessCompleted()
|
||||
}
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
|
||||
QList<DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
|
||||
{
|
||||
QList<ProjectExplorer::DeployableFile> result;
|
||||
QList<DeployableFile> result;
|
||||
|
||||
const int qtVersionId =
|
||||
m_ui->qtLibraryCombo->itemData(m_ui->qtLibraryCombo->currentIndex()).toInt();
|
||||
@@ -243,10 +249,10 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles()
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles(
|
||||
QList<DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles(
|
||||
const QString &dirPath, const QString &baseDirPath, const QStringList &nameFilters)
|
||||
{
|
||||
QList<ProjectExplorer::DeployableFile> result;
|
||||
QList<DeployableFile> result;
|
||||
if (dirPath.isEmpty())
|
||||
return result;
|
||||
|
||||
@@ -270,7 +276,7 @@ QList<ProjectExplorer::DeployableFile> QnxDeployQtLibrariesDialog::gatherFiles(
|
||||
remoteDir = fullRemoteDirectory() + QLatin1Char('/') +
|
||||
baseDir.relativeFilePath(dirPath);
|
||||
}
|
||||
result.append(ProjectExplorer::DeployableFile(fileInfo.absoluteFilePath(), remoteDir));
|
||||
result.append(DeployableFile(fileInfo.absoluteFilePath(), remoteDir));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ void QnxDeviceConfiguration::updateVersionNumber() const
|
||||
{
|
||||
QEventLoop eventLoop;
|
||||
SshDeviceProcess versionNumberProcess(sharedFromThis());
|
||||
QObject::connect(&versionNumberProcess, SIGNAL(finished()), &eventLoop, SLOT(quit()));
|
||||
QObject::connect(&versionNumberProcess, SIGNAL(error(QProcess::ProcessError)), &eventLoop, SLOT(quit()));
|
||||
QObject::connect(&versionNumberProcess, &SshDeviceProcess::finished, &eventLoop, &QEventLoop::quit);
|
||||
QObject::connect(&versionNumberProcess, &DeviceProcess::error, &eventLoop, &QEventLoop::quit);
|
||||
|
||||
StandardRunnable r;
|
||||
r.executable = QLatin1String("uname");
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
#include <ssh/sshremoteprocessrunner.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxDeviceTester::QnxDeviceTester(QObject *parent)
|
||||
: ProjectExplorer::DeviceTester(parent)
|
||||
@@ -39,14 +39,18 @@ QnxDeviceTester::QnxDeviceTester(QObject *parent)
|
||||
, m_currentCommandIndex(-1)
|
||||
{
|
||||
m_genericTester = new RemoteLinux::GenericLinuxDeviceTester(this);
|
||||
connect(m_genericTester, SIGNAL(progressMessage(QString)), SIGNAL(progressMessage(QString)));
|
||||
connect(m_genericTester, SIGNAL(errorMessage(QString)), SIGNAL(errorMessage(QString)));
|
||||
connect(m_genericTester, SIGNAL(finished(ProjectExplorer::DeviceTester::TestResult)),
|
||||
SLOT(handleGenericTestFinished(ProjectExplorer::DeviceTester::TestResult)));
|
||||
connect(m_genericTester, &DeviceTester::progressMessage,
|
||||
this, &DeviceTester::progressMessage);
|
||||
connect(m_genericTester, &DeviceTester::errorMessage,
|
||||
this, &DeviceTester::errorMessage);
|
||||
connect(m_genericTester, &DeviceTester::finished,
|
||||
this, &QnxDeviceTester::handleGenericTestFinished);
|
||||
|
||||
m_processRunner = new QSsh::SshRemoteProcessRunner(this);
|
||||
connect(m_processRunner, SIGNAL(connectionError()), SLOT(handleConnectionError()));
|
||||
connect(m_processRunner, SIGNAL(processClosed(int)), SLOT(handleProcessFinished(int)));
|
||||
connect(m_processRunner, &QSsh::SshRemoteProcessRunner::connectionError,
|
||||
this, &QnxDeviceTester::handleConnectionError);
|
||||
connect(m_processRunner, &QSsh::SshRemoteProcessRunner::processClosed,
|
||||
this, &QnxDeviceTester::handleProcessFinished);
|
||||
|
||||
m_commandsToTest << QLatin1String("awk")
|
||||
<< QLatin1String("grep")
|
||||
@@ -168,3 +172,6 @@ QStringList QnxDeviceTester::versionSpecificCommandsToTest(int versionNumber) co
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -86,7 +86,7 @@ void QnxPlugin::extensionsInitialized()
|
||||
|
||||
m_attachToQnxApplication = new QAction(this);
|
||||
m_attachToQnxApplication->setText(tr("Attach to remote QNX application..."));
|
||||
connect(m_attachToQnxApplication, SIGNAL(triggered()), debugSupport, SLOT(showProcessesDialog()));
|
||||
connect(m_attachToQnxApplication, &QAction::triggered, debugSupport, &QnxAttachDebugSupport::showProcessesDialog);
|
||||
|
||||
Core::ActionContainer *mstart = Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
|
||||
mstart->appendGroup(Constants::QNX_DEBUGGING_GROUP);
|
||||
@@ -95,7 +95,7 @@ void QnxPlugin::extensionsInitialized()
|
||||
Core::Command *cmd = Core::ActionManager::registerAction(m_attachToQnxApplication, "Debugger.AttachToQnxApplication");
|
||||
mstart->addAction(cmd, Constants::QNX_DEBUGGING_GROUP);
|
||||
|
||||
connect(KitManager::instance(), SIGNAL(kitsChanged()), this, SLOT(updateDebuggerActions()));
|
||||
connect(KitManager::instance(), &KitManager::kitsChanged, this, &QnxPlugin::updateDebuggerActions);
|
||||
}
|
||||
|
||||
ExtensionSystem::IPlugin::ShutdownFlag QnxPlugin::aboutToShutdown()
|
||||
|
||||
@@ -32,29 +32,33 @@
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
using namespace Qnx;
|
||||
using namespace Qnx::Internal;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace RemoteLinux;
|
||||
using namespace Utils;
|
||||
|
||||
QnxRunControl::QnxRunControl(ProjectExplorer::RunConfiguration *runConfig)
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
QnxRunControl::QnxRunControl(RunConfiguration *runConfig)
|
||||
: RemoteLinuxRunControl(runConfig)
|
||||
, m_slog2Info(0)
|
||||
{
|
||||
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(runConfig->target()->kit());
|
||||
IDevice::ConstPtr dev = DeviceKitInformation::device(runConfig->target()->kit());
|
||||
QnxDeviceConfiguration::ConstPtr qnxDevice = dev.dynamicCast<const QnxDeviceConfiguration>();
|
||||
|
||||
QnxRunConfiguration *qnxRunConfig = qobject_cast<QnxRunConfiguration *>(runConfig);
|
||||
QTC_CHECK(qnxRunConfig);
|
||||
|
||||
const QString applicationId = Utils::FileName::fromString(qnxRunConfig->remoteExecutableFilePath()).fileName();
|
||||
const QString applicationId = FileName::fromString(qnxRunConfig->remoteExecutableFilePath()).fileName();
|
||||
m_slog2Info = new Slog2InfoRunner(applicationId, qnxDevice, this);
|
||||
connect(m_slog2Info, SIGNAL(output(QString,Utils::OutputFormat)), this, SLOT(appendMessage(QString,Utils::OutputFormat)));
|
||||
connect(this, SIGNAL(started()), m_slog2Info, SLOT(start()));
|
||||
connect(m_slog2Info, &Slog2InfoRunner::output,
|
||||
this, static_cast<void(RunControl::*)(const QString &, OutputFormat)>(&RunControl::appendMessage));
|
||||
connect(this, &RunControl::started, m_slog2Info, &Slog2InfoRunner::start);
|
||||
if (qnxDevice->qnxVersion() > 0x060500)
|
||||
connect(m_slog2Info, SIGNAL(commandMissing()), this, SLOT(printMissingWarning()));
|
||||
connect(m_slog2Info, &Slog2InfoRunner::commandMissing, this, &QnxRunControl::printMissingWarning);
|
||||
}
|
||||
|
||||
ProjectExplorer::RunControl::StopResult QnxRunControl::stop()
|
||||
RunControl::StopResult QnxRunControl::stop()
|
||||
{
|
||||
m_slog2Info->stop();
|
||||
return RemoteLinuxRunControl::stop();
|
||||
@@ -62,5 +66,8 @@ ProjectExplorer::RunControl::StopResult QnxRunControl::stop()
|
||||
|
||||
void QnxRunControl::printMissingWarning()
|
||||
{
|
||||
appendMessage(tr("Warning: \"slog2info\" is not found on the device, debug output not available."), Utils::ErrorMessageFormat);
|
||||
appendMessage(tr("Warning: \"slog2info\" is not found on the device, debug output not available."), ErrorMessageFormat);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Qnx
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
@@ -47,19 +45,19 @@ QnxSettingsWidget::QnxSettingsWidget(QWidget *parent) :
|
||||
m_ui->setupUi(this);
|
||||
|
||||
populateConfigsCombo();
|
||||
connect(m_ui->addButton, SIGNAL(clicked()),
|
||||
this, SLOT(addConfiguration()));
|
||||
connect(m_ui->removeButton, SIGNAL(clicked()),
|
||||
this, SLOT(removeConfiguration()));
|
||||
connect(m_ui->configsCombo, SIGNAL(currentIndexChanged(QString)),
|
||||
this, SLOT(updateInformation()));
|
||||
connect(m_ui->generateKitsCheckBox, SIGNAL(toggled(bool)),
|
||||
this, SLOT(generateKits(bool)));
|
||||
connect(m_qnxConfigManager, SIGNAL(configurationsListUpdated()),
|
||||
this, SLOT(populateConfigsCombo()));
|
||||
connect(m_ui->addButton, &QAbstractButton::clicked,
|
||||
this, &QnxSettingsWidget::addConfiguration);
|
||||
connect(m_ui->removeButton, &QAbstractButton::clicked,
|
||||
this, &QnxSettingsWidget::removeConfiguration);
|
||||
connect(m_ui->configsCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||
this, &QnxSettingsWidget::updateInformation);
|
||||
connect(m_ui->generateKitsCheckBox, &QAbstractButton::toggled,
|
||||
this, &QnxSettingsWidget::generateKits);
|
||||
connect(m_qnxConfigManager, &QnxConfigurationManager::configurationsListUpdated,
|
||||
this, &QnxSettingsWidget::populateConfigsCombo);
|
||||
connect(QtSupport::QtVersionManager::instance(),
|
||||
SIGNAL(qtVersionsChanged(QList<int>,QList<int>,QList<int>)),
|
||||
this, SLOT(updateInformation()));
|
||||
&QtSupport::QtVersionManager::qtVersionsChanged,
|
||||
this, &QnxSettingsWidget::updateInformation);
|
||||
}
|
||||
|
||||
QnxSettingsWidget::~QnxSettingsWidget()
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <QFormLayout>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Qnx {
|
||||
namespace Internal {
|
||||
|
||||
@@ -46,10 +48,10 @@ static const QList<Abi> qccSupportedAbis()
|
||||
return abis;
|
||||
}
|
||||
|
||||
static void setQnxEnvironment(Utils::Environment &env, const QList<Utils::EnvironmentItem> &qnxEnv)
|
||||
static void setQnxEnvironment(Environment &env, const QList<EnvironmentItem> &qnxEnv)
|
||||
{
|
||||
// We only need to set QNX_HOST and QNX_TARGET needed when running qcc
|
||||
foreach (const Utils::EnvironmentItem &item, qnxEnv) {
|
||||
foreach (const EnvironmentItem &item, qnxEnv) {
|
||||
if (item.name == QLatin1String("QNX_HOST") ||
|
||||
item.name == QLatin1String("QNX_TARGET") )
|
||||
env.set(item.name, item.value);
|
||||
@@ -70,7 +72,7 @@ ToolChainConfigWidget *QnxToolChain::configurationWidget()
|
||||
return new QnxToolChainConfigWidget(this);
|
||||
}
|
||||
|
||||
void QnxToolChain::addToEnvironment(Utils::Environment &env) const
|
||||
void QnxToolChain::addToEnvironment(Environment &env) const
|
||||
{
|
||||
if (env.value(QLatin1String("QNX_HOST")).isEmpty()
|
||||
|| env.value(QLatin1String("QNX_TARGET")).isEmpty())
|
||||
@@ -79,12 +81,12 @@ void QnxToolChain::addToEnvironment(Utils::Environment &env) const
|
||||
GccToolChain::addToEnvironment(env);
|
||||
}
|
||||
|
||||
Utils::FileNameList QnxToolChain::suggestedMkspecList() const
|
||||
FileNameList QnxToolChain::suggestedMkspecList() const
|
||||
{
|
||||
Utils::FileNameList mkspecList;
|
||||
mkspecList << Utils::FileName::fromLatin1("qnx-armv7le-qcc");
|
||||
mkspecList << Utils::FileName::fromLatin1("qnx-armle-v7-qcc");
|
||||
mkspecList << Utils::FileName::fromLatin1("qnx-x86-qcc");
|
||||
FileNameList mkspecList;
|
||||
mkspecList << FileName::fromLatin1("qnx-armv7le-qcc");
|
||||
mkspecList << FileName::fromLatin1("qnx-armle-v7-qcc");
|
||||
mkspecList << FileName::fromLatin1("qnx-x86-qcc");
|
||||
|
||||
return mkspecList;
|
||||
}
|
||||
@@ -179,16 +181,16 @@ ToolChain *QnxToolChainFactory::create()
|
||||
|
||||
QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc)
|
||||
: ToolChainConfigWidget(tc)
|
||||
, m_compilerCommand(new Utils::PathChooser)
|
||||
, m_ndkPath(new Utils::PathChooser)
|
||||
, m_compilerCommand(new PathChooser)
|
||||
, m_ndkPath(new PathChooser)
|
||||
, m_abiWidget(new AbiWidget)
|
||||
{
|
||||
m_compilerCommand->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
||||
m_compilerCommand->setExpectedKind(PathChooser::ExistingCommand);
|
||||
m_compilerCommand->setHistoryCompleter(QLatin1String("Qnx.ToolChain.History"));
|
||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
||||
m_compilerCommand->setEnabled(!tc->isAutoDetected());
|
||||
|
||||
m_ndkPath->setExpectedKind(Utils::PathChooser::ExistingDirectory);
|
||||
m_ndkPath->setExpectedKind(PathChooser::ExistingDirectory);
|
||||
m_ndkPath->setHistoryCompleter(QLatin1String("Qnx.Ndk.History"));
|
||||
m_ndkPath->setPath(tc->ndkPath());
|
||||
m_ndkPath->setEnabled(!tc->isAutoDetected());
|
||||
@@ -201,9 +203,9 @@ QnxToolChainConfigWidget::QnxToolChainConfigWidget(QnxToolChain *tc)
|
||||
m_mainLayout->addRow(tr("NDK/SDP path:"), m_ndkPath);
|
||||
m_mainLayout->addRow(tr("&ABI:"), m_abiWidget);
|
||||
|
||||
connect(m_compilerCommand, SIGNAL(rawPathChanged(QString)), this, SIGNAL(dirty()));
|
||||
connect(m_ndkPath, SIGNAL(rawPathChanged(QString)), this, SIGNAL(dirty()));
|
||||
connect(m_abiWidget, SIGNAL(abiChanged()), this, SIGNAL(dirty()));
|
||||
connect(m_compilerCommand, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
|
||||
connect(m_ndkPath, &PathChooser::rawPathChanged, this, &ToolChainConfigWidget::dirty);
|
||||
connect(m_abiWidget, &AbiWidget::abiChanged, this, &ToolChainConfigWidget::dirty);
|
||||
}
|
||||
|
||||
void QnxToolChainConfigWidget::applyImpl()
|
||||
|
||||
@@ -47,17 +47,17 @@ Slog2InfoRunner::Slog2InfoRunner(const QString &applicationId,
|
||||
m_applicationId.truncate(63);
|
||||
|
||||
m_testProcess = new QnxDeviceProcess(device, this);
|
||||
connect(m_testProcess, &ProjectExplorer::DeviceProcess::finished, this, &Slog2InfoRunner::handleTestProcessCompleted);
|
||||
connect(m_testProcess, &DeviceProcess::finished, this, &Slog2InfoRunner::handleTestProcessCompleted);
|
||||
|
||||
m_launchDateTimeProcess = new ProjectExplorer::SshDeviceProcess(device, this);
|
||||
connect(m_launchDateTimeProcess, &ProjectExplorer::DeviceProcess::finished, this, &Slog2InfoRunner::launchSlog2Info);
|
||||
m_launchDateTimeProcess = new SshDeviceProcess(device, this);
|
||||
connect(m_launchDateTimeProcess, &DeviceProcess::finished, this, &Slog2InfoRunner::launchSlog2Info);
|
||||
|
||||
m_logProcess = new QnxDeviceProcess(device, this);
|
||||
connect(m_logProcess, &ProjectExplorer::DeviceProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput);
|
||||
connect(m_logProcess, &ProjectExplorer::DeviceProcess::readyReadStandardError, this, &Slog2InfoRunner::readLogStandardError);
|
||||
connect(m_logProcess, &ProjectExplorer::DeviceProcess::error, this, &Slog2InfoRunner::handleLogError);
|
||||
connect(m_logProcess, &ProjectExplorer::DeviceProcess::started, this, &Slog2InfoRunner::started);
|
||||
connect(m_logProcess, &ProjectExplorer::DeviceProcess::finished, this, &Slog2InfoRunner::finished);
|
||||
connect(m_logProcess, &DeviceProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput);
|
||||
connect(m_logProcess, &DeviceProcess::readyReadStandardError, this, &Slog2InfoRunner::readLogStandardError);
|
||||
connect(m_logProcess, &DeviceProcess::error, this, &Slog2InfoRunner::handleLogError);
|
||||
connect(m_logProcess, &DeviceProcess::started, this, &Slog2InfoRunner::started);
|
||||
connect(m_logProcess, &DeviceProcess::finished, this, &Slog2InfoRunner::finished);
|
||||
}
|
||||
|
||||
void Slog2InfoRunner::start()
|
||||
|
||||
@@ -68,6 +68,7 @@ signals:
|
||||
void warningMessage(const QString &message);
|
||||
void stdOutData(const QString &data);
|
||||
void stdErrData(const QString &data);
|
||||
void finished(); // Used by Qnx.
|
||||
|
||||
protected:
|
||||
const ProjectExplorer::Target *target() const;
|
||||
@@ -86,8 +87,6 @@ private slots:
|
||||
void handleConnectionFailure();
|
||||
|
||||
private:
|
||||
Q_SIGNAL void finished();
|
||||
|
||||
virtual bool isDeploymentNecessary() const = 0;
|
||||
|
||||
// Should do things needed *before* connecting. Call handleDeviceSetupDone() afterwards.
|
||||
|
||||
Reference in New Issue
Block a user