diff --git a/libs/global/kis_pointer_utils.h b/libs/global/kis_pointer_utils.h index e5d2350fb7..ae1c14b9ff 100644 --- a/libs/global/kis_pointer_utils.h +++ b/libs/global/kis_pointer_utils.h @@ -1,103 +1,103 @@ /* * Copyright (c) 2016 Dmitry Kazakov * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIS_POINTER_UTILS_H #define KIS_POINTER_UTILS_H #include /** * Convert a raw pointer into a shared pointer */ template inline QSharedPointer toQShared(T* ptr) { return QSharedPointer(ptr); } /** * Convert a list of raw pointers into a list of shared pointers */ template class List> List> listToQShared(const List list) { List> newList; Q_FOREACH(A* value, list) { newList.append(toQShared(value)); } return newList; } /** * Convert a list of strong pointers into a list of weak pointers */ template