mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kinfocenter: remove unused bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
85bc20d347
commit
38d01643b7
5 changed files with 1 additions and 117 deletions
|
@ -27,10 +27,6 @@
|
||||||
DeviceListing::DeviceListing(QWidget *parent, InfoPanel *info, DevInfoPlugin *stat) :
|
DeviceListing::DeviceListing(QWidget *parent, InfoPanel *info, DevInfoPlugin *stat) :
|
||||||
QTreeWidget(parent), iPanel(info), status(stat)
|
QTreeWidget(parent), iPanel(info), status(stat)
|
||||||
{
|
{
|
||||||
// // Check nic changes
|
|
||||||
// nicSig = new NicSignals();
|
|
||||||
// connect(nicSig,SIGNAL(nicActivatedOrDisconnected()),this,SLOT(networkingChangedSlot()));
|
|
||||||
//
|
|
||||||
// Check if clicked
|
// Check if clicked
|
||||||
connect(this,SIGNAL(itemActivated(QTreeWidgetItem*,int)),this,SLOT(itemActivatedSlot(QTreeWidgetItem*,int)));
|
connect(this,SIGNAL(itemActivated(QTreeWidgetItem*,int)),this,SLOT(itemActivatedSlot(QTreeWidgetItem*,int)));
|
||||||
|
|
||||||
|
@ -237,14 +233,3 @@ void DeviceListing::showRelevantDevicesSlot()
|
||||||
{
|
{
|
||||||
populateListing(RELEVANT);
|
populateListing(RELEVANT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeviceListing::networkingChangedSlot()
|
|
||||||
{
|
|
||||||
QTreeWidgetItemIterator treeWidget(this);
|
|
||||||
while (*treeWidget)
|
|
||||||
{
|
|
||||||
SolDevice *item = static_cast<SolDevice *>(*treeWidget);
|
|
||||||
if(item->deviceType() == Solid::DeviceInterface::NetworkInterface) item->refreshName();
|
|
||||||
++treeWidget;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
#include <solid/processor.h>
|
#include <solid/processor.h>
|
||||||
#include <solid/networkinterface.h>
|
#include <solid/networkinterface.h>
|
||||||
#include <solid/devicenotifier.h>
|
#include <solid/devicenotifier.h>
|
||||||
#include <solid/networking.h>
|
|
||||||
|
|
||||||
//QT
|
//QT
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
|
@ -44,14 +43,12 @@
|
||||||
#include "soldevicetypes.h"
|
#include "soldevicetypes.h"
|
||||||
#include "devinfo.h"
|
#include "devinfo.h"
|
||||||
#include "solidhelper.h"
|
#include "solidhelper.h"
|
||||||
//#include "nicsignals.h"
|
|
||||||
|
|
||||||
//Kde
|
//Kde
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
|
|
||||||
class InfoPanel;
|
class InfoPanel;
|
||||||
class DevInfoPlugin;
|
class DevInfoPlugin;
|
||||||
//class NicSignals;
|
|
||||||
|
|
||||||
class DeviceListing : public QTreeWidget
|
class DeviceListing : public QTreeWidget
|
||||||
{
|
{
|
||||||
|
@ -86,8 +83,6 @@ class DeviceListing : public QTreeWidget
|
||||||
InfoPanel *iPanel;
|
InfoPanel *iPanel;
|
||||||
QAction *colAct, *expAct, *allAct, *relAct;
|
QAction *colAct, *expAct, *allAct, *relAct;
|
||||||
DevInfoPlugin *status;
|
DevInfoPlugin *status;
|
||||||
Solid::Networking::Notifier *network;
|
|
||||||
//NicSignals *nicSig;
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void itemActivatedSlot(QTreeWidgetItem *,const int);
|
void itemActivatedSlot(QTreeWidgetItem *,const int);
|
||||||
|
@ -97,7 +92,6 @@ class DeviceListing : public QTreeWidget
|
||||||
void expandAllDevicesSlot();
|
void expandAllDevicesSlot();
|
||||||
void showAllDevicesSlot();
|
void showAllDevicesSlot();
|
||||||
void showRelevantDevicesSlot();
|
void showRelevantDevicesSlot();
|
||||||
void networkingChangedSlot();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //DEVICELISTING
|
#endif //DEVICELISTING
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
|
|
||||||
/* nicsignals.cpp
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 David Hubner <hubnerd@ntlworld.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "nicsignals.h"
|
|
||||||
|
|
||||||
NicSignals::NicSignals()
|
|
||||||
{
|
|
||||||
connectToNicSignals();
|
|
||||||
}
|
|
||||||
|
|
||||||
void NicSignals::connectToNicSignals()
|
|
||||||
{
|
|
||||||
const QList<Solid::Control::NetworkInterface *> nicList = Solid::Control::NetworkManager::networkInterfaces();
|
|
||||||
|
|
||||||
foreach(const Solid::Control::NetworkInterface *nic, nicList) {
|
|
||||||
connect(nic,SIGNAL(connectionStateChanged(int,int,int)),this,SLOT(nicChangedSignal(int,int,int)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void NicSignals::nicChangedSignal(const int &ns,const int &os,const int &reason)
|
|
||||||
{
|
|
||||||
Q_UNUSED(os); Q_UNUSED(reason);
|
|
||||||
if(ns==8 || ns==2) emit nicActivatedOrDisconnected();
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
|
|
||||||
/*
|
|
||||||
* nicsignals.h
|
|
||||||
*
|
|
||||||
* Copyright (C) 2009 David Hubner <hubnerd@ntlworld.com>
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef NICSIGNALS
|
|
||||||
#define NICSIGNALS
|
|
||||||
|
|
||||||
//Qt
|
|
||||||
#include <QObject>
|
|
||||||
|
|
||||||
//KDE
|
|
||||||
#include <kdebug.h>
|
|
||||||
#include <solid/control/networkmanager.h>
|
|
||||||
#include <solid/control/networkinterface.h>
|
|
||||||
|
|
||||||
class NicSignals : public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
NicSignals();
|
|
||||||
|
|
||||||
private:
|
|
||||||
void connectToNicSignals();
|
|
||||||
|
|
||||||
signals:
|
|
||||||
void nicActivatedOrDisconnected();
|
|
||||||
|
|
||||||
public slots:
|
|
||||||
void nicChangedSignal(const int &,const int &,const int &);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //NICSIGNALS
|
|
|
@ -208,8 +208,7 @@ void SolNetworkDevice::setDefaultListing(const Solid::DeviceInterface::Type &typ
|
||||||
}
|
}
|
||||||
|
|
||||||
void SolNetworkDevice::setDefaultDeviceText()
|
void SolNetworkDevice::setDefaultDeviceText()
|
||||||
{
|
{
|
||||||
QString actTog = i18n("Connected");
|
|
||||||
const Solid::NetworkInterface *netdev = interface<const Solid::NetworkInterface>();
|
const Solid::NetworkInterface *netdev = interface<const Solid::NetworkInterface>();
|
||||||
if(!netdev) return;
|
if(!netdev) return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue