aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libother/othertypesystypedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/libother/othertypesystypedef.cpp')
-rw-r--r--sources/shiboken6/tests/libother/othertypesystypedef.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libother/othertypesystypedef.cpp b/sources/shiboken6/tests/libother/othertypesystypedef.cpp
new file mode 100644
index 000000000..1a50c4edf
--- /dev/null
+++ b/sources/shiboken6/tests/libother/othertypesystypedef.cpp
@@ -0,0 +1,19 @@
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+
+#include "othertypesystypedef.h"
+
+OtherValueWithUnitUser::OtherValueWithUnitUser() = default;
+
+
+ValueWithUnit<double, LengthUnit::Inch>
+ OtherValueWithUnitUser::doubleMillimeterToInch(ValueWithUnit<double, LengthUnit::Millimeter> v)
+{
+ return ValueWithUnit<double, LengthUnit::Inch>(v.value() / 254);
+}
+
+ValueWithUnit<int, LengthUnit::Inch>
+ OtherValueWithUnitUser::intMillimeterToInch(ValueWithUnit<int, LengthUnit::Millimeter> v)
+{
+ return ValueWithUnit<int, LengthUnit::Inch>(v.value() / 254);
+}