summaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorLuciano Wolf <luciano.wolf@openbossa.org>2010-09-13 16:16:40 -0300
committerLuciano Wolf <luciano.wolf@openbossa.org>2010-09-13 19:34:30 -0300
commit58692e4b27957b587a9b8bd5075fbcb0daad7998 (patch)
tree3b1d954e67482c468ca64e7a642759309330fa3b /tests/libsample
parentc3059779d7628fdbb140ed02cdc0cc7ca80e7ad8 (diff)
downloadshiboken-58692e4b27957b587a9b8bd5075fbcb0daad7998.tar.gz
shiboken-58692e4b27957b587a9b8bd5075fbcb0daad7998.tar.xz
shiboken-58692e4b27957b587a9b8bd5075fbcb0daad7998.zip
Fix code generation for modified constructors.
Reviewers: Renato Ara├║jo <renato.filho@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/CMakeLists.txt1
-rw-r--r--tests/libsample/modified_constructor.cpp36
-rw-r--r--tests/libsample/modified_constructor.h40
3 files changed, 77 insertions, 0 deletions
diff --git a/tests/libsample/CMakeLists.txt b/tests/libsample/CMakeLists.txt
index c1386bf1..d7bede64 100644
--- a/tests/libsample/CMakeLists.txt
+++ b/tests/libsample/CMakeLists.txt
@@ -14,6 +14,7 @@ injectcode.cpp
listuser.cpp
modifications.cpp
mapuser.cpp
+modified_constructor.cpp
multiple_derived.cpp
objecttype.cpp
objecttypelayout.cpp
diff --git a/tests/libsample/modified_constructor.cpp b/tests/libsample/modified_constructor.cpp
new file mode 100644
index 00000000..952ae7b4
--- /dev/null
+++ b/tests/libsample/modified_constructor.cpp
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the Shiboken Python Binding Generator project.
+ *
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * Contact: PySide team <contact@pyside.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "modified_constructor.h"
+
+ModifiedConstructor::ModifiedConstructor(int first_arg)
+{
+ m_stored_value = first_arg;
+}
+
+int
+ModifiedConstructor::retrieveValue()
+{
+ return m_stored_value;
+}
+
+
diff --git a/tests/libsample/modified_constructor.h b/tests/libsample/modified_constructor.h
new file mode 100644
index 00000000..242b1d5a
--- /dev/null
+++ b/tests/libsample/modified_constructor.h
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the Shiboken Python Binding Generator project.
+ *
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * Contact: PySide team <contact@pyside.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef MODIFIEDCONSTRUCTOR_H
+#define MODIFIEDCONSTRUCTOR_H
+
+#include "libsamplemacros.h"
+
+class LIBSAMPLE_API ModifiedConstructor
+{
+public:
+
+ ModifiedConstructor(int first_arg);
+ int retrieveValue();
+
+private:
+ int m_stored_value;
+};
+
+#endif // MODIFIEDCONSTRUCTOR_H
+