diff options
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; |
