Commit graph

54 commits

Author SHA1 Message Date
Nicolas Fella
60a1adf229 [kio] Mark Class as local
This is needed for kioexec to work properly since we forward to a local file system

BUG: 413477
CCBUG: 425948
2020-08-30 23:45:43 +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
c6c58b6b52 [kio] Don't link agains QtGui 2019-03-11 18:55:38 +01: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
Ivan Čukić
6dbfe9cd24 Qt Network is used by the KIO module
Reviewers: albertvaka, ngraham, #plasma, #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11251
2018-05-26 23:13:47 +02:00
Friedrich W. H. Kossebau
bb3ab8b631 Clean-up requirements: cmake 3.0, qt 5.7, use min versions, deduplicate KF5
Summary:
* cmake 2.8.12 is really outdated, 3.0 is minimum in plasma & kf5
* cmake_minimum_required should be at begin of toplevel CMakeLists.txt
* bump qt version to 5.7, matching the min Qt version of kf5 5.42
* with ecm being part of kf5 since early versions, share ${KF5_MIN_VERSION}
* use QT_MIN_VERSION & KF5_MIN_VERSION also for separate find_package calls
* deduplicate all KF5 components searched for in unconditionally included
  subdirs

Test Plan: Still configures and builds with all options OFF & ON

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D11418
2018-03-17 23:34:33 +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
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
Albert Vaca
d2b4a6f214 Indentation 2015-10-18 21:51:51 -07:00
Aleix Pol
d58f6314fe run Clang Modernize
Minus the auto change
2015-09-08 10:47:37 +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
Aleix Pol
3caf5e7908 Move some find_package dependencies to the children directories as agreed 2015-04-10 17:48:48 +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
Lukáš Tinkl
743f7548e0 i18n fixes 2014-09-08 03:09:18 +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
Aleix Pol
7a0557f482 cmake fixes
Use the new directory structure when installing generated files.
Remove unneeded add_dependencies calls.
2014-06-14 16:56:41 +02:00
Rohan Garg
83c882cbdd Fix build 2014-06-14 16:50:54 +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
Albert Vaca
29719ccce5 New icon by Malcer <malcer@gmx.com> 2014-02-19 21:10:41 +01:00