Git commit 7409ef88edd943acccc4798c6852239640d0cc62 by Michael Leupold. Committed on 10/08/2010 at 10:59. Pushed by vrusu into branch 'ksecretsservice'. Move around files and split the large CMakeLists.txt into smaller chunks inside the various directories. This is natural as the sources are split into several static libraries anyway. svn path=/trunk/playground/base/ksecretservice/; revision=1161503 M +1 -0 CMakeLists.txt A +33 -0 secrettool.h [License: GPL (v2/3)] A +29 -0 secrettool.cpp [License: GPL (v2/3)] http://commits.kde.org/kdelibs/7409ef88edd943acccc4798c6852239640d0cc62 diff --git a/CMakeLists.txt b/CMakeLists.txt index 2095d54..7a28533 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ SET (ksecretservice_lib_SRCS jobqueue.cpp queuedjob.cpp + secrettool.cpp ) KDE4_ADD_LIBRARY (ksecretservicelib STATIC ${ksecretservice_lib_SRCS}) diff --git a/secrettool.cpp b/secrettool.cpp new file mode 100644 index 0000000..41ee316 --- /dev/null +++ b/secrettool.cpp @@ -0,0 +1,29 @@ +/* + * Copyright 2010, Michael Leupold + * + * 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) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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, see . + */ + +#include "secrettool.h" + +#include +#include + +QString createId() +{ + return QUuid::createUuid().toString().remove(QRegExp("[\\{\\}-]")); +} diff --git a/secrettool.h b/secrettool.h new file mode 100644 index 0000000..26f3515 --- /dev/null +++ b/secrettool.h @@ -0,0 +1,33 @@ +/* + * Copyright 2010, Michael Leupold + * + * 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) version 3 or any later version + * accepted by the membership of KDE e.V. (or its successor approved + * by the membership of KDE e.V.), which shall act as a proxy + * defined in Section 14 of version 3 of the license. + * + * 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, see . + */ + +#ifndef SECRETTOOL_H +#define SECRETTOOL_H + +#include + +/** + * Create a unique identifier for a collection. + * + * @return a uuid that can be used for a collection + */ +QString createId(); + +#endif