summaryrefslogtreecommitdiff
path: root/noncore
authormickeyl <mickeyl>2005-05-17 16:57:08 (UTC)
committer mickeyl <mickeyl>2005-05-17 16:57:08 (UTC)
commitd2ae68c413873e234b34f733818427902e738948 (patch) (side-by-side diff)
treef5748014d7b1785302c167c6f43fbd0622bf1019 /noncore
parentcce15d6b9a27880df72ea2638f9295900ea6c21e (diff)
downloadopie-d2ae68c413873e234b34f733818427902e738948.zip
opie-d2ae68c413873e234b34f733818427902e738948.tar.gz
opie-d2ae68c413873e234b34f733818427902e738948.tar.bz2
libopienet API cleanups
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/networkapplet/networkapplet.cpp6
-rw-r--r--noncore/net/opiestumbler/opiestumbler.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp
index 534a8d0..bd6ca66 100644
--- a/noncore/applets/networkapplet/networkapplet.cpp
+++ b/noncore/applets/networkapplet/networkapplet.cpp
@@ -62,67 +62,67 @@ IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name )
//setFixedWidth( 16 );
connect( this, SIGNAL( clicked() ), this, SLOT( clicked() ) );
}
IfaceUpDownButton::~IfaceUpDownButton()
{
}
void IfaceUpDownButton::clicked()
{
_iface->setUp( isOn() );
setOn( _iface->isUp() ); // it might not have worked...
repaint();
}
IfaceIPAddress::IfaceIPAddress( QWidget* parent, const char* name )
:QLineEdit( parent, name )
{
setFont( QFont( "fixed" ) );
_iface = ONetwork::instance()->interface( name );
setFixedWidth( 105 );
- setText( _iface->ipV4Address() );
+ setText( _iface->ipV4Address().toString() );
connect( this, SIGNAL( returnPressed() ), this, SLOT( returnPressed() ) );
}
IfaceIPAddress::~IfaceIPAddress()
{
}
void IfaceIPAddress::returnPressed()
{
QHostAddress a;
a.setAddress( text() );
QHostAddress mask;
- mask.setAddress( _iface->ipV4Netmask() ); // setIPV4Address destroys the netmask...
+ mask.setAddress( _iface->ipV4Netmask().toString() ); // setIPV4Address destroys the netmask...
_iface->setIPV4Address( a );
_iface->setIPV4Netmask( mask ); // recover the old netmask
- setText( _iface->ipV4Address() );
+ setText( _iface->ipV4Address().toString() );
repaint();
}
NetworkAppletControl::NetworkAppletControl( OTaskbarApplet* parent, const char* name )
:QFrame( parent, name, WStyle_StaysOnTop | WType_Popup ), l(0)
{
setFrameStyle( QFrame::PopupPanel | QFrame::Raised );
l = new QVBoxLayout( this, 4, 2 );
}
void NetworkAppletControl::build()
{
ONetwork::InterfaceIterator it = ONetwork::instance()->iterator();
while ( it.current() )
{
QHBoxLayout* h = new QHBoxLayout( l );
QLabel* symbol = new QLabel( this );
symbol->setPixmap( Resource::loadPixmap( guessDevice( it.current() ) ) );
h->addWidget( symbol );
symbol->show();
QLabel* name = new QLabel( it.current()->name(), this );
diff --git a/noncore/net/opiestumbler/opiestumbler.cpp b/noncore/net/opiestumbler/opiestumbler.cpp
index 8dedd67..f231fca 100644
--- a/noncore/net/opiestumbler/opiestumbler.cpp
+++ b/noncore/net/opiestumbler/opiestumbler.cpp
@@ -315,34 +315,34 @@ void OpieStumbler::slotAssociated()
if(m_proc) {
m_proc->kill();
delete m_proc;
}
m_proc = new Opie::Core::OProcess(this);
*m_proc << "udhcpc" << "-f" << "-n" << "-i" << m_interface;
m_proc->start(Opie::Core::OProcess::DontCare);
QTimer::singleShot(5000, this, SLOT(slotCheckDHCP()));
}
void OpieStumbler::slotCheckDHCP()
{
if(!m_proc->isRunning()) {
Global::statusMessage(tr("Could not Obtain an Address"));
delete m_proc;
m_proc = NULL;
return;
}
m_listCurrent->show();
OWirelessNetworkInterface *wiface = static_cast<OWirelessNetworkInterface*>(ONetwork::instance()->interface(m_interface));
- Global::statusMessage(tr("Obtained IP ") + wiface->ipV4Address());
+ Global::statusMessage(tr("Obtained IP ") + wiface->ipV4Address().toString());
}