musicservices/tsrc/unittest_musicservices/src/unittest_musicservices.cpp
changeset 55 f3930dda3342
parent 22 ecf06a08d4d9
--- a/musicservices/tsrc/unittest_musicservices/src/unittest_musicservices.cpp	Tue Aug 24 03:36:14 2010 -0500
+++ b/musicservices/tsrc/unittest_musicservices/src/unittest_musicservices.cpp	Fri Sep 03 19:58:01 2010 -0500
@@ -15,8 +15,7 @@
 *
 */
 
-#include <hbapplication.h>
-#include <hbmainwindow.h>
+#include <qnamespace.h>
 
 
 #include "unittest_musicservices.h"
@@ -34,19 +33,20 @@
  */
 int main(int argc, char *argv[])
 {
-    HbApplication app(argc, argv);
-    HbMainWindow window;
-
+	  QApplication app(argc, argv);
     TestMusicServices tv;
 
-    char *pass[3];
-    pass[0] = argv[0];
-    pass[1] = "-o";
-    pass[2] = "c:\\data\\unittest_musicservices.txt";
+    if ( argc > 1 ) {
+        return QTest::qExec( &tv, argc, argv);
+    }
+    else {
+        char *pass[3];
+        pass[0] = argv[0];
+        pass[1] = "-o";
+        pass[2] = "c:\\data\\unittest_musicservices.txt";
 
-    int res = QTest::qExec(&tv, 3, pass);
-
-    return res;
+        return QTest::qExec(&tv, 3, pass);
+    }
 }
 
 TestMusicServices::TestMusicServices()