Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Network
KIO Extras
Commits
0f1fe739
Commit
0f1fe739
authored
Jan 06, 2022
by
Harald Sitter
✨
Browse files
mtp: remove timeout members
they are entirely unused
parent
766af7f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
mtp/kiod_module/kmtpd.cpp
View file @
0f1fe739
...
...
@@ -101,7 +101,7 @@ void KMTPd::checkDevice(const Solid::Device &solidDevice)
LIBMTP_mtpdevice_t
*
mtpDevice
=
LIBMTP_Open_Raw_Device_Uncached
(
rawDevice
);
if
(
mtpDevice
)
{
MTPDevice
*
device
=
new
MTPDevice
(
QStringLiteral
(
"/modules/kmtpd/device%1"
).
arg
(
m_devices
.
count
()),
mtpDevice
,
rawDevice
,
solidDevice
.
udi
()
,
m_timeout
);
auto
device
=
new
MTPDevice
(
QStringLiteral
(
"/modules/kmtpd/device%1"
).
arg
(
m_devices
.
count
()),
mtpDevice
,
rawDevice
,
solidDevice
.
udi
());
// Always let MTPDevice know any changes to devices. It might be helpful Daemon interfaces
connect
(
this
,
&
KMTPd
::
devicesChanged
,
device
,
[
device
]
{
...
...
mtp/kiod_module/kmtpd.h
View file @
0f1fe739
...
...
@@ -32,7 +32,6 @@ private:
MTPDevice
*
deviceFromUdi
(
const
QString
&
udi
)
const
;
QList
<
MTPDevice
*>
m_devices
;
qint32
m_timeout
;
public
Q_SLOTS
:
// D-Bus methods
...
...
mtp/kiod_module/mtpdevice.cpp
View file @
0f1fe739
...
...
@@ -29,10 +29,9 @@
* @param device The LIBMTP_mtpdevice_t pointer to cache
* @param udi The UDI of the new device to cache
*/
MTPDevice
::
MTPDevice
(
const
QString
&
dbusObjectPath
,
LIBMTP_mtpdevice_t
*
device
,
LIBMTP_raw_device_t
*
rawdevice
,
const
QString
&
udi
,
qint32
timeout
,
QObject
*
parent
)
MTPDevice
::
MTPDevice
(
const
QString
&
dbusObjectPath
,
LIBMTP_mtpdevice_t
*
device
,
LIBMTP_raw_device_t
*
rawdevice
,
const
QString
&
udi
,
QObject
*
parent
)
:
QObject
(
parent
),
m_dbusObjectName
(
dbusObjectPath
),
m_timeout
(
timeout
),
m_mtpdevice
(
device
),
m_rawdevice
(
*
rawdevice
),
m_udi
(
udi
),
...
...
@@ -48,7 +47,7 @@ MTPDevice::MTPDevice(const QString &dbusObjectPath, LIBMTP_mtpdevice_t *device,
m_friendlyName
=
QString
::
fromUtf8
(
deviceName
);
}
qCDebug
(
LOG_KIOD_KMTPD
)
<<
"Created device "
<<
m_friendlyName
<<
" with udi="
<<
udi
<<
" and timeout "
<<
timeout
;
qCDebug
(
LOG_KIOD_KMTPD
)
<<
"Created device "
<<
m_friendlyName
<<
" with udi="
<<
udi
;
new
DeviceAdaptor
(
this
);
QDBusConnection
::
sessionBus
().
registerObject
(
m_dbusObjectName
,
this
);
...
...
mtp/kiod_module/mtpdevice.h
View file @
0f1fe739
...
...
@@ -30,7 +30,6 @@ public:
LIBMTP_mtpdevice_t
*
device
,
LIBMTP_raw_device_t
*
rawdevice
,
const
QString
&
udi
,
qint32
timeout
,
QObject
*
parent
=
nullptr
);
~
MTPDevice
()
override
;
...
...
@@ -50,7 +49,6 @@ public:
private:
const
QString
m_dbusObjectName
;
QList
<
MTPStorage
*>
m_storages
;
qint32
m_timeout
;
LIBMTP_mtpdevice_t
*
m_mtpdevice
;
LIBMTP_raw_device_t
m_rawdevice
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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