[PATCH] Adds posting private picture to imagebin.ca from the pastebin plasmoid

Artur Souza (MoRpHeUz) morpheuz at openbossa.org
Sat Aug 8 21:20:38 CEST 2009


On Saturday 08 August 2009, 13:40 Patrick Aljord wrote:
> This is my first patch, it just adds "posting private picture to
> imagebin.ca from the pastebin plasmoid" as the title says, it needs to
> be applied from kdeplasma-addons, hope it works for you.

Thanks for the patch! As Chani asked, can you provide a screenshot of the config 
dialog ?

Some comments on code:

Index: applets/pastebin/backends/imagebinca.h
===================================================================
--- applets/pastebin/backends/imagebinca.h      (revision 1008583)
+++ applets/pastebin/backends/imagebinca.h      (working copy)
@@ -42,6 +42,8 @@ public:
     void finish();
     bool addPair(const QString& name, const QString& value);
     bool addFile(const QString& name,const QString& path);
+    QString adult;


It seems that you do not need to store this string in the object and can 
declare it when you setup this string, something like this:

QString adult;
+    if(m_privacy == "0"){
+      adult = "f";
+    } else {
+      adult = "t";
+    }

> one thing I don't get is how you managed to use a string ("0") as the default 
> value for an int ;)
+    QString m_privacy;

m_privacy seems to be a QString :)

Cheers!

--------------------------------------------------------------
Artur Duque de Souza
openBossa Research Labs
INdT - Instituto Nokia de Tecnologia
--------------------------------------------------------------
Blog: http://blog.morpheuz.cc
PGP: 0xDBEEAAC3 @ wwwkeys.pgp.net
--------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090808/ec40b47a/attachment.sig 


More information about the Plasma-devel mailing list