Changeset 15832 in vbox for trunk/src/VBox/Frontends/VirtualBox4
- Timestamp:
- Jan 7, 2009 1:27:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxGlobal.cpp
r15822 r15832 89 89 #include <iprt/file.h> 90 90 #include <iprt/ldr.h> 91 92 #if defined (Q_OS_MACX) || defined (Q_OS_SOLARIS) /* platform info */93 91 #include <iprt/system.h> 94 #endif95 92 96 93 #ifdef VBOX_GUI_WITH_SYSTRAY … … 2636 2633 distrib = QString ("Unknown %1"); 2637 2634 } 2638 else 2635 else /** @todo Windows Server 2008 == vista? Probably not... */ 2639 2636 distrib = QString ("Unknown %1"); 2640 2637 distrib = distrib.arg (sp); … … 2643 2640 platform += QString (" [Distribution: %1 | Version: %2 | Build: %3]") 2644 2641 .arg (distrib).arg (version).arg (kernel); 2645 #elif defined (Q_OS_OS2)2646 // TODO: add sys info for os2 if any...2647 2642 #elif defined (Q_OS_LINUX) 2648 2643 /* Get script path */ … … 2655 2650 if (!result.isNull()) 2656 2651 platform += QString (" [%1]").arg (QString (result).trimmed()); 2657 #elif defined (Q_OS_MACX) || defined (Q_OS_SOLARIS) || defined (Q_OS_FREEBSD) 2652 #else 2653 /* Use RTSystemQueryOSInfo. */ 2658 2654 char szTmp[256]; 2659 2655 QStringList components; 2660 int vrc = RTSystemQueryOSInfo (RTSYSOSINFO_PRODUCT, szTmp, sizeof (szTmp));2661 if ( RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW)2656 int vrc = RTSystemQueryOSInfo (RTSYSOSINFO_PRODUCT, szTmp, sizeof (szTmp)); 2657 if ((RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW) && szTmp[0] != '\0') 2662 2658 components << QString ("Product: %1").arg (szTmp); 2663 vrc = RTSystemQueryOSInfo (RTSYSOSINFO_RELEASE, szTmp, sizeof (szTmp));2664 if ( RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW)2659 vrc = RTSystemQueryOSInfo (RTSYSOSINFO_RELEASE, szTmp, sizeof (szTmp)); 2660 if ((RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW) && szTmp[0] != '\0') 2665 2661 components << QString ("Release: %1").arg (szTmp); 2666 vrc = RTSystemQueryOSInfo (RTSYSOSINFO_VERSION, szTmp, sizeof (szTmp));2667 if ( RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW)2662 vrc = RTSystemQueryOSInfo (RTSYSOSINFO_VERSION, szTmp, sizeof (szTmp)); 2663 if ((RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW) && szTmp[0] != '\0') 2668 2664 components << QString ("Version: %1").arg (szTmp); 2669 vrc = RTSystemQueryOSInfo (RTSYSOSINFO_SERVICE_PACK, szTmp, sizeof (szTmp));2670 if ( RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW)2665 vrc = RTSystemQueryOSInfo (RTSYSOSINFO_SERVICE_PACK, szTmp, sizeof (szTmp)); 2666 if ((RT_SUCCESS (vrc) || vrc == VERR_BUFFER_OVERFLOW) && szTmp[0] != '\0') 2671 2667 components << QString ("SP: %1").arg (szTmp); 2672 platform += QString (" [%1]").arg (components.join (" | ")); 2668 if (!components.isEmpty()) 2669 platform += QString (" [%1]").arg (components.join (" | ")); 2673 2670 #endif 2674 2671
Note:
See TracChangeset
for help on using the changeset viewer.