From a08aff328d4393031d5ba7d622c2b05705a89d73 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 04 Jul 2007 11:23:42 +0000 Subject: initial public commit of qt4 port --- (limited to 'libkdepim/externalapphandler.cpp') diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index f376e6c..3fc548a 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp @@ -39,7 +39,9 @@ $Id$ #include #else #include -#include +#include +//Added by qt3to4: +#include #endif #include @@ -123,7 +125,7 @@ void QCopTransferItem::setSourceChannel(const QString& sourceChannel) /*********************************************************************************/ -bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) +bool QCopTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data ) { // copied from old mail2 @@ -146,7 +148,7 @@ bool QCopTransferItem::appMessage( const QCString& cmsg, const QByteArray& data if ( (_sourceMessage + _sourceMessageParameters) == cmsg.data()) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast(&data), QIODevice::ReadOnly ); QString sourceChannel; @@ -226,13 +228,13 @@ bool QCopMapTransferItem::sendMessageToSource(const QString& uid, const QMap(&data), QIODevice::ReadOnly ); // qDebug("QCopMapTransferItem- QCOP message received: %s ", cmsg.data() ); @@ -305,7 +307,7 @@ bool QCopListTransferItem::sendMessageToSource(const QString& uid, const QString /*********************************************************************************/ -bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& data ) +bool QCopListTransferItem::appMessage( const Q3CString& cmsg, const QByteArray& data ) { bool res = QCopTransferItem::appMessage( cmsg, data ); #ifdef DEBUG_EXT_APP_HANDLER @@ -314,7 +316,7 @@ bool QCopListTransferItem::appMessage( const QCString& cmsg, const QByteArray& d if (res == false) { - QDataStream stream( data, IO_ReadOnly ); + QDataStream stream( const_cast(&data), QIODevice::ReadOnly ); #ifdef DEBUG_EXT_APP_HANDLER qDebug("2QCopListTransferItem- QCOP message received: %s ", cmsg.data() ); @@ -518,9 +520,9 @@ void ExternalAppHandler::addDefaultAppItem(Types type, int id, const QString& la } -QList ExternalAppHandler::getAvailableDefaultItems(Types type) +Q3PtrList ExternalAppHandler::getAvailableDefaultItems(Types type) { - QList list; + Q3PtrList list; DefaultAppItem* dai; @@ -746,7 +748,7 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS #endif qDebug("%s --- %s %s --- %s %s", channel.latin1(), message.latin1(),message2.latin1(), parameters.latin1(), parameters2.latin1() ); //KMessageBox::sorry( 0, message2 ); - QProcess * proc = new QProcess( this ); + Q3Process * proc = new Q3Process( this ); int i = 0; proc->addArgument( channel ); @@ -772,7 +774,7 @@ bool ExternalAppHandler::mailToMultipleContacts( const QString& emails, const QS //KMessageBox::sorry( 0,arg ); //qDebug("2add%sdd ",arg.latin1() ); proc->addArgument( arg); - proc->launch(""); + proc->launch(QString()); #endif return true; @@ -831,7 +833,7 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e #else // DESKTOP_VERSION //KMessageBox::sorry( 0,channel ); - QProcess * proc = new QProcess( this ); + Q3Process * proc = new Q3Process( this ); proc->addArgument( channel ); if ( message.find (" " ) > 0 ) { QStringList list = QStringList::split( " ", message ); @@ -850,7 +852,7 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e //KMessageBox::information(0,parameters); proc->addArgument( parameters ); - proc->launch(""); + proc->launch(QString()); #endif return true; @@ -1232,7 +1234,7 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete * **************************************************************************/ -void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) +void ExternalAppHandler::appMessage( const Q3CString& cmsg, const QByteArray& data ) { qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this); if ( cmsg == "nextView()" ) { -- cgit v0.9.0.2