File indexing completed on 2024-05-12 05:22:15
0001 /* 0002 * This file is part of LibKGAPI library 0003 * 0004 * SPDX-FileCopyrightText: 2018 Daniel Vrátil <dvratil@kde.org> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #pragma once 0010 0011 #include "debug.h" 0012 #include "utils.h" 0013 0014 #define GAPI_COMPARE(propName) \ 0015 if (d->propName != other.d->propName) { \ 0016 qCDebug(KGAPIDebug) << #propName "s don't match"; \ 0017 return false; \ 0018 } 0019 0020 #define GAPI_COMPARE_CONTAINERS(propName) \ 0021 if (!Utils::compareSharedPtrContainers(d->propName, other.d->propName)) { \ 0022 qCDebug(KGAPIDebug) << #propName "s don't match"; \ 0023 return false; \ 0024 } 0025 0026 #define GAPI_COMPARE_SHAREDPTRS(propName) \ 0027 if (d->propName || other.d->propName) { \ 0028 if (((bool)d->propName != (bool)other.d->propName) || (*d->propName != *other.d->propName)) { \ 0029 qCDebug(KGAPIDebug) << #propName "s don't match"; \ 0030 return false; \ 0031 } \ 0032 }