summaryrefslogtreecommitdiff
path: root/core/applets/obex/obeximpl.cc
Unidiff
Diffstat (limited to 'core/applets/obex/obeximpl.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/obex/obeximpl.cc19
1 files changed, 13 insertions, 6 deletions
diff --git a/core/applets/obex/obeximpl.cc b/core/applets/obex/obeximpl.cc
index da47e5b..eb0e67b 100644
--- a/core/applets/obex/obeximpl.cc
+++ b/core/applets/obex/obeximpl.cc
@@ -24,18 +24,23 @@ ObexImpl::ObexImpl( )
24 m_recvgui = new ObexInc(); 24 m_recvgui = new ObexInc();
25 m_chan = new QCopChannel("QPE/Obex" ); 25 m_chan = new QCopChannel("QPE/Obex" );
26 connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ), 26 connect(m_chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
27 this, SLOT(slotMessage(const QCString&, const QByteArray&) ) ); 27 this, SLOT(slotMessage(const QCString&, const QByteArray&) ) );
28 connect(m_obex, SIGNAL(receivedFile(const QString& ) ), 28 connect(m_obex, SIGNAL(receivedFile(const QString& ) ),
29 this, SLOT(slotReceivedFile(const QString& ) ) ); 29 this, SLOT(slotReceivedFile(const QString& ) ) );
30 connect((QObject*) m_recvgui->InsertButton, SIGNAL(clicked()),
31 m_recvgui, SLOT( accept() ));
32 connect((QObject*) m_recvgui->RejectButton, SIGNAL(clicked()),
33 m_recvgui, SLOT( reject() ));
30} 34}
31 35
32ObexImpl::~ObexImpl() { 36ObexImpl::~ObexImpl() {
33 delete m_obex; 37 delete m_obex;
34 delete m_chan; 38 delete m_chan;
35 delete m_sendgui; 39 delete m_sendgui;
40 delete m_recvgui;
36} 41}
37 42
38QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { 43QRESULT ObexImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
39 *iface = 0; 44 *iface = 0;
40 if( uuid == IID_QUnknown ) 45 if( uuid == IID_QUnknown )
41 *iface = this; 46 *iface = this;
@@ -126,20 +131,22 @@ void ObexImpl::slotReceivedFile( const QString &fileName ) {
126 } // now prompt and then add it 131 } // now prompt and then add it
127 132
128 m_recvgui->PixmapLabel->setPixmap(lnk.pixmap()); 133 m_recvgui->PixmapLabel->setPixmap(lnk.pixmap());
129 m_recvgui->AppLabel->setText(lnk.name()); 134 m_recvgui->AppLabel->setText(lnk.name());
130 m_recvgui->FileLabel->setText(fileName); 135 m_recvgui->FileLabel->setText(fileName);
131 m_recvgui->showMaximized(); 136 m_recvgui->showMaximized();
132 137 if( m_recvgui->exec() != -1 ) {
133 QCString str= "QPE/Application/"; 138 QCString str= "QPE/Application/";
134 str += exec.latin1(); 139 str += exec.latin1();
135 qWarning("channel %s", str.data() ); 140 qWarning("channel %s", str.data() );
136 QCopEnvelope e(str , "setDocument(QString)" ); 141 QCopEnvelope e(str , "setDocument(QString)" );
137 e << fileName; 142 e << fileName;
143 }
138 144
139} 145}
140 146
141 147
148
142Q_EXPORT_INTERFACE() 149Q_EXPORT_INTERFACE()
143{ 150{
144 Q_CREATE_INSTANCE( ObexImpl ) 151 Q_CREATE_INSTANCE( ObexImpl )
145} 152}