File indexing completed on 2024-04-28 05:32:12
0001 /* 0002 this file is part of the oxygen gtk engine 0003 SPDX-FileCopyrightText: 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr> 0004 SPDX-FileCopyrightText: 2012 Ruslan Kabatsayev <b7.10110111@gmail.com> 0005 0006 inspired notably from kdelibs/kdeui/color/kcolorutils.h 0007 SPDX-FileCopyrightText: 2007 Matthew Woehlke <mw_triad@users.sourceforge.net> 0008 SPDX-FileCopyrightText: 2007 Thomas Zander <zander@kde.org> 0009 SPDX-FileCopyrightText: 2007 Zack Rusin <zack@kde.org> 0010 0011 SPDX-License-Identifier: LGPL-2.0-or-later 0012 */ 0013 0014 #include "oxygenoption.h" 0015 0016 namespace Oxygen 0017 { 0018 //_______________________________________________________________________ 0019 template<> std::string Option::toVariant( std::string defaultValue ) const 0020 { 0021 0022 std::string out; 0023 std::istringstream stream( _value ); 0024 return ( std::getline(stream, out) ) ? out:defaultValue; 0025 } 0026 0027 }