[SCM] ktp-accounts-kcm packaging branch, master, updated. debian/15.12.1-1-1157-gc4589c5

Maximiliano Curia maxy at moszumanska.debian.org
Fri May 27 23:57:25 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-accounts-kcm.git;a=commitdiff;h=3072a73

The following commit has been merged in the master branch:
commit 3072a737c2b1f77a06f756dedb7aec9076a5861d
Author: George Goldberg <grundleborg at googlemail.com>
Date:   Thu Jul 23 12:34:23 2009 +0000

    Add a skeleton class ParameterItem which will be used to populate the ParameterEditModel.
    
    svn path=/trunk/playground/network/telepathy-accounts-kcm/; revision=1001487
---
 src/CMakeLists.txt                                 |  1 +
 ...{parameter-edit-widget.h => parameter-item.cpp} | 35 ++++++++++------------
 src/{protocol-item.h => parameter-item.h}          | 27 ++++++++---------
 3 files changed, 29 insertions(+), 34 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2efdb21..2c5a737 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -16,6 +16,7 @@ set (telepathy_accounts_kcm_SRCS
      parameter-edit-widget.cpp
      parameter-edit-delegate.cpp
      parameter-edit-model.cpp
+     parameter-item.cpp
 )
 
 kde4_add_ui_files (telepathy_accounts_kcm_SRCS
diff --git a/src/parameter-edit-widget.h b/src/parameter-item.cpp
similarity index 64%
copy from src/parameter-edit-widget.h
copy to src/parameter-item.cpp
index ea77471..29645bb 100644
--- a/src/parameter-edit-widget.h
+++ b/src/parameter-item.cpp
@@ -18,28 +18,25 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef TELEPATHY_ACCOUNTS_KCM_PARAMETER_EDIT_WIDGET_H
-#define TELEPATHY_ACCOUNTS_KCM_PARAMETER_EDIT_WIDGET_H
+#include "parameter-item.h"
 
-#include <QtGui/QWidget>
+#include <KDebug>
 
-#include <TelepathyQt4/ConnectionManager>
-
-class ParameterEditWidget : public QWidget
+ParameterItem::ParameterItem(Tp::ProtocolParameter *parameter,
+                             const QVariant &originalValue,
+                             QObject *parent)
+ : QObject(parent),
+   m_parameter(parameter),
+   m_originalValue(originalValue)
 {
-    Q_OBJECT
-
-public:
-    explicit ParameterEditWidget(QWidget *parent = 0);
-    ~ParameterEditWidget();
-
-    void setParameters(const Tp::ProtocolParameterList &parameters);
+    kDebug();
 
-protected:
-    class Private;
-    Private * const d;
-};
+    // To begin with, the current value is the original value.
+    m_currentValue = m_originalValue;
+}
 
-
-#endif  // Header guard
+ParameterItem::~ParameterItem()
+{
+    kDebug();
+}
 
diff --git a/src/protocol-item.h b/src/parameter-item.h
similarity index 66%
copy from src/protocol-item.h
copy to src/parameter-item.h
index f2e9ee5..253a2a8 100644
--- a/src/protocol-item.h
+++ b/src/parameter-item.h
@@ -18,32 +18,29 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef TELEPATHY_ACCOUNTS_KCM_PROTOCOL_ITEM_H
-#define TELEPATHY_ACCOUNTS_KCM_PROTOCOL_ITEM_H
+#ifndef TELEPATHY_ACCOUNTS_KCM_PARAMETER_ITEM_H
+#define TELEPATHY_ACCOUNTS_KCM_PARAMETER_ITEM_H
 
 #include <QtCore/QObject>
+#include <QtCore/QVariant>
 
 #include <TelepathyQt4/ConnectionManager>
 
-class ConnectionManagerItem;
-
-class ProtocolItem : public QObject
+class ParameterItem : public QObject
 {
     Q_OBJECT
-    Q_DISABLE_COPY(ProtocolItem);
+    Q_DISABLE_COPY(ParameterItem);
 
 public:
-    explicit ProtocolItem(const QString &protocol,
-                          ConnectionManagerItem *parent = 0);
-    virtual ~ProtocolItem();
-
-    QString protocol() const;
-
-    Tp::ProtocolParameterList mandatoryParameters() const;
-    Tp::ProtocolParameterList optionalParameters() const;
+    ParameterItem(Tp::ProtocolParameter *parameter,
+                  const QVariant &originalValue,
+                  QObject *parent = 0);
+    virtual ~ParameterItem();
 
 private:
-    QString m_protocol;
+    Tp::ProtocolParameter const *m_parameter;
+    const QVariant m_originalValue;
+    QVariant m_currentValue;
 };
 
 

-- 
ktp-accounts-kcm packaging



More information about the pkg-kde-commits mailing list