public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Theofilos Intzoglou" <int.teo@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/c-portage:cmake_port commit in: src/Qt/
Date: Sat,  8 Oct 2011 23:43:17 +0000 (UTC)	[thread overview]
Message-ID: <80effa9443f3310f4b668d99837b95c3c2feda78.parapente@gentoo> (raw)

commit:     80effa9443f3310f4b668d99837b95c3c2feda78
Author:     Theofilos Intzoglou <int.teo <AT> gmail <DOT> com>
AuthorDate: Sat Oct  8 23:41:21 2011 +0000
Commit:     Theofilos Intzoglou <int.teo <AT> gmail <DOT> com>
CommitDate: Sat Oct  8 23:41:21 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/c-portage.git;a=commit;h=80effa94

Add some helper function used mostly for convertions between datatypes

---
 src/Qt/helper.cpp |   28 ++++++++++++++++++++++++++++
 src/Qt/helper.h   |    5 +++++
 2 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/src/Qt/helper.cpp b/src/Qt/helper.cpp
new file mode 100644
index 0000000..93a00fe
--- /dev/null
+++ b/src/Qt/helper.cpp
@@ -0,0 +1,28 @@
+#include "helper.h"
+#include <stringlist.h>
+
+QStringList CListToQStringList(StringList *clist)
+{
+    QStringList list;
+    
+    for (int i=0; i<stringListCount(clist); i++) {
+        list << stringListGetAt(clist, i);
+    }
+    
+    return list;
+}
+
+StringList* QStringListToCList(const QStringList &list)
+{
+    StringList *clist;
+    
+    clist = stringListCreate(list.count());
+    
+    if (clist) { // Not null
+        for (int i=0; i<list.count(); i++) {
+            stringListInsertAt(clist, i, list.at(i).toUtf8().data());
+        }
+    }
+    
+    return clist;
+}

diff --git a/src/Qt/helper.h b/src/Qt/helper.h
new file mode 100644
index 0000000..b45c14a
--- /dev/null
+++ b/src/Qt/helper.h
@@ -0,0 +1,5 @@
+#include <QStringList>
+#include <stringlist.h>
+
+QStringList CListToQStringList(StringList *);
+StringList* QStringListToCList(const QStringList&);
\ No newline at end of file



             reply	other threads:[~2011-10-08 23:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-08 23:43 Theofilos Intzoglou [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-11 13:58 [gentoo-commits] proj/c-portage:cmake_port commit in: src/Qt/ Theofilos Intzoglou
2011-10-08 23:43 Theofilos Intzoglou
2011-10-06 17:36 Theofilos Intzoglou
2011-10-06 15:18 Theofilos Intzoglou
2011-10-06 11:23 Giorgos Tsiapaliwkas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80effa9443f3310f4b668d99837b95c3c2feda78.parapente@gentoo \
    --to=int.teo@gmail.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox