Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
aababf0c
Commit
aababf0c
authored
May 16, 2011
by
Christian Kandeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maemo: Make more generic.
We can now deploy and remotely run/debug any Linux target.
parent
d135e33a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
93 additions
and
77 deletions
+93
-77
src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp
src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp
+8
-4
src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
...s/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
+2
-3
src/plugins/qt4projectmanager/qt-maemo/maemodeploystepfactory.cpp
...ins/qt4projectmanager/qt-maemo/maemodeploystepfactory.cpp
+6
-5
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
+26
-2
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
+3
-0
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.cpp
...t4projectmanager/qt-maemo/maemopackagecreationfactory.cpp
+2
-3
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
...plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
+4
-3
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
...gins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
+17
-10
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
...lugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
+1
-2
src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
...t4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
+5
-3
src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp
src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp
+16
-14
src/plugins/qt4projectmanager/qt-maemo/qt4maemodeployconfiguration.cpp
...t4projectmanager/qt-maemo/qt4maemodeployconfiguration.cpp
+2
-2
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
+0
-13
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
+1
-13
No files found.
src/plugins/qt4projectmanager/qt-maemo/maemodebugsupport.cpp
View file @
aababf0c
...
...
@@ -42,6 +42,7 @@
#include <debugger/debuggerrunner.h>
#include <debugger/debuggerengine.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/toolchain.h>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
...
...
@@ -96,10 +97,13 @@ RunControl *MaemoDebugSupport::createDebugRunControl(MaemoRunConfiguration *runC
params
.
remoteChannel
=
devConf
->
sshParameters
().
host
+
QLatin1String
(
":-1"
);
params
.
useServerStartScript
=
true
;
const
AbstractQt4MaemoTarget
::
DebugArchitecture
&
debugArch
=
runConfig
->
maemoTarget
()
->
debugArchitecture
();
params
.
remoteArchitecture
=
debugArch
.
architecture
;
params
.
gnuTarget
=
debugArch
.
gnuTarget
;
// TODO: This functionality should be inside the debugger.
const
ProjectExplorer
::
Abi
&
abi
=
runConfig
->
target
()
->
activeBuildConfiguration
()
->
toolChain
()
->
targetAbi
();
params
.
remoteArchitecture
=
abi
.
toString
();
params
.
gnuTarget
=
QLatin1String
(
abi
.
architecture
()
==
ProjectExplorer
::
Abi
::
ArmArchitecture
?
"arm-none-linux-gnueabi"
:
"i386-unknown-linux-gnu"
);
}
}
else
{
params
.
startMode
=
AttachToRemote
;
...
...
src/plugins/qt4projectmanager/qt-maemo/maemodeployablelistmodel.cpp
View file @
aababf0c
...
...
@@ -33,7 +33,6 @@
#include "maemodeployablelistmodel.h"
#include "maemoglobal.h"
#include "qt4maemotarget.h"
#include <coreplugin/icore.h>
#include <coreplugin/filemanager.h>
...
...
@@ -331,8 +330,8 @@ const BaseQtVersion *MaemoDeployableListModel::qtVersion() const
const
ProjectExplorer
::
Project
*
const
activeProject
=
ProjectExplorer
::
ProjectExplorerPlugin
::
instance
()
->
session
()
->
startupProject
();
QTC_ASSERT
(
activeProject
,
return
0
);
const
AbstractQt4Maemo
Target
*
const
activeTarget
=
qobject_cast
<
AbstractQt4Maemo
Target
*>
(
activeProject
->
activeTarget
());
const
Qt4Base
Target
*
const
activeTarget
=
qobject_cast
<
Qt4Base
Target
*>
(
activeProject
->
activeTarget
());
QTC_ASSERT
(
activeTarget
,
return
0
);
const
Qt4BuildConfiguration
*
const
bc
=
activeTarget
->
activeBuildConfiguration
();
...
...
src/plugins/qt4projectmanager/qt-maemo/maemodeploystepfactory.cpp
View file @
aababf0c
...
...
@@ -63,13 +63,14 @@ MaemoDeployStepFactory::MaemoDeployStepFactory(QObject *parent)
QStringList
MaemoDeployStepFactory
::
availableCreationIds
(
BuildStepList
*
parent
)
const
{
if
(
!
qobject_cast
<
Qt4MaemoDeployConfiguration
*>
(
parent
->
parent
()))
return
QStringList
();
QStringList
ids
;
if
(
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
parent
->
target
()))
AbstractQt4MaemoTarget
*
const
maemoTarget
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
parent
->
target
());
if
(
maemoTarget
)
ids
<<
MaemoMakeInstallToSysrootStep
::
Id
;
if
(
!
qobject_cast
<
Qt4HarmattanTarget
*>
(
parent
->
target
()))
else
if
(
MaemoGlobal
::
hasLinuxQt
(
parent
->
target
()))
ids
<<
MaemoUploadAndInstallTarPackageStep
::
Id
;
if
(
maemoTarget
&&
!
qobject_cast
<
Qt4HarmattanTarget
*>
(
parent
->
target
()))
ids
<<
MaemoUploadAndInstallTarPackageStep
::
Id
;
if
(
qobject_cast
<
AbstractDebBasedQt4MaemoTarget
*>
(
parent
->
target
()))
{
ids
<<
MaemoInstallDebianPackageToSysrootStep
::
Id
;
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
View file @
aababf0c
...
...
@@ -40,6 +40,7 @@
#include <utils/ssh/sshconnection.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
#include <qt4projectmanager/qtversionmanager.h>
#include <qt4projectmanager/qt4target.h>
#include <utils/environment.h>
#include <QtCore/QDateTime>
...
...
@@ -91,6 +92,29 @@ bool MaemoGlobal::isValidMeegoQtVersion(const QString &qmakePath)
return
isValidMaemoQtVersion
(
qmakePath
,
MaemoDeviceConfig
::
Meego
);
}
bool
MaemoGlobal
::
isLinuxQt
(
const
BaseQtVersion
*
qtVersion
)
{
if
(
!
qtVersion
)
return
false
;
const
QList
<
ProjectExplorer
::
Abi
>
&
abis
=
qtVersion
->
qtAbis
();
foreach
(
const
ProjectExplorer
::
Abi
&
abi
,
abis
)
{
if
(
abi
.
os
()
==
ProjectExplorer
::
Abi
::
LinuxOS
)
return
true
;
}
return
false
;
}
bool
MaemoGlobal
::
hasLinuxQt
(
const
ProjectExplorer
::
Target
*
target
)
{
const
Qt4BaseTarget
*
const
qtTarget
=
qobject_cast
<
const
Qt4BaseTarget
*>
(
target
);
if
(
!
qtTarget
)
return
false
;
const
Qt4BuildConfiguration
*
const
bc
=
qtTarget
->
activeBuildConfiguration
();
return
bc
&&
isLinuxQt
(
bc
->
qtVersion
());
}
bool
MaemoGlobal
::
isValidMaemoQtVersion
(
const
QString
&
qmakePath
,
MaemoDeviceConfig
::
OsVersion
maemoVersion
)
{
...
...
@@ -143,7 +167,7 @@ QString MaemoGlobal::remoteSudo(MaemoDeviceConfig::OsVersion osVersion,
case
MaemoDeviceConfig
::
Meego
:
return
devrootshPath
();
default:
return
Q
Latin1
String
(
"sudo"
);
return
QString
(
);
// Using sudo would open a can of worms.
}
}
...
...
@@ -254,7 +278,7 @@ MaemoDeviceConfig::OsVersion MaemoGlobal::version(const QString &qmakePath)
return
MaemoDeviceConfig
::
Maemo6
;
if
(
name
.
startsWith
(
QLatin1String
(
"meego"
)))
return
MaemoDeviceConfig
::
Meego
;
return
static_cast
<
MaemoDeviceConfig
::
OsVersion
>
(
-
1
)
;
return
MaemoDeviceConfig
::
GenericLinux
;
}
QString
MaemoGlobal
::
architecture
(
const
QString
&
qmakePath
)
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
View file @
aababf0c
...
...
@@ -73,6 +73,9 @@ public:
static
bool
isValidHarmattanQtVersion
(
const
QString
&
qmakePath
);
static
bool
isValidMeegoQtVersion
(
const
QString
&
qmakePath
);
static
bool
isLinuxQt
(
const
BaseQtVersion
*
qtVersion
);
static
bool
hasLinuxQt
(
const
ProjectExplorer
::
Target
*
target
);
static
QString
homeDirOnDevice
(
const
QString
&
uname
);
static
QString
devrootshPath
();
static
int
applicationIconSize
(
MaemoDeviceConfig
::
OsVersion
osVersion
);
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationfactory.cpp
View file @
aababf0c
...
...
@@ -61,10 +61,9 @@ MaemoPackageCreationFactory::MaemoPackageCreationFactory(QObject *parent)
QStringList
MaemoPackageCreationFactory
::
availableCreationIds
(
ProjectExplorer
::
BuildStepList
*
parent
)
const
{
if
(
!
qobject_cast
<
Qt4MaemoDeployConfiguration
*>
(
parent
->
parent
()))
return
QStringList
();
QStringList
ids
;
if
(
!
MaemoGlobal
::
hasLinuxQt
(
parent
->
target
()))
return
ids
;
if
(
qobject_cast
<
AbstractDebBasedQt4MaemoTarget
*>
(
parent
->
target
())
&&
!
parent
->
contains
(
MaemoDebianPackageCreationStep
::
CreatePackageId
))
{
ids
<<
MaemoDebianPackageCreationStep
::
CreatePackageId
;
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
View file @
aababf0c
...
...
@@ -76,9 +76,10 @@ void MaemoRemoteMounter::setBuildConfiguration(const Qt4BuildConfiguration *bc)
{
ASSERT_STATE
(
Inactive
);
const
BaseQtVersion
*
const
qtVersion
=
bc
->
qtVersion
();
m_remoteMountsAllowed
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
bc
->
target
())
->
allowsRemoteMounts
();
m_maddeRoot
=
qtVersion
?
MaemoGlobal
::
maddeRoot
(
qtVersion
->
qmakeCommand
())
:
""
;
const
AbstractQt4MaemoTarget
*
const
maemoTarget
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
bc
->
target
());
m_remoteMountsAllowed
=
maemoTarget
&&
maemoTarget
->
allowsRemoteMounts
();
m_maddeRoot
=
qtVersion
?
MaemoGlobal
::
maddeRoot
(
qtVersion
->
qmakeCommand
())
:
QString
();
}
void
MaemoRemoteMounter
::
addMountSpecification
(
const
MaemoMountSpecification
&
mountSpec
,
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.cpp
View file @
aababf0c
...
...
@@ -52,6 +52,7 @@
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4project.h>
#include <qt4projectmanager/qt4target.h>
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
...
...
@@ -105,7 +106,7 @@ void MaemoRunConfiguration::init()
this
,
SLOT
(
handleDeployConfigChanged
()));
handleDeployConfigChanged
();
Qt4Project
*
pro
=
maemo
Target
()
->
qt4Project
();
Qt4Project
*
pro
=
qt4
Target
()
->
qt4Project
();
connect
(
pro
,
SIGNAL
(
proFileUpdated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)),
this
,
SLOT
(
proFileUpdate
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
,
bool
)));
connect
(
pro
,
SIGNAL
(
proFileInvalidated
(
Qt4ProjectManager
::
Internal
::
Qt4ProFileNode
*
)),
...
...
@@ -116,9 +117,9 @@ MaemoRunConfiguration::~MaemoRunConfiguration()
{
}
AbstractQt4Maemo
Target
*
MaemoRunConfiguration
::
maemo
Target
()
const
Qt4Base
Target
*
MaemoRunConfiguration
::
qt4
Target
()
const
{
return
static_cast
<
AbstractQt4Maemo
Target
*>
(
target
());
return
static_cast
<
Qt4Base
Target
*>
(
target
());
}
Qt4BuildConfiguration
*
MaemoRunConfiguration
::
activeQt4BuildConfiguration
()
const
...
...
@@ -140,7 +141,7 @@ QWidget *MaemoRunConfiguration::createConfigurationWidget()
Utils
::
OutputFormatter
*
MaemoRunConfiguration
::
createOutputFormatter
()
const
{
return
new
QtOutputFormatter
(
maemo
Target
()
->
qt4Project
());
return
new
QtOutputFormatter
(
qt4
Target
()
->
qt4Project
());
}
void
MaemoRunConfiguration
::
handleParseState
(
bool
success
)
...
...
@@ -197,7 +198,7 @@ bool MaemoRunConfiguration::fromMap(const QVariantMap &map)
SystemEnvironmentBase
).
toInt
());
m_remoteMounts
->
fromMap
(
map
);
m_validParse
=
maemo
Target
()
->
qt4Project
()
->
validParse
(
m_proFilePath
);
m_validParse
=
qt4
Target
()
->
qt4Project
()
->
validParse
(
m_proFilePath
);
setDefaultDisplayName
(
defaultDisplayName
());
...
...
@@ -207,9 +208,9 @@ bool MaemoRunConfiguration::fromMap(const QVariantMap &map)
QString
MaemoRunConfiguration
::
defaultDisplayName
()
{
if
(
!
m_proFilePath
.
isEmpty
())
return
(
QFileInfo
(
m_proFilePath
).
completeBaseName
());
return
(
QFileInfo
(
m_proFilePath
).
completeBaseName
())
+
QLatin1String
(
" (remote)"
)
;
//: Maemo run configuration default display name
return
tr
(
"Run on
Ma
emo device"
);
return
tr
(
"Run on
r
emo
te
device"
);
}
MaemoDeviceConfig
::
ConstPtr
MaemoRunConfiguration
::
deviceConfig
()
const
...
...
@@ -275,7 +276,7 @@ QString MaemoRunConfiguration::remoteProjectSourcesMountPoint() const
QString
MaemoRunConfiguration
::
localExecutableFilePath
()
const
{
TargetInformation
ti
=
maemo
Target
()
->
qt4Project
()
->
rootProjectNode
()
TargetInformation
ti
=
qt4
Target
()
->
qt4Project
()
->
rootProjectNode
()
->
targetInformation
(
m_proFilePath
);
if
(
!
ti
.
valid
)
return
QString
();
...
...
@@ -299,7 +300,11 @@ MaemoPortList MaemoRunConfiguration::freePorts() const
bool
MaemoRunConfiguration
::
useRemoteGdb
()
const
{
return
m_useRemoteGdb
&&
maemoTarget
()
->
allowsRemoteMounts
();
if
(
!
m_useRemoteGdb
)
return
false
;
const
AbstractQt4MaemoTarget
*
const
maemoTarget
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
target
());
return
maemoTarget
&&
maemoTarget
->
allowsRemoteMounts
();
}
void
MaemoRunConfiguration
::
setArguments
(
const
QString
&
args
)
...
...
@@ -309,7 +314,9 @@ void MaemoRunConfiguration::setArguments(const QString &args)
MaemoRunConfiguration
::
DebuggingType
MaemoRunConfiguration
::
debuggingType
()
const
{
if
(
!
maemoTarget
()
->
allowsQmlDebugging
())
const
AbstractQt4MaemoTarget
*
const
maemoTarget
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
target
());
if
(
!
maemoTarget
||
!
maemoTarget
->
allowsQmlDebugging
())
return
DebugCppOnly
;
if
(
useCppDebugger
())
{
if
(
useQmlDebugger
())
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfiguration.h
View file @
aababf0c
...
...
@@ -56,7 +56,6 @@ namespace Internal {
class
Qt4ProFileNode
;
class
AbstractQt4MaemoTarget
;
class
AbstractLinuxDeviceDeployStep
;
class
MaemoDeviceConfigListModel
;
class
MaemoManager
;
...
...
@@ -85,7 +84,7 @@ public:
bool
isEnabled
(
ProjectExplorer
::
BuildConfiguration
*
config
)
const
;
QWidget
*
createConfigurationWidget
();
Utils
::
OutputFormatter
*
createOutputFormatter
()
const
;
AbstractQt4Maemo
Target
*
maemo
Target
()
const
;
Qt4Base
Target
*
qt4
Target
()
const
;
Qt4BuildConfiguration
*
activeQt4BuildConfiguration
()
const
;
Qt4MaemoDeployConfiguration
*
deployConfig
()
const
;
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunconfigurationwidget.cpp
View file @
aababf0c
...
...
@@ -96,11 +96,13 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
this
,
SLOT
(
runConfigurationEnabledChange
(
bool
)));
const
AbstractQt4MaemoTarget
*
const
maemoTarget
=
runConfiguration
->
maemoTarget
();
const
bool
remoteMountsAvailable
=
maemoTarget
->
allowsRemoteMounts
();
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
runConfiguration
->
target
());
const
bool
remoteMountsAvailable
=
maemoTarget
&&
maemoTarget
->
allowsRemoteMounts
();
m_debugDetailsContainer
->
setVisible
(
remoteMountsAvailable
);
m_mountDetailsContainer
->
setVisible
(
remoteMountsAvailable
);
const
bool
qmlDebuggingAvailable
=
maemoTarget
->
allowsQmlDebugging
();
const
bool
qmlDebuggingAvailable
=
!
maemoTarget
||
maemoTarget
->
allowsQmlDebugging
();
m_debuggingLanguagesLabel
->
setVisible
(
qmlDebuggingAvailable
);
m_debugCppOnlyButton
->
setVisible
(
qmlDebuggingAvailable
);
m_debugQmlOnlyButton
->
setVisible
(
qmlDebuggingAvailable
);
...
...
src/plugins/qt4projectmanager/qt-maemo/maemorunfactories.cpp
View file @
aababf0c
...
...
@@ -75,16 +75,16 @@ MaemoRunConfigurationFactory::~MaemoRunConfigurationFactory()
bool
MaemoRunConfigurationFactory
::
canCreate
(
Target
*
parent
,
const
QString
&
id
)
const
{
AbstractQt4MaemoTarget
*
target
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
parent
);
if
(
!
target
)
if
(
!
MaemoGlobal
::
hasLinuxQt
(
parent
))
return
false
;
return
target
->
qt4Project
()
->
hasApplicationProFile
(
pathFromId
(
id
));
return
qobject_cast
<
Qt4BaseTarget
*>
(
parent
)
->
qt4Project
()
->
hasApplicationProFile
(
pathFromId
(
id
));
}
bool
MaemoRunConfigurationFactory
::
canRestore
(
Target
*
parent
,
const
QVariantMap
&
map
)
const
{
if
(
!
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
parent
))
if
(
!
MaemoGlobal
::
hasLinuxQt
(
parent
))
return
false
;
return
ProjectExplorer
::
idFromMap
(
map
)
.
startsWith
(
QLatin1String
(
MAEMO_RC_ID
));
...
...
@@ -98,8 +98,8 @@ bool MaemoRunConfigurationFactory::canClone(Target *parent,
QStringList
MaemoRunConfigurationFactory
::
availableCreationIds
(
Target
*
parent
)
const
{
if
(
AbstractQt4Maemo
Target
*
t
=
qobject_cast
<
AbstractQt4Maemo
Target
*>
(
parent
))
{
if
(
t
)
{
if
(
Qt4Base
Target
*
t
=
qobject_cast
<
Qt4Base
Target
*>
(
parent
))
{
if
(
t
&&
MaemoGlobal
::
hasLinuxQt
(
t
)
)
{
return
t
->
qt4Project
()
->
applicationProFilePathes
(
QLatin1String
(
MAEMO_RC_ID_PREFIX
));
}
...
...
@@ -109,7 +109,8 @@ QStringList MaemoRunConfigurationFactory::availableCreationIds(Target *parent) c
QString
MaemoRunConfigurationFactory
::
displayNameForId
(
const
QString
&
id
)
const
{
return
QFileInfo
(
pathFromId
(
id
)).
completeBaseName
();
return
QFileInfo
(
pathFromId
(
id
)).
completeBaseName
()
+
QLatin1String
(
" (remote)"
);
}
RunConfiguration
*
MaemoRunConfigurationFactory
::
create
(
Target
*
parent
,
...
...
@@ -117,9 +118,8 @@ RunConfiguration *MaemoRunConfigurationFactory::create(Target *parent,
{
if
(
!
canCreate
(
parent
,
id
))
return
0
;
AbstractQt4MaemoTarget
*
pqt4parent
=
static_cast
<
AbstractQt4MaemoTarget
*>
(
parent
);
return
new
MaemoRunConfiguration
(
pqt4parent
,
pathFromId
(
id
));
return
new
MaemoRunConfiguration
(
qobject_cast
<
Qt4BaseTarget
*>
(
parent
),
pathFromId
(
id
));
}
RunConfiguration
*
MaemoRunConfigurationFactory
::
restore
(
Target
*
parent
,
...
...
@@ -127,8 +127,8 @@ RunConfiguration *MaemoRunConfigurationFactory::restore(Target *parent,
{
if
(
!
canRestore
(
parent
,
map
))
return
0
;
AbstractQt4MaemoTarget
*
target
=
static_cast
<
AbstractQt4MaemoTarget
*>
(
parent
);
MaemoRunConfiguration
*
rc
=
new
MaemoRunConfiguration
(
target
,
QString
());
MaemoRunConfiguration
*
rc
=
new
MaemoRunConfiguration
(
qobject_cast
<
Qt4BaseTarget
*>
(
parent
)
,
QString
());
if
(
rc
->
fromMap
(
map
))
return
rc
;
...
...
@@ -143,7 +143,7 @@ RunConfiguration *MaemoRunConfigurationFactory::clone(Target *parent,
return
0
;
MaemoRunConfiguration
*
old
=
static_cast
<
MaemoRunConfiguration
*>
(
source
);
return
new
MaemoRunConfiguration
(
static_cast
<
AbstractQt4Maemo
Target
*>
(
parent
),
old
);
return
new
MaemoRunConfiguration
(
static_cast
<
Qt4Base
Target
*>
(
parent
),
old
);
}
// #pragma mark -- MaemoRunControlFactory
...
...
@@ -169,8 +169,10 @@ bool MaemoRunControlFactory::canRun(RunConfiguration *runConfiguration,
return
false
;
const
int
freePortCount
=
maemoRunConfig
->
freePorts
().
count
();
const
AbstractQt4MaemoTarget
*
const
maemoTarget
=
qobject_cast
<
AbstractQt4MaemoTarget
*>
(
maemoRunConfig
->
target
());
const
bool
remoteMountsAllowed
=
maemo
RunConfig
->
maemoTarget
()
->
allowsRemoteMounts
();
=
maemo
Target
&&
maemoTarget
->
allowsRemoteMounts
();
if
(
remoteMountsAllowed
&&
freePortCount
==
0
)
return
false
;
const
int
mountDirCount
...
...
src/plugins/qt4projectmanager/qt-maemo/qt4maemodeployconfiguration.cpp
View file @
aababf0c
...
...
@@ -118,9 +118,9 @@ QStringList Qt4MaemoDeployConfigurationFactory::availableCreationIds(Target *par
ids
<<
Qt4MaemoDeployConfiguration
::
HarmattanId
;
}
else
if
(
qobject_cast
<
Qt4MeegoTarget
*>
(
parent
))
{
ids
<<
Qt4MaemoDeployConfiguration
::
MeegoId
;
}
/*
else if (
qobject_cast<Qt4BaseTarget *>(parent)) { // TODO: Check for Linux
}
else
if
(
MaemoGlobal
::
hasLinuxQt
(
parent
))
{
ids
<<
Qt4MaemoDeployConfiguration
::
GenericLinuxId
;
}
*/
}
return
ids
;
}
...
...
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.cpp
View file @
aababf0c
...
...
@@ -129,19 +129,6 @@ AbstractQt4MaemoTarget::AbstractQt4MaemoTarget(Qt4Project *parent, const QString
AbstractQt4MaemoTarget
::~
AbstractQt4MaemoTarget
()
{
}
AbstractQt4MaemoTarget
::
DebugArchitecture
AbstractQt4MaemoTarget
::
debugArchitecture
()
const
{
// TODO: This functionality should be inside the debugger.
const
ProjectExplorer
::
Abi
&
abi
=
activeBuildConfiguration
()
->
toolChain
()
->
targetAbi
();
DebugArchitecture
arch
(
abi
.
toString
());
// TODO: This might do the wrong thing for x64.
arch
.
gnuTarget
=
QLatin1String
(
abi
.
architecture
()
==
ProjectExplorer
::
Abi
::
ArmArchitecture
?
"arm-none-linux-gnueabi"
:
"i386-unknown-linux-gnu"
);
return
arch
;
}
QList
<
ProjectExplorer
::
ToolChain
*>
AbstractQt4MaemoTarget
::
possibleToolChains
(
ProjectExplorer
::
BuildConfiguration
*
bc
)
const
{
QList
<
ProjectExplorer
::
ToolChain
*>
result
;
...
...
src/plugins/qt4projectmanager/qt-maemo/qt4maemotarget.h
View file @
aababf0c
...
...
@@ -60,6 +60,7 @@ public:
Qt4BuildConfigurationFactory
*
buildConfigurationFactory
()
const
;
void
createApplicationProFiles
();
QList
<
ProjectExplorer
::
RunConfiguration
*>
runConfigurationsForNode
(
ProjectExplorer
::
Node
*
n
);
QList
<
ProjectExplorer
::
ToolChain
*>
possibleToolChains
(
ProjectExplorer
::
BuildConfiguration
*
bc
)
const
;
virtual
bool
allowsRemoteMounts
()
const
=
0
;
virtual
bool
allowsPackagingDisabling
()
const
=
0
;
...
...
@@ -74,19 +75,6 @@ public:
bool
setPackageName
(
const
QString
&
packageName
);
bool
setShortDescription
(
const
QString
&
description
);
struct
DebugArchitecture
{
explicit
DebugArchitecture
(
const
QString
&
a
=
QString
(),
const
QString
&
t
=
QString
())
:
architecture
(
a
),
gnuTarget
(
t
)
{
}
QString
architecture
;
QString
gnuTarget
;
};
// TODO: Is this needed with the ABI info we have?
DebugArchitecture
debugArchitecture
()
const
;
QList
<
ProjectExplorer
::
ToolChain
*>
possibleToolChains
(
ProjectExplorer
::
BuildConfiguration
*
bc
)
const
;
protected:
enum
ActionStatus
{
NoActionRequired
,
ActionSuccessful
,
ActionFailed
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment