File indexing completed on 2024-05-19 05:45:02
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2009 by Rajko Albrecht * 0003 * ral@alwins-world.de * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0019 ***************************************************************************/ 0020 #include "commitmodelhelper.h" 0021 #include "svnqt/commititem.h" 0022 0023 #include <KLocalizedString> 0024 0025 CommitModelNode::CommitModelNode(const svn::CommitItem &aItem) 0026 : m_Content() 0027 , m_Checkable(false) 0028 , m_Checked(false) 0029 { 0030 QString what; 0031 QString action; 0032 switch (aItem.actionType()) { 0033 case 'A': 0034 case 'a': 0035 action = i18n("Add"); 0036 break; 0037 case 'C': 0038 case 'c': 0039 action = i18n("Copy"); 0040 break; 0041 case 'D': 0042 case 'd': 0043 action = i18n("Delete"); 0044 break; 0045 case 'M': 0046 case 'm': 0047 action = i18n("Modify (content or property)"); 0048 break; 0049 case 'R': 0050 case 'r': 0051 action = i18n("Replace"); 0052 break; 0053 case 'L': 0054 case 'l': 0055 action = i18n("(Un)Lock"); 0056 break; 0057 } 0058 if (aItem.path().isEmpty()) { 0059 what = aItem.url(); 0060 } else { 0061 what = aItem.path(); 0062 } 0063 m_Content = CommitActionEntry(what, action); 0064 } 0065 0066 CommitModelNode::CommitModelNode(const CommitActionEntry &aContent, bool checked) 0067 : m_Content(aContent) 0068 , m_Checkable(true) 0069 , m_Checked(checked) 0070 { 0071 } 0072 0073 CommitModelNode::~CommitModelNode() 0074 { 0075 }