Commit d23f4cff authored by Robert Loehning's avatar Robert Loehning

SDKtool: Provide default values in Operation objects

Change-Id: I3d121e4bee891309f455a67ade76f0ea4f26c77c
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 89057b55
......@@ -49,10 +49,6 @@ const char ABIS[] = "Abis";
const char BINARY[] = "Binary";
const char ENGINE_TYPE[] = "EngineType";
AddDebuggerOperation::AddDebuggerOperation()
: m_engine(0)
{ }
QString AddDebuggerOperation::name() const
{
return QLatin1String("addDebugger");
......@@ -75,8 +71,6 @@ QString AddDebuggerOperation::argumentsHelpText() const
bool AddDebuggerOperation::setArguments(const QStringList &args)
{
m_engine = 0;
for (int i = 0; i < args.count(); ++i) {
const QString current = args.at(i);
const QString next = ((i + 1) < args.count()) ? args.at(i + 1) : QString();
......
......@@ -32,8 +32,6 @@
class AddDebuggerOperation : public Operation
{
public:
AddDebuggerOperation();
QString name() const;
QString helpText() const;
QString argumentsHelpText() const;
......@@ -56,7 +54,7 @@ public:
private:
QString m_id;
QString m_displayName;
quint32 m_engine;
quint32 m_engine = 0;
QString m_binary;
QStringList m_abis;
KeyValuePairList m_extra;
......
......@@ -43,9 +43,6 @@ const char DEVICE_ID_ID[] = "InternalId";
static const char INTERNAL_DSEKTOP_DEVICE_ID[] = "Desktop Device";
AddDeviceOperation::AddDeviceOperation()
{ }
QString AddDeviceOperation::name() const
{
return QLatin1String("addDev");
......@@ -79,13 +76,6 @@ QString AddDeviceOperation::argumentsHelpText() const
bool AddDeviceOperation::setArguments(const QStringList &args)
{
m_authentication = -1;
m_origin = 1;
m_sshPort = 0;
m_timeout = 5;
m_type = -1;
m_version = 0;
for (int i = 0; i < args.count(); ++i) {
const QString current = args.at(i);
const QString next = ((i + 1) < args.count()) ? args.at(i + 1) : QString();
......
......@@ -38,8 +38,6 @@ extern const char DEVICE_ID_ID[];
class AddDeviceOperation : public Operation
{
public:
AddDeviceOperation();
QString name() const;
QString helpText() const;
QString argumentsHelpText() const;
......@@ -75,7 +73,7 @@ private:
int sshPort, int timeout, const QString &uname, int version,
const KeyValuePairList &extra);
int m_authentication;
int m_authentication = -1;
QString m_b2q_platformHardware;
QString m_b2q_platformSoftware;
QString m_debugServer;
......@@ -84,13 +82,13 @@ private:
QString m_id;
QString m_keyFile;
QString m_displayName;
int m_origin;
int m_origin = 1;
QString m_osType;
QString m_password;
int m_sshPort;
int m_timeout;
int m_type;
int m_sshPort = 0;
int m_timeout = 5;
int m_type = -1;
QString m_uname;
int m_version;
int m_version = 0;
KeyValuePairList m_extra;
};
......@@ -71,11 +71,6 @@ const char CMAKE_ID[] = "CMakeProjectManager.CMakeKitInformation";
const char CMAKE_GENERATOR[] = "CMake.GeneratorKitInformation";
const char CMAKE_CONFIGURATION[] = "CMake.ConfigurationKitInformation";
AddKitOperation::AddKitOperation()
: m_debuggerEngine(0)
{
}
QString AddKitOperation::name() const
{
return QString("addKit");
......@@ -113,8 +108,6 @@ QString AddKitOperation::argumentsHelpText() const
bool AddKitOperation::setArguments(const QStringList &args)
{
m_debuggerEngine = 0;
for (int i = 0; i < args.count(); ++i) {
const QString current = args.at(i);
const QString next = ((i + 1) < args.count()) ? args.at(i + 1) : QString();
......
......@@ -33,8 +33,6 @@
class AddKitOperation : public Operation
{
public:
AddKitOperation();
QString name() const;
QString helpText() const;
QString argumentsHelpText() const;
......@@ -77,7 +75,7 @@ private:
QString m_displayName;
QString m_icon;
QString m_debuggerId;
quint32 m_debuggerEngine;
quint32 m_debuggerEngine = 0;
QString m_debugger;
QString m_deviceType;
QString m_device;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment