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
9f7794a3
Commit
9f7794a3
authored
Oct 05, 2009
by
Robert Loehning
Browse files
Trk: Checking result of TrkInstallFile.
parent
b61969be
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
View file @
9f7794a3
...
...
@@ -630,6 +630,7 @@ void S60DeviceRunControlBase::signsisProcessFinished()
connect
(
m_launcher
,
SIGNAL
(
canNotCreateFile
(
QString
,
QString
)),
this
,
SLOT
(
printCreateFileFailed
(
QString
,
QString
)));
connect
(
m_launcher
,
SIGNAL
(
canNotWriteFile
(
QString
,
QString
)),
this
,
SLOT
(
printWriteFileFailed
(
QString
,
QString
)));
connect
(
m_launcher
,
SIGNAL
(
installingStarted
()),
this
,
SLOT
(
printInstallingNotice
()));
connect
(
m_launcher
,
SIGNAL
(
canNotInstall
(
QString
,
QString
)),
this
,
SLOT
(
printInstallFailed
(
QString
,
QString
)));
connect
(
m_launcher
,
SIGNAL
(
copyProgress
(
int
)),
this
,
SLOT
(
printCopyProgress
(
int
)));
//TODO sisx destination and file path user definable
...
...
@@ -676,6 +677,11 @@ void S60DeviceRunControlBase::printInstallingNotice()
emit
addToOutputWindow
(
this
,
tr
(
"Installing application..."
));
}
void
S60DeviceRunControlBase
::
printInstallFailed
(
const
QString
&
filename
,
const
QString
&
errorMessage
)
{
emit
addToOutputWindow
(
this
,
tr
(
"Could not install from package %1 on device: %2"
).
arg
(
filename
,
errorMessage
));
}
void
S60DeviceRunControlBase
::
launcherFinished
()
{
m_launcher
->
deleteLater
();
...
...
src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
View file @
9f7794a3
...
...
@@ -175,6 +175,7 @@ private slots:
void
printWriteFileFailed
(
const
QString
&
filename
,
const
QString
&
errorMessage
);
void
printCopyProgress
(
int
progress
);
void
printInstallingNotice
();
void
printInstallFailed
(
const
QString
&
filename
,
const
QString
&
errorMessage
);
void
launcherFinished
();
private:
...
...
src/shared/trk/launcher.cpp
View file @
9f7794a3
...
...
@@ -155,7 +155,7 @@ bool Launcher::startServer(QString *errorMessage)
if
(
d
->
m_startupActions
&
ActionCopy
)
copyFileToRemote
();
else
if
(
d
->
m_startupActions
&
ActionInstall
)
installRemotePackageSilently
(
d
->
m_installFileName
);
installRemotePackageSilently
();
else
if
(
d
->
m_startupActions
&
ActionRun
)
startInferiorIfNeeded
();
return
true
;
...
...
@@ -379,7 +379,7 @@ void Launcher::handleFileCopied(const TrkResult &result)
{
Q_UNUSED
(
result
)
if
(
d
->
m_startupActions
&
ActionInstall
)
installRemotePackageSilently
(
d
->
m_installFileName
);
installRemotePackageSilently
();
else
if
(
d
->
m_startupActions
&
ActionRun
)
startInferiorIfNeeded
();
else
...
...
@@ -518,21 +518,25 @@ void Launcher::copyFileToRemote()
d
->
m_device
.
sendTrkMessage
(
TrkOpenFile
,
TrkCallback
(
this
,
&
Launcher
::
handleFileCreation
),
ba
);
}
void
Launcher
::
installRemotePackageSilently
(
const
QString
&
fileName
)
void
Launcher
::
installRemotePackageSilently
()
{
emit
installingStarted
();
QByteArray
ba
;
appendByte
(
&
ba
,
'C'
);
appendString
(
&
ba
,
f
ileName
.
toLocal8Bit
(),
TargetByteOrder
,
false
);
appendString
(
&
ba
,
d
->
m_installF
ileName
.
toLocal8Bit
(),
TargetByteOrder
,
false
);
d
->
m_device
.
sendTrkMessage
(
TrkInstallFile
,
TrkCallback
(
this
,
&
Launcher
::
handleInstallPackageFinished
),
ba
);
}
void
Launcher
::
handleInstallPackageFinished
(
const
TrkResult
&
)
void
Launcher
::
handleInstallPackageFinished
(
const
TrkResult
&
result
)
{
if
(
d
->
m_startupActions
&
ActionRun
)
if
(
result
.
errorCode
())
{
emit
canNotInstall
(
d
->
m_installFileName
,
result
.
errorString
());
emit
finished
();
}
else
if
(
d
->
m_startupActions
&
ActionRun
)
{
startInferiorIfNeeded
();
else
}
else
{
emit
finished
();
}
}
void
Launcher
::
startInferiorIfNeeded
()
...
...
src/shared/trk/launcher.h
View file @
9f7794a3
...
...
@@ -72,6 +72,7 @@ signals:
void
canNotCreateFile
(
const
QString
&
filename
,
const
QString
&
errorMessage
);
void
canNotWriteFile
(
const
QString
&
filename
,
const
QString
&
errorMessage
);
void
installingStarted
();
void
canNotInstall
(
const
QString
&
packageFilename
,
const
QString
&
errorMessage
);
void
startingApplication
();
void
applicationRunning
(
uint
pid
);
void
canNotRun
(
const
QString
&
errorMessage
);
...
...
@@ -104,7 +105,7 @@ private:
void
waitForTrkFinished
(
const
TrkResult
&
data
);
void
copyFileToRemote
();
void
installRemotePackageSilently
(
const
QString
&
filename
);
void
installRemotePackageSilently
();
void
startInferiorIfNeeded
();
void
logMessage
(
const
QString
&
msg
);
...
...
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