Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KInfoCenter
Commits
83abb46d
Commit
83abb46d
authored
Oct 17, 2020
by
Jonathan Liu
Browse files
Update device info on selection change instead of activation
Avoids having to double-click to update device info.
parent
90b53552
Changes
2
Hide whitespace changes
Inline
Side-by-side
Modules/devinfo/devicelisting.cpp
View file @
83abb46d
...
...
@@ -44,8 +44,8 @@ DeviceListing::DeviceListing(QWidget *parent, InfoPanel *info, DevInfoPlugin *st
// nicSig = new NicSignals();
// connect(nicSig,SIGNAL(nicActivatedOrDisconnected()),this,SLOT(networkingChangedSlot()));
//
// Check if
click
ed
connect
(
this
,
&
DeviceListing
::
itemActivat
ed
,
this
,
&
DeviceListing
::
itemActivat
edSlot
);
// Check if
selection chang
ed
connect
(
this
,
&
DeviceListing
::
currentItemChang
ed
,
this
,
&
DeviceListing
::
currentItemChang
edSlot
);
// Check if item is added
connect
(
Solid
::
DeviceNotifier
::
instance
(),
&
Solid
::
DeviceNotifier
::
deviceAdded
,
this
,
...
...
@@ -136,9 +136,9 @@ void DeviceListing::populateListing(const show showStatus)
}
}
void
DeviceListing
::
itemActivat
edSlot
(
QTreeWidgetItem
*
listItemIn
,
const
int
columnIn
)
void
DeviceListing
::
currentItemChang
edSlot
(
QTreeWidgetItem
*
listItemIn
,
QTreeWidgetItem
*
previous
)
{
Q_UNUSED
(
columnIn
);
Q_UNUSED
(
previous
);
SolDevice
*
listItem
=
static_cast
<
SolDevice
*>
(
listItemIn
);
if
(
listItem
->
isDeviceSet
())
{
...
...
Modules/devinfo/devicelisting.h
View file @
83abb46d
...
...
@@ -80,7 +80,7 @@ private:
//NicSignals *nicSig;
public
Q_SLOTS
:
void
itemActivat
edSlot
(
QTreeWidgetItem
*
,
const
int
);
void
currentItemChang
edSlot
(
QTreeWidgetItem
*
,
QTreeWidgetItem
*
);
void
deviceAddedSlot
(
const
QString
&
);
void
deviceRemovedSlot
(
const
QString
&
);
void
collapseAllDevicesSlot
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment