Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
f692d505
Commit
f692d505
authored
Jun 24, 2010
by
ck
Browse files
Maemo: Fix merge artifacts.
parent
ec1bc282
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
View file @
f692d505
...
...
@@ -35,7 +35,6 @@
#include "maemoruncontrol.h"
#include "maemopackagecreationstep.h"
#include "maemosshthread.h"
#include "maemorunconfiguration.h"
#include "maemopackagecontents.h"
...
...
@@ -67,6 +66,7 @@ using ProjectExplorer::RunConfiguration;
using
ProjectExplorer
::
ToolChain
;
using
namespace
Debugger
;
AbstractMaemoRunControl
::
AbstractMaemoRunControl
(
RunConfiguration
*
rc
,
QString
mode
)
:
RunControl
(
rc
,
mode
)
,
m_runConfig
(
qobject_cast
<
MaemoRunConfiguration
*>
(
rc
))
...
...
@@ -136,7 +136,7 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging)
const
MaemoPackageCreationStep
*
const
packageStep
=
m_runConfig
->
packageStep
();
if
(
packageStep
->
isPackagingEnabled
())
{
const
MaemoDeployable
d
(
packageFilePath
(),
remote
Dir
());
const
MaemoDeployable
d
(
packageFilePath
(),
upload
Dir
());
m_needsInstall
=
addDeployableIfNeeded
(
d
);
}
else
{
const
MaemoPackageContents
*
const
packageContents
...
...
@@ -151,7 +151,7 @@ void AbstractMaemoRunControl::startDeployment(bool forDebugging)
if
(
forDebugging
)
{
QFileInfo
dumperInfo
(
m_runConfig
->
dumperLib
());
if
(
dumperInfo
.
exists
())
{
const
MaemoDeployable
d
(
m_runConfig
->
dumperLib
(),
remote
Dir
());
const
MaemoDeployable
d
(
m_runConfig
->
dumperLib
(),
upload
Dir
());
m_needsInstall
=
addDeployableIfNeeded
(
d
);
}
}
...
...
@@ -164,14 +164,14 @@ bool AbstractMaemoRunControl::addDeployableIfNeeded(const MaemoDeployable &deplo
if
(
m_runConfig
->
currentlyNeedsDeployment
(
m_devConfig
.
server
.
host
,
deployable
))
{
const
QString
fileName
=
QFileInfo
(
deployable
.
localFilePath
).
fileName
();
=
QFileInfo
(
deployable
.
localFilePath
).
fileName
();
const
QString
remoteFilePath
=
deployable
.
remoteDir
+
'/'
+
fileName
;
const
QString
sftpTarget
FilePath
=
remote
Dir
()
+
'/'
+
fileName
+
'.'
const
QString
upload
FilePath
=
upload
Dir
()
+
'/'
+
fileName
+
'.'
+
QCryptographicHash
::
hash
(
remoteFilePath
.
toUtf8
(),
QCryptographicHash
::
Md5
).
toHex
();
m_deployables
.
append
(
MaemoDeployable
(
deployable
.
localFilePath
,
sftpTargetFilePath
));
m_remoteLinks
.
insert
(
sftpTarget
FilePath
,
remoteFilePath
);
// TODO fix merge mess
m_deployables
.
append
(
Core
::
SftpTransferInfo
(
deployable
.
localFilePath
,
uploadFilePath
.
toUtf8
(),
Core
::
SftpTransferInfo
::
Upload
));
m_remoteLinks
.
insert
(
upload
FilePath
,
remoteFilePath
);
return
true
;
}
else
{
return
false
;
...
...
@@ -186,15 +186,11 @@ void AbstractMaemoRunControl::deploy()
if
(
!
m_deployables
.
isEmpty
())
{
QList
<
Core
::
SftpTransferInfo
>
deploySpecs
;
QStringList
files
;
foreach
(
const
MaemoDeployable
&
deployable
,
m_deployables
)
{
foreach
(
const
Core
::
SftpTransferInfo
&
deployable
,
m_deployables
)
files
<<
deployable
.
localFilePath
;
const
QString
remoteFilePath
=
deployable
.
remoteDir
+
'/'
+
QFileInfo
(
deployable
.
localFilePath
).
fileName
();
deploySpecs
<<
Core
::
SftpTransferInfo
(
deployable
.
localFilePath
,
remoteFilePath
.
toUtf8
(),
Core
::
SftpTransferInfo
::
Upload
);
}
emit
appendMessage
(
this
,
tr
(
"Files to deploy: %1."
).
arg
(
files
.
join
(
" "
)),
false
);
m_sshDeployer
.
reset
(
new
MaemoSshDeployer
(
m_devConfig
.
server
,
deploySpecs
));
emit
appendMessage
(
this
,
tr
(
"Files to deploy: %1."
).
arg
(
files
.
join
(
" "
)),
false
);
m_sshDeployer
.
reset
(
new
MaemoSshDeployer
(
m_devConfig
.
server
,
m_deployables
));
connect
(
m_sshDeployer
.
data
(),
SIGNAL
(
finished
()),
this
,
SLOT
(
handleDeployThreadFinished
()));
connect
(
m_sshDeployer
.
data
(),
SIGNAL
(
fileCopied
(
QString
)),
...
...
@@ -211,10 +207,16 @@ void AbstractMaemoRunControl::deploy()
void
AbstractMaemoRunControl
::
handleFileCopied
()
{
const
MaemoDeployable
&
deployable
=
m_deployables
.
takeFirst
();
const
Core
::
SftpTransferInfo
&
deployable
=
m_deployables
.
takeFirst
();
const
QString
remoteDir
=
QFileInfo
(
m_remoteLinks
.
value
(
QString
::
fromUtf8
(
deployable
.
remoteFilePath
)))
.
dir
().
path
();
// TODO: This should be done after the linking step, in case the
// operation is cancelled directly after the upload.
m_runConfig
->
setDeployed
(
m_devConfig
.
server
.
host
,
MaemoDeployable
(
deployable
.
localFilePath
,
m_remoteLinks
.
value
(
deployable
.
remoteDir
)));
// TODO fix merge mess
MaemoDeployable
(
deployable
.
localFilePath
,
remoteDir
));
m_progress
.
setProgressValue
(
m_progress
.
progressValue
()
+
1
);
}
...
...
@@ -341,7 +343,7 @@ const QString AbstractMaemoRunControl::executableFileName() const
return
QFileInfo
(
executableOnHost
()).
fileName
();
}
const
QString
AbstractMaemoRunControl
::
remote
Dir
()
const
const
QString
AbstractMaemoRunControl
::
upload
Dir
()
const
{
return
homeDirOnDevice
(
m_devConfig
.
server
.
uname
);
}
...
...
@@ -445,7 +447,7 @@ MaemoDebugRunControl::MaemoDebugRunControl(RunConfiguration *runConfiguration)
m_startParams
->
sysRoot
=
m_runConfig
->
sysRoot
();
m_startParams
->
toolChainType
=
ToolChain
::
GCC_MAEMO
;
m_startParams
->
dumperLibrary
=
m_runConfig
->
dumperLib
();
m_startParams
->
remoteDumperLib
=
remote
Dir
().
toUtf8
()
+
'/'
m_startParams
->
remoteDumperLib
=
upload
Dir
().
toUtf8
()
+
'/'
+
QFileInfo
(
m_runConfig
->
dumperLib
()).
fileName
().
toUtf8
();
m_debuggerRunControl
=
DebuggerPlugin
::
createDebugger
(
*
m_startParams
.
data
());
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h
View file @
f692d505
...
...
@@ -37,6 +37,7 @@
#include "maemodeviceconfigurations.h"
#include "maemopackagecontents.h"
#include "maemosshthread.h"
#include <projectexplorer/runconfiguration.h>
...
...
@@ -81,7 +82,7 @@ protected:
const
QString
executableFileName
()
const
;
const
QString
targetCmdLinePrefix
()
const
;
QString
targetCmdLineSuffix
()
const
;
const
QString
remote
Dir
()
const
;
const
QString
upload
Dir
()
const
;
QString
packageFileName
()
const
;
QString
packageFilePath
()
const
;
QString
executableFilePathOnTarget
()
const
;
...
...
@@ -112,6 +113,7 @@ private:
bool
isDeploying
()
const
;
QString
remoteSudo
()
const
;
QString
remoteInstallCommand
()
const
;
QString
uploadFilePath
(
const
MaemoDeployable
&
deployable
)
const
;
QFutureInterface
<
void
>
m_progress
;
QScopedPointer
<
MaemoSshDeployer
>
m_sshDeployer
;
...
...
@@ -120,7 +122,7 @@ private:
QScopedPointer
<
MaemoSshRunner
>
m_initialCleaner
;
bool
m_stoppedByUser
;
QList
<
MaemoDeployable
>
m_deployables
;
QList
<
Core
::
SftpTransferInfo
>
m_deployables
;
QMap
<
QString
,
QString
>
m_remoteLinks
;
bool
m_needsInstall
;
};
...
...
Write
Preview
Supports
Markdown
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