Advertisement
Guest User

Untitled

a guest
Feb 6th, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #elif defined(Q_WS_HAIKU)
  2. extern const char* __get_haiku_revision(void);
  3.     QString strVersion("Haiku");
  4.     BPath path;
  5.     if (find_directory(B_BEOS_LIB_DIRECTORY, &path) == B_OK) {
  6.         path.Append("libbe.so");
  7.         BAppFileInfo appFileInfo;
  8.         version_info versionInfo;
  9.         BFile file;
  10.         if (file.SetTo(path.Path(), B_READ_ONLY) == B_OK
  11.             && appFileInfo.SetTo(&file) == B_OK
  12.             && appFileInfo.GetVersionInfo(&versionInfo,
  13.                 B_APP_VERSION_KIND) == B_OK
  14.             && versionInfo.short_info[0] != '\0')
  15.                 strVersion = versionInfo.short_info;
  16.     }
  17.  
  18.     const char* haikuRevision = __get_haiku_revision();
  19.     if (haikuRevision != NULL) {
  20.         os_str_ += " ( " + strVersion + " Rev. ";
  21.         os_str_ += haikuRevision;
  22.         os_str_ += ")";
  23.     }
  24.        
  25. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement