Changeset 84

Show
Ignore:
Timestamp:
12/03/06 18:45:43 (2 years ago)
Author:
dmik
Message:

Psi: Added installation of the OS/2 System Exception handler (QtOS2SysXcptHandler) on the main thread.

Location:
psi/trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • psi/trunk/src/common.cpp

    r76 r84  
    2121#include"common.h" 
    2222 
     23#if defined(Q_OS_OS2) && !defined(QT_OS2_NO_SYSEXCEPTIONS) 
     24#include <qt_os2.h> 
     25#endif 
     26 
    2327#include"profiles.h" 
    2428#include"rtparse.h" 
     
    2731 
    2832QString PROG_NAME = "Psi/2"; 
    29 QString PROG_VERSION = "0.10.1"; 
    30 //QString PROG_VERSION = "0.10.1-dev (" __DATE__ ")"; 
     33//QString PROG_VERSION = "0.10.2"; 
     34QString PROG_VERSION = "0.10.2-dev (" __DATE__ ")"; 
    3135 
    3236#ifdef HAVE_CONFIG 
     
    20112015} 
    20122016 
     2017#if defined(Q_OS_OS2) && !defined(QT_OS2_NO_SYSEXCEPTIONS) 
     2018int psiOS2SysXcptCallback( QtOS2SysXcptReq req, QtOS2SysXcptWriter writer, 
     2019                                                   int /* reserved */ ) 
     2020{ 
     2021    switch( req ) 
     2022    { 
     2023        case QtOS2SysXcptReq_AppName: 
     2024            if ( writer ) writer( PROG_NAME.latin1() ); 
     2025            return TRUE; 
     2026        case QtOS2SysXcptReq_AppVer: 
     2027            if ( writer ) writer( PROG_VERSION.latin1() ); 
     2028            return TRUE; 
     2029        case QtOS2SysXcptReq_ReportTo: 
     2030            if ( writer ) writer( "qt-traps@hugaida.com" ); 
     2031            return TRUE; 
     2032                default: 
     2033                        break; 
     2034    } 
     2035    return FALSE; 
     2036} 
     2037#endif 
  • psi/trunk/src/main.cpp

    r2 r84  
    3434#include<qmessagebox.h> 
    3535#include<qca.h> 
     36 
     37#if defined(Q_OS_OS2) && !defined(QT_OS2_NO_SYSEXCEPTIONS) 
     38#include <qt_os2.h> 
     39extern // defined in common.cpp 
     40int psiOS2SysXcptCallback( QtOS2SysXcptReq req, QtOS2SysXcptWriter writer, 
     41                                                   int /* reserved */ ); 
     42#endif 
     43 
     44 
    3645#include<stdlib.h> 
    3746#include<time.h> 
     47 
    3848#include"common.h" 
    3949#include"profiles.h" 
     
    337347int main(int argc, char *argv[]) 
    338348{ 
     349#if defined(Q_OS_OS2) && !defined(QT_OS2_NO_SYSEXCEPTIONS) 
     350        // install the OS/2 system exception handler and callback 
     351    QtOS2SysXcptMainHandler sysXcptHandler( psiOS2SysXcptCallback ); 
     352#endif 
     353 
    339354        // add library paths before creating QApplication 
    340355        if (!loadGlobal()) 
  • psi/trunk/src/psiapplication.cpp

    r53 r84  
    128128        Q_UNUSED(GUIenabled); 
    129129#ifdef Q_WS_PM 
     130        // enable ft2lib when appropriate 
    130131        if ( GUIenabled ) { 
    131132                Ft2EnableFontEngine =