Commit graph

47 commits

Author SHA1 Message Date
Albert Vaca Cintora
064ddfa3fe Refactor PairingHandler
We now have a single PairingHandler for all types of links.

The implementation now is more aligned with the one for Android.
2023-06-02 16:38:52 +00:00
Simon Redman
8cfa308140 Fix some Qt and KF5 deprecation warnings
## Summary

Fixes a few warnings about deprecated fields and methods.

## Test Plan

Things still seem to be basically working 🤷
2022-10-17 21:17:49 +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
f53dadaffa Port to new KIO worker API 2022-09-05 12:06:39 +02:00
Nicolas Fella
87db95b22f Convert license headers to SPDX expressions 2020-08-17 09:48:10 +00:00
Antonio Larrosa
1d36164230 Use ecm_qt_declare_logging_category to declare the logging categories
This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.

Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
2020-05-26 18:55:47 +02:00
Piyush Aggarwal
d35b845c0f use Qt in place of Unix-only symbols in kio/kdeconnect 2019-08-17 22:12:29 +00:00
Nicolas Fella
99aad18e7a Use UDSEntry::fastInsert 2019-07-17 21:37:19 +00:00
Nicolas Fella
e601755644 Force usage of QStringLiteral and port remaining offenders 2019-06-10 14:40:28 +00:00
Nicolas Fella
51e4e399f4 [kio] Mount device during stat if necessary 2019-05-14 20:36:44 +00:00
Nicolas Fella
2545ba5926 Use UDSEntry::reserve 2019-05-08 21:29:11 +00:00
Nicolas Fella
3b8fedea1a Replace http GNU urls with https 2019-03-23 17:29:26 +01:00
Nicolas Fella
640664db00 Change plugin name 2019-03-13 01:33:51 +01:00
Nicolas Fella
b248e37b81 [sftp] Give better error messages for common errors 2019-03-13 01:31:40 +01:00
Nicolas Fella
b0ae40f791 [kio] Fix file browsing with non-KIO file managers 2019-03-12 13:38:49 +00:00
Nicolas Fella
bcb985adda Use ERR_SLAVE_DEFINED 2019-03-09 15:27:49 +00:00
Nicolas Fella
efa644f0a4 [sftp] Get device ID from URL 2019-03-09 14:52:29 +00:00
Erik Duisters
273c9bb6e4 Handle errorMessage in kdeconnect.sftp packet 2019-01-22 18:42:00 +01:00
Erik Duisters
4834b63537 Just set UDSEntry::UDS_NAME to the actual directory name instead of the hardcoded string "folder" and don't set UDSEntry::UDS_DISPLAY_NAME at all
Summary: There is no reason to set UDSEntry::UDS_NAME to "folder" and then override it with UDSEntry::UDS_DISPLAY_NAME

Test Plan:
Apply patch, click android device in dolphin's Devices list
Verify phones sdcards are listed as befor

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D18223
2019-01-16 14:56:24 +01:00
Erik Duisters
560e8638e8 A QApplication object needs to be instantiated for kio-kdeconnect to work on KDE Neon
Summary:
kio-kdeconnect fails to start on KDE Neon because it does not instantiate a QApplication object

BUG: 400178

Test Plan:
Install on a KDE Neon 5.14 system or VM
Pair an android phone
Browse the phone's filesystem using dolphin

Reviewers: #kde_connect, #frameworks, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: sredman, apol, jriddell, nicolasfella, albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16692
2018-11-06 14:20:08 +01:00
Yuri Chornoivan
5fe74ce041 Fix minor EBN issues and typos 2018-10-07 21:23:20 +03:00
Albert Vaca
a1f48f79f2 Revert "Fix deprecation warning from KIO"
Requires KF5 version 5.48

This reverts commit 52040ca02b.
2018-08-05 21:38:35 +02:00
Albert Vaca
52040ca02b Fix deprecation warning from KIO 2018-08-05 17:44:42 +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
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
Albert Vaca
2fd42a8408 Unused var 2016-08-29 20:38:16 +02:00
Albert Vaca
d89bf512cf We should always emit an entry for "."
Note this doesn't fix the bug yet, as the KIO just redirects to the SSHFS,
which happens to have the same problem.

BUG: 367878
2016-08-29 20:31:52 +02:00
Albert Vaca
152c6dccb9 Calling processedSize is not needed in listDir 2016-08-29 20:28:24 +02:00
Boris Egorov
1924173df2 Fix various krazy2 warnings
Fix following krazy2 warning types:
[explicit], [endswithnewline], [doublequote_chars], [includes], [normalize],
[postfixop], [spelling]

See http://ebn.kde.org/krazy/reports/playground/base/kdeconnect-kde/index.html
for details.

SLOT/SIGNAL normalization done with Qt normalize utility:
https://github.com/qtproject/qtrepotools/tree/master/util/normalize

REVIEW: 124857
2015-08-21 22:38:54 +06:00
Àlex Fiestas
886787f732 Set a valid url for UDS_URL, basically one that includes files://
In Qt5 QUrl need to be created by calling fromLocalFile to handle
paths such /root/foo.txt.
So KIO apparently broke compatibility with setting such paths in
UDS_URL and we have to pass instead files:///root/foo.txt

Altought this might be a bug in KIO, we want to work with all KF5 based
versions of plasma and this patch will just do that.

REVIEW:124544
2015-07-31 13:01:24 +02:00
Àlex Fiestas
4acfaa8b12 Remove trailing spaces and lines 2015-07-31 11:39:58 +02:00
Albert Vaca
15745b2425 Fixed deprecation warning 2015-02-23 22:07:28 -08:00
Aleix Pol
21ab5a4f81 Merge branch 'master' into frameworks
Mostly kDebug -> qCDebug
Also some KCmdLineArgs -> QCommandLineParser

Conflicts:
	cli/kdeconnect-cli.cpp
	core/CMakeLists.txt
	core/backends/lan/lanlinkprovider.cpp
	core/daemon.cpp
	core/pluginloader.cpp
	interfaces/CMakeLists.txt
	kio/kiokdeconnect.cpp
	plugins/mousepad/CMakeLists.txt
	plugins/mousepad/mousepadplugin.h
	plugins/mpriscontrol/mpriscontrolplugin.cpp
	plugins/sftp/sftpplugin.cpp
2014-11-04 19:12:29 +01:00
Albert Vaca
7a214e72ee SFTP plugin now supports devices with multiple external storages 2014-10-10 15:01:21 -07:00
Albert Vaca
279dbe5598 Minor changes 2014-10-10 11:47:35 -07:00
Àlex Fiestas
82a8d921b8 Port KIO free of KDElibs4Support 2014-09-23 19:33:03 +02:00
Àlex Fiestas
d971269bd5 Remove kdebugnamespace completely and replace by core_debug
In those places that belong to "core" we use core_debug, in any other
place we have added custom logging categories so we use those instead.
2014-09-22 00:59:34 +02:00
Àlex Fiestas
3f24ccd39a Port the kio from kDebug to qCDebug
Use custom area for the kio "kdeconnect.kio"
2014-09-22 00:20:14 +02:00
Albert Vaca
a303b73238 Merge branch 'master' into frameworks
Conflicts:
	cli/kdeconnect-cli.cpp
	core/CMakeLists.txt
	plasmoid/package/contents/ui/FullRepresentation.qml
	plugins/ping/pingplugin.cpp
2014-07-01 23:59:38 +02:00
Albert Vaca
cabb0f2f7b Simplified debug areas so we only have one, called "kdeconnect" 2014-07-01 01:26:08 +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
Albert Vaca
29719ccce5 New icon by Malcer <malcer@gmx.com> 2014-02-19 21:10:41 +01:00
Albert Vaca
37fdc70e94 Loading the correct translations catalog 2014-02-14 17:31:05 +01:00
Albert Vaca
4f71045782 Added i18n to kio 2014-01-23 21:00:47 +01:00
Samoilenko Yuri
bbca88eff2 playing with blocking mounting 2014-01-21 17:06:51 +04:00
Albert Vaca
90e9ded926 Added KIO slave and icon in Dolphin's places for file browsing 2014-01-16 15:32:35 +01:00