summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/obexdialog.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (side-by-side diff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/net/opietooth/manager/obexdialog.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/net/opietooth/manager/obexdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/obexdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp
index 15973d4..46a0e3d 100644
--- a/noncore/net/opietooth/manager/obexdialog.cpp
+++ b/noncore/net/opietooth/manager/obexdialog.cpp
@@ -1,86 +1,86 @@
#include "obexdialog.h"
#include <qpushbutton.h>
#include <qmultilineedit.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qfileinfo.h>
#include <qpe/resource.h>
#include <opie/oprocess.h>
#include <opie/ofiledialog.h>
using namespace OpieTooth;
ObexDialog::ObexDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device )
: QDialog( parent, name, modal, fl ) {
if ( !name )
setName( "ObexDialog" );
setCaption( tr( "beam files " ) ) ;
m_device = device;
layout = new QVBoxLayout( this );
QLabel* info = new QLabel( this );
info->setText( tr("Which file should be beamed?") );
cmdLine = new QLineEdit( this );
QPushButton *browserButton;
browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton");
connect( browserButton, SIGNAL(released() ), this , SLOT(browse() ) );
chNameLine = new QLineEdit( this );
sendButton = new QPushButton( this );
sendButton->setText( tr( "Send" ) );
layout->addWidget(info);
layout->addWidget(cmdLine);
layout->addWidget(browserButton);
layout->addWidget(chNameLine);
layout->addWidget(sendButton);
- connect( sendButton, SIGNAL( clicked() ), this, SLOT( sendData() ) );
+ connect( sendButton, SIGNAL( clicked() ), this, SLOT( sendData() ) );
}
ObexDialog::~ObexDialog() {
}
void ObexDialog::browse() {
MimeTypes types;
QStringList all;
all << "*/*";
types.insert("All Files", all );
QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 );
cmdLine->setText( str );
}
void ObexDialog::sendData() {
QString fileURL = cmdLine->text();
QString file = QFileInfo( fileURL ).fileName();
QString modifiedName = chNameLine->text();
// vom popupmenu beziehen
OProcess* obexSend = new OProcess();
if ( !modifiedName.isEmpty() ) {
*obexSend << "ussp-push" << m_device << fileURL << modifiedName;
} else {
*obexSend << "ussp-push" << m_device << fileURL << file;
}
if (!obexSend->start(OProcess::DontCare, OProcess::AllOutput) ) {
qWarning("could not start");
delete obexSend;
}
}