summaryrefslogtreecommitdiffstats
path: root/kipi-plugins/sendimages/sendimages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kipi-plugins/sendimages/sendimages.cpp')
-rw-r--r--kipi-plugins/sendimages/sendimages.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kipi-plugins/sendimages/sendimages.cpp b/kipi-plugins/sendimages/sendimages.cpp
index ce22104..994e31a 100644
--- a/kipi-plugins/sendimages/sendimages.cpp
+++ b/kipi-plugins/sendimages/sendimages.cpp
@@ -168,18 +168,18 @@ void SendImages::run()
if ((m_sendImagesDialog->m_comment2ImageName->isChecked() == true ) &&
!commentItem.isEmpty() )
{
- qDebug("commentItem: %s",commentItem.ascii());
+ tqDebug("commentItem: %s",commentItem.ascii());
}
else
{
commentItem = ItemName.left(ItemName.findRev('.'));
- qDebug("commentItem is empty");
+ tqDebug("commentItem is empty");
}
//TQString TempFileName = (*it).directory().section('/', -1);
TQString TempFileName=(*it).path().section('/', -2,-2)+"/"+commentItem+
+"."+(*it).path().section('.', -1,-1);
- qDebug("TempFileName: %s",TempFileName.ascii());
+ tqDebug("TempFileName: %s",TempFileName.ascii());
// Thunderbird does not like (). Replace them, BUG:131343
@@ -192,11 +192,11 @@ void SendImages::run()
//If TempFileName already exists, add a number oder increase number
if (entry_already_exists(m_filesSendList,m_tmp + TempFileName))
{
- qDebug ("I entered");
+ tqDebug ("I entered");
TQString secondpart=(m_tmp+TempFileName).section(".",-1,-1);
TQString firstpart=
(m_tmp+TempFileName).left((m_tmp+TempFileName).length()-secondpart.length()-1);
- qDebug("Firstpart: %s \n Secondpart: %s",firstpart.ascii(), secondpart.ascii());
+ tqDebug("Firstpart: %s \n Secondpart: %s",firstpart.ascii(), secondpart.ascii());
//Add _integer value in the end and prove again
int int_index=2;
TQString index=TQString::number(int_index,10);
@@ -204,7 +204,7 @@ void SendImages::run()
{
int_index++;
index=TQString::number(int_index,10);
- qDebug("Index: %s",index.ascii());
+ tqDebug("Index: %s",index.ascii());
}
TQString temp=firstpart + "_"+index+"."+secondpart;
TempFileName=temp.right(temp.length()-m_tmp.length());
@@ -219,7 +219,7 @@ void SendImages::run()
//TQString imageNameFormat = TempFileName.replace(TQChar('.'), "_") +
// extension(m_imageFormat);
- qDebug( "Resizing %s-> '%s %s ' (%s ; %d )",imageName.ascii(),
+ tqDebug( "Resizing %s-> '%s %s ' (%s ; %d )",imageName.ascii(),
m_tmp.ascii(),TempFileName.ascii(),m_imageFormat.ascii(),m_sizeFactor);
// Return value for resizeImageProcess-function, in order to avoid reopening
@@ -260,7 +260,7 @@ void SendImages::run()
}
else
{
- qWarning( "createThumb::No Exif Data Found") ;
+ tqWarning( "createThumb::No Exif Data Found") ;
}
d = new KIPISendimagesPlugin::EventData;
@@ -418,21 +418,21 @@ KURL::List SendImages::divideEmails(void)
for ( KURL::List::Iterator it = m_filesSendList.begin() ; it != m_filesSendList.end() ; ++it )
{
- qDebug("m_attachmentlimit: %lu ", m_attachmentlimit);
+ tqDebug("m_attachmentlimit: %lu ", m_attachmentlimit);
TQString imageName = (*it).path();
- qDebug("Imagename: %s", imageName.ascii());
+ tqDebug("Imagename: %s", imageName.ascii());
TQFile file(imageName);
- qDebug("filesize: %lu", file.size());
+ tqDebug("filesize: %lu", file.size());
if ((mylistsize + file.size()) <= m_attachmentlimit)
{
mylistsize+=file.size();
sendnow.append(*it);
- qDebug("mylistsize: %lu; attachmentlimit: %lu",mylistsize, m_attachmentlimit);
+ tqDebug("mylistsize: %lu; attachmentlimit: %lu",mylistsize, m_attachmentlimit);
}
else
{
- qDebug("file %s is out of %lu",imageName.ascii(),m_attachmentlimit);
+ tqDebug("file %s is out of %lu",imageName.ascii(),m_attachmentlimit);
filesSendList.append(*it);
}
}
@@ -450,13 +450,13 @@ bool SendImages::invokeMailAgent(void)
KURL::List filelist;
kurllistdeepcopy(m_filesSendList_copy,m_filesSendList);
- qDebug("invokeMailagent1: Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size());
+ tqDebug("invokeMailagent1: Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size());
while (!((filelist=divideEmails()).empty()))
{
- qDebug("invokeMailagent2: Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int) m_filesSendList.size(),(int)m_filesSendList_copy.size());
- qDebug("number of elements in filelist %d",(int)filelist.size());
- qDebug("number of elements in m_filelist %d", (int)m_filesSendList.size());
+ tqDebug("invokeMailagent2: Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int) m_filesSendList.size(),(int)m_filesSendList_copy.size());
+ tqDebug("number of elements in filelist %d",(int)filelist.size());
+ tqDebug("number of elements in m_filelist %d", (int)m_filesSendList.size());
if ( m_sendImagesDialog->m_mailAgentName->currentText() == "Default" )
{
KApplication::kApplication()->invokeMailer(
@@ -587,7 +587,7 @@ bool SendImages::invokeMailAgent(void)
else if ( m_sendImagesDialog->m_mailAgentName->currentText() == "Thunderbird" )
{
*m_mailAgentProc << m_thunderbirdUrl << "-remote";
- qDebug("URL: %s", m_thunderbirdUrl.ascii());
+ tqDebug("URL: %s", m_thunderbirdUrl.ascii());
}
else if ( m_sendImagesDialog->m_mailAgentName->currentText() == "GmailAgent" )
{
@@ -621,7 +621,7 @@ bool SendImages::invokeMailAgent(void)
connect(m_mailAgentProc, TQT_SIGNAL(receivedStderr(KProcess *, char*, int)),
this, TQT_SLOT(slotMozillaReadStderr(KProcess*, char*, int)));
}
- qDebug ("%s", Temp.ascii());
+ tqDebug ("%s", Temp.ascii());
if ( m_mailAgentProc->start(KProcess::NotifyOnExit , KProcess::All) == false )
KMessageBox::error(TQT_TQWIDGET(kapp->activeWindow()),
@@ -756,8 +756,8 @@ bool SendImages::copyImageProcess(const TQString &oldFilePath, const TQString &D
const TQString &ImageName)
{
//same file, no need to copy
- qDebug("DestPath: %s",(DestPath).ascii());
- qDebug("ImageName: %s",(ImageName).ascii());
+ tqDebug("DestPath: %s",(DestPath).ascii());
+ tqDebug("ImageName: %s",(ImageName).ascii());
if(oldFilePath.compare(DestPath+ImageName) == 0)
return true;
@@ -834,7 +834,7 @@ bool SendImages::resizeImageProcess(const TQString &SourcePath, const TQString &
if ( scaleImg.width() != w || scaleImg.height() != h )
{
- qDebug ("Resizing failed. Aborting.");
+ tqDebug ("Resizing failed. Aborting.");
return false;
}
@@ -844,7 +844,7 @@ bool SendImages::resizeImageProcess(const TQString &SourcePath, const TQString &
if ( !img.save(DestPath + ImageName, ImageFormat.latin1(), ImageCompression) )
{
- qDebug("Saving failed with specific compression value. Aborting.");
+ tqDebug("Saving failed with specific compression value. Aborting.");
return false;
}
@@ -858,13 +858,13 @@ bool SendImages::resizeImageProcess(const TQString &SourcePath, const TQString &
wait 5 seconds and start SlotMozillaTimeout() */
void SendImages::slotMozillaExited(KProcess*)
{
- qDebug("slotMozillaExited");
+ tqDebug("slotMozillaExited");
///Here would be the right point to clear the sendlist in order to avoid infinite resendings!!
m_filesSendList.clear();
///Also disconnect SLOT
m_mailAgentProc->disconnect(TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotMozillaExited(KProcess*)));
- qDebug("Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size());
+ tqDebug("Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size());
if ( m_mozillaStdErr.find("No running window found") != -1 ) // No remote Mozilla | Netscape |
{ // Thunderbird env. loaded !
m_mailAgentProc2 = new KProcess; // Init a new env.
@@ -902,7 +902,7 @@ void SendImages::slotMozillaTimeout(void)
{
m_mozillaTimer->disconnect(TQT_SIGNAL(timeout()), this, TQT_SLOT(slotMozillaTimeout()));
- qDebug("slotMozillaTimeout: Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size());
+ tqDebug("slotMozillaTimeout: Number of elements in m_filesSendList=%d, and in m_filesSendList_copy=%d)",(int)m_filesSendList.size(),(int)m_filesSendList_copy.size());
kurllistdeepcopy(m_filesSendList,m_filesSendList_copy);
invokeMailAgent();
@@ -918,26 +918,26 @@ void SendImages::slotMozillaReadStderr(KProcess*, char *buffer, int buflen)
bool SendImages::kurllistdeepcopy(KURL::List &Destination, KURL::List Source)
{
Destination.clear();
- qDebug("kurllistdeepcopy started");
+ tqDebug("kurllistdeepcopy started");
for ( KURL::List::Iterator it = Source.begin() ; it != Source.end() ; ++it )
{
//TQString Tempstring;
TQString Getstring=(*it).path();
TQString Tempstring=Getstring.copy();
Destination.append(Tempstring);
- qDebug("%s",Tempstring.ascii());
+ tqDebug("%s",Tempstring.ascii());
}
/*
- qDebug("deepcopytest");
+ tqDebug("deepcopytest");
Source.clear();
for ( KURL::List::Iterator it = Destination.begin() ; it != Destination.end() ; ++it )
{
- qDebug("%s",(*it).path().ascii());
+ tqDebug("%s",(*it).path().ascii());
}
*/
- qDebug("kurllistdeepcopy ended\n");
+ tqDebug("kurllistdeepcopy ended\n");
return true;
}