[SCM] kdeconnect packaging branch, master, updated. debian/0.9g-1-1183-g9d69498

Maximiliano Curia maxy at moszumanska.debian.org
Fri Oct 14 14:28:13 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/kdeconnect.git;a=commitdiff;h=6cc6d28

The following commit has been merged in the master branch:
commit 6cc6d287fceed9a6a3d0f2f84f59ba24b819e370
Merge: 930c107f7b75eb742b6c98a8bbfd8f2954683c9c da1cb4c354e0c5f4f1b75079f82c0461413c176d
Author: Albert Vaca <albertvaka at gmail.com>
Date:   Tue Jan 20 22:44:31 2015 -0800

    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

 core/filetransferjob.cpp                           | 37 +++++++++++-----------
 core/filetransferjob.h                             |  7 ++--
 interfaces/devicesmodel.h                          |  6 ++--
 interfaces/notificationsmodel.cpp                  |  8 +++--
 interfaces/notificationsmodel.h                    | 14 ++++----
 kcm/kcm_kdeconnect.desktop                         |  2 +-
 plugins/notifications/notification.cpp             |  1 +
 .../kdeconnect_screensaver_inhibit.desktop         |  2 ++
 plugins/sftp/sftpplugin.cpp                        |  9 +++---
 plugins/sftp/sftpplugin.h                          |  3 +-
 10 files changed, 47 insertions(+), 42 deletions(-)

diff --cc core/filetransferjob.cpp
index 8accfa6,070048c..98418ec
--- a/core/filetransferjob.cpp
+++ b/core/filetransferjob.cpp
@@@ -28,20 -26,21 +28,19 @@@
  #include <KIO/RenameDialog>
  #include <KLocalizedString>
  
- FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const QUrl &destination): KJob()
 -#include "kdebugnamespace.h"
 -
 -FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const KUrl& destination)
++FileTransferJob::FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const QUrl& destination)
+     : KJob()
+     , mOrigin(origin)
+     , mDestinationJob(0)
+     , mDeviceName("KDE Connect")
+     , mDestination(destination)
+     , mSpeedBytes(0)
+     , mSize(size)
+     , mWritten(0)
  {
      Q_ASSERT(destination.isLocalFile());
-     //TODO: Make a precondition before calling this function that destination file exists
-     mOrigin = origin;
-     mSize = size;
-     mWritten = 0;
-     m_speedBytes = 0;
-     mDestination = destination;
-     mDestinationJob = 0;
-     mDeviceName = i18nc("Device name that will appear on the jobs", "KDE-Connect");
- 
      setCapabilities(Killable);
 -    kDebug(debugArea()) << "FileTransferJob Downloading payload to" << destination;
 +    qCDebug(KDECONNECT_CORE) << "FileTransferJob Downloading payload to" << destination;
  }
  
  void FileTransferJob::openFinished(KJob* job)
diff --cc core/filetransferjob.h
index e55359a,30ab4c2..8c94c99
--- a/core/filetransferjob.h
+++ b/core/filetransferjob.h
@@@ -37,10 -37,10 +37,10 @@@ class FileTransferJo
      Q_OBJECT
  
  public:
 -    FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const KUrl& destination);
 +    FileTransferJob(const QSharedPointer<QIODevice>& origin, qint64 size, const QUrl &destination);
      virtual void start();
 -    KUrl destination() const { return mDestination; }
 +    QUrl destination() const { return mDestination; }
-     void setDeviceName(const QString &deviceName) {mDeviceName = deviceName;};
+     void setDeviceName(const QString &deviceName) { mDeviceName = deviceName; }
  
  public Q_SLOTS:
      void doStart();
@@@ -58,12 -58,11 +58,11 @@@ private
      QSharedPointer<QIODevice> mOrigin;
      KIO::FileJob* mDestinationJob;
      QString mDeviceName;
 -    KUrl mDestination;
 +    QUrl mDestination;
-     QTime m_time;
-     qulonglong m_speedBytes;
+     QTime mTime;
+     qulonglong mSpeedBytes;
      qint64 mSize;
      qint64 mWritten;
- 
  };
  
  #endif
diff --cc interfaces/notificationsmodel.cpp
index 0f4c197,4f6feb4..caa4dad
--- a/interfaces/notificationsmodel.cpp
+++ b/interfaces/notificationsmodel.cpp
@@@ -44,15 -45,15 +44,17 @@@ NotificationsModel::NotificationsModel(
  
      connect(this, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
              this, SIGNAL(anyDismissableChanged()));
 +}
  
 +QHash<int, QByteArray> NotificationsModel::roleNames() const
 +{
+     //Role names for QML
 -    QHash<int, QByteArray> names = roleNames();
 +    QHash<int, QByteArray> names = QAbstractItemModel::roleNames();
-     names.insert(DbusInterfaceRole, "dbusInterface");
-     names.insert(AppNameModelRole, "appName");
+     names.insert(DbusInterfaceRole,    "dbusInterface");
+     names.insert(AppNameModelRole,     "appName");
+     names.insert(IdModelRole,          "notificationId");
      names.insert(DismissableModelRole, "dismissable");
 -    setRoleNames(names);
 -
 +    return names;
  }
  
  NotificationsModel::~NotificationsModel()
@@@ -154,14 -155,14 +156,14 @@@ QVariant NotificationsModel::data(cons
  
      NotificationDbusInterface* notification = m_notificationList[index.row()];
  
-     //FIXME: This function gets called lots of times, producing lots of dbus calls. Add a cache.
+     //FIXME: This function gets called lots of times, producing lots of dbus calls. Add a cache?
      switch (role) {
          case IconModelRole:
 -            return KIcon("device-notifier").pixmap(32, 32);
 +            return QIcon::fromTheme("device-notifier").pixmap(32, 32);
          case IdModelRole:
 -            return QString(notification->internalId());
 +            return notification->internalId();
          case NameModelRole:
 -            return QString(notification->ticker());
 +            return notification->ticker();
          case ContentModelRole:
              return QString(); //To implement in the Android side
          case AppNameModelRole:
diff --cc plugins/sftp/sftpplugin.cpp
index 9564ad2,7ddce51..e98b087
--- a/plugins/sftp/sftpplugin.cpp
+++ b/plugins/sftp/sftpplugin.cpp
@@@ -57,8 -55,9 +57,9 @@@ SftpPlugin::SftpPlugin(QObject *parent
      : KdeConnectPlugin(parent, args)
      , m_d(new Pimpl())
  { 
+     deviceId = device()->id();
      addToDolphin();
 -    kDebug(debugArea()) << "Created device:" << device()->name();
 +    qCDebug(KDECONNECT_PLUGIN_SFTP) << "Created device:" << device()->name();
  }
  
  SftpPlugin::~SftpPlugin()
@@@ -71,14 -70,14 +72,14 @@@
  void SftpPlugin::addToDolphin()
  {
      removeFromDolphin();
-     QUrl kioUrl("kdeconnect://"+device()->id()+"/");
 -    KUrl kioUrl("kdeconnect://"+deviceId+"/");
++    QUrl kioUrl("kdeconnect://"+deviceId+"/");
      m_d->placesModel.addPlace(device()->name(), kioUrl, "kdeconnect");
 -    kDebug(debugArea()) << "add to dolphin";
 +    qCDebug(KDECONNECT_PLUGIN_SFTP) << "add to dolphin";
  }
  
  void SftpPlugin::removeFromDolphin()
  {
-     QUrl kioUrl("kdeconnect://"+device()->id()+"/");
 -    KUrl kioUrl("kdeconnect://"+deviceId+"/");
++    QUrl kioUrl("kdeconnect://"+deviceId+"/");
      QModelIndex index = m_d->placesModel.closestItem(kioUrl);
      while (index.row() != -1) {
          m_d->placesModel.removePlace(index);
@@@ -134,8 -133,8 +135,8 @@@ bool SftpPlugin::isMounted() cons
  bool SftpPlugin::startBrowsing()
  {
      if (mountAndWait()) {
 -        //return new KRun(KUrl::fromLocalFile(mountPoint()), 0);
 -        return new KRun(KUrl::fromPathOrUrl("kdeconnect://"+deviceId), 0);
 +        //return new KRun(QUrl::fromLocalFile(mountPoint()), 0);
-         return new KRun(QUrl("kdeconnect://"+device()->id()), 0);
++        return new KRun(QUrl("kdeconnect://"+deviceId), 0);
      }
      return false;
  }
@@@ -167,8 -166,8 +168,8 @@@ bool SftpPlugin::receivePackage(const N
  
  QString SftpPlugin::mountPoint()
  {
 -    const QString mountDir = KStandardDirs::locateLocal("appdata", "", true, KComponentData("kdeconnect", "kdeconnect"));
 +    const QString mountDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
-     return QDir(mountDir).absoluteFilePath(device()->id());
+     return QDir(mountDir).absoluteFilePath(deviceId);
  }
  
  void SftpPlugin::onMounted()

-- 
kdeconnect packaging



More information about the pkg-kde-commits mailing list