Commit graph

20 commits

Author SHA1 Message Date
Albert Vaca Cintora
74caaface0 Further KIO::AccessManager cleanup 2023-04-10 08:29:48 +00:00
Nicolas Fella
a918ffc0cb Add and make use of ECM's clang-format integration 2022-09-11 23:21:58 +00:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Richard Liebscher
ba34672cbd Make build for SailfishConnect possible 2019-12-09 22:14:19 +00:00
Nicolas Fella
e601755644 Force usage of QStringLiteral and port remaining offenders 2019-06-10 14:40:28 +00:00
Simon Redman
24ab6d15cf ## Summary
pluginloadtest and sendfiletest are crashing. This patch fixes that by allowing Daemon::init() to be called from TestDaemon

## Test Plan

### Before:
Both tests are crashing because it is not able to find any devices. It is not able to find any devices because the LanLinkProvider is not being added because Daemon::init() is not being called.

### After:
pluginloadtest and sendfiletest pass
2019-06-02 21:26:47 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Jean Vincent
72535ecf48 Make member variable names, & placement and * placement more coherent
Summary:
Change all member variables to the form m_fooBar because it is the preferred form in Qt (it was half and half between this and mFooBar, and a minority didn't have anything).
Place all references and pointers on the side of the type since it is the majority.

Basically:
 - mFoo -> m_foo
 - foo -> m_foo (if it is a member variable)
 - Type &ref -> Type& ref
 - Type *ptr -> Type* ptr

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, nicolasfella, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7312
2017-09-03 21:45:08 +02:00
Jean Vincent
c864267f04 Replace Q_FOREACH with C++11 range-for
Summary:
The use of Q_FOREACH is advised against (https://doc.qt.io/qt-5/qtglobal.html#Q_FOREACH) since Qt 5.7 and will eventually be removed from Qt.

I replaced all occurrences with the range-for loop introduced in C++11 (except for the one in daemon.cpp in deviceIdByName which might have a bug / typo in it).

I added const to the container or casted it with qAsConst when appropriate to avoid unnecessary copies.

(This is my first submission. I did all the unit tests, and they all passed but I don't know how to show it here.)

Reviewers: #kde_connect, nicolasfella, apol

Reviewed By: #kde_connect, nicolasfella, apol

Subscribers: albertvaka, apol, nicolasfella

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6724
2017-07-21 09:57:19 +02:00
Albert Vaca
60331ccbf1 Clazy says all this QStringLiteral and QLatin1String were missing/wrong 2016-11-26 16:21:29 +01:00
Aleix Pol
81634303b2 Make capabilities static
As discussed with Albert, move the population of capabilities into the
identity package, making them static along the execution of the link.

When we receive the identityPackage, we collect the plugins we can use with
the device and stick to those. This should simplify the implementation and
remove the possibility to lose packages if packages are received before the
capabilities are processed in the former approach.

REVIEW: 128386
2016-07-06 17:37:22 +02:00
Aleix Pol
49713d8aca Enforce Qt-specific keywords
Reviewed by Albert Vaca
2016-06-21 20:19:14 +02:00
Aleix Pol
55c6014686 Fix tests
In case we need to discover the device (i.e. we're running the test in a
clean environment) we need to acquire the discovery mode.
Only initialize the test after setting the test mode enabled, so the
loopback is enabled.
2016-06-06 01:21:37 +02:00
Aleix Pol
a45e48ca7a Fix tests build
Daemon::requestPairing changed into ::askPairingConfirmation.
2015-12-06 00:08:02 +01:00
Albert Vaca
cf6cbd2925 WIPx3! 2015-12-01 10:45:14 -08:00
Aleix Pol
3269b7a9c2 Fix tests when the Qt mobile app is not built 2015-09-12 15:17:08 +02:00
Aleix Pol
fc074c8ec8 Fix tests
Ensure the loopback device is paired
2015-09-09 20:12:05 +02:00
Aleix Pol
acdd96c431 Fix device lookup on the tests 2015-09-08 20:11:52 +02:00
Aleix Pol
6a379e9227 Rename missingPlugins to unsupportedPlugins 2015-09-08 17:38:33 +02:00
Aleix Pol
df3581459a Add a test that makes sure that capabilities are gathered correctly
While at it, fix the logic, because it wasn't working all that well.

Reviewed by Albert Vaca
2015-09-08 17:35:30 +02:00