add setType to PackageStucture

Petri Damstén petri.damsten at gmail.com
Thu Oct 30 11:23:25 CET 2008


Hi,

If we copy Plasma::Applet::packageStructure() to custom package structure type 
is also copied and we have no setType to correct it.

Index: packagestructure.cpp
===================================================================
--- packagestructure.cpp        (revision 877358)
+++ packagestructure.cpp        (working copy)
@@ -169,6 +169,11 @@
     return d->type;
 }

+void PackageStructure::setType(const QString &type)
+{
+    d->type = type;
+}
+
 QList<const char*> PackageStructure::directories() const
 {
     QList<const char*> dirs;
@@ -403,6 +408,7 @@

 void PackageStructure::createNewWidgetBrowser(QWidget *parent)
 {
+    Q_UNUSED(parent)
     emit newWidgetBrowserFinished();
 }

Index: packagestructure.h
===================================================================
--- packagestructure.h  (revision 877358)
+++ packagestructure.h  (working copy)
@@ -294,6 +294,11 @@
     void setDefaultPackageRoot(const QString &packageRoot);

     /**
+     * Sets package type.
+     */
+    void setType(const QString &type);
+
+    /**
      * Called whenever the path changes so that subclasses may take
      * package specific actions.
      */

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20081030/95927aae/attachment.sig 


More information about the Plasma-devel mailing list