Index: /trunk/src/VBox/Frontends/VirtualBox4/include/COMDefs.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/include/COMDefs.h	(revision 9424)
+++ /trunk/src/VBox/Frontends/VirtualBox4/include/COMDefs.h	(revision 9425)
@@ -31,8 +31,8 @@
  * @{
  *
- * The Qt-COM support layer provides a set of defintions and smart classes for
+ * The Qt-COM support layer provides a set of definitions and smart classes for
  * writing simple, clean and platform-independent code to access COM/XPCOM
  * components through exposed COM interfaces. This layer is based on the
- * COM/XPCOM Abstarction Layer library (the VBoxCOM glue library defined in
+ * COM/XPCOM Abstraction Layer library (the VBoxCOM glue library defined in
  * include/VBox/com and implemented in src/VBox/Main/glue).
  *
@@ -42,9 +42,9 @@
  * @{
  *
- * COM/XPCOM arrays are mapped to QValueVector objects. QValueVector templates
- * declared with a type that corresponds to the COM type of elements in the
- * array using normal Qt-COM type mapping rules. Here is a code example that
- * demonstrates how to call interface methods that take and return arrays (this
- * example is based on examples given in @ref grp_COM_arrays):
+ * COM/XPCOM arrays are mapped to QVector objects. QVector templates declared
+ * with a type that corresponds to the COM type of elements in the array using
+ * normal Qt-COM type mapping rules. Here is a code example that demonstrates
+ * how to call interface methods that take and return arrays (this example is
+ * based on examples given in @ref grp_COM_arrays):
  * @code
 
@@ -53,11 +53,11 @@
     // ...
 
-    QValueVector <LONG> in (3);
+    QVector <LONG> in (3);
     in [0] = -1;
     in [1] = -2;
     in [2] = -3;
 
-    QValueVector <LONG> out;
-    QValueVector <LONG> ret;
+    QVector <LONG> out;
+    QVector <LONG> ret;
 
     ret = component.TestArrays (in, out);
@@ -258,8 +258,6 @@
     {
         aArr.reset (aVec.size());
-        size_t i = 0;
-        for (typename QVector <T>::const_iterator it = aVec.begin();
-             it != aVec.end(); ++ it, ++ i)
-            aArr [i] = *it;
+        for (int i = 0; i < aVec.size(); ++i)
+            aArr [i] = aVec.at (i);
     }
 
@@ -267,9 +265,7 @@
     static void FromSafeArray (const com::SafeArray <T> &aArr, QVector <T> &aVec)
     {
-        aVec = QVector <T> (aArr.size());
-        size_t i = 0;
-        for (typename QVector <T>::iterator it = aVec.begin();
-             it != aVec.end(); ++ it, ++ i)
-            *it = aArr [i];
+        aVec.resize (aArr.size());
+        for (int i = 0; i < aVec.size(); ++i)
+            aVec [i] = aArr [i];
     }
 
@@ -295,9 +291,7 @@
     {
         aArr.reset (aVec.size());
-        size_t i = 0;
-        for (typename QVector <CI>::const_iterator it = aVec.begin();
-             it != aVec.end(); ++ it, ++ i)
-        {
-            aArr [i] = (*it).iface();
+        for (int i = 0; i < aVec.size(); ++i)
+        {
+            aArr [i] = aVec.at (i);
             if (aArr [i])
                 aArr [i]->AddRef();
@@ -309,9 +303,7 @@
                                     QVector <CI> &aVec)
     {
-        aVec = QVector <CI> (aArr.size());
-        size_t i = 0;
-        for (typename QVector <CI>::iterator it = aVec.begin();
-             it != aVec.end(); ++ it, ++ i)
-            (*it).attach (aArr [i]);
+        aVec.resize (aArr.size());
+        for (int i = 0; i < aVec.size(); ++i)
+            aVec [i].attach (aArr [i]);
     }
 
@@ -525,5 +517,5 @@
 
     /**
-     * Returns @c true if the result code repesents success (with or without
+     * Returns @c true if the result code represents success (with or without
      * warnings).
      */
@@ -531,5 +523,5 @@
 
     /**
-     * Returns @c true if the result code represends success with one or more
+     * Returns @c true if the result code represents success with one or more
      * warnings.
      */
@@ -537,5 +529,5 @@
 
     /**
-     * Returns @c true if the result code represends success with no warnings.
+     * Returns @c true if the result code represents success with no warnings.
      */
     bool isReallyOk() const { return mRC == S_OK; }
@@ -647,5 +639,5 @@
 
     /**
-     * Returns @c true if the result code repesents success (with or without
+     * Returns @c true if the result code represents success (with or without
      * warnings).
      */
@@ -653,5 +645,5 @@
 
     /**
-     * Returns @c true if the result code represends success with one or more
+     * Returns @c true if the result code represents success with one or more
      * warnings.
      */
@@ -659,5 +651,5 @@
 
     /**
-     * Returns @c true if the result code represends success with no warnings.
+     * Returns @c true if the result code represents success with no warnings.
      */
     bool isReallyOk() const { return !isNull() && B::mRC == S_OK; }
Index: /trunk/src/VBox/Frontends/VirtualBox4/src/COMDefs.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox4/src/COMDefs.cpp	(revision 9424)
+++ /trunk/src/VBox/Frontends/VirtualBox4/src/COMDefs.cpp	(revision 9425)
@@ -191,8 +191,6 @@
 {
     aArr.reset (aVec.size());
-    size_t i = 0;
-    for (QVector <QString>::const_iterator it = aVec.begin();
-         it != aVec.end(); ++ it, ++ i)
-        aArr [i] = SysAllocString ((const OLECHAR *) (*it).utf16());
+    for (int i = 0; i < aVec.size(); ++i)
+        aArr [i] = SysAllocString ((const OLECHAR *) aVec.at (i).utf16());
 }
 
@@ -201,9 +199,7 @@
                              QVector <QString> &aVec)
 {
-    aVec = QVector <QString> (aArr.size());
-    size_t i = 0;
-    for (QVector <QString>::iterator it = aVec.begin();
-         it != aVec.end(); ++ it, ++ i)
-        *it = QString::fromUtf16 (aArr [i]);
+    aVec.resize (aArr.size());
+    for (int i = 0; i < aVec.size(); ++i)
+        aVec [i] = QString::fromUtf16 (aArr [i]);
 }
 
@@ -226,4 +222,5 @@
     if (info.isOk())
         mInterfaceName = getInterfaceNameFromIID (mInterfaceID);
+    printf("iface %s\n", qPrintable (mInterfaceName));
 
     mComponent = info.GetComponent();
@@ -322,16 +319,20 @@
 #else /* !defined (VBOX_WITH_XPCOM) */
 
+    printf("1\n");
     nsCOMPtr <nsIExceptionService> es;
     es = do_GetService (NS_EXCEPTIONSERVICE_CONTRACTID, &rc);
     if (NS_SUCCEEDED (rc))
     {
+        printf("2\n");
         nsCOMPtr <nsIExceptionManager> em;
         rc = es->GetCurrentExceptionManager (getter_AddRefs (em));
         if (NS_SUCCEEDED (rc))
         {
+            printf("3\n");
             nsCOMPtr <nsIException> ex;
             rc = em->GetCurrentException (getter_AddRefs(ex));
             if (NS_SUCCEEDED (rc) && ex)
             {
+                printf("4\n");
                 nsCOMPtr <IVirtualBoxErrorInfo> info;
                 info = do_QueryInterface (ex, &rc);
@@ -339,6 +340,8 @@
                     init (CVirtualBoxErrorInfo (info));
 
+                printf("5\n");
                 if (!mIsFullAvailable)
                 {
+                    printf("6\n");
                     bool gotSomething = false;
 
@@ -351,6 +354,9 @@
                     if (NS_SUCCEEDED (rc) && message)
                     {
-                        mText = QString::fromUtf8 (message);
-                        nsMemory::Free (message);
+                        printf("7\n");
+//                        mText = QString::fromUtf8 (message);
+                        printf ("%s\n", message);
+                        mText = "sdafsdf";
+//                        nsMemory::Free (message);
                     }
 
