File indexing completed on 2024-04-28 04:00:48
0001 /* 0002 SPDX-FileCopyrightText: 2006-2007 Kevin Ottens <ervin@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef SOLID_SOLIDDEFS_P_H 0008 #define SOLID_SOLIDDEFS_P_H 0009 0010 // clang-format off 0011 0012 #define return_SOLID_CALL(Type, Object, Default, Method) \ 0013 Type t = qobject_cast<Type>(Object); \ 0014 if (t!=nullptr) \ 0015 { \ 0016 return t->Method; \ 0017 } \ 0018 else \ 0019 { \ 0020 return Default; \ 0021 } 0022 0023 #define SOLID_CALL(Type, Object, Method) \ 0024 Type t = qobject_cast<Type>(Object); \ 0025 if (t!=nullptr) \ 0026 { \ 0027 t->Method; \ 0028 } 0029 0030 #endif