diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-22 12:05:18 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-22 12:13:05 +0900 |
| commit | a4ebd73f48610ed351c9c53f3646d0597f8ea7bc (patch) | |
| tree | 2edd219eef4cb8f35bb3844d06902ae8b2fcb565 /src/tools/tqfileinfo.cpp | |
| parent | 7d612f7c91d55501276a385a30dbadb121e7bd9f (diff) | |
| download | tqt-rename/true-false-9.tar.gz tqt-rename/true-false-9.zip | |
Replace TRUE/FALSE with boolean values true/false - part 9rename/true-false-9
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tools/tqfileinfo.cpp')
| -rw-r--r-- | src/tools/tqfileinfo.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/tools/tqfileinfo.cpp b/src/tools/tqfileinfo.cpp index e9ba95680..1a50b7713 100644 --- a/src/tools/tqfileinfo.cpp +++ b/src/tools/tqfileinfo.cpp @@ -84,7 +84,7 @@ extern bool qt_file_access( const TQString& fn, int t ); even by other parts of the same program, there is a function that refreshes the file information: refresh(). If you want to switch off a TQFileInfo's caching and force it to access the file system - every time you request information from it call setCaching(FALSE). + every time you request information from it call setCaching(false). The file's type is obtained with isFile(), isDir() and isSymLink(). The readLink() function provides the name of the file @@ -142,9 +142,9 @@ extern bool qt_file_access( const TQString& fn, int t ); TQFileInfo::TQFileInfo() { fic = 0; - cache = TRUE; + cache = true; #if defined(Q_OS_UNIX) - symLink = FALSE; + symLink = false; #endif } @@ -163,9 +163,9 @@ TQFileInfo::TQFileInfo( const TQString &file ) fn = file; slashify( fn ); fic = 0; - cache = TRUE; + cache = true; #if defined(Q_OS_UNIX) - symLink = FALSE; + symLink = false; #endif } @@ -184,9 +184,9 @@ TQFileInfo::TQFileInfo( const TQFile &file ) fn = file.name(); slashify( fn ); fic = 0; - cache = TRUE; + cache = true; #if defined(Q_OS_UNIX) - symLink = FALSE; + symLink = false; #endif } @@ -205,9 +205,9 @@ TQFileInfo::TQFileInfo( const TQDir &d, const TQString &fileName ) fn = d.filePath( fileName ); slashify( fn ); fic = 0; - cache = TRUE; + cache = true; #if defined(Q_OS_UNIX) - symLink = FALSE; + symLink = false; #endif } #endif @@ -343,7 +343,7 @@ void TQFileInfo::setFile( const TQDir &d, const TQString &fileName ) #endif /*! - Returns TRUE if the file exists; otherwise returns FALSE. + Returns true if the file exists; otherwise returns false. */ bool TQFileInfo::exists() const @@ -368,14 +368,14 @@ void TQFileInfo::refresh() const /*! \fn bool TQFileInfo::caching() const - Returns TRUE if caching is enabled; otherwise returns FALSE. + Returns true if caching is enabled; otherwise returns false. \sa setCaching(), refresh() */ /*! - If \a enable is TRUE, enables caching of file information. If \a - enable is FALSE caching is disabled. + If \a enable is true, enables caching of file information. If \a + enable is false caching is disabled. When caching is enabled, TQFileInfo reads the file information from the file system the first time it's needed, but generally not @@ -413,11 +413,11 @@ TQString TQFileInfo::filePath() const /*! Returns the base name of the file. - If \a complete is FALSE (the default) the base name consists of + If \a complete is false (the default) the base name consists of all characters in the file name up to (but not including) the \e first '.' character. - If \a complete is TRUE the base name consists of all characters in + If \a complete is true the base name consists of all characters in the file up to (but not including) the \e last '.' character. The path is not included in either case. @@ -426,7 +426,7 @@ TQString TQFileInfo::filePath() const \code TQFileInfo fi( "/tmp/archive.tar.gz" ); TQString base = fi.baseName(); // base = "archive" - base = fi.baseName( TRUE ); // base = "archive.tar" + base = fi.baseName( true ); // base = "archive.tar" \endcode \sa fileName(), extension() @@ -445,11 +445,11 @@ TQString TQFileInfo::baseName( bool complete ) const /*! Returns the file's extension name. - If \a complete is TRUE (the default), extension() returns the + If \a complete is true (the default), extension() returns the string of all characters in the file name after (but not including) the first '.' character. - If \a complete is FALSE, extension() returns the string of all + If \a complete is false, extension() returns the string of all characters in the file name after (but not including) the last '.' character. @@ -457,7 +457,7 @@ TQString TQFileInfo::baseName( bool complete ) const \code TQFileInfo fi( "/tmp/archive.tar.gz" ); TQString ext = fi.extension(); // ext = "tar.gz" - ext = fi.extension( FALSE ); // ext = "gz" + ext = fi.extension( false ); // ext = "gz" \endcode \sa fileName(), baseName() @@ -476,7 +476,7 @@ TQString TQFileInfo::extension( bool complete ) const /*! Returns the file's path as a TQDir object. - If the TQFileInfo is relative and \a absPath is FALSE, the TQDir + If the TQFileInfo is relative and \a absPath is false, the TQDir will be relative; otherwise it will be absolute. \sa dirPath(), filePath(), fileName(), isRelative() @@ -490,7 +490,7 @@ TQDir TQFileInfo::dir( bool absPath ) const /*! - Returns TRUE if the file is readable; otherwise returns FALSE. + Returns true if the file is readable; otherwise returns false. \sa isWritable(), isExecutable(), permission() */ @@ -505,7 +505,7 @@ bool TQFileInfo::isReadable() const } /*! - Returns TRUE if the file is writable; otherwise returns FALSE. + Returns true if the file is writable; otherwise returns false. \sa isReadable(), isExecutable(), permission() */ @@ -520,7 +520,7 @@ bool TQFileInfo::isWritable() const } /*! - Returns TRUE if the file is executable; otherwise returns FALSE. + Returns true if the file is executable; otherwise returns false. \sa isReadable(), isWritable(), permission() */ @@ -546,7 +546,7 @@ bool TQFileInfo::isHidden() const #endif /*! - Returns TRUE if the file path name is relative. Returns FALSE if + Returns true if the file path name is relative. Returns false if the path is absolute (e.g. under Unix a path is absolute if it begins with a "/"). */ @@ -662,7 +662,7 @@ TQDateTime TQFileInfo::lastRead() const drive letter, in which case the path will begin '//sharename/'. This function returns the same as filePath(), unless isRelative() - is TRUE. + is true. If the TQFileInfo is empty it returns TQDir::currentDirPath(). |
