forked from qt-creator/qt-creator
Maemo: Rename some classes.
All our classes should have the Maemo prefix because we don't have a namespace of our own.
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "maemodeployablelistmodel.h"
|
||||
|
||||
#include "profilewrapper.h"
|
||||
#include "maemoprofilewrapper.h"
|
||||
|
||||
#include <qt4projectmanager/qt4nodes.h>
|
||||
|
||||
@@ -45,7 +45,7 @@ MaemoDeployableListModel::MaemoDeployableListModel(const Qt4ProFileNode *proFile
|
||||
: QAbstractTableModel(parent),
|
||||
m_proFileNode(proFileNode),
|
||||
m_modified(false),
|
||||
m_proFileWrapper(new ProFileWrapper(m_proFileNode->path(), proFileOption))
|
||||
m_proFileWrapper(new MaemoProFileWrapper(m_proFileNode->path(), proFileOption))
|
||||
{
|
||||
buildModel();
|
||||
}
|
||||
@@ -56,7 +56,7 @@ bool MaemoDeployableListModel::buildModel()
|
||||
{
|
||||
m_deployables.clear();
|
||||
|
||||
const ProFileWrapper::InstallsList &installs = m_proFileWrapper->installs();
|
||||
const MaemoProFileWrapper::InstallsList &installs = m_proFileWrapper->installs();
|
||||
if (installs.targetPath.isEmpty()) {
|
||||
const QString remoteDir = m_proFileNode->projectType() == LibraryTemplate
|
||||
? QLatin1String("/usr/local/lib")
|
||||
@@ -79,7 +79,7 @@ bool MaemoDeployableListModel::buildModel()
|
||||
m_deployables.prepend(MaemoDeployable(localExecutableFilePath(),
|
||||
installs.targetPath));
|
||||
}
|
||||
foreach (const ProFileWrapper::InstallsElem &elem, installs.normalElems) {
|
||||
foreach (const MaemoProFileWrapper::InstallsElem &elem, installs.normalElems) {
|
||||
foreach (const QString &file, elem.files) {
|
||||
m_deployables << MaemoDeployable(m_proFileWrapper->absFilePath(file),
|
||||
elem.path);
|
||||
|
||||
@@ -45,7 +45,7 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
class ProFileWrapper;
|
||||
class MaemoProFileWrapper;
|
||||
class Qt4ProFileNode;
|
||||
|
||||
class MaemoDeployableListModel : public QAbstractTableModel
|
||||
@@ -83,7 +83,7 @@ private:
|
||||
const Qt4ProFileNode * const m_proFileNode;
|
||||
QList<MaemoDeployable> m_deployables;
|
||||
mutable bool m_modified;
|
||||
const QScopedPointer<ProFileWrapper> m_proFileWrapper;
|
||||
const QScopedPointer<MaemoProFileWrapper> m_proFileWrapper;
|
||||
};
|
||||
|
||||
} // namespace Qt4ProjectManager
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "deviceenvreader.h"
|
||||
#include "maemodeviceenvreader.h"
|
||||
|
||||
#include "maemorunconfiguration.h"
|
||||
|
||||
#include <coreplugin/ssh/sshconnection.h>
|
||||
@@ -41,7 +42,7 @@
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
DeviceEnvReader::DeviceEnvReader(QObject *parent, MaemoRunConfiguration *config)
|
||||
MaemoDeviceEnvReader::MaemoDeviceEnvReader(QObject *parent, MaemoRunConfiguration *config)
|
||||
: QObject(parent)
|
||||
, m_stop(false)
|
||||
, m_runConfig(config)
|
||||
@@ -49,11 +50,11 @@ DeviceEnvReader::DeviceEnvReader(QObject *parent, MaemoRunConfiguration *config)
|
||||
{
|
||||
}
|
||||
|
||||
DeviceEnvReader::~DeviceEnvReader()
|
||||
MaemoDeviceEnvReader::~MaemoDeviceEnvReader()
|
||||
{
|
||||
}
|
||||
|
||||
void DeviceEnvReader::start()
|
||||
void MaemoDeviceEnvReader::start()
|
||||
{
|
||||
m_stop = false;
|
||||
if (m_connection)
|
||||
@@ -77,7 +78,7 @@ void DeviceEnvReader::start()
|
||||
m_connection->connectToHost(m_devConfig.server);
|
||||
}
|
||||
|
||||
void DeviceEnvReader::stop()
|
||||
void MaemoDeviceEnvReader::stop()
|
||||
{
|
||||
m_stop = true;
|
||||
disconnect(m_connection.data(), 0, this, 0);
|
||||
@@ -88,7 +89,7 @@ void DeviceEnvReader::stop()
|
||||
}
|
||||
}
|
||||
|
||||
void DeviceEnvReader::setEnvironment()
|
||||
void MaemoDeviceEnvReader::setEnvironment()
|
||||
{
|
||||
if (m_remoteOutput.isEmpty() && !m_runConfig.isNull())
|
||||
return;
|
||||
@@ -96,7 +97,7 @@ void DeviceEnvReader::setEnvironment()
|
||||
QString::SkipEmptyParts));
|
||||
}
|
||||
|
||||
void DeviceEnvReader::executeRemoteCall()
|
||||
void MaemoDeviceEnvReader::executeRemoteCall()
|
||||
{
|
||||
if (m_stop)
|
||||
return;
|
||||
@@ -115,14 +116,14 @@ void DeviceEnvReader::executeRemoteCall()
|
||||
m_remoteProcess->start();
|
||||
}
|
||||
|
||||
void DeviceEnvReader::handleConnectionFailure()
|
||||
void MaemoDeviceEnvReader::handleConnectionFailure()
|
||||
{
|
||||
emit error(tr("Could not connect to host: %1")
|
||||
.arg(m_connection->errorString()));
|
||||
emit finished();
|
||||
}
|
||||
|
||||
void DeviceEnvReader::remoteProcessFinished(int exitCode)
|
||||
void MaemoDeviceEnvReader::remoteProcessFinished(int exitCode)
|
||||
{
|
||||
Q_ASSERT(exitCode == Core::SshRemoteProcess::FailedToStart
|
||||
|| exitCode == Core::SshRemoteProcess::KilledBySignal
|
||||
@@ -140,12 +141,12 @@ void DeviceEnvReader::remoteProcessFinished(int exitCode)
|
||||
emit finished();
|
||||
}
|
||||
|
||||
void DeviceEnvReader::remoteOutput(const QByteArray &data)
|
||||
void MaemoDeviceEnvReader::remoteOutput(const QByteArray &data)
|
||||
{
|
||||
m_remoteOutput.append(QString::fromUtf8(data));
|
||||
}
|
||||
|
||||
void DeviceEnvReader::remoteErrorOutput(const QByteArray &data)
|
||||
void MaemoDeviceEnvReader::remoteErrorOutput(const QByteArray &data)
|
||||
{
|
||||
emit error(data);
|
||||
}
|
||||
@@ -35,12 +35,13 @@
|
||||
#ifndef DEVICEENVREADER_H
|
||||
#define DEVICEENVREADER_H
|
||||
|
||||
#include "maemodeviceconfigurations.h"
|
||||
|
||||
#include <projectexplorer/environment.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointer>
|
||||
|
||||
#include "maemodeviceconfigurations.h"
|
||||
#include <projectexplorer/environment.h>
|
||||
|
||||
namespace Core {
|
||||
class SshConnection;
|
||||
class SshRemoteProcess;
|
||||
@@ -51,12 +52,12 @@ namespace Qt4ProjectManager {
|
||||
|
||||
class MaemoRunConfiguration;
|
||||
|
||||
class DeviceEnvReader : public QObject
|
||||
class MaemoDeviceEnvReader : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DeviceEnvReader(QObject *parent, MaemoRunConfiguration *config);
|
||||
~DeviceEnvReader();
|
||||
MaemoDeviceEnvReader(QObject *parent, MaemoRunConfiguration *config);
|
||||
~MaemoDeviceEnvReader();
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
@@ -82,9 +83,8 @@ private:
|
||||
bool m_stop;
|
||||
QString m_remoteOutput;
|
||||
ProjectExplorer::Environment m_env;
|
||||
|
||||
MaemoDeviceConfig m_devConfig;
|
||||
QPointer<MaemoRunConfiguration> m_runConfig;
|
||||
MaemoDeviceConfig m_devConfig;
|
||||
QSharedPointer<Core::SshConnection> m_connection;
|
||||
QSharedPointer<Core::SshRemoteProcess> m_remoteProcess;
|
||||
};
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "maemodeploystepfactory.h"
|
||||
#include "maemodeviceconfigurations.h"
|
||||
#include "maemopackagecreationfactory.h"
|
||||
#include "maemoqemumanager.h"
|
||||
#include "maemorunfactories.h"
|
||||
#include "maemosettingspage.h"
|
||||
#include "maemotoolchain.h"
|
||||
#include "qemuruntimemanager.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <qt4projectmanager/qtversionmanager.h>
|
||||
@@ -64,7 +64,7 @@ MaemoManager::MaemoManager()
|
||||
Q_ASSERT(!m_instance);
|
||||
|
||||
m_instance = this;
|
||||
QemuRuntimeManager::instance(this);
|
||||
MaemoQemuManager::instance(this);
|
||||
MaemoDeviceConfigurations::instance(this);
|
||||
|
||||
PluginManager *pluginManager = PluginManager::instance();
|
||||
|
||||
@@ -46,7 +46,7 @@ class MaemoPackageCreationFactory;
|
||||
class MaemoRunControlFactory;
|
||||
class MaemoRunConfigurationFactory;
|
||||
class MaemoSettingsPage;
|
||||
class QemuRuntimeManager;
|
||||
class MaemoQemuManager;
|
||||
|
||||
class MaemoManager : public QObject
|
||||
{
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
MaemoPackageCreationFactory *m_packageCreationFactory;
|
||||
MaemoDeployStepFactory *m_deployStepFactory;
|
||||
MaemoSettingsPage *m_settingsPage;
|
||||
QemuRuntimeManager *m_qemuRuntimeManager;
|
||||
MaemoQemuManager *m_qemuRuntimeManager;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -42,12 +42,12 @@
|
||||
#include "maemopackagecreationstep.h"
|
||||
|
||||
#include "maemoconstants.h"
|
||||
#include "maemoglobal.h"
|
||||
#include "maemopackagecreationwidget.h"
|
||||
#include "maemodeployables.h"
|
||||
#include "maemodeploystep.h"
|
||||
#include "maemoglobal.h"
|
||||
#include "maemopackagecreationwidget.h"
|
||||
#include "maemoprofilewrapper.h"
|
||||
#include "maemotoolchain.h"
|
||||
#include "profilewrapper.h"
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <qt4buildconfiguration.h>
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Internal {
|
||||
|
||||
class MaemoDeployStep;
|
||||
class MaemoToolChain;
|
||||
class ProFileWrapper;
|
||||
class MaemoProFileWrapper;
|
||||
class Qt4BuildConfiguration;
|
||||
|
||||
class MaemoPackageCreationStep : public ProjectExplorer::BuildStep
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "profilewrapper.h"
|
||||
#include "maemoprofilewrapper.h"
|
||||
|
||||
#include <prowriter.h>
|
||||
#include <qt4projectmanager/profilereader.h>
|
||||
@@ -26,7 +26,7 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
ProFileWrapper::ProFileWrapper(const QString &proFileName,
|
||||
MaemoProFileWrapper::MaemoProFileWrapper(const QString &proFileName,
|
||||
const QSharedPointer<ProFileOption> &proFileOption)
|
||||
: m_proFileName(proFileName), m_proDir(QFileInfo(m_proFileName).dir()),
|
||||
m_proFileOption(proFileOption)
|
||||
@@ -34,14 +34,14 @@ ProFileWrapper::ProFileWrapper(const QString &proFileName,
|
||||
parseProFile(ParseFromFile);
|
||||
}
|
||||
|
||||
ProFileWrapper::~ProFileWrapper() {}
|
||||
MaemoProFileWrapper::~MaemoProFileWrapper() {}
|
||||
|
||||
void ProFileWrapper::reload()
|
||||
void MaemoProFileWrapper::reload()
|
||||
{
|
||||
parseProFile(ParseFromFile);
|
||||
}
|
||||
|
||||
ProFileWrapper::InstallsList ProFileWrapper::installs() const
|
||||
MaemoProFileWrapper::InstallsList MaemoProFileWrapper::installs() const
|
||||
{
|
||||
InstallsList list;
|
||||
|
||||
@@ -75,7 +75,7 @@ ProFileWrapper::InstallsList ProFileWrapper::installs() const
|
||||
return list;
|
||||
}
|
||||
|
||||
bool ProFileWrapper::addInstallsElem(const QString &path,
|
||||
bool MaemoProFileWrapper::addInstallsElem(const QString &path,
|
||||
const QString &absFilePath, const QString &var)
|
||||
{
|
||||
QString varName = var;
|
||||
@@ -92,12 +92,12 @@ bool ProFileWrapper::addInstallsElem(const QString &path,
|
||||
&& addVarValue(InstallsVar, varName);
|
||||
}
|
||||
|
||||
bool ProFileWrapper::addInstallsTarget(const QString &path)
|
||||
bool MaemoProFileWrapper::addInstallsTarget(const QString &path)
|
||||
{
|
||||
return addInstallsElem(path, QString(), TargetVar);
|
||||
}
|
||||
|
||||
bool ProFileWrapper::removeInstallsElem(const QString &path,
|
||||
bool MaemoProFileWrapper::removeInstallsElem(const QString &path,
|
||||
const QString &file)
|
||||
{
|
||||
const InstallsElem &elem = findInstallsElem(path, file);
|
||||
@@ -116,7 +116,7 @@ bool ProFileWrapper::removeInstallsElem(const QString &path,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ProFileWrapper::replaceInstallPath(const QString &oldPath,
|
||||
bool MaemoProFileWrapper::replaceInstallPath(const QString &oldPath,
|
||||
const QString &file, const QString &newPath)
|
||||
{
|
||||
const InstallsElem &elem = findInstallsElem(oldPath, file);
|
||||
@@ -134,12 +134,12 @@ bool ProFileWrapper::replaceInstallPath(const QString &oldPath,
|
||||
return addInstallsElem(newPath, file);
|
||||
}
|
||||
|
||||
QStringList ProFileWrapper::varValues(const QString &var) const
|
||||
QStringList MaemoProFileWrapper::varValues(const QString &var) const
|
||||
{
|
||||
return m_proFileReader->values(var, m_proFile);
|
||||
}
|
||||
|
||||
bool ProFileWrapper::addVarValue(const QString &var, const QString &value)
|
||||
bool MaemoProFileWrapper::addVarValue(const QString &var, const QString &value)
|
||||
{
|
||||
if (varValues(var).contains(value))
|
||||
return true;
|
||||
@@ -152,7 +152,7 @@ bool ProFileWrapper::addVarValue(const QString &var, const QString &value)
|
||||
return writeProFileContents();
|
||||
}
|
||||
|
||||
bool ProFileWrapper::addFile(const QString &var, const QString &absFilePath)
|
||||
bool MaemoProFileWrapper::addFile(const QString &var, const QString &absFilePath)
|
||||
{
|
||||
if (!readProFileContents())
|
||||
return false;
|
||||
@@ -162,7 +162,7 @@ bool ProFileWrapper::addFile(const QString &var, const QString &absFilePath)
|
||||
return writeProFileContents();
|
||||
}
|
||||
|
||||
bool ProFileWrapper::removeVarValue(const QString &var, const QString &value)
|
||||
bool MaemoProFileWrapper::removeVarValue(const QString &var, const QString &value)
|
||||
{
|
||||
if (!readProFileContents())
|
||||
return false;
|
||||
@@ -178,7 +178,7 @@ bool ProFileWrapper::removeVarValue(const QString &var, const QString &value)
|
||||
}
|
||||
}
|
||||
|
||||
bool ProFileWrapper::removeFile(const QString &var, const QString &absFilePath)
|
||||
bool MaemoProFileWrapper::removeFile(const QString &var, const QString &absFilePath)
|
||||
{
|
||||
if (!readProFileContents())
|
||||
return false;
|
||||
@@ -193,7 +193,7 @@ bool ProFileWrapper::removeFile(const QString &var, const QString &absFilePath)
|
||||
}
|
||||
}
|
||||
|
||||
bool ProFileWrapper::replaceVarValue(const QString &var,
|
||||
bool MaemoProFileWrapper::replaceVarValue(const QString &var,
|
||||
const QString &oldValue, const QString &newValue)
|
||||
{
|
||||
if (!readProFileContents())
|
||||
@@ -211,7 +211,7 @@ bool ProFileWrapper::replaceVarValue(const QString &var,
|
||||
return writeProFileContents();
|
||||
}
|
||||
|
||||
QString ProFileWrapper::absFilePath(const QString &relFilePath) const
|
||||
QString MaemoProFileWrapper::absFilePath(const QString &relFilePath) const
|
||||
{
|
||||
// I'd rather use QDir::cleanPath(), but that doesn't work well
|
||||
// enough for redundant ".." dirs.
|
||||
@@ -221,7 +221,7 @@ QString ProFileWrapper::absFilePath(const QString &relFilePath) const
|
||||
.canonicalFilePath();
|
||||
}
|
||||
|
||||
void ProFileWrapper::parseProFile(ParseType type) const
|
||||
void MaemoProFileWrapper::parseProFile(ParseType type) const
|
||||
{
|
||||
m_proFileReader.reset(new ProFileReader(m_proFileOption.data()));
|
||||
m_proFileReader->setCumulative(false);
|
||||
@@ -244,7 +244,7 @@ void ProFileWrapper::parseProFile(ParseType type) const
|
||||
m_proFile->deref();
|
||||
}
|
||||
|
||||
bool ProFileWrapper::writeProFileContents()
|
||||
bool MaemoProFileWrapper::writeProFileContents()
|
||||
{
|
||||
QFile proFileOnDisk(m_proFileName);
|
||||
if (!proFileOnDisk.open(QIODevice::WriteOnly)) {
|
||||
@@ -262,7 +262,7 @@ bool ProFileWrapper::writeProFileContents()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ProFileWrapper::readProFileContents()
|
||||
bool MaemoProFileWrapper::readProFileContents()
|
||||
{
|
||||
if (!m_proFileContents.isEmpty())
|
||||
return true;
|
||||
@@ -278,7 +278,7 @@ bool ProFileWrapper::readProFileContents()
|
||||
return true;
|
||||
}
|
||||
|
||||
ProFileWrapper::InstallsElem ProFileWrapper::findInstallsElem(const QString &path,
|
||||
MaemoProFileWrapper::InstallsElem MaemoProFileWrapper::findInstallsElem(const QString &path,
|
||||
const QString &file) const
|
||||
{
|
||||
const QStringList &elems = varValues(InstallsVar);
|
||||
@@ -16,12 +16,12 @@ namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
class ProFileReader;
|
||||
|
||||
class ProFileWrapper
|
||||
class MaemoProFileWrapper
|
||||
{
|
||||
public:
|
||||
ProFileWrapper(const QString &proFileName,
|
||||
MaemoProFileWrapper(const QString &proFileName,
|
||||
const QSharedPointer<ProFileOption> &proFileOption);
|
||||
~ProFileWrapper();
|
||||
~MaemoProFileWrapper();
|
||||
|
||||
void reload();
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#include "qemuruntimemanager.h"
|
||||
#include "maemoqemumanager.h"
|
||||
|
||||
#include "maemorunconfiguration.h"
|
||||
#include "maemotoolchain.h"
|
||||
@@ -58,12 +58,12 @@ using namespace ProjectExplorer;
|
||||
using namespace Qt4ProjectManager;
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
QemuRuntimeManager *QemuRuntimeManager::m_instance = 0;
|
||||
MaemoQemuManager *MaemoQemuManager::m_instance = 0;
|
||||
|
||||
const QSize iconSize = QSize(24, 20);
|
||||
const QLatin1String binQmake("/bin/qmake" EXEC_SUFFIX);
|
||||
|
||||
QemuRuntimeManager::QemuRuntimeManager(QObject *parent)
|
||||
MaemoQemuManager::MaemoQemuManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_qemuAction(0)
|
||||
, m_qemuProcess(new QProcess(this))
|
||||
@@ -117,20 +117,20 @@ QemuRuntimeManager::QemuRuntimeManager(QObject *parent)
|
||||
this, SLOT(qemuStatusChanged(QemuStatus, QString)));
|
||||
}
|
||||
|
||||
QemuRuntimeManager::~QemuRuntimeManager()
|
||||
MaemoQemuManager::~MaemoQemuManager()
|
||||
{
|
||||
terminateRuntime();
|
||||
m_instance = 0;
|
||||
}
|
||||
|
||||
QemuRuntimeManager &QemuRuntimeManager::instance(QObject *parent)
|
||||
MaemoQemuManager &MaemoQemuManager::instance(QObject *parent)
|
||||
{
|
||||
if (m_instance == 0)
|
||||
m_instance = new QemuRuntimeManager(parent);
|
||||
m_instance = new MaemoQemuManager(parent);
|
||||
return *m_instance;
|
||||
}
|
||||
|
||||
bool QemuRuntimeManager::runtimeForQtVersion(int uniqueId, Runtime *rt) const
|
||||
bool MaemoQemuManager::runtimeForQtVersion(int uniqueId, Runtime *rt) const
|
||||
{
|
||||
bool found = m_runtimes.contains(uniqueId);
|
||||
if (found)
|
||||
@@ -138,7 +138,7 @@ bool QemuRuntimeManager::runtimeForQtVersion(int uniqueId, Runtime *rt) const
|
||||
return found;
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::qtVersionsChanged(const QList<int> &uniqueIds)
|
||||
void MaemoQemuManager::qtVersionsChanged(const QList<int> &uniqueIds)
|
||||
{
|
||||
if (m_needsSetup)
|
||||
setupRuntimes();
|
||||
@@ -172,7 +172,7 @@ void QemuRuntimeManager::qtVersionsChanged(const QList<int> &uniqueIds)
|
||||
m_qemuAction->setVisible(!m_runtimes.isEmpty() && sessionHasMaemoTarget());
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::projectAdded(ProjectExplorer::Project *project)
|
||||
void MaemoQemuManager::projectAdded(ProjectExplorer::Project *project)
|
||||
{
|
||||
// handle all target related changes, add, remove, etc...
|
||||
connect(project, SIGNAL(addedTarget(ProjectExplorer::Target*)), this,
|
||||
@@ -187,7 +187,7 @@ void QemuRuntimeManager::projectAdded(ProjectExplorer::Project *project)
|
||||
m_qemuAction->setVisible(!m_runtimes.isEmpty() && sessionHasMaemoTarget());
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::projectRemoved(ProjectExplorer::Project *project)
|
||||
void MaemoQemuManager::projectRemoved(ProjectExplorer::Project *project)
|
||||
{
|
||||
disconnect(project, SIGNAL(addedTarget(ProjectExplorer::Target*)), this,
|
||||
SLOT(targetAdded(ProjectExplorer::Target*)));
|
||||
@@ -201,7 +201,7 @@ void QemuRuntimeManager::projectRemoved(ProjectExplorer::Project *project)
|
||||
m_qemuAction->setVisible(!m_runtimes.isEmpty() && sessionHasMaemoTarget());
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::projectChanged(ProjectExplorer::Project *project)
|
||||
void MaemoQemuManager::projectChanged(ProjectExplorer::Project *project)
|
||||
{
|
||||
if (project) {
|
||||
toggleStarterButton(project->activeTarget());
|
||||
@@ -214,7 +214,7 @@ bool targetIsMaemo(const QString &id)
|
||||
return id == QLatin1String(Constants::MAEMO_DEVICE_TARGET_ID);
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::targetAdded(ProjectExplorer::Target *target)
|
||||
void MaemoQemuManager::targetAdded(ProjectExplorer::Target *target)
|
||||
{
|
||||
if (!target || !targetIsMaemo(target->id()))
|
||||
return;
|
||||
@@ -243,7 +243,7 @@ void QemuRuntimeManager::targetAdded(ProjectExplorer::Target *target)
|
||||
m_qemuAction->setVisible(!m_runtimes.isEmpty() && sessionHasMaemoTarget());
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::targetRemoved(ProjectExplorer::Target *target)
|
||||
void MaemoQemuManager::targetRemoved(ProjectExplorer::Target *target)
|
||||
{
|
||||
if (!target || !targetIsMaemo(target->id()))
|
||||
return;
|
||||
@@ -269,7 +269,7 @@ void QemuRuntimeManager::targetRemoved(ProjectExplorer::Target *target)
|
||||
m_qemuAction->setVisible(!m_runtimes.isEmpty() && sessionHasMaemoTarget());
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::targetChanged(ProjectExplorer::Target *target)
|
||||
void MaemoQemuManager::targetChanged(ProjectExplorer::Target *target)
|
||||
{
|
||||
if (target) {
|
||||
toggleStarterButton(target);
|
||||
@@ -277,27 +277,27 @@ void QemuRuntimeManager::targetChanged(ProjectExplorer::Target *target)
|
||||
}
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::runConfigurationAdded(ProjectExplorer::RunConfiguration *rc)
|
||||
void MaemoQemuManager::runConfigurationAdded(ProjectExplorer::RunConfiguration *rc)
|
||||
{
|
||||
if (!rc || !targetIsMaemo(rc->target()->id()))
|
||||
return;
|
||||
toggleDeviceConnections(qobject_cast<MaemoRunConfiguration*> (rc), true);
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::runConfigurationRemoved(ProjectExplorer::RunConfiguration *rc)
|
||||
void MaemoQemuManager::runConfigurationRemoved(ProjectExplorer::RunConfiguration *rc)
|
||||
{
|
||||
if (!rc || rc->target()->id() != QLatin1String(Constants::MAEMO_DEVICE_TARGET_ID))
|
||||
return;
|
||||
toggleDeviceConnections(qobject_cast<MaemoRunConfiguration*> (rc), false);
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::runConfigurationChanged(ProjectExplorer::RunConfiguration *rc)
|
||||
void MaemoQemuManager::runConfigurationChanged(ProjectExplorer::RunConfiguration *rc)
|
||||
{
|
||||
if (rc)
|
||||
m_qemuAction->setEnabled(targetUsesMatchingRuntimeConfig(rc->target()));
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::buildConfigurationAdded(ProjectExplorer::BuildConfiguration *bc)
|
||||
void MaemoQemuManager::buildConfigurationAdded(ProjectExplorer::BuildConfiguration *bc)
|
||||
{
|
||||
if (!bc || !targetIsMaemo(bc->target()->id()))
|
||||
return;
|
||||
@@ -305,7 +305,7 @@ void QemuRuntimeManager::buildConfigurationAdded(ProjectExplorer::BuildConfigura
|
||||
connect(bc, SIGNAL(environmentChanged()), this, SLOT(environmentChanged()));
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::buildConfigurationRemoved(ProjectExplorer::BuildConfiguration *bc)
|
||||
void MaemoQemuManager::buildConfigurationRemoved(ProjectExplorer::BuildConfiguration *bc)
|
||||
{
|
||||
if (!bc || !targetIsMaemo(bc->target()->id()))
|
||||
return;
|
||||
@@ -313,13 +313,13 @@ void QemuRuntimeManager::buildConfigurationRemoved(ProjectExplorer::BuildConfigu
|
||||
disconnect(bc, SIGNAL(environmentChanged()), this, SLOT(environmentChanged()));
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::buildConfigurationChanged(ProjectExplorer::BuildConfiguration *bc)
|
||||
void MaemoQemuManager::buildConfigurationChanged(ProjectExplorer::BuildConfiguration *bc)
|
||||
{
|
||||
if (bc)
|
||||
toggleStarterButton(bc->target());
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::environmentChanged()
|
||||
void MaemoQemuManager::environmentChanged()
|
||||
{
|
||||
// likely to happen when the qt version changes the build config is using
|
||||
if (ProjectExplorerPlugin *explorer = ProjectExplorerPlugin::instance()) {
|
||||
@@ -328,12 +328,12 @@ void QemuRuntimeManager::environmentChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::deviceConfigurationChanged(ProjectExplorer::Target *target)
|
||||
void MaemoQemuManager::deviceConfigurationChanged(ProjectExplorer::Target *target)
|
||||
{
|
||||
m_qemuAction->setEnabled(targetUsesMatchingRuntimeConfig(target));
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::startRuntime()
|
||||
void MaemoQemuManager::startRuntime()
|
||||
{
|
||||
m_userTerminated = false;
|
||||
Project *p = ProjectExplorerPlugin::instance()->session()->startupProject();
|
||||
@@ -387,7 +387,7 @@ void QemuRuntimeManager::startRuntime()
|
||||
disconnect(m_qemuAction, SIGNAL(triggered()), this, SLOT(startRuntime()));
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::terminateRuntime()
|
||||
void MaemoQemuManager::terminateRuntime()
|
||||
{
|
||||
m_userTerminated = true;
|
||||
|
||||
@@ -400,7 +400,7 @@ void QemuRuntimeManager::terminateRuntime()
|
||||
disconnect(m_qemuAction, SIGNAL(triggered()), this, SLOT(terminateRuntime()));
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::qemuProcessFinished()
|
||||
void MaemoQemuManager::qemuProcessFinished()
|
||||
{
|
||||
m_runningQtId = -1;
|
||||
QemuStatus status = QemuFinished;
|
||||
@@ -420,13 +420,13 @@ void QemuRuntimeManager::qemuProcessFinished()
|
||||
emit qemuProcessStatus(status, error);
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::qemuProcessError(QProcess::ProcessError error)
|
||||
void MaemoQemuManager::qemuProcessError(QProcess::ProcessError error)
|
||||
{
|
||||
if (error == QProcess::FailedToStart)
|
||||
emit qemuProcessStatus(QemuFailedToStart, m_qemuProcess->errorString());
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::qemuStatusChanged(QemuStatus status, const QString &error)
|
||||
void MaemoQemuManager::qemuStatusChanged(QemuStatus status, const QString &error)
|
||||
{
|
||||
QString message;
|
||||
bool running = false;
|
||||
@@ -456,7 +456,7 @@ void QemuRuntimeManager::qemuStatusChanged(QemuStatus status, const QString &err
|
||||
updateStarterIcon(running);
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::qemuOutput()
|
||||
void MaemoQemuManager::qemuOutput()
|
||||
{
|
||||
qDebug("%s", m_qemuProcess->readAllStandardOutput().data());
|
||||
qDebug("%s", m_qemuProcess->readAllStandardError().data());
|
||||
@@ -464,7 +464,7 @@ void QemuRuntimeManager::qemuOutput()
|
||||
|
||||
// -- private
|
||||
|
||||
void QemuRuntimeManager::setupRuntimes()
|
||||
void MaemoQemuManager::setupRuntimes()
|
||||
{
|
||||
m_needsSetup = false;
|
||||
|
||||
@@ -477,7 +477,7 @@ void QemuRuntimeManager::setupRuntimes()
|
||||
qtVersionsChanged(uniqueIds);
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::updateStarterIcon(bool running)
|
||||
void MaemoQemuManager::updateStarterIcon(bool running)
|
||||
{
|
||||
QIcon::State state;
|
||||
QString toolTip;
|
||||
@@ -494,7 +494,7 @@ void QemuRuntimeManager::updateStarterIcon(bool running)
|
||||
state));
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::toggleStarterButton(Target *target)
|
||||
void MaemoQemuManager::toggleStarterButton(Target *target)
|
||||
{
|
||||
if (m_needsSetup)
|
||||
setupRuntimes();
|
||||
@@ -517,7 +517,7 @@ void QemuRuntimeManager::toggleStarterButton(Target *target)
|
||||
&& targetUsesMatchingRuntimeConfig(target) && !isRunning);
|
||||
}
|
||||
|
||||
bool QemuRuntimeManager::sessionHasMaemoTarget() const
|
||||
bool MaemoQemuManager::sessionHasMaemoTarget() const
|
||||
{
|
||||
bool result = false;
|
||||
ProjectExplorerPlugin *explorer = ProjectExplorerPlugin::instance();
|
||||
@@ -527,7 +527,7 @@ bool QemuRuntimeManager::sessionHasMaemoTarget() const
|
||||
return result;
|
||||
}
|
||||
|
||||
bool QemuRuntimeManager::targetUsesMatchingRuntimeConfig(Target *target,
|
||||
bool MaemoQemuManager::targetUsesMatchingRuntimeConfig(Target *target,
|
||||
QtVersion **qtVersion)
|
||||
{
|
||||
if (!target)
|
||||
@@ -551,20 +551,20 @@ bool QemuRuntimeManager::targetUsesMatchingRuntimeConfig(Target *target,
|
||||
return config.isValid() && config.type == MaemoDeviceConfig::Simulator;
|
||||
}
|
||||
|
||||
QString QemuRuntimeManager::maddeRoot(const QString &qmake) const
|
||||
QString MaemoQemuManager::maddeRoot(const QString &qmake) const
|
||||
{
|
||||
QDir dir(QDir::cleanPath(qmake).remove(binQmake));
|
||||
dir.cdUp(); dir.cdUp();
|
||||
return dir.absolutePath();
|
||||
}
|
||||
|
||||
QString QemuRuntimeManager::targetRoot(const QString &qmake) const
|
||||
QString MaemoQemuManager::targetRoot(const QString &qmake) const
|
||||
{
|
||||
const QString target = QDir::cleanPath(qmake).remove(binQmake);
|
||||
return target.mid(target.lastIndexOf(QLatin1Char('/')) + 1);
|
||||
}
|
||||
|
||||
bool QemuRuntimeManager::fillRuntimeInformation(Runtime *runtime) const
|
||||
bool MaemoQemuManager::fillRuntimeInformation(Runtime *runtime) const
|
||||
{
|
||||
const QStringList files = QDir(runtime->m_root).entryList(QDir::Files
|
||||
| QDir::NoSymLinks | QDir::NoDotAndDotDot);
|
||||
@@ -597,7 +597,7 @@ bool QemuRuntimeManager::fillRuntimeInformation(Runtime *runtime) const
|
||||
return false;
|
||||
}
|
||||
|
||||
QString QemuRuntimeManager::runtimeForQtVersion(const QString &qmakeCommand) const
|
||||
QString MaemoQemuManager::runtimeForQtVersion(const QString &qmakeCommand) const
|
||||
{
|
||||
const QString &target = targetRoot(qmakeCommand);
|
||||
const QString &madRoot = maddeRoot(qmakeCommand);
|
||||
@@ -631,7 +631,7 @@ QString QemuRuntimeManager::runtimeForQtVersion(const QString &qmakeCommand) con
|
||||
return QString();
|
||||
}
|
||||
|
||||
void QemuRuntimeManager::toggleDeviceConnections(MaemoRunConfiguration *mrc,
|
||||
void MaemoQemuManager::toggleDeviceConnections(MaemoRunConfiguration *mrc,
|
||||
bool _connect)
|
||||
{
|
||||
if (!mrc)
|
||||
@@ -67,12 +67,12 @@ struct Runtime
|
||||
QString m_gdbServerPort;
|
||||
};
|
||||
|
||||
class QemuRuntimeManager : public QObject
|
||||
class MaemoQemuManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static QemuRuntimeManager& instance(QObject *parent = 0);
|
||||
static MaemoQemuManager& instance(QObject *parent = 0);
|
||||
|
||||
bool runtimeForQtVersion(int uniqueId, Runtime *rt) const;
|
||||
|
||||
@@ -110,8 +110,8 @@ private slots:
|
||||
void qemuOutput();
|
||||
|
||||
private:
|
||||
QemuRuntimeManager(QObject *parent);
|
||||
~QemuRuntimeManager();
|
||||
MaemoQemuManager(QObject *parent);
|
||||
~MaemoQemuManager();
|
||||
|
||||
void setupRuntimes();
|
||||
bool sessionHasMaemoTarget() const;
|
||||
@@ -138,7 +138,7 @@ private:
|
||||
bool m_userTerminated;
|
||||
QIcon m_qemuStarterIcon;
|
||||
QMap<int, Runtime> m_runtimes;
|
||||
static QemuRuntimeManager *m_instance;
|
||||
static MaemoQemuManager *m_instance;
|
||||
};
|
||||
|
||||
} // namespace Qt4ProjectManager
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "maemodeploystep.h"
|
||||
#include "maemodeviceconfiglistmodel.h"
|
||||
#include "maemoglobal.h"
|
||||
#include "maemoqemumanager.h"
|
||||
#include "maemoremotemountsmodel.h"
|
||||
#include "maemorunconfigurationwidget.h"
|
||||
#include "maemotoolchain.h"
|
||||
#include "qemuruntimemanager.h"
|
||||
#include "qtoutputformatter.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -259,7 +259,7 @@ QString MaemoRunConfiguration::runtimeGdbServerPort() const
|
||||
if (Qt4BuildConfiguration *qt4bc = activeQt4BuildConfiguration()) {
|
||||
Runtime rt;
|
||||
const int id = qt4bc->qtVersion()->uniqueId();
|
||||
if (QemuRuntimeManager::instance().runtimeForQtVersion(id, &rt))
|
||||
if (MaemoQemuManager::instance().runtimeForQtVersion(id, &rt))
|
||||
return rt.m_gdbServerPort;
|
||||
}
|
||||
return QLatin1String("13219");
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
#include "maemorunconfigurationwidget.h"
|
||||
|
||||
#include "deviceenvreader.h"
|
||||
#include "maemodeviceconfiglistmodel.h"
|
||||
#include "maemodeviceenvreader.h"
|
||||
#include "maemomanager.h"
|
||||
#include "maemoremotemountsmodel.h"
|
||||
#include "maemorunconfiguration.h"
|
||||
@@ -63,7 +63,7 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
|
||||
MaemoRunConfiguration *runConfiguration, QWidget *parent)
|
||||
: QWidget(parent),
|
||||
m_runConfiguration(runConfiguration),
|
||||
m_deviceEnvReader(new DeviceEnvReader(this, runConfiguration))
|
||||
m_deviceEnvReader(new MaemoDeviceEnvReader(this, runConfiguration))
|
||||
{
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
setLayout(mainLayout);
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace ProjectExplorer {
|
||||
namespace Qt4ProjectManager {
|
||||
namespace Internal {
|
||||
|
||||
class DeviceEnvReader;
|
||||
class MaemoDeviceEnvReader;
|
||||
class MaemoRunConfiguration;
|
||||
|
||||
class MaemoRunConfigurationWidget : public QWidget
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
MaemoRunConfiguration *m_runConfiguration;
|
||||
|
||||
QPushButton *m_fetchEnv;
|
||||
DeviceEnvReader *m_deviceEnvReader;
|
||||
MaemoDeviceEnvReader *m_deviceEnvReader;
|
||||
ProjectExplorer::EnvironmentWidget *m_environmentWidget;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ HEADERS += \
|
||||
$$PWD/maemopackagecreationfactory.h \
|
||||
$$PWD/maemopackagecreationwidget.h \
|
||||
$$PWD/maemodeployablelistmodel.h \
|
||||
$$PWD/qemuruntimemanager.h \
|
||||
$$PWD/profilewrapper.h \
|
||||
$$PWD/maemoqemumanager.h \
|
||||
$$PWD/maemoprofilewrapper.h \
|
||||
$$PWD/maemodeployables.h \
|
||||
$$PWD/maemodeployable.h \
|
||||
$$PWD/maemodeployablelistwidget.h \
|
||||
@@ -28,7 +28,7 @@ HEADERS += \
|
||||
$$PWD/maemodebugsupport.h \
|
||||
$$PWD/maemodeviceconfiglistmodel.h \
|
||||
$$PWD/maemoremotemountsmodel.h \
|
||||
$$PWD/deviceenvreader.h
|
||||
$$PWD/maemodeviceenvreader.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/maemoconfigtestdialog.cpp \
|
||||
@@ -46,8 +46,8 @@ SOURCES += \
|
||||
$$PWD/maemopackagecreationfactory.cpp \
|
||||
$$PWD/maemopackagecreationwidget.cpp \
|
||||
$$PWD/maemodeployablelistmodel.cpp \
|
||||
$$PWD/qemuruntimemanager.cpp \
|
||||
$$PWD/profilewrapper.cpp \
|
||||
$$PWD/maemoqemumanager.cpp \
|
||||
$$PWD/maemoprofilewrapper.cpp \
|
||||
$$PWD/maemodeployables.cpp \
|
||||
$$PWD/maemodeployablelistwidget.cpp \
|
||||
$$PWD/maemodeploystep.cpp \
|
||||
@@ -58,7 +58,7 @@ SOURCES += \
|
||||
$$PWD/maemodebugsupport.cpp \
|
||||
$$PWD/maemodeviceconfiglistmodel.cpp \
|
||||
$$PWD/maemoremotemountsmodel.cpp \
|
||||
$$PWD/deviceenvreader.cpp
|
||||
$$PWD/maemodeviceenvreader.cpp
|
||||
|
||||
FORMS += \
|
||||
$$PWD/maemoconfigtestdialog.ui \
|
||||
|
||||
Reference in New Issue
Block a user