--- a/videocollection/videocollectionview/src/videooperatorservice_p.cpp Tue Oct 05 09:26:49 2010 +0300
+++ b/videocollection/videocollectionview/src/videooperatorservice_p.cpp Fri Oct 15 16:29:10 2010 +0300
@@ -18,10 +18,10 @@
// Version :
// INCLUDE FILES
+#include "videocollectiontrace.h"
#include "videooperatorservice_p.h"
#include "videocollectionviewutils.h"
#include "videocollectioncenrepdefs.h"
-#include "videocollectiontrace.h"
#include <qdesktopservices.h>
#include <qurl.h>
@@ -30,13 +30,15 @@
#include <apgcli.h>
#include <apaid.h>
#include <apgtask.h>
+#include <xqappmgr.h>
// ---------------------------------------------------------------------------
// Constructor
// ---------------------------------------------------------------------------
//
VideoOperatorServicePrivate::VideoOperatorServicePrivate() :
- mProcess(0)
+ mProcess(0),
+ mAppMgr(0)
{
}
@@ -57,6 +59,9 @@
mProcess->close();
}
delete mProcess;
+ mProcess = 0;
+ delete mAppMgr;
+ mAppMgr = 0;
}
// ---------------------------------------------------------------------------
@@ -111,7 +116,7 @@
if(!mServiceUri.isEmpty())
{
INFOQSTR_1("VideoOperatorServicePrivate::launchService() starting url: %S", mServiceUri);
- QDesktopServices::openUrl(QUrl(mServiceUri));
+ launchUrl(mServiceUri);
}
else
{
@@ -222,6 +227,41 @@
}
// ---------------------------------------------------------------------------
+// launchUrl
+// ---------------------------------------------------------------------------
+//
+void VideoOperatorServicePrivate::launchUrl(QString url)
+{
+ if(!mAppMgr)
+ {
+ mAppMgr = new XQApplicationManager();
+ }
+
+ XQAiwRequest *request = mAppMgr->create(QUrl(url));
+ if(!request)
+ {
+ INFO("VideoOperatorServicePrivate::launchUrl() handler was not found!");
+ return;
+ }
+
+ // Set function parameters
+ QList<QVariant> args;
+ args << url;
+ request->setArguments(args);
+ request->setEmbedded(true);
+ // Send the request
+ bool res = request->send();
+ if(!res)
+ {
+ // Request failed.
+ int error = request->lastError();
+ INFO_1("VideoOperatorServicePrivate::launchUrl() send failed with error: %d", error);
+ }
+
+ delete request;
+}
+
+// ---------------------------------------------------------------------------
// processFinished
// ---------------------------------------------------------------------------
//