Commit graph

27 commits

Author SHA1 Message Date
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Nicolas Fella
283d014059 Use a compositejob for receiving files 2019-06-02 14:02:21 +00:00
Erik Duisters
6fb67d0261 Delete partially downloaded file when transfer is canceled locally 2019-05-03 17:34:17 +02:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Albert Vaca
84bba9429f Merge branch 'master' into 1.x
# Conflicts:
#	core/backends/lan/downloadjob.cpp
#	core/backends/lan/downloadjob.h
#	core/filetransferjob.cpp
#	core/filetransferjob.h
#	plugins/notifications/sendreplydialog.cpp
#	plugins/notifications/sendreplydialog.h
#	plugins/telephony/sendsmsdialog.cpp
#	plugins/telephony/sendsmsdialog.h
2017-09-03 22:05:54 +02: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
Aleix Pol
364ab02aad set total amount later
Otherwise the kwidgetjobtracker wouldn't notice it and it wouldn't be
reported properly.
2017-08-02 01:48:37 +02:00
Nicolas Fella
f0010763e7 Fixed filetransferjob broken after adding icons.
The plasmoid didn't know the transfer ended.

REVIEW: 130116
2017-05-07 20:16:19 +02:00
Nicolas Fella
891f1bd355 Notification icons from Android are now displayed
- FileTransferJob is now nonblocking.
- Files are stored based on the image MD5.
- Some improvements in displaying the notification, e.g. title is only
  displayed when different than the app name.
- Most of the notification display code moved to the Notification class.

REVIEW: 130050
2017-04-13 21:32:03 +02:00
Albert Vaca
b7bb8d94c5 Fixed QStrings not being passed by ref 2016-11-26 16:36:34 +01: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
5933c6810c More unused includes cleanup 2016-07-05 14:27:53 +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
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
Aleix Pol
0bca50af93 Merge branch '0.9' 2015-10-19 17:48:13 +02:00
Albert Vaca
4574aa3639 Make the origin also contain the file name, not only the device name 2015-10-17 13:32:57 -07:00
Aleix Pol
d835d01a09 Add a test for file sending, using the loopback device
Extends unit testing by making sure that file sharing works locally.

REVIEW: 125086
2015-09-07 15:03:04 +02:00
Aleix Pol
11996f56ca Drop dependency of KIO from kdeconnectcore
Use QNetworkAccessManager for storing the files we receive instead of
directly KIO, then provide the KIO-based QNetworkAccessManager from the
daemon. This way we'll still get the KIO network-transparency, but the
library only depenends on QtNetwork, which will be easier to get in some
platforms.

After this change, we only depend on KConfig, KI18n and KCoreAddons, which
are tier1 and really easy to work with on any platform.

REVIEW: 123325
2015-05-05 01:07:29 +02:00
Aleix Pol
ede7dd0e84 Drop KIOWidgets dependency from KDEConnectCore
Removes the usage of RenameDialog by moving the functionality away. In
fact, what it does is make the share dialog try to come up with a different
name rather than asking the user. It's a quite common procedure as makes
the interaction simpler (for example, Chromium and Kamoso work like that).

REVIEW: 122813
2015-03-09 13:22:10 +01:00
Albert Vaca
6cc6d287fc Merge branch 'master' into frameworks
Conflicts:
	cli/kdeconnect-cli.cpp
	core/filetransferjob.cpp
	core/filetransferjob.h
	interfaces/notificationsmodel.cpp
	plasmoid/declarativeplugin/kdeconnectdeclarativeplugin.h
	plugins/sftp/sftpplugin.cpp
2015-01-20 22:44:31 -08:00
Albert Vaca
da1cb4c354 Coding style 2015-01-20 22:22:14 -08:00
Albert Vaca
a58fab4fb3 Merge branch 'master' into frameworks
Conflicts:
	cli/kdeconnect-cli.cpp
	core/device.cpp
	core/filetransferjob.cpp
	core/filetransferjob.h
	core/networkpackage.h
	kded/CMakeLists.txt
	plugins/share/shareplugin.cpp
	plugins/telephony/telephonyplugin.cpp
2014-11-11 21:40:54 -08:00
Jens Dagerbo
53a33096ad Changed int to qint64 for tracking payload size
No longer keeping the entire file in RAM while uploading
2014-11-09 12:57:09 -08:00
Àlex Fiestas
dbea3171bd Make kdeconnect core compile without KDELibs4Support
This meant to add a lot of dependencies to each plugin since we had
KDELibs4support as PUBLIC link meaning that anything linking against
kdeconnectcore was linking at the same time to mostly all frameworks.

Now each plugin has more or less its dependencies in the CMake some
still depend on KDELibs4Support.

For the mousepad plugin I needed to add a fixX11.h file that basically
undefines/defines again some stuff xlib has that conflcits with normal
C++ and Qt.

Before it was not conflicting because some lib within KDELibs4Support
was including this file, but now we have to do it ourselves.
2014-09-22 02:40:51 +02:00
Àlex Fiestas
473a34b76f Por filetranasferjob to QUrl
Pretty much a straight forward port from KUrl to QUrl, since we are only
forwarding arguments there was not much to port but a simple /kurl/qurl/
2014-09-21 22:22:06 +02:00
Aleix Pol
a1a560c469 First approach to a KF5 port of KDE Connect
Ported using KDELibs4Support, for a smaller delta, so we can keep
developing on master until we decide not to.

At the moment, it builds and installs but tests don't pass because
of a QCA2 initialization problem I didn't manage to debug yet.

CCMAIL: kdeconnect@kde.org
2014-06-16 20:02:07 +02:00
Aleix Pol
b88897847b Reorganize sources
We broke kded into core and kded, core contains the library with the backends
and plugins.
Also we renamed libkdeconnect to interfaces.
2014-06-14 15:22:40 +02:00
Renamed from kded/filetransferjob.h (Browse further)