1 /**
2  * Copyright (C) 2021 Michael Pyne <mpyne@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License as published by the Free Software
6  * Foundation; either version 2 of the License, or (at your option) any later
7  * version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
10  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11  * PARTICULAR PURPOSE. See the GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License along with
14  * this program.  If not, see <https://www.gnu.org/licenses/>.
15  */
16 
17 #include "iconsupport.h"
18 
19 #include <QIcon>
20 
21 namespace IconSupport {
22 
operator ""_icon(const char * latin1Name,std::size_t len)23 QIcon operator ""_icon(const char *latin1Name, std::size_t len)
24 {
25     QString iconName = QString::fromLatin1(latin1Name, len);
26     return QIcon::fromTheme(iconName);
27 }
28 
29 };
30 
31