summaryrefslogtreecommitdiffstats
path: root/libkcal/attachmenthandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkcal/attachmenthandler.cpp')
-rw-r--r--libkcal/attachmenthandler.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/libkcal/attachmenthandler.cpp b/libkcal/attachmenthandler.cpp
index 3163def07..eb0fc2b77 100644
--- a/libkcal/attachmenthandler.cpp
+++ b/libkcal/attachmenthandler.cpp
@@ -47,7 +47,7 @@
namespace KCal {
-Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmentName,
+Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, const TQString &attachmentName,
Incidence *incidence )
{
if ( !incidence ) {
@@ -69,15 +69,15 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
if ( !a ) {
KMessageBox::error(
- parent,
+ tqparent,
i18n( "No attachment named \"%1\" found in the incidence." ).arg( attachmentName ) );
return 0;
}
if ( a->isUri() ) {
- if ( !KIO::NetAccess::exists( a->uri(), true, parent ) ) {
+ if ( !KIO::NetAccess::exists( a->uri(), true, tqparent ) ) {
KMessageBox::sorry(
- parent,
+ tqparent,
i18n( "The attachment \"%1\" is a web link that is inaccessible from this computer. " ).
arg( KURL::decode_string( a->uri() ) ) );
return 0;
@@ -86,7 +86,7 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
return a;
}
-Attachment *AttachmentHandler::find( TQWidget *parent,
+Attachment *AttachmentHandler::tqfind( TQWidget *tqparent,
const TQString &attachmentName, const TQString &uid )
{
if ( uid.isEmpty() ) {
@@ -99,16 +99,16 @@ Attachment *AttachmentHandler::find( TQWidget *parent,
Incidence *incidence = cal->incidence( uid );
if ( !incidence ) {
KMessageBox::error(
- parent,
+ tqparent,
i18n( "The incidence that owns the attachment named \"%1\" could not be found. "
"Perhaps it was removed from your calendar?" ).arg( attachmentName ) );
return 0;
}
- return find( parent, attachmentName, incidence );
+ return tqfind( tqparent, attachmentName, incidence );
}
-Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmentName,
+Attachment *AttachmentHandler::tqfind( TQWidget *tqparent, const TQString &attachmentName,
ScheduleMessage *message )
{
if ( !message ) {
@@ -118,13 +118,13 @@ Attachment *AttachmentHandler::find( TQWidget *parent, const TQString &attachmen
Incidence *incidence = dynamic_cast<Incidence*>( message->event() );
if ( !incidence ) {
KMessageBox::error(
- parent,
+ tqparent,
i18n( "The calendar invitation stored in this email message is broken in some way. "
"Unable to continue." ) );
return 0;
}
- return find( parent, attachmentName, incidence );
+ return tqfind( tqparent, attachmentName, incidence );
}
static KTempFile *s_tempFile = 0;
@@ -134,10 +134,10 @@ static KURL tempFileForAttachment( Attachment *attachment )
KURL url;
TQStringList patterns = KMimeType::mimeType( attachment->mimeType() )->patterns();
if ( !patterns.empty() ) {
- s_tempFile = new KTempFile( TQString::null,
+ s_tempFile = new KTempFile( TQString(),
TQString( patterns.first() ).remove( '*' ), 0600 );
} else {
- s_tempFile = new KTempFile( TQString::null, TQString::null, 0600 );
+ s_tempFile = new KTempFile( TQString(), TQString(), 0600 );
}
TQFile *qfile = s_tempFile->file();
@@ -157,7 +157,7 @@ static KURL tempFileForAttachment( Attachment *attachment )
return url;
}
-bool AttachmentHandler::view( TQWidget *parent, Attachment *attachment )
+bool AttachmentHandler::view( TQWidget *tqparent, Attachment *attachment )
{
if ( !attachment ) {
return false;
@@ -174,7 +174,7 @@ bool AttachmentHandler::view( TQWidget *parent, Attachment *attachment )
} else {
stat = false;
KMessageBox::error(
- parent,
+ tqparent,
i18n( "Unable to create a temporary file for the attachment." ) );
}
delete s_tempFile;
@@ -183,31 +183,31 @@ bool AttachmentHandler::view( TQWidget *parent, Attachment *attachment )
return stat;
}
-bool AttachmentHandler::view( TQWidget *parent, const TQString &attachmentName, Incidence *incidence )
+bool AttachmentHandler::view( TQWidget *tqparent, const TQString &attachmentName, Incidence *incidence )
{
- return view( parent, find( parent, attachmentName, incidence ) );
+ return view( tqparent, tqfind( tqparent, attachmentName, incidence ) );
}
-bool AttachmentHandler::view( TQWidget *parent, const TQString &attachmentName, const TQString &uid )
+bool AttachmentHandler::view( TQWidget *tqparent, const TQString &attachmentName, const TQString &uid )
{
- return view( parent, find( parent, attachmentName, uid ) );
+ return view( tqparent, tqfind( tqparent, attachmentName, uid ) );
}
-bool AttachmentHandler::view( TQWidget *parent, const TQString &attachmentName,
+bool AttachmentHandler::view( TQWidget *tqparent, const TQString &attachmentName,
ScheduleMessage *message )
{
- return view( parent, find( parent, attachmentName, message ) );
+ return view( tqparent, tqfind( tqparent, attachmentName, message ) );
}
-bool AttachmentHandler::saveAs( TQWidget *parent, Attachment *attachment )
+bool AttachmentHandler::saveAs( TQWidget *tqparent, Attachment *attachment )
{
// get the saveas file name
- TQString saveAsFile = KFileDialog::getSaveFileName( attachment->label(), TQString::null, parent,
+ TQString saveAsFile = KFileDialog::getSaveFileName( attachment->label(), TQString(), tqparent,
i18n( "Save Attachment" ) );
if ( saveAsFile.isEmpty() ||
( TQFile( saveAsFile ).exists() &&
( KMessageBox::warningYesNo(
- parent,
+ tqparent,
i18n( "%1 already exists. Do you want to overwrite it?").
arg( saveAsFile ) ) == KMessageBox::No ) ) ) {
return false;
@@ -223,12 +223,12 @@ bool AttachmentHandler::saveAs( TQWidget *parent, Attachment *attachment )
if ( tempUrl.isValid() ) {
stat = KIO::NetAccess::file_copy( tempUrl, KURL( saveAsFile ), -1, true );
if ( !stat && KIO::NetAccess::lastError() ) {
- KMessageBox::error( parent, KIO::NetAccess::lastErrorString() );
+ KMessageBox::error( tqparent, KIO::NetAccess::lastErrorString() );
}
} else {
stat = false;
KMessageBox::error(
- parent,
+ tqparent,
i18n( "Unable to create a temporary file for the attachment." ) );
}
delete s_tempFile;
@@ -237,21 +237,21 @@ bool AttachmentHandler::saveAs( TQWidget *parent, Attachment *attachment )
return stat;
}
-bool AttachmentHandler::saveAs( TQWidget *parent, const TQString &attachmentName,
+bool AttachmentHandler::saveAs( TQWidget *tqparent, const TQString &attachmentName,
Incidence *incidence )
{
- return saveAs( parent, find( parent, attachmentName, incidence ) );
+ return saveAs( tqparent, tqfind( tqparent, attachmentName, incidence ) );
}
-bool AttachmentHandler::saveAs( TQWidget *parent, const TQString &attachmentName, const TQString &uid )
+bool AttachmentHandler::saveAs( TQWidget *tqparent, const TQString &attachmentName, const TQString &uid )
{
- return saveAs( parent, find( parent, attachmentName, uid ) );
+ return saveAs( tqparent, tqfind( tqparent, attachmentName, uid ) );
}
-bool AttachmentHandler::saveAs( TQWidget *parent, const TQString &attachmentName,
+bool AttachmentHandler::saveAs( TQWidget *tqparent, const TQString &attachmentName,
ScheduleMessage *message )
{
- return saveAs( parent, find( parent, attachmentName, message ) );
+ return saveAs( tqparent, tqfind( tqparent, attachmentName, message ) );
}
}