diff options
Diffstat (limited to 'src/tools/tqcomponentfactory.cpp')
| -rw-r--r-- | src/tools/tqcomponentfactory.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/tools/tqcomponentfactory.cpp b/src/tools/tqcomponentfactory.cpp index 4d799b024..c8b8e6e6d 100644 --- a/src/tools/tqcomponentfactory.cpp +++ b/src/tools/tqcomponentfactory.cpp @@ -115,7 +115,7 @@ static TQPtrList<TQComLibrary> *liblist() { if ( !libraries ) { libraries = new TQPtrList<TQComLibrary>(); - libraries->setAutoDelete( TRUE ); + libraries->setAutoDelete( true ); tqAddPostRoutine( cleanup ); } return libraries; @@ -150,7 +150,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid & { TQSettings settings; settings.insertSearchPath( TQSettings::Windows, "/Classes" ); - bool ok = FALSE; + bool ok = false; TQString cidStr = cid; TQRESULT res = TQE_NOCOMPONENT; @@ -168,7 +168,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid & return res; TQComLibrary *library = new TQComLibrary( file ); - library->setAutoUnload( FALSE ); + library->setAutoUnload( false ); TQComponentFactoryInterface *cfIface =0; library->queryInterface( IID_QComponentFactory, (TQUnknownInterface**)&cfIface ); @@ -184,7 +184,7 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid & delete library; // only deletes the object, thanks to TQLibrary::Manual } else { libiface->release(); - library->setAutoUnload( TRUE ); + library->setAutoUnload( true ); liblist()->prepend( library ); } return res; @@ -196,8 +196,8 @@ TQRESULT TQComponentFactory::createInstance( const TQString &cid, const TQUuid & the \link TQComponentRegistrationInterface::registerComponents() registerComponents() \endlink function is called. - Returns TRUE if the interface is found and successfully called, - otherwise returns FALSE. + Returns true if the interface is found and successfully called, + otherwise returns false. */ TQRESULT TQComponentFactory::registerServer( const TQString &filename ) { @@ -219,8 +219,8 @@ TQRESULT TQComponentFactory::registerServer( const TQString &filename ) the \link TQComponentRegistrationInterface::unregisterComponents() unregisterComponents() \endlink function is called. - Returns TRUE if the interface is found and successfully unregistered, - otherwise returns FALSE. + Returns true if the interface is found and successfully unregistered, + otherwise returns false. */ TQRESULT TQComponentFactory::unregisterServer( const TQString &filename ) { @@ -237,11 +237,11 @@ TQRESULT TQComponentFactory::unregisterServer( const TQString &filename ) /*! Registers the component with id \a cid in the system component registry and - returns TRUE if the component was registerd successfully, otherwise returns - FALSE. The component is provided by the component server at \a filepath and + returns true if the component was registerd successfully, otherwise returns + false. The component is provided by the component server at \a filepath and registered with an optional \a name, \a version and \a description. - This function does nothing and returns FALSE if a component with an identical + This function does nothing and returns false if a component with an identical \a cid does already exist on the system. A component that has been registered with a \a name can be created using both the @@ -254,14 +254,14 @@ TQRESULT TQComponentFactory::unregisterServer( const TQString &filename ) */ bool TQComponentFactory::registerComponent( const TQUuid &cid, const TQString &filepath, const TQString &name, int version, const TQString &description ) { - bool ok = FALSE; + bool ok = false; TQSettings settings; settings.insertSearchPath( TQSettings::Windows, "/Classes" ); TQString cidStr = cid.toString().upper(); settings.readEntry( "/CLSID/" + cidStr + "/InprocServer32/Default", TQString::null, &ok ); if ( ok ) // don't overwrite existing component - return FALSE; + return false; ok = settings.writeEntry( "/CLSID/" + cidStr + "/InprocServer32/Default", filepath ); if ( ok && !!description ) @@ -292,7 +292,7 @@ bool TQComponentFactory::registerComponent( const TQUuid &cid, const TQString &f /*! Unregisters the component with id \a cid from the system component registry and returns - TRUE if the component was unregistered successfully, otherwise returns FALSE. + true if the component was unregistered successfully, otherwise returns false. Call this function for each component in an implementation of \link TQComponentRegistrationInterface::unregisterComponents() unregisterComponents() \endlink. @@ -302,12 +302,12 @@ bool TQComponentFactory::registerComponent( const TQUuid &cid, const TQString &f bool TQComponentFactory::unregisterComponent( const TQUuid &cid ) { TQSettings settings; - bool ok = FALSE; + bool ok = false; settings.insertSearchPath( TQSettings::Windows, "/Classes" ); TQString cidStr = cid.toString().upper(); if ( cidStr.isEmpty() ) - return FALSE; + return false; // unregister the human readable part TQString vName = settings.readEntry( "/CLSID/" + cidStr + "/ProgID/Default", TQString::null, &ok ); |
