Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVersion.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVersion.h	(revision 70829)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVersion.h	(revision 70830)
@@ -86,4 +86,33 @@
     int z() const { return m_z; }
 
+    /** Defines the object X value. */
+    void setX(int x) { m_x = x; }
+    /** Defines the object Y value. */
+    void setY(int y) { m_y = y; }
+    /** Defines the object Z value. */
+    void setZ(int z) { m_z = z; }
+
+    /** Returns effective released version guessed or hardcoded for this one version.
+      * This can be even the version itself. */
+    UIVersion effectiveRelasedVersion() const
+    {
+        /* First, we just copy the current one: */
+        UIVersion version = *this;
+
+        /* If this version being developed: */
+        if (version.z() % 2 == 1)
+        {
+            /* If this version being developed on release branch (we guess the right one): */
+            if (version.z() < 97)
+                version.setZ(version.z() - 1);
+            /* If this version being developed on trunk (we use hardcoded one for now): */
+            else
+                version.setZ(6); /* Current .z for 5.2.z */
+        }
+
+        /* Finally, we just return that we have:  */
+        return version;
+    }
+
 private:
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp	(revision 70829)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp	(revision 70830)
@@ -31,4 +31,5 @@
 # include "UIMessageCenter.h"
 # include "UIModalWindowManager.h"
+# include "UIVersion.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
@@ -61,25 +62,6 @@
         m_spInstance = this;
 
-    /* Get version number and adjust it for test and trunk builds,
-     * both have odd build numbers. The server only has official releases. */
-    QString strVersion = vboxGlobal().vboxVersionStringNormalized();
-    const QChar qchLastDigit = strVersion[strVersion.length() - 1];
-    if (   qchLastDigit == '1'
-        || qchLastDigit == '3'
-        || qchLastDigit == '5'
-        || qchLastDigit == '7'
-        || qchLastDigit == '9')
-    {
-        if (   !strVersion.endsWith(".51")
-            && !strVersion.endsWith(".53")
-            && !strVersion.endsWith(".97")
-            && !strVersion.endsWith(".99"))
-            strVersion[strVersion.length() - 1] = qchLastDigit.toLatin1() - 1;
-        else
-        {
-            strVersion.chop(2);
-            strVersion += "6"; /* Current for 5.2.x */
-        }
-    }
+    /* Get version number and adjust it for test and trunk builds. The server only has official releases. */
+    const QString strVersion = UIVersion(vboxGlobal().vboxVersionStringNormalized()).effectiveRelasedVersion().toString();
 
     /* Prepare source/target: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp	(revision 70829)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp	(revision 70830)
@@ -31,4 +31,5 @@
 # include "UIMessageCenter.h"
 # include "UIModalWindowManager.h"
+# include "UIVersion.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
@@ -61,25 +62,6 @@
         m_spInstance = this;
 
-    /* Get version number and adjust it for test and trunk builds,
-     * both have odd build numbers. The server only has official releases. */
-    QString strVersion = vboxGlobal().vboxVersionStringNormalized();
-    const QChar qchLastDigit = strVersion[strVersion.length() - 1];
-    if (   qchLastDigit == '1'
-        || qchLastDigit == '3'
-        || qchLastDigit == '5'
-        || qchLastDigit == '7'
-        || qchLastDigit == '9')
-    {
-        if (   !strVersion.endsWith(".51")
-            && !strVersion.endsWith(".53")
-            && !strVersion.endsWith(".97")
-            && !strVersion.endsWith(".99"))
-            strVersion[strVersion.length() - 1] = qchLastDigit.toLatin1() - 1;
-        else
-        {
-            strVersion.chop(2);
-            strVersion += "6"; /* Current for 5.2.x */
-        }
-    }
+    /* Get version number and adjust it for test and trunk builds. The server only has official releases. */
+    const QString strVersion = UIVersion(vboxGlobal().vboxVersionStringNormalized()).effectiveRelasedVersion().toString();
 
     /* Prepare source/target: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp	(revision 70829)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderUserManual.cpp	(revision 70830)
@@ -31,4 +31,5 @@
 # include "UIMessageCenter.h"
 # include "UIModalWindowManager.h"
+# include "UIVersion.h"
 
 #endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
@@ -58,25 +59,6 @@
         m_spInstance = this;
 
-    /* Get version number and adjust it for test and trunk builds,
-     * both have odd build numbers. The server only has official releases. */
-    QString strVersion = vboxGlobal().vboxVersionStringNormalized();
-    const QChar qchLastDigit = strVersion[strVersion.length() - 1];
-    if (   qchLastDigit == '1'
-        || qchLastDigit == '3'
-        || qchLastDigit == '5'
-        || qchLastDigit == '7'
-        || qchLastDigit == '9')
-    {
-        if (   !strVersion.endsWith(".51")
-            && !strVersion.endsWith(".53")
-            && !strVersion.endsWith(".97")
-            && !strVersion.endsWith(".99"))
-            strVersion[strVersion.length() - 1] = qchLastDigit.toLatin1() - 1;
-        else
-        {
-            strVersion.chop(2);
-            strVersion += "6"; /* Current for 5.2.x */
-        }
-    }
+    /* Get version number and adjust it for test and trunk builds. The server only has official releases. */
+    const QString strVersion = UIVersion(vboxGlobal().vboxVersionStringNormalized()).effectiveRelasedVersion().toString();
 
     /* Compose User Manual filename: */
