aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Ehresman <jpe@wingware.com>2012-04-17 12:30:49 -0400
committerHugo Parente Lima <hugo.lima@openbossa.org>2012-04-30 19:44:29 +0200
commit8c5297bb10daf508f787646b66a2e4c21e4e15f6 (patch)
treee85bad50a08023f4296b9e02357c136e003419f3 /tests
parent815159e28d786d83c984670cd8867d5ce3d314f4 (diff)
Don't use inline methods in dllexported classes to keep VC++ happy
Change-Id: I2e954bedfe4699a621047a757b3dbd202655e97b Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/libsample/CMakeLists.txt2
-rw-r--r--tests/libsample/pen.cpp61
-rw-r--r--tests/libsample/pen.h18
-rw-r--r--tests/libsample/sbkdate.cpp42
-rw-r--r--tests/libsample/sbkdate.h8
5 files changed, 118 insertions, 13 deletions
diff --git a/tests/libsample/CMakeLists.txt b/tests/libsample/CMakeLists.txt
index 408920c9c..074de61fc 100644
--- a/tests/libsample/CMakeLists.txt
+++ b/tests/libsample/CMakeLists.txt
@@ -28,6 +28,7 @@ objectview.cpp
overload.cpp
overloadsort.cpp
pairuser.cpp
+pen.cpp
photon.cpp
point.cpp
pointf.cpp
@@ -36,6 +37,7 @@ protected.cpp
reference.cpp
sample.cpp
samplenamespace.cpp
+sbkdate.cpp
simplefile.cpp
size.cpp
sometime.cpp
diff --git a/tests/libsample/pen.cpp b/tests/libsample/pen.cpp
new file mode 100644
index 000000000..e7780570f
--- /dev/null
+++ b/tests/libsample/pen.cpp
@@ -0,0 +1,61 @@
+/*
+ * This file is part of the Shiboken Python Binding Generator project.
+ *
+ * Copyright (C) 2012 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 "pen.h"
+
+Color::Color() : m_null(true)
+{
+}
+
+Color::Color(SampleNamespace::InValue arg) : m_null(false)
+{
+}
+
+Color::Color(unsigned int arg) : m_null(false)
+{
+}
+
+bool Color::isNull() const
+{
+ return m_null;
+}
+
+Pen::Pen() : m_ctor(EmptyCtor)
+{
+}
+
+Pen::Pen(SampleNamespace::Option option) : m_ctor(EnumCtor)
+{
+}
+
+Pen::Pen(const Color& color) : m_ctor(ColorCtor)
+{
+}
+
+Pen::Pen(const Pen& pen) : m_ctor(CopyCtor)
+{
+}
+
+int Pen::ctorType()
+{
+ return m_ctor;
+}
diff --git a/tests/libsample/pen.h b/tests/libsample/pen.h
index a0c13ef50..cdf4496e2 100644
--- a/tests/libsample/pen.h
+++ b/tests/libsample/pen.h
@@ -29,11 +29,11 @@
class LIBSAMPLE_API Color
{
public:
- Color() : m_null(true) {}
- Color(SampleNamespace::InValue arg) : m_null(false) {}
- Color(unsigned int arg) : m_null(false) {}
+ Color();
+ Color(SampleNamespace::InValue arg);
+ Color(unsigned int arg);
- bool isNull() const { return m_null; }
+ bool isNull() const;
private:
bool m_null;
};
@@ -43,12 +43,12 @@ class LIBSAMPLE_API Pen
public:
enum { EmptyCtor, EnumCtor, ColorCtor, CopyCtor };
- Pen() : m_ctor(EmptyCtor) {}
- Pen(SampleNamespace::Option option) : m_ctor(EnumCtor) {}
- Pen(const Color& color) : m_ctor(ColorCtor) {}
- Pen(const Pen& pen) : m_ctor(CopyCtor) {}
+ Pen();
+ Pen(SampleNamespace::Option option);
+ Pen(const Color& color);
+ Pen(const Pen& pen);
- int ctorType() { return m_ctor; }
+ int ctorType();
private:
int m_ctor;
};
diff --git a/tests/libsample/sbkdate.cpp b/tests/libsample/sbkdate.cpp
new file mode 100644
index 000000000..d5f86c687
--- /dev/null
+++ b/tests/libsample/sbkdate.cpp
@@ -0,0 +1,42 @@
+/*
+ * This file is part of the Shiboken Python Binding Generator project.
+ *
+ * Copyright (C) 2012 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 "sbkdate.h"
+
+SbkDate::SbkDate(int d, int m, int y) : m_d(d), m_m(m), m_y(y)
+{
+}
+
+int SbkDate::day() const
+{
+ return m_d;
+}
+
+int SbkDate::month() const
+{
+ return m_m;
+}
+
+int SbkDate::year() const
+{
+ return m_y;
+}
diff --git a/tests/libsample/sbkdate.h b/tests/libsample/sbkdate.h
index e41ed1fe6..7025cc3a9 100644
--- a/tests/libsample/sbkdate.h
+++ b/tests/libsample/sbkdate.h
@@ -28,11 +28,11 @@
class LIBSAMPLE_API SbkDate
{
public:
- SbkDate(int d, int m, int y) : m_d(d), m_m(m), m_y(y) {}
+ SbkDate(int d, int m, int y);
- inline int day() const { return m_d; }
- inline int month() const { return m_m; }
- inline int year() const { return m_y; }
+ int day() const;
+ int month() const;
+ int year() const;
private:
int m_d;