-
Notifications
You must be signed in to change notification settings - Fork 1
/
QtAppLauncher.cpp
60 lines (56 loc) · 1.43 KB
/
QtAppLauncher.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* AppLauncher.cpp
*
* Created on: 23/ago/2010
* Author: faenil
*/
#include <QObject>
#include <QtGui/QWidget>
#include <QtGui/QMainWindow>
#include <QObject>
#include "QtAppLauncher.h"
#include <QtGui/QMessageBox>
#ifdef Q_OS_SYMBIAN
#include "apgtask.h"
#include "coemain.h"
#endif
QtAppLauncher::QtAppLauncher(QWidget *parent)
: QMainWindow(parent)
{
#ifdef Q_OS_SYMBIAN
const static TUid camera = {0x101F857A};
process2 = new QProcess();
//connect error() to slot processError() to get error, if occurs.
QObject::connect( process2, SIGNAL(error(QProcess::ProcessError)),
this, SLOT(processError(QProcess::ProcessError)));
QProcess::startDetached("Camcorder");
#endif
}
//get errors, if any
void QtAppLauncher::processError(QProcess::ProcessError err)
{
switch(err)
{
case QProcess::FailedToStart:
QMessageBox::information(0,"FailedToStart","FailedToStart");
break;
case QProcess::Crashed:
QMessageBox::information(0,"Crashed","Crashed");
break;
case QProcess::Timedout:
QMessageBox::information(0,"FailedToStart","FailedToStart");
break;
case QProcess::WriteError:
QMessageBox::information(0,"Timedout","Timedout");
break;
case QProcess::ReadError:
QMessageBox::information(0,"ReadError","ReadError");
break;
case QProcess::UnknownError:
QMessageBox::information(0,"UnknownError","UnknownError");
break;
default:
QMessageBox::information(0,"default","default");
break;
}
}