summaryrefslogtreecommitdiffstats
path: root/src/tools/tqdir.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2025-12-22 12:05:18 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2025-12-22 12:13:05 +0900
commita4ebd73f48610ed351c9c53f3646d0597f8ea7bc (patch)
tree2edd219eef4cb8f35bb3844d06902ae8b2fcb565 /src/tools/tqdir.cpp
parent7d612f7c91d55501276a385a30dbadb121e7bd9f (diff)
downloadtqt-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/tqdir.cpp')
-rw-r--r--src/tools/tqdir.cpp114
1 files changed, 57 insertions, 57 deletions
diff --git a/src/tools/tqdir.cpp b/src/tools/tqdir.cpp
index 21bea6afd..5e276dfc1 100644
--- a/src/tools/tqdir.cpp
+++ b/src/tools/tqdir.cpp
@@ -50,9 +50,9 @@
#include <limits.h>
#if defined(Q_FS_FAT) && !defined(Q_OS_UNIX)
-const bool CaseSensitiveFS = FALSE;
+const bool CaseSensitiveFS = false;
#else
-const bool CaseSensitiveFS = TRUE;
+const bool CaseSensitiveFS = true;
#endif
@@ -239,7 +239,7 @@ TQDir::TQDir( const TQDir &d )
fList = 0;
fiList = 0;
nameFilt = d.nameFilt;
- dirty = TRUE;
+ dirty = true;
allDirs = d.allDirs;
filtS = d.filtS;
sortS = d.sortS;
@@ -251,7 +251,7 @@ TQDir::TQDir( const TQDir &d )
void TQDir::refresh() const
{
TQDir* that = (TQDir*) this;
- that->dirty = TRUE;
+ that->dirty = true;
}
void TQDir::init()
@@ -259,8 +259,8 @@ void TQDir::init()
fList = 0;
fiList = 0;
nameFilt = TQString::fromLatin1("*");
- dirty = TRUE;
- allDirs = FALSE;
+ dirty = true;
+ allDirs = false;
filtS = All;
sortS = SortSpec(Name | IgnoreCase);
}
@@ -297,7 +297,7 @@ void TQDir::setPath( const TQString &path )
dPath = cleanDirPath( path );
if ( dPath.isEmpty() )
dPath = TQString::fromLatin1(".");
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -362,9 +362,9 @@ TQString TQDir::dirName() const
multiple separators or "." and ".." directories in \a fileName
will not be removed (see cleanDirPath()).
- If \a acceptAbsPath is TRUE a \a fileName starting with a
+ If \a acceptAbsPath is true a \a fileName starting with a
separator "/" will be returned without change. If \a acceptAbsPath
- is FALSE an absolute path will be prepended to the fileName and
+ is false an absolute path will be prepended to the fileName and
the resultant string returned.
\sa absFilePath(), isRelative(), canonicalPath()
@@ -390,9 +390,9 @@ TQString TQDir::filePath( const TQString &fileName,
multiple separators or "." and ".." directories in \a fileName
will not be removed (see cleanDirPath()).
- If \a acceptAbsPath is TRUE a \a fileName starting with a
+ If \a acceptAbsPath is true a \a fileName starting with a
separator "/" will be returned without change. If \a acceptAbsPath
- is FALSE an absolute path will be prepended to the fileName and
+ is false an absolute path will be prepended to the fileName and
the resultant string returned.
\sa filePath()
@@ -475,14 +475,14 @@ TQString TQDir::convertSeparators( const TQString &pathName )
/*!
Changes the TQDir's directory to \a dirName.
- If \a acceptAbsPath is TRUE a path starting with separator "/"
+ If \a acceptAbsPath is true a path starting with separator "/"
will cause the function to change to the absolute directory. If \a
- acceptAbsPath is FALSE any number of separators at the beginning
+ acceptAbsPath is false any number of separators at the beginning
of \a dirName will be removed and the function will descend into
\a dirName.
- Returns TRUE if the new directory exists and is readable;
- otherwise returns FALSE. Note that the logical cd() operation is
+ Returns true if the new directory exists and is readable;
+ otherwise returns false. Note that the logical cd() operation is
not performed if the new directory does not exist.
Calling cd( ".." ) is equivalent to calling cdUp().
@@ -493,7 +493,7 @@ TQString TQDir::convertSeparators( const TQString &pathName )
bool TQDir::cd( const TQString &dirName, bool acceptAbsPath )
{
if ( dirName.isEmpty() || dirName == TQString::fromLatin1(".") )
- return TRUE;
+ return true;
TQString old = dPath;
if ( acceptAbsPath && !isRelativePath(dirName) ) {
dPath = cleanDirPath( dirName );
@@ -501,7 +501,7 @@ bool TQDir::cd( const TQString &dirName, bool acceptAbsPath )
if ( isRoot() ) {
if ( dirName == ".." ) {
dPath = old;
- return FALSE;
+ return false;
}
} else {
dPath += '/';
@@ -528,18 +528,18 @@ bool TQDir::cd( const TQString &dirName, bool acceptAbsPath )
}
if ( !exists() ) {
dPath = old; // regret
- return FALSE;
+ return false;
}
- dirty = TRUE;
- return TRUE;
+ dirty = true;
+ return true;
}
/*!
Changes directory by moving one directory up from the TQDir's
current directory.
- Returns TRUE if the new directory exists and is readable;
- otherwise returns FALSE. Note that the logical cdUp() operation is
+ Returns true if the new directory exists and is readable;
+ otherwise returns false. Note that the logical cdUp() operation is
not performed if the new directory does not exist.
\sa cd(), isReadable(), exists(), path()
@@ -578,7 +578,7 @@ void TQDir::setNameFilter( const TQString &nameFilter )
nameFilt = nameFilter;
if ( nameFilt.isEmpty() )
nameFilt = TQString::fromLatin1("*");
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -643,7 +643,7 @@ void TQDir::setFilter( int filterSpec )
if ( filtS == (FilterSpec) filterSpec )
return;
filtS = (FilterSpec) filterSpec;
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -696,7 +696,7 @@ void TQDir::setSorting( int sortSpec )
if ( sortS == (SortSpec) sortSpec )
return;
sortS = (SortSpec) sortSpec;
- dirty = TRUE;
+ dirty = true;
}
/*!
@@ -708,9 +708,9 @@ void TQDir::setSorting( int sortSpec )
*/
/*!
- If \a enable is TRUE then all directories are included (e.g. in
+ If \a enable is true then all directories are included (e.g. in
entryList()), and the nameFilter() is only applied to the files.
- If \a enable is FALSE then the nameFilter() is applied to both
+ If \a enable is false then the nameFilter() is applied to both
directories and files.
\sa matchAllDirs()
@@ -721,7 +721,7 @@ void TQDir::setMatchAllDirs( bool enable )
if ( (bool)allDirs == enable )
return;
allDirs = enable;
- dirty = TRUE;
+ dirty = true;
}
@@ -921,9 +921,9 @@ const TQFileInfoList *TQDir::entryInfoList( const TQString &nameFilter,
/*!
\overload
- Returns TRUE if the \e directory exists; otherwise returns FALSE.
+ Returns true if the \e directory exists; otherwise returns false.
(If a file with the same name is found this function will return
- FALSE).
+ false).
\sa TQFileInfo::exists(), TQFile::exists()
*/
@@ -935,8 +935,8 @@ bool TQDir::exists() const
}
/*!
- Returns TRUE if the directory path is relative to the current
- directory and returns FALSE if the path is absolute (e.g. under
+ Returns true if the directory path is relative to the current
+ directory and returns false if the path is absolute (e.g. under
UNIX a path is relative if it does not start with a "/").
\sa convertToAbs()
@@ -971,7 +971,7 @@ TQDir &TQDir::operator=( const TQDir &d )
delete fiList;
fiList = 0;
nameFilt = d.nameFilt;
- dirty = TRUE;
+ dirty = true;
allDirs = d.allDirs;
filtS = d.filtS;
sortS = d.sortS;
@@ -987,7 +987,7 @@ TQDir &TQDir::operator=( const TQDir &d )
TQDir &TQDir::operator=( const TQString &path )
{
dPath = cleanDirPath( path );
- dirty = TRUE;
+ dirty = true;
return *this;
}
@@ -995,9 +995,9 @@ TQDir &TQDir::operator=( const TQString &path )
/*!
\fn bool TQDir::operator!=( const TQDir &d ) const
- Returns TRUE if directory \a d and this directory have different
+ Returns true if directory \a d and this directory have different
paths or different sort or filter settings; otherwise returns
- FALSE.
+ false.
Example:
\code
@@ -1010,9 +1010,9 @@ TQDir &TQDir::operator=( const TQString &path )
*/
/*!
- Returns TRUE if directory \a d and this directory have the same
+ Returns true if directory \a d and this directory have the same
path and their sort and filter settings are the same; otherwise
- returns FALSE.
+ returns false.
Example:
\code
@@ -1038,13 +1038,13 @@ bool TQDir::operator==( const TQDir &d ) const
/*!
Removes the file, \a fileName.
- If \a acceptAbsPath is TRUE a path starting with separator "/"
+ If \a acceptAbsPath is true a path starting with separator "/"
will remove the file with the absolute path. If \a acceptAbsPath
- is FALSE any number of separators at the beginning of \a fileName
+ is false any number of separators at the beginning of \a fileName
will be removed and the resultant file name will be removed.
- Returns TRUE if the file is removed successfully; otherwise
- returns FALSE.
+ Returns true if the file is removed successfully; otherwise
+ returns false.
*/
bool TQDir::remove( const TQString &fileName, bool acceptAbsPath )
@@ -1053,7 +1053,7 @@ bool TQDir::remove( const TQString &fileName, bool acceptAbsPath )
#if defined(QT_CHECK_NULL)
tqWarning( "TQDir::remove: Empty or null file name" );
#endif
- return FALSE;
+ return false;
}
TQString p = filePath( fileName, acceptAbsPath );
return TQFile::remove( p );
@@ -1062,12 +1062,12 @@ bool TQDir::remove( const TQString &fileName, bool acceptAbsPath )
/*!
Checks for the existence of the file \a name.
- If \a acceptAbsPath is TRUE a path starting with separator "/"
+ If \a acceptAbsPath is true a path starting with separator "/"
will check the file with the absolute path. If \a acceptAbsPath is
- FALSE any number of separators at the beginning of \a name will be
+ false any number of separators at the beginning of \a name will be
removed and the resultant file name will be checked.
- Returns TRUE if the file exists; otherwise returns FALSE.
+ Returns true if the file exists; otherwise returns false.
\sa TQFileInfo::exists(), TQFile::exists()
*/
@@ -1078,7 +1078,7 @@ bool TQDir::exists( const TQString &name, bool acceptAbsPath ) //### const in 4.
#if defined(QT_CHECK_NULL)
tqWarning( "TQDir::exists: Empty or null file name" );
#endif
- return FALSE;
+ return false;
}
TQString tmp = filePath( name, acceptAbsPath );
return TQFile::exists( tmp );
@@ -1173,7 +1173,7 @@ TQValueList<TQRegExp> qt_makeFilterList( const TQString &filter )
TQStringList list = TQStringList::split( sep, filter );
TQStringList::Iterator it = list.begin();
while ( it != list.end() ) {
- regExps << TQRegExp( (*it).stripWhiteSpace(), CaseSensitiveFS, TRUE );
+ regExps << TQRegExp( (*it).stripWhiteSpace(), CaseSensitiveFS, true );
++it;
}
return regExps;
@@ -1185,18 +1185,18 @@ bool qt_matchFilterList( const TQValueList<TQRegExp>& filters,
TQValueList<TQRegExp>::ConstIterator rit = filters.begin();
while ( rit != filters.end() ) {
if ( (*rit).exactMatch(fileName) )
- return TRUE;
+ return true;
++rit;
}
- return FALSE;
+ return false;
}
/*!
\overload
- Returns TRUE if the \a fileName matches any of the wildcard (glob)
- patterns in the list of \a filters; otherwise returns FALSE.
+ Returns true if the \a fileName matches any of the wildcard (glob)
+ patterns in the list of \a filters; otherwise returns false.
(See \link tqregexp.html#wildcard-matching TQRegExp wildcard
matching.\endlink)
@@ -1207,17 +1207,17 @@ bool TQDir::match( const TQStringList &filters, const TQString &fileName )
{
TQStringList::ConstIterator sit = filters.begin();
while ( sit != filters.end() ) {
- TQRegExp rx( *sit, CaseSensitiveFS, TRUE );
+ TQRegExp rx( *sit, CaseSensitiveFS, true );
if ( rx.exactMatch(fileName) )
- return TRUE;
+ return true;
++sit;
}
- return FALSE;
+ return false;
}
/*!
- Returns TRUE if the \a fileName matches the wildcard (glob)
- pattern \a filter; otherwise returns FALSE. The \a filter may
+ Returns true if the \a fileName matches the wildcard (glob)
+ pattern \a filter; otherwise returns false. The \a filter may
contain multiple patterns separated by spaces or semicolons.
(See \link tqregexp.html#wildcard-matching TQRegExp wildcard