From a4ebd73f48610ed351c9c53f3646d0597f8ea7bc Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 22 Dec 2025 12:05:18 +0900 Subject: Replace TRUE/FALSE with boolean values true/false - part 9 Signed-off-by: Michele Calgaro --- src/tools/tqgpluginmanager.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/tools/tqgpluginmanager.cpp') diff --git a/src/tools/tqgpluginmanager.cpp b/src/tools/tqgpluginmanager.cpp index 94b5a6435..a19532136 100644 --- a/src/tools/tqgpluginmanager.cpp +++ b/src/tools/tqgpluginmanager.cpp @@ -264,13 +264,13 @@ static int similarity( const TQString& s1, const TQString& s2 ) */ /*! - \fn TQPluginManager::TQPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = TRUE ) + \fn TQPluginManager::TQPluginManager( const TQUuid& id, const TQStringList& paths = TQString::null, const TQString &suffix = TQString::null, bool cs = true ) Creates an TQPluginManager for interfaces \a id that will load all shared library files in the \a paths + \a suffix. - If \a cs is FALSE the manager will handle feature strings case insensitive. + If \a cs is false the manager will handle feature strings case insensitive. \warning - Setting the cs flag to FALSE requires that components also convert to lower case when comparing with passed strings, so this has + Setting the cs flag to false requires that components also convert to lower case when comparing with passed strings, so this has to be handled with care and documented very well. \sa TQApplication::libraryPaths() @@ -290,10 +290,10 @@ static int similarity( const TQString& s1, const TQString& s2 ) #include TQGPluginManager::TQGPluginManager( const TQUuid& id, const TQStringList& paths, const TQString &suffix, bool cs ) - : interfaceId( id ), plugDict( 17, cs ), casesens( cs ), autounload( TRUE ) + : interfaceId( id ), plugDict( 17, cs ), casesens( cs ), autounload( true ) { // Every TQLibrary object is destroyed on destruction of the manager - libDict.setAutoDelete( TRUE ); + libDict.setAutoDelete( true ); for ( TQStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it ) { TQString path = *it; addLibraryPath( path + suffix ); @@ -307,14 +307,14 @@ TQGPluginManager::~TQGPluginManager() while ( it.current() ) { TQLibrary *lib = it.current(); ++it; - lib->setAutoUnload( FALSE ); + lib->setAutoUnload( false ); } } } void TQGPluginManager::addLibraryPath( const TQString& path ) { - if ( !enabled() || !TQDir( path ).exists( ".", TRUE ) ) + if ( !enabled() || !TQDir( path ).exists( ".", true ) ) return; #if defined(Q_OS_WIN32) @@ -393,7 +393,7 @@ const TQLibrary* TQGPluginManager::library( const TQString& feature ) const that->addLibrary( new TQComLibrary( lib ) ); } else { TQPtrList same; - same.setAutoDelete( TRUE ); + same.setAutoDelete( true ); same.append( new TQComLibrary( lib ) ); for ( TQStringList::ConstIterator bit = sameBasename.begin(); bit != sameBasename.end(); ++bit ) @@ -458,10 +458,10 @@ TQStringList TQGPluginManager::featureList() const bool TQGPluginManager::addLibrary( TQLibrary* lib ) { if ( !enabled() || !lib ) - return FALSE; + return false; TQComLibrary* plugin = (TQComLibrary*)lib; - bool useful = FALSE; + bool useful = false; TQUnknownInterface* iFace = 0; plugin->queryInterface( interfaceId, &iFace ); @@ -486,22 +486,22 @@ bool TQGPluginManager::addLibrary( TQLibrary* lib ) for ( TQStringList::Iterator f = fl.begin(); f != fl.end(); ++f ) { TQLibrary *old = plugDict[*f]; if ( !old ) { - useful = TRUE; + useful = true; plugDict.replace( *f, plugin ); } else { // we have old *and* plugin, which one to pick? TQComLibrary* first = (TQComLibrary*)old; TQComLibrary* second = (TQComLibrary*)plugin; - bool takeFirst = TRUE; + bool takeFirst = true; if ( first->qtVersion() != TQT_VERSION ) { if ( second->qtVersion() == TQT_VERSION ) - takeFirst = FALSE; + takeFirst = false; else if ( second->qtVersion() < TQT_VERSION && first->qtVersion() > TQT_VERSION ) - takeFirst = FALSE; + takeFirst = false; } if ( !takeFirst ) { - useful = TRUE; + useful = true; plugDict.replace( *f, plugin ); tqWarning("%s: Discarding feature %s in %s!", (const char*) TQFile::encodeName( plugin->library()), @@ -526,19 +526,19 @@ bool TQGPluginManager::addLibrary( TQLibrary* lib ) libDict.replace( plugin->library(), plugin ); if ( !libList.contains( plugin->library() ) ) libList.append( plugin->library() ); - return TRUE; + return true; } delete plugin; - return FALSE; + return false; } bool TQGPluginManager::enabled() const { #ifdef QT_SHARED - return TRUE; + return true; #else - return FALSE; + return false; #endif } -- cgit v1.2.3