Changeset 8 for trunk/src/tools/qglobal.cpp
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tools/qglobal.cpp
r7 r8 47 47 #if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) && !defined(Q_OS_TEMP) 48 48 #include <crtdbg.h> 49 #endif 50 51 #if defined(Q_OS_OS2) 52 #include "qt_os2.h" 49 53 #endif 50 54 … … 359 363 \endcode 360 364 361 Under X11 , the text is printed to stderr. Under Windows, the text365 Under X11 or OS/2, the text is printed to stderr. Under Windows, the text 362 366 is sent to the debugger. 363 367 … … 392 396 \endcode 393 397 394 Under X11 , the text is printed to stderr. Under Windows, the text398 Under X11 or OS/2, the text is printed to stderr. Under Windows, the text 395 399 is sent to the debugger. 396 400 … … 426 430 \endcode 427 431 428 Under X11 , the text is printed to stderr. Under Windows, the text432 Under X11 or OS/2, the text is printed to stderr. Under Windows, the text 429 433 is sent to the debugger. 430 434 … … 652 656 error code will be used if possible. Use this method to handle 653 657 failures in platform specific API calls. 658 659 Under OS/2, the value -1 for \a code should only be used after Presentation 660 Manager calls. 654 661 655 662 This function does nothing when Qt is built with \c QT_NO_DEBUG … … 689 696 } ); 690 697 LocalFree( (HLOCAL)string ); 698 #elif defined(Q_OS_OS2) 699 if ( code != -1 ) { 700 CHAR buf [256] = {0}; 701 ULONG len = 0; 702 APIRET rc = DosGetMessage( NULL, 0, buf, sizeof(buf) - 1, code, "OSO001.MSG", &len ); 703 if ( !rc ) { 704 buf[len] = '\0'; 705 qWarning( "%s\n\tError %s", msg, buf ); 706 } else { 707 if ( rc == ERROR_MR_MSG_TOO_LONG ) 708 qWarning( 709 "%s\n\tError code SYS%04d, " 710 "type help %d in the command prompt to get more information", 711 msg, code, code ); 712 else 713 qWarning( "%s\n\tError code %d (system error)", msg, code ); 714 } 715 } else { 716 code = (int) WinGetLastError( 0 ); 717 if ( code ) 718 qWarning( "%s\n\tError code %08X (PM error)", msg, code ); 719 else 720 qWarning( msg ); 721 } 691 722 #else 692 723 if ( code != -1 ) … … 858 889 859 890 The default message handler prints the message to the standard 860 output under X11 or to the debugger under Windows. If it is a891 output under X11 and OS/2 or to the debugger under Windows. If it is a 861 892 fatal message, the application aborts immediately. 862 893
Note:
See TracChangeset
for help on using the changeset viewer.