summaryrefslogtreecommitdiffstats
path: root/src/imports/serviceframework/qdeclarativeservice_p.h
diff options
context:
space:
mode:
authorAndrew Stanley-Jones <andrew.stanley-jones@nokia.com>2011-09-23 16:01:01 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-23 08:32:47 +0200
commit6dafb88b22250bf85a3f27154bcfe76f70b223dd (patch)
treefd36955e54614a6568e0ca736e0bc6492c346861 /src/imports/serviceframework/qdeclarativeservice_p.h
parenta17e7315861fe8af19eb23f60f6653f38eef1712 (diff)
Add QML error reporting
Change-Id: I7246ad768a2efdc871e62dceb3fac005ec44bfca Reviewed-on: http://codereview.qt-project.org/5444 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
Diffstat (limited to 'src/imports/serviceframework/qdeclarativeservice_p.h')
-rw-r--r--src/imports/serviceframework/qdeclarativeservice_p.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/src/imports/serviceframework/qdeclarativeservice_p.h b/src/imports/serviceframework/qdeclarativeservice_p.h
index 0fb5778c..3cd77a0d 100644
--- a/src/imports/serviceframework/qdeclarativeservice_p.h
+++ b/src/imports/serviceframework/qdeclarativeservice_p.h
@@ -58,6 +58,7 @@ class QDeclarativeService : public QObject {
Q_PROPERTY(int minorVersion READ minorVersion NOTIFY minorVersionChanged)
Q_PROPERTY(bool valid READ isValid NOTIFY validChanged)
Q_PROPERTY(QObject* serviceObject READ serviceObject NOTIFY serviceObjectChanged)
+ Q_PROPERTY(QString error READ lastError NOTIFY error)
public:
QDeclarativeService();
@@ -71,6 +72,7 @@ public:
QString serviceName() const;
int majorVersion() const;
int minorVersion() const;
+ QString lastError() const;
bool isValid() const;
QObject* serviceObject();
@@ -83,10 +85,16 @@ Q_SIGNALS:
void majorVersionChanged();
void minorVersionChanged();
+ void error(const QString &errorString);
+
+private slots:
+ void IPCFault(QService::UnrecoverableIPCError);
+
private:
- QObject* serviceInstance;
+ QPointer<QObject> serviceInstance;
QServiceManager* serviceManager;
QServiceInterfaceDescriptor m_descriptor;
+ QString m_error;
};
@@ -134,6 +142,15 @@ public:
virtual void classBegin();
virtual void componentComplete();
+Q_SIGNALS:
+ void resultsChanged();
+ void servicesChanged(const QDeclarativeListProperty<QDeclarativeService>&);
+ void serviceNameChanged();
+ void interfaceNameChanged();
+ void minorVersionChanged();
+ void majorVersionChanged();
+ void versionMatchChanged();
+
private:
QList<QDeclarativeService *> m_services;
QServiceManager* serviceManager;
@@ -151,14 +168,6 @@ private:
static QDeclarativeService* s_at(QDeclarativeListProperty<QDeclarativeService> *prop, int index);
static void s_clear(QDeclarativeListProperty<QDeclarativeService> *prop);
-Q_SIGNALS:
- void resultsChanged();
- void servicesChanged(const QDeclarativeListProperty<QDeclarativeService>&);
- void serviceNameChanged();
- void interfaceNameChanged();
- void minorVersionChanged();
- void majorVersionChanged();
- void versionMatchChanged();
};