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
8bc33493
Commit
8bc33493
authored
Oct 10, 2020
by
Alexander Lohnau
💬
Committed by
David Faure
Oct 10, 2020
Browse files
Remove commented out debug statements
parent
f9a85e44
Changes
8
Hide whitespace changes
Inline
Side-by-side
archive/autotests/testkioarchive.cpp
View file @
8bc33493
...
...
@@ -74,10 +74,8 @@ void TestKioArchive::testListTar()
connect
(
job
,
&
KIO
::
ListJob
::
entries
,
this
,
&
TestKioArchive
::
slotEntries
);
bool
ok
=
job
->
exec
();
QVERIFY
(
ok
);
//qDebug() << "listDir done - entry count=" << m_listResult.count();
QVERIFY
(
m_listResult
.
count
()
>
1
);
//qDebug() << m_listResult;
QCOMPARE
(
m_listResult
.
count
(
"."
),
1
);
// found it, and only once
QCOMPARE
(
m_listResult
.
count
(
"empty"
),
1
);
QCOMPARE
(
m_listResult
.
count
(
"test1"
),
1
);
...
...
@@ -93,10 +91,8 @@ void TestKioArchive::testListRecursive()
connect
(
job
,
&
KIO
::
ListJob
::
entries
,
this
,
&
TestKioArchive
::
slotEntries
);
bool
ok
=
job
->
exec
();
QVERIFY
(
ok
);
//qDebug() << "listDir done - entry count=" << m_listResult.count();
QVERIFY
(
m_listResult
.
count
()
>
1
);
//qDebug() << m_listResult;
QCOMPARE
(
m_listResult
.
count
(
"."
),
1
);
// found it, and only once
QCOMPARE
(
m_listResult
.
count
(
"empty"
),
1
);
QCOMPARE
(
m_listResult
.
count
(
"test1"
),
1
);
...
...
bookmarks/kio_bookmarks.cpp
View file @
8bc33493
...
...
@@ -149,8 +149,6 @@ void BookmarksProtocol::flattenTree( const KBookmarkGroup &folder )
next
=
tree
.
next
(
bm
);
if
(
bm
.
isGroup
()
&&
bm
.
parentGroup
().
hasParent
())
{
//qDebug() << "moving " << bm.text() << " from " << bm.parentGroup().fullText() << " to " << prev.parentGroup().text() << endl;
bm
.
setFullText
(
"| "
+
bm
.
parentGroup
().
fullText
()
+
" > "
+
bm
.
fullText
());
tree
.
moveBookmark
(
bm
,
prev
);
prev
=
bm
;
...
...
network/ioslave/networkslave.cpp
View file @
8bc33493
...
...
@@ -41,7 +41,6 @@
NetworkSlave
::
NetworkSlave
(
const
QByteArray
&
name
,
const
QByteArray
&
poolSocket
,
const
QByteArray
&
programSocket
)
:
SlaveBase
(
name
,
poolSocket
,
programSocket
)
{
//qDebug();
mNetworkDBusProxy
=
new
NetworkDBusInterface
(
QLatin1String
(
"org.kde.kded5"
),
QLatin1String
(
"/modules/networkwatcher"
),
QDBusConnection
::
sessionBus
()
);
...
...
@@ -54,7 +53,6 @@ void NetworkSlave::get( const QUrl& url )
bool
successfulGetting
=
false
;
const
NetworkUri
::
Type
type
=
networkUri
.
type
();
//qDebug()<<"type="<<networkUri.type()<<"host="<<networkUri.hostAddress()<<"service="<<networkUri.serviceName()<<"stype="<<networkUri.serviceType();
if
(
type
==
NetworkUri
::
Service
)
{
const
QString
hostAddress
=
networkUri
.
hostAddress
();
...
...
@@ -62,7 +60,6 @@ void NetworkSlave::get( const QUrl& url )
const
QString
serviceType
=
networkUri
.
serviceType
();
QDBusReply
<
Mollet
::
NetService
>
reply
=
mNetworkDBusProxy
->
serviceData
(
hostAddress
,
serviceName
,
serviceType
);
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
Mollet
::
NetService
serviceData
=
reply
.
value
();
...
...
@@ -86,8 +83,6 @@ void NetworkSlave::mimetype( const QUrl& url )
bool
successfulMimetyping
=
false
;
NetworkUri
::
Type
type
=
networkUri
.
type
();
//qDebug()<<"type="<<networkUri.type()<<"host="<<networkUri.hostAddress()<<"service="<<networkUri.serviceName()<<"stype="<<networkUri.serviceType();
if
(
type
==
NetworkUri
::
Domain
)
{
mimeType
(
QLatin1String
(
Mimetypes
::
NetworkMimetype
)
);
...
...
@@ -101,7 +96,6 @@ void NetworkSlave::mimetype( const QUrl& url )
{
QDBusReply
<
Mollet
::
NetDevice
>
reply
=
mNetworkDBusProxy
->
deviceData
(
hostAddress
);
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
Mollet
::
NetDevice
deviceData
=
reply
.
value
();
...
...
@@ -117,7 +111,6 @@ void NetworkSlave::mimetype( const QUrl& url )
const
QString
serviceType
=
networkUri
.
serviceType
();
QDBusReply
<
Mollet
::
NetService
>
reply
=
mNetworkDBusProxy
->
serviceData
(
hostAddress
,
serviceName
,
serviceType
);
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
Mollet
::
NetService
serviceData
=
reply
.
value
();
...
...
@@ -144,7 +137,6 @@ void NetworkSlave::stat( const QUrl& url )
bool
successfulStating
=
false
;
NetworkUri
::
Type
type
=
networkUri
.
type
();
//qDebug()<<"type="<<networkUri.type()<<"host="<<networkUri.hostAddress()<<"service="<<networkUri.serviceName()<<"stype="<<networkUri.serviceType();
if
(
type
==
NetworkUri
::
Domain
)
{
...
...
@@ -161,7 +153,6 @@ void NetworkSlave::stat( const QUrl& url )
{
QDBusReply
<
Mollet
::
NetDevice
>
reply
=
mNetworkDBusProxy
->
deviceData
(
hostAddress
);
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
Mollet
::
NetDevice
deviceData
=
reply
.
value
();
...
...
@@ -179,7 +170,6 @@ void NetworkSlave::stat( const QUrl& url )
const
QString
serviceType
=
networkUri
.
serviceType
();
QDBusReply
<
Mollet
::
NetService
>
reply
=
mNetworkDBusProxy
->
serviceData
(
hostAddress
,
serviceName
,
serviceType
);
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
Mollet
::
NetService
serviceData
=
reply
.
value
();
...
...
@@ -207,7 +197,6 @@ void NetworkSlave::listDir( const QUrl& url )
bool
successfulListing
=
false
;
NetworkUri
::
Type
networkUriType
=
networkUri
.
type
();
//qDebug()<<"type="<<networkUri.type()<<"host="<<networkUri.hostAddress()<<"service="<<networkUri.serviceName()<<"stype="<<networkUri.serviceType();
if
(
networkUriType
!=
NetworkUri
::
InvalidUrl
)
{
...
...
@@ -215,7 +204,6 @@ void NetworkSlave::listDir( const QUrl& url )
{
QDBusReply
<
Mollet
::
NetDeviceList
>
reply
=
mNetworkDBusProxy
->
deviceDataList
();
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
const
Mollet
::
NetDeviceList
deviceDataList
=
reply
.
value
();
...
...
@@ -236,7 +224,6 @@ void NetworkSlave::listDir( const QUrl& url )
{
QDBusReply
<
Mollet
::
NetServiceList
>
reply
=
mNetworkDBusProxy
->
serviceDataList
(
hostAddress
);
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
const
Mollet
::
NetServiceList
serviceDataList
=
reply
.
value
();
...
...
@@ -256,7 +243,6 @@ void NetworkSlave::listDir( const QUrl& url )
const
QString
serviceType
=
networkUri
.
serviceType
();
QDBusReply
<
Mollet
::
NetService
>
reply
=
mNetworkDBusProxy
->
serviceData
(
hostAddress
,
serviceName
,
serviceType
);
//qDebug()<<reply.isValid();
if
(
reply
.
isValid
()
)
// TODO: find how a not found service can be expressed in the reply
{
Mollet
::
NetService
serviceData
=
reply
.
value
();
...
...
network/ioslave/networkthread.cpp
View file @
8bc33493
...
...
@@ -44,19 +44,14 @@ Mollet::Network* NetworkThread::network() const { return mNetwork; }
void
NetworkThread
::
pause
()
{
//qDebug()<<"before lock";
mMutex
.
lock
();
//qDebug()<<"after lock";
exit
();
//qDebug()<<"after exit";
}
void
NetworkThread
::
unpause
()
{
//qDebug()<<"before unlock";
mMutex
.
unlock
();
//qDebug()<<"after unlock";
}
void
NetworkThread
::
finish
()
...
...
@@ -70,19 +65,14 @@ void NetworkThread::run()
{
mNetwork
=
Mollet
::
Network
::
network
();
//qDebug()<<"starting with lock";
mMutex
.
lock
();
new
NetworkInitWatcher
(
mNetwork
,
&
mMutex
);
do
{
//qDebug()<<"going exec()";
exec
();
//qDebug()<<"left exec()";
mMutex
.
lock
();
//qDebug()<<"after lock";
mMutex
.
unlock
();
//qDebug()<<"after unlock";
}
while
(
mContinue
);
}
...
...
network/kded/kioslavenotifier.cpp
View file @
8bc33493
...
...
@@ -97,7 +97,6 @@ QStringList KioSlaveNotifier::watchedDirectories() const
void
KioSlaveNotifier
::
onDirectoryEntered
(
const
QString
&
directory
)
{
//qDebug()<<directory;
if
(
!
directory
.
startsWith
(
QLatin1String
(
"network:/"
))
)
return
;
...
...
@@ -117,7 +116,6 @@ void KioSlaveNotifier::onDirectoryEntered( const QString& directory )
void
KioSlaveNotifier
::
onDirectoryLeft
(
const
QString
&
directory
)
{
//qDebug()<<directory;
if
(
!
directory
.
startsWith
(
QLatin1String
(
"network:/"
))
)
return
;
...
...
@@ -142,7 +140,6 @@ void KioSlaveNotifier::notifyAboutAdded( const QString& dirId )
if
(
it
!=
mWatchedDirs
.
end
()
)
{
const
QUrl
url
(
QLatin1String
(
"network:/"
)
+
dirId
);
//qDebug()<<url;
org
::
kde
::
KDirNotify
::
emitFilesAdded
(
url
);
}
}
...
...
@@ -154,7 +151,6 @@ void KioSlaveNotifier::notifyAboutRemoved( const QString& dirId, const QString&
{
QList
<
QUrl
>
itemUrls
;
itemUrls
.
append
(
QUrl
(
QStringLiteral
(
"network:/"
)
+
itemPath
)
);
//qDebug()<<itemUrls;
org
::
kde
::
KDirNotify
::
emitFilesRemoved
(
itemUrls
);
}
}
...
...
network/network/builder/dnssd/dnssdnetworkbuilder.cpp
View file @
8bc33493
...
...
@@ -71,11 +71,9 @@ void DNSSDNetworkBuilder::start()
void
DNSSDNetworkBuilder
::
addServiceType
(
const
QString
&
serviceType
)
{
//qDebug()<<serviceType<<mServiceBrowserTable.contains(serviceType);
if
(
mServiceBrowserTable
.
contains
(
serviceType
))
return
;
// //qDebug()<<serviceType;
KDNSSD
::
ServiceBrowser
*
serviceBrowser
=
new
KDNSSD
::
ServiceBrowser
(
serviceType
,
true
);
connect
(
serviceBrowser
,
&
KDNSSD
::
ServiceBrowser
::
serviceAdded
,
this
,
&
DNSSDNetworkBuilder
::
addService
);
connect
(
serviceBrowser
,
&
KDNSSD
::
ServiceBrowser
::
serviceRemoved
,
this
,
&
DNSSDNetworkBuilder
::
removeService
);
...
...
@@ -92,7 +90,6 @@ void DNSSDNetworkBuilder::addServiceType( const QString& serviceType )
void
DNSSDNetworkBuilder
::
removeServiceType
(
const
QString
&
serviceType
)
{
//qDebug()<<serviceType<<mServiceBrowserTable.contains(serviceType);
// for now we keep the service browser (aren't that many) because otherwise
// the serviceRemoved calls won't reach us.
// we could also go through all the devices and remove the services manually as a fix
...
...
@@ -120,7 +117,6 @@ void DNSSDNetworkBuilder::addService( KDNSSD::RemoteService::Ptr service )
const
bool
isSameAddress
=
useIpAddress
?
(
device
.
ipAddress
()
==
ipAddress
)
:
(
deviceHostName
==
hostName
);
//qDebug()<<"existing device:"<<deviceHostName<<"at"<<device.ipAddress()<<"vs."<<hostName<<"at"<<ipAddress<<":"<<isSameAddress;
if
(
isSameAddress
)
{
...
...
@@ -159,7 +155,6 @@ void DNSSDNetworkBuilder::addService( KDNSSD::RemoteService::Ptr service )
// TODO: the new service will be announced two times, once with the new device and once alone.
// what to do about that? which order? okay? for now just do not attach services before. find usecases.
mNetworkPrivate
->
emitDevicesAdded
(
newDevices
);
//qDebug()<<"new device:"<<deviceName<<"at"<<hostName<<"by"<<service->type();
}
else
{
...
...
@@ -242,7 +237,6 @@ void DNSSDNetworkBuilder::removeService( KDNSSD::RemoteService::Ptr service )
const
NetDevice
&
device
=
it
.
next
();
if
(
device
.
hostName
()
==
hostName
)
{
// //qDebug()<<hostName;
QString
id
;
const
QString
serviceType
=
service
->
type
();
for
(
const
DNSSDNetSystemAble
*
factory
:
qAsConst
(
mNetSystemFactoryList
))
{
...
...
@@ -278,7 +272,6 @@ void DNSSDNetworkBuilder::removeService( KDNSSD::RemoteService::Ptr service )
void
DNSSDNetworkBuilder
::
onServiceTypeBrowserFinished
()
{
// //qDebug();
if
(
mIsInit
)
{
mIsInit
=
false
;
...
...
@@ -290,7 +283,6 @@ void DNSSDNetworkBuilder::onServiceTypeBrowserFinished()
void
DNSSDNetworkBuilder
::
onServiceBrowserFinished
()
{
--
mNoOfInitServiceTypes
;
// //qDebug()<<"mIsInit="<<mIsInit<<"mNoOfInitServiceTypes="<<mNoOfInitServiceTypes;
// only check for countdown after end of new service types
if
(
!
mIsInit
&&
mNoOfInitServiceTypes
==
0
)
emit
initDone
();
...
...
network/network/network_p.cpp
View file @
8bc33493
...
...
@@ -60,7 +60,6 @@ void NetworkPrivate::init()
void
NetworkPrivate
::
onBuilderInit
()
{
--
mNoOfInitBuilders
;
//qDebug()<<mNoOfInitBuilders;
if
(
mNoOfInitBuilders
==
0
)
emit
p
->
initDone
();
}
...
...
settings/kio_settings.cpp
View file @
8bc33493
...
...
@@ -141,7 +141,6 @@ void SettingsProtocol::stat(const QUrl& url)
const
KService
::
Ptr
service
=
it
.
value
();
const
QString
parentCategory
=
service
->
property
(
"X-KDE-System-Settings-Parent-Category"
).
toString
();
const
QString
category
=
service
->
property
(
"X-KDE-System-Settings-Category"
).
toString
();
//qDebug() << "category" << service->desktopEntryName() << service->name() << "category=" << category << "parentCategory=" << parentCategory;
createDirEntry
(
entry
,
category
,
service
->
icon
());
entry
.
fastInsert
(
KIO
::
UDSEntry
::
UDS_DISPLAY_NAME
,
service
->
name
());
statEntry
(
entry
);
...
...
@@ -179,7 +178,6 @@ void SettingsProtocol::listDir(const QUrl& url)
const
KService
::
Ptr
service
=
m_categories
.
at
(
i
);
QString
parentCategory
=
service
->
property
(
"X-KDE-System-Settings-Parent-Category"
).
toString
();
QString
category
=
service
->
property
(
"X-KDE-System-Settings-Category"
).
toString
();
//qDebug() << "category" << service->desktopEntryName() << service->name() << "category=" << category << "parentCategory=" << parentCategory;
if
(
parentCategory
==
fileName
)
{
//KUrl dirUrl = url;
//dirUrl.addPath(category);
...
...
Write
Preview
Supports
Markdown
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