kinfocenter: remove unused bits

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-08 07:04:30 +03:00
parent 85bc20d347
commit 38d01643b7
5 changed files with 1 additions and 117 deletions

View file

@ -27,10 +27,6 @@
DeviceListing::DeviceListing(QWidget *parent, InfoPanel *info, DevInfoPlugin *stat) :
QTreeWidget(parent), iPanel(info), status(stat)
{
// // Check nic changes
// nicSig = new NicSignals();
// connect(nicSig,SIGNAL(nicActivatedOrDisconnected()),this,SLOT(networkingChangedSlot()));
//
// Check if clicked
connect(this,SIGNAL(itemActivated(QTreeWidgetItem*,int)),this,SLOT(itemActivatedSlot(QTreeWidgetItem*,int)));
@ -237,14 +233,3 @@ void DeviceListing::showRelevantDevicesSlot()
{
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;
}
}

View file

@ -29,7 +29,6 @@
#include <solid/processor.h>
#include <solid/networkinterface.h>
#include <solid/devicenotifier.h>
#include <solid/networking.h>
//QT
#include <QMap>
@ -44,14 +43,12 @@
#include "soldevicetypes.h"
#include "devinfo.h"
#include "solidhelper.h"
//#include "nicsignals.h"
//Kde
#include <klocale.h>
class InfoPanel;
class DevInfoPlugin;
//class NicSignals;
class DeviceListing : public QTreeWidget
{
@ -86,8 +83,6 @@ class DeviceListing : public QTreeWidget
InfoPanel *iPanel;
QAction *colAct, *expAct, *allAct, *relAct;
DevInfoPlugin *status;
Solid::Networking::Notifier *network;
//NicSignals *nicSig;
public slots:
void itemActivatedSlot(QTreeWidgetItem *,const int);
@ -97,7 +92,6 @@ class DeviceListing : public QTreeWidget
void expandAllDevicesSlot();
void showAllDevicesSlot();
void showRelevantDevicesSlot();
void networkingChangedSlot();
};
#endif //DEVICELISTING

View file

@ -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();
}

View file

@ -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

View file

@ -208,8 +208,7 @@ void SolNetworkDevice::setDefaultListing(const Solid::DeviceInterface::Type &typ
}
void SolNetworkDevice::setDefaultDeviceText()
{
QString actTog = i18n("Connected");
{
const Solid::NetworkInterface *netdev = interface<const Solid::NetworkInterface>();
if(!netdev) return;