//SPDX-FileCopyrightText: 2023 Yury Gubich //SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #define UNUSED(X) (void)(X) template const T& qast(const QVariant& variant) { if (variant.userType() == qMetaTypeId()) return *reinterpret_cast(variant.data()); throw std::runtime_error("An usuccessfull qast"); }