aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/tests/libsample/typesystypedef.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/tests/libsample/typesystypedef.cpp')
-rw-r--r--sources/shiboken6/tests/libsample/typesystypedef.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/shiboken6/tests/libsample/typesystypedef.cpp b/sources/shiboken6/tests/libsample/typesystypedef.cpp
new file mode 100644
index 000000000..d9c9a92fc
--- /dev/null
+++ b/sources/shiboken6/tests/libsample/typesystypedef.cpp
@@ -0,0 +1,12 @@
+// 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 "typesystypedef.h"
+
+ValueWithUnitUser::ValueWithUnitUser() = default;
+
+ValueWithUnit<double, LengthUnit::Millimeter>
+ ValueWithUnitUser::doubleInchToMillimeter(ValueWithUnit<double, LengthUnit::Inch> v)
+{
+ return ValueWithUnit<double, LengthUnit::Millimeter>(v.value() * 254);
+}