- Timestamp:
- Sep 5, 2010, 11:03:48 PM (14 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mainwindow.cpp
r131 r133 160 160 QString file; 161 161 if ((fileName == tr("Untitled") + ".tspt") && settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()) 162 file = settings->value( "LastUsed/TaskLoadPath").toString();162 file = settings->value(OS"/LastUsed/TaskLoadPath").toString(); 163 163 else 164 164 file = QFileInfo(fileName).path(); … … 168 168 return; 169 169 if (settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()) 170 settings->setValue( "LastUsed/TaskLoadPath", QFileInfo(file).path());170 settings->setValue(OS"/LastUsed/TaskLoadPath", QFileInfo(file).path()); 171 171 172 172 if (!tspmodel->loadTask(file)) … … 201 201 if (selectedFile.isEmpty()) { 202 202 if (settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()) { 203 selectedFile = settings->value( "LastUsed/SolutionSavePath").toString();203 selectedFile = settings->value(OS"/LastUsed/SolutionSavePath").toString(); 204 204 } 205 205 } else … … 237 237 selectedFile = file; 238 238 if (settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()) 239 settings->setValue( "LastUsed/SolutionSavePath", QFileInfo(selectedFile).path());239 settings->setValue(OS"/LastUsed/SolutionSavePath", QFileInfo(selectedFile).path()); 240 240 QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); 241 241 #ifndef QT_NO_PRINTER … … 454 454 455 455 QString title; 456 #ifdef HANDHELD457 title += QString("<b>TSPSG<br>TSP Solver and Generator</b><br>");458 #else459 456 title += QString("<b>%1</b><br>").arg(QApplication::applicationName()); 460 #endif // HANDHELD461 457 title += QString("%1: <b>%2</b><br>").arg(tr("Version"), QApplication::applicationVersion()); 462 458 #ifndef HANDHELD … … 466 462 467 463 QString about; 468 about += QString("%1: <b>%2</b><br>").arg(tr("Target OS (ARCH)"), OS);464 about += QString("%1: <b>%2</b><br>").arg(tr("Target OS (ARCH)"), PLATFROM); 469 465 #ifndef STATIC_BUILD 470 466 about += QString("%1 (%2):<br>").arg(tr("Qt library"), tr("shared")); … … 474 470 about += QString("%1: <b>%2</b> (%3)<br>").arg(tr("Qt library"), QT_VERSION_STR, tr("static")); 475 471 #endif // STATIC_BUILD 476 about += tr("Buid <b>%1</b>, built on <b>%2</b> at <b>%3</b> ").arg(BUILD_NUMBER).arg(__DATE__).arg(__TIME__) + "<br>";472 about += tr("Buid <b>%1</b>, built on <b>%2</b> at <b>%3</b> with <b>%4</b> compiler.").arg(BUILD_NUMBER).arg(__DATE__).arg(__TIME__).arg(COMPILER) + "<br>"; 477 473 about += QString("%1: <b>%2</b><br>").arg(tr("Algorithm"), CTSPSolver::getVersionId()); 478 474 about += "<br>"; … … 1448 1444 QString file; 1449 1445 if ((fileName == tr("Untitled") + ".tspt") && settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()) { 1450 file = settings->value( "LastUsed/TaskSavePath").toString();1446 file = settings->value(OS"/LastUsed/TaskSavePath").toString(); 1451 1447 if (!file.isEmpty()) 1452 1448 file.append("/"); … … 1462 1458 return false; 1463 1459 else if (settings->value("SaveLastUsed", DEF_SAVE_LAST_USED).toBool()) 1464 settings->setValue( "LastUsed/TaskSavePath", QFileInfo(file).path());1460 settings->setValue(OS"/LastUsed/TaskSavePath", QFileInfo(file).path()); 1465 1461 1466 1462 if (tspmodel->saveTask(file)) { -
trunk/src/os.h
r132 r133 66 66 */ 67 67 #ifdef Q_OS_AIX 68 #define OS "AIX" ARCH68 #define OS "AIX" 69 69 #define OSID quint8(1) 70 70 #elif defined Q_OS_BSD4 71 #define OS "BSD 4.4" ARCH71 #define OS "BSD 4.4" 72 72 #define OSID quint8(2) 73 73 #elif defined Q_OS_BSDI 74 #define OS "BSD/OS" ARCH74 #define OS "BSD/OS" 75 75 #define OSID quint8(3) 76 76 #elif defined Q_OS_CYGWIN 77 #define OS "Cygwin" ARCH77 #define OS "Cygwin" 78 78 #define OSID quint8(4) 79 79 #elif defined Q_OS_DGUX 80 #define OS "DG/UX" ARCH80 #define OS "DG/UX" 81 81 #define OSID quint8(5) 82 82 #elif defined Q_OS_DYNIX 83 #define OS "DYNIX/ptx" ARCH83 #define OS "DYNIX/ptx" 84 84 #define OSID quint8(6) 85 85 #elif defined Q_OS_FREEBSD 86 #define OS "FreeBSD" ARCH86 #define OS "FreeBSD" 87 87 #define OSID quint8(7) 88 88 #elif defined Q_OS_HPUX 89 #define OS "HP-UX" ARCH89 #define OS "HP-UX" 90 90 #define OSID quint8(8) 91 91 #elif defined Q_OS_HURD 92 #define OS "GNU Hurd" ARCH92 #define OS "GNU Hurd" 93 93 #define OSID quint8(9) 94 94 #elif defined Q_OS_IRIX 95 #define OS "SGI Irix" ARCH95 #define OS "SGI Irix" 96 96 #define OSID quint8(10) 97 97 #elif defined Q_OS_LINUX 98 #define OS "Linux" ARCH98 #define OS "Linux" 99 99 #define OSID quint8(11) 100 100 #elif defined Q_OS_LYNX 101 #define OS "LynxOS" ARCH101 #define OS "LynxOS" 102 102 #define OSID quint8(12) 103 103 #elif defined Q_OS_MAC 104 #define OS "Mac OS (Darwin)" ARCH104 #define OS "Mac OS (Darwin)" 105 105 #define OSID quint8(13) 106 106 #elif defined Q_OS_MSDOS 107 #define OS "MS-DOS" ARCH107 #define OS "MS-DOS" 108 108 #define OSID quint8(14) 109 109 #elif defined Q_OS_NETBSD 110 #define OS "NetBSD" ARCH110 #define OS "NetBSD" 111 111 #define OSID quint8(15) 112 112 #elif defined Q_OS_OS2 113 #define OS "OS/2" ARCH113 #define OS "OS/2" 114 114 #define OSID quint8(16) 115 115 #elif defined Q_OS_OPENBSD 116 #define OS "OpenBSD" ARCH116 #define OS "OpenBSD" 117 117 #define OSID quint8(17) 118 118 #elif defined Q_OS_OS2EMX 119 #define OS "OS/2" ARCH119 #define OS "OS/2" 120 120 #define OSID quint8(18) 121 121 #elif defined Q_OS_OSF 122 #define OS "HP Tru64 UNIX" ARCH122 #define OS "HP Tru64 UNIX" 123 123 #define OSID quint8(19) 124 124 #elif defined Q_OS_QNX 125 #define OS "QNX Neutrino" ARCH125 #define OS "QNX Neutrino" 126 126 #define OSID quint8(20) 127 127 #elif defined Q_OS_RELIANT 128 #define OS "Reliant UNIX" ARCH128 #define OS "Reliant UNIX" 129 129 #define OSID quint8(21) 130 130 #elif defined Q_OS_SCO 131 #define OS "SCO OpenServer 5" ARCH131 #define OS "SCO OpenServer 5" 132 132 #define OSID quint8(22) 133 133 #elif defined Q_OS_SOLARIS 134 #define OS "Sun Solaris" ARCH134 #define OS "Sun Solaris" 135 135 #define OSID quint8(23) 136 136 #elif defined Q_OS_SYMBIAN 137 #define OS "Symbian" ARCH137 #define OS "Symbian" 138 138 #define OSID quint8(24) 139 139 #elif defined Q_OS_ULTRIX 140 #define OS "DEC Ultrix" ARCH140 #define OS "DEC Ultrix" 141 141 #define OSID quint8(25) 142 142 #elif defined Q_OS_UNIX 143 #define OS "UNIX BSD/SYSV" ARCH143 #define OS "UNIX BSD/SYSV" 144 144 #define OSID quint8(26) 145 145 #elif defined Q_OS_UNIXWARE 146 #define OS "UnixWare 7/Open UNIX 8" ARCH146 #define OS "UnixWare 7/Open UNIX 8" 147 147 #define OSID quint8(27) 148 148 #elif defined Q_OS_WIN32 149 #define OS "Windows" ARCH149 #define OS "Windows" 150 150 #define OSID quint8(28) 151 151 #elif defined Q_OS_WINCE_WM 152 #define OS "Windows Mobile" ARCH152 #define OS "Windows Mobile" 153 153 #define OSID quint8(29) 154 154 #elif defined Q_OS_WINCE 155 #define OS "Windows CE" ARCH155 #define OS "Windows CE" 156 156 #define OSID quint8(30) 157 157 #else 158 #define OS "Unknown" ARCH158 #define OS "Unknown" 159 159 #define OSID quint8(255) 160 160 #endif // OS 161 161 162 //! The target platform in the form OS ARCH 163 #define PLATFROM OS ARCH 164 165 /*! 166 * \def COMPILER 167 * \brief The compiler TSPSG was built with. 168 */ 169 #ifdef Q_CC_MSVC 170 #define COMPILER "Microsoft Visual C/C++ or Intel C++ for Windows" 171 #elif defined(Q_CC_GNU) 172 #define COMPILER "GNU C++" 173 #elif defined(Q_CC_INTEL) 174 #define COMPILER "Intel C++ for Linux or Intel C++ for Windows" 175 #elif defined(Q_CC_GCCE) 176 #define COMPILER "GCCE (Symbian GCCE builds)" 177 #elif defined(Q_CC_RVCT) 178 #define COMPILER "ARM Realview Compiler Suite" 179 #elif defined(Q_CC_NOKIAX86) 180 #define COMPILER "Nokia x86 (Symbian WINSCW builds)" 181 #else 182 #define COMPILER "Unknown" 183 #endif 184 162 185 #endif // OS_H
Note: See TracChangeset
for help on using the changeset viewer.