diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-03 15:55:36 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-08 17:13:22 +0900 |
| commit | 2cab1f3059038ab001f5185c29f0791c77aeeba1 (patch) | |
| tree | e294a699a78e0aef2969216fc8fc1378b83b0064 /kget | |
| parent | b2cb25ce7dde70c48747856d22dfac03f27033e1 (diff) | |
| download | tdenetwork-2cab1f30.tar.gz tdenetwork-2cab1f30.zip | |
Replace TRUE/FALSE with boolean values true/false
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 89969dcb2142d91b295c8d18cde46e22ef118dce)
Diffstat (limited to 'kget')
| -rw-r--r-- | kget/tdefileio.cpp | 14 | ||||
| -rw-r--r-- | kget/tdefileio.h | 18 | ||||
| -rw-r--r-- | kget/tdemainwidget.cpp | 6 |
3 files changed, 19 insertions, 19 deletions
diff --git a/kget/tdefileio.cpp b/kget/tdefileio.cpp index ed9ef955..4ecb544a 100644 --- a/kget/tdefileio.cpp +++ b/kget/tdefileio.cpp @@ -111,7 +111,7 @@ static bool kBytesToFile(const char *aBuffer, int len, const TQString & aFileNam rc = KMessageBox::questionYesNo(tqApp->mainWidget(), str, TQString(), i18n("Replace"),KStdGuiItem::cancel()); if (rc != KMessageBox::Yes) - return FALSE; + return false; } if (aBackup) { // make a backup copy @@ -123,10 +123,10 @@ static bool kBytesToFile(const char *aBuffer, int len, const TQString & aFileNam if (rc) { // failed to rename file if (!aVerbose) - return FALSE; + return false; rc = KMessageBox::warningContinueCancel(tqApp->mainWidget(), i18n("Failed to make a backup copy of %1.\nContinue anyway?").arg(aFileName)); if (rc != KMessageBox::Continue) - return FALSE; + return false; } } } @@ -143,24 +143,24 @@ static bool kBytesToFile(const char *aBuffer, int len, const TQString & aFileNam default: KMessageBox::error(tqApp->mainWidget(), i18n("Error while writing file:\n%1").arg(aFileName)); } - return FALSE; + return false; } writeLen = file.writeBlock(aBuffer, len); if (writeLen < 0) { KMessageBox::error(tqApp->mainWidget(), i18n("Could not write to file:\n%1").arg(aFileName)); - return FALSE; + return false; } else if (writeLen < len) { TQString msg = i18n("Could only write %1 bytes of %2.").arg(TDEGlobal::locale()->formatNumber(writeLen, 0)).arg(TDEGlobal::locale()->formatNumber(len, 0)); KMessageBox::error(tqApp->mainWidget(), msg); - return FALSE; + return false; } - return TRUE; + return true; } bool kCStringToFile(const TQCString & aBuffer, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) diff --git a/kget/tdefileio.h b/kget/tdefileio.h index b8310137..a6068fc9 100644 --- a/kget/tdefileio.h +++ b/kget/tdefileio.h @@ -22,23 +22,23 @@ /** Load a file. Returns a pointer to the memory-block that contains * the loaded file. Returns a NULL string if the file could not be loaded. - * If withDialogs is FALSE no warning dialogs are opened if there are + * If withDialogs is false no warning dialogs are opened if there are * problems. * The string returned is always zero-terminated and therefore one * byte longer than the file itself. - * If ensureNewline is TRUE the string will always have a trailing newline. + * If ensureNewline is true the string will always have a trailing newline. */ -TQString kFileToString(const TQString & fileName, bool ensureNewline = TRUE, bool withDialogs = TRUE); +TQString kFileToString(const TQString & fileName, bool ensureNewline = true, bool withDialogs = true); -/** Save a file. If withDialogs is FALSE no warning dialogs are opened if - * there are problems. Returns TRUE on success and FALSE on failure. - * Replaces existing files without warning if askIfExists==FALSE. - * Makes a copy if the file exists to filename~ if createBackup==TRUE. +/** Save a file. If withDialogs is false no warning dialogs are opened if + * there are problems. Returns true on success and false on failure. + * Replaces existing files without warning if askIfExists==false. + * Makes a copy if the file exists to filename~ if createBackup==true. */ -bool kCStringToFile(const TQCString & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); +bool kCStringToFile(const TQCString & buffer, const TQString & fileName, bool askIfExists = false, bool createBackup = true, bool withDialogs = true); // Does not stop at NUL -bool kByteArrayToFile(const TQByteArray & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); +bool kByteArrayToFile(const TQByteArray & buffer, const TQString & fileName, bool askIfExists = false, bool createBackup = true, bool withDialogs = true); #endif /* tdefileio_h */ diff --git a/kget/tdemainwidget.cpp b/kget/tdemainwidget.cpp index 0cc65452..e392505a 100644 --- a/kget/tdemainwidget.cpp +++ b/kget/tdemainwidget.cpp @@ -134,9 +134,9 @@ TDEMainWidget::TDEMainWidget(bool bStartDocked) cfg.sync(); } - b_connected = TRUE; - b_viewLogWindow = FALSE; - b_viewPreferences = FALSE; + b_connected = true; + b_viewLogWindow = false; + b_viewPreferences = false; myTransferList = 0L; tdemain = this; |
