Index: trunk/playground/base/kconfig/ldb/CMakeLists.txt =================================================================== --- trunk/playground/base/kconfig/ldb/CMakeLists.txt (revision 1513275) +++ trunk/playground/base/kconfig/ldb/CMakeLists.txt (nonexistent) @@ -1,12 +0,0 @@ -set(ldb_backend_SRCS ldbbackend.cpp) - -kde4_add_plugin(kconfigbackend_ldb ${ldb_backend_SRCS}) -target_link_libraries(kconfigbackend_ldb ${KDE4_KDECORE_LIBS}) - -install(TARGETS kconfigbackend_ldb DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES kconfigbackend-ldb.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - -set(kconfigplugintest_SRCS kconfigplugintest.cpp) -kde4_add_executable(kconfigplugintest ${kconfigplugintest_SRCS}) -target_link_libraries(kconfigplugintest ${KDE4_KDEUI_LIBS}) - Index: trunk/playground/base/kconfig/ldb/ldbbackend.cpp =================================================================== --- trunk/playground/base/kconfig/ldb/ldbbackend.cpp (revision 1513275) +++ trunk/playground/base/kconfig/ldb/ldbbackend.cpp (nonexistent) @@ -1,79 +0,0 @@ -/* - * Copyright 2008 Aaron Seigo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 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 Library 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. - */ - -#include "ldbbackend.h" - -LDBBackend::LDBBackend(QObject* parent, const QVariantList& args) - : KConfigBackend() -{ - Q_UNUSED(parent) - Q_UNUSED(args) -} - -LDBBackend::~LDBBackend() -{ -} - -KConfigBackend::ParseInfo LDBBackend::parseConfig(const QByteArray& locale, - KEntryMap& pWriteBackMap, - ParseOptions options) -{ - return ParseInfo(); -} - -bool LDBBackend::writeConfig(const QByteArray& locale, KEntryMap& entryMap, - WriteOptions options, const KComponentData &data) -{ - return false; -} - -bool LDBBackend::isWritable() const -{ - return false; -} - -KConfigBase::AccessMode LDBBackend::accessMode() const -{ - return KConfigBase::ReadOnly; -} - -void LDBBackend::createEnclosing() -{ -} - -void LDBBackend::setFilePath(const QString& path) -{ -} - -bool LDBBackend::lock(const KComponentData& componentData) -{ - return false; -} - -void LDBBackend::unlock() -{ -} - -bool LDBBackend::isLocked() const -{ - return false; -} - -#include - Index: trunk/playground/base/kconfig/ldb/ldbbackend.h =================================================================== --- trunk/playground/base/kconfig/ldb/ldbbackend.h (revision 1513275) +++ trunk/playground/base/kconfig/ldb/ldbbackend.h (nonexistent) @@ -1,54 +0,0 @@ -/* - * Copyright 2008 Aaron Seigo - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 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 Library 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 LDBBACKEND_H -#define LDBBACKEND_H - -#include - -/** - * This class implements a KConfigBackend using LDB - */ -class LDBBackend : public KConfigBackend -{ - Q_OBJECT - - public: - LDBBackend(QObject* parent, const QVariantList& args); - ~LDBBackend(); - - ParseInfo parseConfig(const QByteArray& locale, - KEntryMap& pWriteBackMap, - ParseOptions options); - - bool writeConfig(const QByteArray& locale, KEntryMap& entryMap, - WriteOptions options, const KComponentData &data); - - bool isWritable() const; - KConfigBase::AccessMode accessMode() const; - void createEnclosing(); - void setFilePath(const QString& path); - bool lock(const KComponentData& componentData); - virtual void unlock(); - virtual bool isLocked() const; -}; - -K_EXPORT_KCONFIGBACKEND(ldb, LDBBackend) - -#endif Index: trunk/playground/base/kconfig/ldb/kconfigbackend-ldb.desktop =================================================================== --- trunk/playground/base/kconfig/ldb/kconfigbackend-ldb.desktop (revision 1513275) +++ trunk/playground/base/kconfig/ldb/kconfigbackend-ldb.desktop (nonexistent) @@ -1,61 +0,0 @@ -[Desktop Entry] -Name=LDB -Name[bg]=LDB -Name[bs]=LDB -Name[cs]=LDB -Name[de]=LDB -Name[el]=LDB -Name[en_GB]=LDB -Name[eo]=LDB -Name[es]=LDB -Name[et]=LDB -Name[fi]=LDB -Name[fr]=LDB -Name[gl]=LDB -Name[hr]=LDB -Name[hu]=LDB -Name[ja]=LDB -Name[km]=LDB -Name[nb]=LDB -Name[nds]=LDB -Name[nl]=LDB -Name[pa]=LDB -Name[pl]=LDB -Name[pt]=LDB -Name[pt_BR]=LDB -Name[ro]=LDB -Name[sk]=LDB -Name[sv]=LDB -Name[tr]=LDB -Name[uk]=LDB -Name[x-test]=xxLDBxx -Comment=LDB backed for KConfig -Comment[bg]=LDB ядро за KConfig -Comment[bs]=LDB pozadina za KConfig -Comment[cs]=Podpůrná vrstva LDB pro KConfig -Comment[de]=LDB-Unterstützung für KConfig -Comment[el]=Σύστημα υποστήριξης LDB για το KConfig -Comment[en_GB]=LDB backed for KConfig -Comment[es]=Motor LDB para KConfig -Comment[et]=KConfigi LDB taustaprogramm -Comment[fr]=Moteur LDB pour KConfig -Comment[gl]=Infraestrutura LDB para KConfig -Comment[hr]=LDB podrška za KConfig -Comment[hu]=LDB háttérprogram a KConfighoz -Comment[ja]=KConfig のための LDB バックエンド -Comment[km]=LDB គាំ​ទ្រ​​ចំពោះ​ KConfig -Comment[nb]=LDB-lagret for KConfig -Comment[nds]=LDB-Hülpprogramm för Kat -Comment[nl]=LDB ondersteund voor KConfig -Comment[pl]=LDB przystosowane dla KConfig -Comment[pt]=Infra-estrutura LDB para o KConfig -Comment[pt_BR]=Infraestrutura de armazenamento para o KConfig -Comment[ro]=Platformă LDB pentru KConfig -Comment[sv]=LDB-gränssnitt för Kconfig -Comment[th]=โปรแกรมเบื้องหลัง LDB สำหรับ KConfig -Comment[tr]=KConfig için LDB yardımı -Comment[uk]=Сервер LDB для KConfig -Comment[x-test]=xxLDB backed for KConfigxx -X-KDE-ServiceTypes=KConfigBackend -Type=Service -X-KDE-Library=kconfigbackend_ldb Index: trunk/playground/base/kconfig/ldb/kconfigplugintest.cpp =================================================================== --- trunk/playground/base/kconfig/ldb/kconfigplugintest.cpp (revision 1513275) +++ trunk/playground/base/kconfig/ldb/kconfigplugintest.cpp (nonexistent) @@ -1,62 +0,0 @@ -/* - * Copyright 2008 Aaron J. Seigo - * - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 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 Library 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. - */ - -#include - -#include -#include -#include -#include -#include -#include - -static const char description[] = I18N_NOOP("Test for KConfig backends"); -static const char version[] = "1.0"; - -int main(int argc, char *argv[]) -{ - KAboutData aboutData("kconfigplugintest", 0, ki18n("KConfigBackend plugin test"), - version, ki18n( description ), KAboutData::License_GPL, - ki18n("(C) 2008, Aaron Seigo")); - aboutData.addAuthor(ki18n("Aaron Seigo"), ki18n("Original author"), "aseigo@kde.org"); - KCmdLineArgs::init(argc, argv, &aboutData); - KComponentData cd(aboutData); - - - KCmdLineOptions options; - options.add("f"); - options.add("file ", ki18n("The configuration file to parse")); - options.add("b"); - options.add("backend ", ki18n("The backend to load")); - - KCmdLineArgs::addCmdLineOptions(options); - - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - kDebug() << "args count is" << args->count(); - if (false && args->count() < 2) { - KCmdLineArgs::usage(); - return 1; - } - - kDebug() << "Attempting to open" << args->getOption("file") << "with the" - << args->getOption("backend") << "KConfig backend"; - KConfig config(args->getOption("file"), args->getOption("backend")); -} - Index: trunk/playground/base/kconfig/CMakeLists.txt =================================================================== --- trunk/playground/base/kconfig/CMakeLists.txt (revision 1513275) +++ trunk/playground/base/kconfig/CMakeLists.txt (nonexistent) @@ -1 +0,0 @@ -#add_subdirectory(ldb) Index: trunk/playground/base/CMakeLists.txt =================================================================== --- trunk/playground/base/CMakeLists.txt (revision 1513275) +++ trunk/playground/base/CMakeLists.txt (revision 1513276) @@ -1,22 +1,21 @@ project(playground-base) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${playground-base_SOURCE_DIR}/cmake/modules) find_package(KDE4 REQUIRED) include (KDE4Defaults) include(MacroOptionalAddSubdirectory) macro_optional_add_subdirectory(doc) macro_optional_add_subdirectory(kio_sysinfo) macro_optional_add_subdirectory(nepomuk-kde) add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) -macro_optional_add_subdirectory(kconfig) macro_optional_add_subdirectory(plasma) macro_optional_add_subdirectory(konq-plugins) if(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") macro_display_feature_log() endif(CMAKE_SOURCE_DIR STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")