File indexing completed on 2024-04-28 05:42:07
0001 /* 0002 * Port for usage with qt-framework and development for kdesvn 0003 * Copyright (C) 2005-2009 by Rajko Albrecht (ral@alwins-world.de) 0004 * https://kde.org/applications/development/org.kde.kdesvn 0005 */ 0006 /* 0007 * ==================================================================== 0008 * Copyright (c) 2002-2005 The RapidSvn Group. All rights reserved. 0009 * dev@rapidsvn.tigris.org 0010 * 0011 * This library is free software; you can redistribute it and/or 0012 * modify it under the terms of the GNU Lesser General Public 0013 * License as published by the Free Software Foundation; either 0014 * version 2.1 of the License, or (at your option) any later version. 0015 * 0016 * This library is distributed in the hope that it will be useful, 0017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0019 * Lesser General Public License for more details. 0020 * 0021 * You should have received a copy of the GNU Lesser General Public 0022 * License along with this library (in the file LGPL.txt); if not, 0023 * write to the Free Software Foundation, Inc., 51 Franklin St, 0024 * Fifth Floor, Boston, MA 02110-1301 USA 0025 * 0026 * This software consists of voluntary contributions made by many 0027 * individuals. For exact contribution history, see the revision 0028 * history and logs, available at http://rapidsvn.tigris.org/. 0029 * ==================================================================== 0030 */ 0031 0032 // svncpp 0033 #include "client.h" 0034 #include "client_impl.h" 0035 #include "svnqt_defines.h" 0036 0037 #include <svn_cmdline.h> 0038 #include <svn_opt.h> 0039 0040 #include <QDir> 0041 0042 namespace svn 0043 { 0044 0045 Client::Client() 0046 { 0047 } 0048 0049 Client::~Client() 0050 { 0051 } 0052 0053 ClientP Client::getobject(const ContextP &context) 0054 { 0055 static bool s_initialized = false; 0056 if (!s_initialized) { 0057 svn_cmdline_init("svnqt", nullptr); 0058 QString basePath = QDir::homePath(); 0059 QDir d; 0060 if (!d.exists(basePath)) { 0061 d.mkpath(basePath); 0062 } 0063 basePath = basePath + QLatin1String("/.svnqt"); 0064 if (!d.exists(basePath)) { 0065 d.mkdir(basePath); 0066 } 0067 } 0068 return ClientP(new Client_impl(context)); 0069 } 0070 } 0071 0072 /* ----------------------------------------------------------------- 0073 * local variables: 0074 * eval: (load-file "../../rapidsvn-dev.el") 0075 * end: 0076 */