Changeset 19 for psi/trunk/src/common.cpp
- Timestamp:
- Sep 5, 2006, 1:31:01 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
psi/trunk/src/common.cpp
r2 r19 27 27 28 28 QString PROG_NAME = "Psi"; 29 #ifdef Q_WS_PM 30 QString PROG_VERSION = "0.10-os2-b1 (" __DATE__ ")"; // OS/2 versions are betas yet 31 #else 29 32 //QString PROG_VERSION = "0.11-dev" " (" __DATE__ ")"; //CVS Builds are dated 30 33 QString PROG_VERSION = "0.10"; 34 #endif 31 35 32 36 #ifdef HAVE_CONFIG … … 58 62 #ifdef Q_WS_WIN 59 63 #include<windows.h> 64 #endif 65 66 #ifdef Q_WS_PM 67 #include<sys/types.h> 68 #include<sys/stat.h> 60 69 #endif 61 70 … … 995 1004 useCustom = FALSE; 996 1005 #endif 1006 #ifdef Q_WS_PM 1007 /// @todo (dmik) use HINI_USER_PROFILE\WPURLDEFAULTSETTINGS\DefaultBrowserExe 1008 #endif 997 1009 #ifdef Q_WS_X11 998 1010 if(option.browser == 0 || option.browser == 2) … … 1040 1052 QMessageBox::critical(0, CAP(QObject::tr("URL error")), QObject::tr("Unable to open the URL. Ensure that you have a web browser installed.")); 1041 1053 } 1054 #endif 1055 #ifdef Q_WS_PM 1056 /// @todo (dmik) use HINI_USER_PROFILE\WPURLDEFAULTSETTINGS\DefaultBrowserExe 1042 1057 #endif 1043 1058 #ifdef Q_WS_X11 … … 1102 1117 static void getSysInfo() 1103 1118 { 1104 #if defined(Q_WS_X11) || defined(Q_WS_MAC) 1119 #if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_PM) 1120 /// @todo (dmik) test it 1105 1121 time_t x; 1106 1122 time(&x); … … 1206 1222 } 1207 1223 } 1224 #elif defined(Q_WS_PM) 1225 os_str = "OS/2"; 1208 1226 #elif defined(Q_WS_MAC) 1209 1227 os_str = "Mac OS X"; … … 1328 1346 else 1329 1347 base = QDir::homeDirPath(); 1348 1349 // no trailing slash 1350 if(base.at(base.length()-1) == '/') 1351 base.truncate(base.length()-1); 1352 1353 QDir proghome(base + "/PsiData"); 1354 if(!proghome.exists()) { 1355 QDir home(base); 1356 home.mkdir("PsiData"); 1357 } 1358 1359 return proghome.path(); 1360 } 1361 #endif 1362 1363 #ifdef Q_WS_PM 1364 QString getResourcesDir() 1365 { 1366 #if QT_VERSION >= 0x030200 1367 return qApp->applicationDirPath(); 1368 #else 1369 # error Not implemented! 1370 #endif 1371 } 1372 1373 QString getHomeDir() 1374 { 1375 QString base = QDir::homeDirPath(); 1330 1376 1331 1377 // no trailing slash … … 1465 1511 return; 1466 1512 1467 #if defined(Q_WS_WIN) || defined(Q_WS_ MAC)1513 #if defined(Q_WS_WIN) || defined(Q_WS_PM) || defined(Q_WS_MAC) 1468 1514 QSound::play(str); 1469 1515 #else
Note:
See TracChangeset
for help on using the changeset viewer.