Albert Vaca
7638683c85
Print a qCritical in addition to showing a notification
2016-11-24 15:11:30 +01:00
Albert Vaca
3d0f7c3fcb
Changed signal reachableStatusChanged() to reachableChanged(bool)
...
And proxied it on the C++ dbus interface.
2016-11-23 17:24:35 +01:00
Albert Vaca
f845b33392
Fixed bug on Windows
2016-11-20 04:25:11 +01:00
Albert Vaca
f901655ef4
Warning
2016-11-16 21:37:07 +01:00
Albert Vaca
f61dde5bbb
Use different files instead of different groups
2016-09-19 13:35:03 +02:00
Kai Uwe Broulik
6f7c419baa
Merge branch '1.x'
2016-09-10 22:53:37 +02:00
Kai Uwe Broulik
77ad9336b6
[FileTransferJob] Fix division by null and use elapsed timer
...
When sending multiple files from my phone to my PC, kdeconnectd usually received a SIGFPE.
To get the transfer speed it divides the number of bytes received by the elapsed time which can be zero.
Also, since we're only interested in the time that has elapsed, use QElapsedTimer,
which is exactly for this. QTime::elapsed() also needs to take into account potentially
ocurred timezone or DST changes.
REVIEW: 128861
2016-09-10 22:52:03 +02:00
Albert Vaca
b585e4d48a
Don't return an empty list of supported plugins
...
If we don't know it yet return them all.
2016-09-06 10:53:19 +02:00
Albert Vaca
5ad007a981
Merge branch '1.x'
2016-08-29 20:46:48 +02:00
Thmoas Posch
a759cdf678
Device::encryptionInfo returned the entire certificate instead of the hash
...
BUG: 367897
2016-08-29 20:41:06 +02:00
Albert Vaca
c9cfac7253
Remove debug logs
2016-08-29 11:00:35 +02:00
Albert Vaca
6281b9c232
Make it compile with Qt < 5.6
2016-08-28 11:19:00 +02:00
Albert Vaca
54801aac3b
Use a new config group so we don't conflict with older versions' config
2016-08-25 18:06:01 +02:00
Aleix Pol
d9e7f308c2
Show the announcedName in the qml app
...
Makes it possible to display it and modify it
Introduces a DBusProperty component that can be used if we don't want
to go through the QtDBus property generation hell.
2016-08-21 19:38:15 +02:00
Aleix Pol
f765e9c0a8
Actually compare the old plugin map
...
We were comparing to the result after removing all the actually used
plugins
2016-08-21 13:21:40 +02:00
Aleix Pol
0774020899
Merge branch '1.0' into 1.x
2016-08-14 21:15:13 +02:00
Aleix Pol
426bf2a105
Merge branch '1.0'
2016-08-08 19:39:21 +02:00
Aleix Pol
91f952f5f1
Fix test
...
Use the right port
Store the port in a public variable, so it can be used from the test.
2016-08-08 19:38:58 +02:00
Albert Vaca
50496a3442
Reverted change that introduced a crash.
...
If there are ssl erros with unpaired devices, link was null.
This reverts commit 7da30ddbb1
.
2016-08-03 22:01:04 +02:00
Albert Vaca
2cdf7d5499
Reduced logging
2016-07-12 12:49:21 +02:00
Albert Vaca
f41877fbec
Disabled removing links when exiting discovery mode because it was broken.
...
If both devices are in "discovery mode" (ie: both want to keep links
established) and the last one to create the link goes out of discovery
mode, it will close the link when it shouldn't (because the other end still
was "using" it to display it to the user).
2016-07-12 12:38:40 +02:00
Albert Vaca
7da30ddbb1
Use the pairing handler instead of accessing the device directly on error
2016-07-12 12:34:56 +02:00
Albert Vaca
0b3de33d74
Minor
2016-07-12 12:33:57 +02:00
Albert Vaca
4e8a325479
Do not specify type for struct
2016-07-12 12:32:58 +02:00
Albert Vaca
6248f03256
Made a QString const refrence.
2016-07-07 01:09:07 +02:00
Albert Vaca
47c78427cb
Removed outdated comment
2016-07-07 01:07:51 +02: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
afdac88885
Proper i18n use
2016-07-06 16:41:38 +02:00
Aleix Pol
8d7d820ef4
Naming consistency. Capabilities is the correct name
2016-07-06 15:55:04 +02:00
Aleix Pol
0e76082fc6
Remove commented code
...
Used to be used when we encrypted and decrypted using QCA. Now it's done
by the device link.
2016-07-06 00:59:37 +02:00
Albert Vaca
5933c6810c
More unused includes cleanup
2016-07-05 14:27:53 +02:00
Albert Vaca
7c0fbbc034
Unused include cleanup
2016-07-05 14:13:48 +02:00
Aleix Pol
0d6a7bafcf
Remove unused variable
2016-07-05 13:14:55 +02:00
Aleix Pol
5a265a55de
Start consuming right away, if there's data available from the start
...
Fixes sendfiletest
2016-07-05 13:14:47 +02:00
Albert Vaca
963a15bd08
Fixed crash where a device was destroyed but links tried to use it.
2016-07-05 12:42:57 +02:00
Albert Vaca
9c736583e2
Use the actual connection origin, so we don't keep all connections open.
2016-07-05 12:42:39 +02:00
Aleix Pol
2b451097eb
Make sure errors get reported
2016-07-05 01:00:02 +02:00
Albert Vaca
385bf77480
Fixed bug which didn't allow to pair a new device
2016-07-04 19:52:37 +02:00
Aleix Pol
359194c2ed
Use initializers to construct it
2016-07-04 19:18:13 +02:00
Albert Vaca
04713de718
Remove qdebugs
2016-06-26 15:48:37 +02:00
Aleix Pol
ef98fb4587
Fix file transfer under SSL
...
Introduces a big fat buffer :(
Actually test the trasfers :)
Takes QSslSocket causistic into account, for some reason QNAM refuses to
mark as finished when the QSslSocket (through QIODevice) closes.
It would be good to look into dropping the QBuffer, doing so with the test
in place will help.
2016-06-22 17:49:45 +02:00
Aleix Pol
86b086e392
Make warnings actual warnings
2016-06-22 16:31:01 +02:00
Albert Vaca
01139d31d1
De-duplicated socket SSL configuration code
2016-06-22 14:27:09 +02:00
Aleix Pol
f011191eca
Fix few issues in FileTransferJob
...
Handle errors from different endpoints
Don't ::startTransfer when we find a colliding file
2016-06-22 12:42:51 +02:00
Aleix Pol
4cb50d69d8
Fix some issues in the downloadjob and its test
...
Test on KJob abstraction, this way we can check if it has an error when it
breaks.
Handle errors in a different branch of the code.
2016-06-22 12:40:14 +02:00
Aleix Pol
f9406e8afc
Introduce QVariantMap as an argument of NetworkPackage
...
Makes it possible to specify the different properties sent at once,
rather than one by one as we used to do.
Also port whenever possible to the initializer-list syntax.
REVIEW: 128269
2016-06-21 20:07:12 +02:00
Albert Vaca
aa41b40ab5
Changed magic number by constant
2016-06-21 18:42:53 +02:00
Albert Vaca
e880e14ed5
Preffer Q_FOREACH to foreach
2016-06-21 14:50:17 +02:00
Albert Vaca
5abd081b85
Changed port so we don't conflict with Houdini
2016-06-21 14:42:32 +02:00
Aleix Pol
bfd698af36
Fix issues detected by clazy
...
Don't use for(:) on Qt containers. It detaches without need.
2016-06-20 19:22:29 +02:00
Aleix Pol
596e4484f4
Clean up use of virtual and override keywords
...
Only use virtual when actually virtual, to override just use override.
2016-06-20 19:22:29 +02:00
Albert Vaca
cc0fdacbf5
Fixed compilation on Windows
2016-06-20 02:31:55 +02:00
Albert Vaca
c4d7c2f39b
Improved comments
2016-06-17 02:00:23 +02:00
Albert Vaca
e379fcd69d
Destroying a socket should not destroy the link.
...
Also, sockets can be destroyed as soon as the socketreader is deleted.
2016-06-17 02:00:23 +02:00
Aleix Pol
83a56c47e9
Drop NetworkPackage QObject heritage
...
It was only used for introspection and we can use Q_GADGET for that.
Make the NetworkPackage objects much lighter.
REVIEW: 124166
2016-06-16 20:33:13 +02:00
Albert Vaca
91c23dfdea
Do not compare against the current version of the protocol
2016-06-16 19:48:23 +02:00
Albert Vaca
cb0fd1fe20
Removed a case where we would still add a link on old protocol versions
2016-06-15 20:38:57 +02:00
Aleix Pol
b9be1e17d1
Specify for which device we're not delivering the packages
2016-06-12 20:16:58 +02:00
Aleix Pol
5715926c5c
Export the symbols needed by the tests
2016-06-10 15:07:33 +02:00
Albert Vaca
3177143439
Fixed build on windows
2016-06-09 02:36:02 +02:00
Albert Vaca
1c315af108
Revert "Fix file transfers"
...
This reverts commit 252ea4ba20
.
2016-06-07 00:28:52 +02:00
Aleix Pol
c7429b56b7
In the CLI interface, make it possible to refer a device by name
...
Only works with trusted devices
2016-06-06 01:21:37 +02:00
Aleix Pol
751bd5849b
small style changes
2016-06-06 01:21:37 +02:00
Frederik Schwarzer
a594324d4f
Fix message wording.
2016-06-03 21:33:25 +02:00
Aleix Pol
252ea4ba20
Fix file transfers
2016-06-03 16:38:04 +02:00
Aleix Pol
8736d2559e
Notify if a package is being discarded
2016-06-03 15:51:05 +02:00
Aleix Pol
fd19426756
Make it possible to put NetworkPackage right into qDebug
2016-06-03 15:50:46 +02:00
Albert Vaca
7a0bb09353
Make sure we don't broadcast more than once at the same time.
...
Race conditions might happen because two links will be created.
2016-06-02 12:18:51 +02:00
Albert Vaca
7a67274a18
Fixed memory leak.
2016-06-02 12:17:07 +02:00
Albert Vaca
0c48c00fa7
Added debug function to print a stack trace
2016-06-01 12:43:34 +02:00
Aleix Pol
70d447f58f
better debug information
2016-06-01 01:14:30 +02:00
Aleix Pol
702fbd09af
If interfaces are required is up to the plugin
2016-05-31 20:46:48 +02:00
Aleix Pol
16eccd46d3
Restore having plugins without any capabilities
...
These won't need to be matched by the other device
2016-05-31 20:16:25 +02:00
Albert Vaca
4383a42703
Changed the way we detect if capabilities are supported
2016-05-31 20:10:35 +02:00
Albert Vaca
5654300249
Removed logs
2016-05-31 20:09:52 +02:00
Aleix Pol
9aa794b0da
Merge branch 'master' into sslrefactor
2016-05-31 17:29:06 +02:00
Aleix Pol
c2349bacd7
Make sure we don't eat all system memory
...
I had wrong configuration files, the encription algorithm definitely
doesn't take it into account.
2016-05-05 17:45:49 +02:00
Vineet Garg
b96227ae75
Changed protocol version to TLS 1.0, as TLS 1.2 not supported on many Android device
...
Choosing cipher suites manually, same as of Android
2016-04-30 20:39:34 +05:30
David Kahles
abc5fa3c56
Remove second UDP socket in LanLinkProvider
...
We don't need two sockets for reading and writing.
REVIEW: 127769
2016-04-28 00:19:20 +02:00
Albert Vaca
29d3f9aa7a
Expose protocol version
2016-04-14 18:52:31 -07:00
David Kahles
174cf3d3ce
Don't reset m_pairStatus when unpair is requested by remote device
...
unpairInternal() will take care of this, otherwise pairingChanged() will not
be emited and though, the model won't notice it.
REVIEW: 127641
2016-04-13 08:44:47 +02:00
Albert Vaca
78d4ba2106
Cleanup
2016-03-08 07:29:34 -08:00
Albert Vaca
ff9775e1c9
Better logging of what's going on
2016-03-07 16:01:44 -08:00
Albert Vaca
8f9fde8f40
Fixed crash when pairing old Android apps.
2016-03-02 16:38:03 -08:00
Albert Vaca
ebd429629a
Fixed unpairs never being sent
2016-03-02 16:17:38 -08:00
Albert Vaca
ea812f1101
Attribute not needed
2016-03-02 15:50:06 -08:00
Albert Vaca
b1ef3f9fc9
Use a different key for settings, so we don't clash with older versions.
2016-03-02 15:36:45 -08:00
Albert Vaca
90d2b0ad69
Changing TLS version to what is used in LanLinkProvider.
...
Android<16 doesn't support TLS>1.0
2016-02-12 09:02:56 -08:00
Albert Vaca
6cde0271fb
Removed loopbackpairinghandler
2016-02-12 07:59:12 -08:00
Albert Vaca
aa4150f0c9
Moved ConnectionStarted from DeviceLink to LanDeviceLink
2016-01-10 07:12:13 -08:00
Albert Vaca
2aca5ca11e
Added error message when trying to pair older devices
2015-12-17 09:24:34 -08:00
Aleix Pol
8a019ccddf
Fix assert
2015-12-17 17:58:33 +01:00
Albert Vaca
7ed012e4a5
Fixed broadcast
2015-12-17 08:59:08 -08:00
Albert Vaca
f5404ea11b
Removed more references to publicKey
2015-12-17 08:22:18 -08:00
Albert Vaca
918bb82ffa
Do not store certificate and key in landevicelink
...
The socket already stores the certificate, and the public key is only used
in the sftp plugin, so it should be moved there or dropped.
2015-12-17 07:46:13 -08:00
Albert Vaca
4c84499e6a
Don't addLink twice for the same link
2015-12-17 07:44:29 -08:00
Albert Vaca
dd7d4093ed
Removed sendPackageEncrypted from DeviceLink
2015-12-17 07:43:52 -08:00
Albert Vaca
d37830b429
Simplified pairing logic
2015-12-17 06:54:29 -08:00
Albert Vaca
10b4ca00fb
Set certificate in outgoing pairing packet
2015-12-17 06:53:57 -08:00
Albert Vaca
af43a21864
Propagate pairingError
2015-12-17 06:53:29 -08:00