File indexing completed on 2024-04-21 14:55:54

0001 /* This file is part of the KDE libraries
0002     Copyright (C) 2006 Hamish Rodda <rodda@kde.org>
0003 
0004     This library is free software; you can redistribute it and/or
0005     modify it under the terms of the GNU Library General Public
0006     License version 2 as published by the Free Software Foundation.
0007 
0008     This library is distributed in the hope that it will be useful,
0009     but WITHOUT ANY WARRANTY; without even the implied warranty of
0010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0011     Library General Public License for more details.
0012 
0013     You should have received a copy of the GNU Library General Public License
0014     along with this library; see the file COPYING.LIB.  If not, write to
0015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0016     Boston, MA 02110-1301, USA.
0017 */
0018 
0019 #include "kicon.h"
0020 
0021 #include "kiconloader.h"
0022 #include "kiconengine.h"
0023 
0024 KIcon::KIcon(const QString &iconName, KIconLoader *iconLoader, const QStringList &overlays)
0025     : QIcon(new KIconEngine(iconName, iconLoader ? iconLoader : KIconLoader::global(), overlays)),
0026       d(nullptr)
0027 {
0028 }
0029 
0030 KIcon::KIcon(const QString &iconName, KIconLoader *iconLoader)
0031     : QIcon(new KIconEngine(iconName, iconLoader ? iconLoader : KIconLoader::global())),
0032       d(nullptr)
0033 {
0034 }
0035 
0036 KIcon::KIcon(const QString &iconName)
0037     : QIcon(new KIconEngine(iconName, KIconLoader::global())),
0038       d(nullptr)
0039 {
0040 }
0041 
0042 KIcon::KIcon()
0043     : d(nullptr)
0044 {
0045 }
0046 
0047 KIcon::KIcon(const QIcon &copy)
0048     : QIcon(copy),
0049       d(nullptr)
0050 {
0051 }
0052 
0053 KIcon::~KIcon()
0054 {
0055     //delete d;
0056 }