-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elektra backend without master #14
Conversation
added warning when elektra is enabled and ini backend is used added flag to skip tests which fail on the test machine
moved kdb and keyset to backend instances
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing progress. I think we should merge this soon, create issues with the TODOs and then make a follow-up PR with the requested changes/new features.
.gitignore
Outdated
@@ -13,9 +12,12 @@ | |||
.*.swp | |||
.swp.* | |||
Doxyfile | |||
Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not remove something here, this only leads to unnecessary discussions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have added the rules back in, i think they were removed automatically by a plugin i use
|
||
ecm_add_test( | ||
kconfigelektratest.cpp | ||
../src/core/kconfigelektra.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these sources required? It would be better if we can test directly against the public interfaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need those sources to test the backend directly
autotests/CMakeLists.txt
Outdated
@@ -50,6 +50,28 @@ ecm_add_tests( | |||
LINK_LIBRARIES KF5::ConfigCore Qt5::Test Qt5::Concurrent | |||
) | |||
|
|||
find_package(Elektra) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add to beginning where the other find_packages are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -32,7 +32,7 @@ private Q_SLOTS: | |||
|
|||
void FallbackConfigResourcesTest::initTestCase() | |||
{ | |||
QStandardPaths::setTestModeEnabled(true); | |||
QStandardPaths::setTestModeEnabled(true); //TODO create and drop expected data (i guess) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is better if you create issues and not TODOs or FIXMEs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i will create the issues today in the afternoon
#include <iostream> | ||
#include "kconfigelektratest.h" | ||
|
||
#ifdef FEAT_ELEKTRA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to exclude the whole file in CMake
src/core/kconfigelektra.cpp
Outdated
* @param ks | ||
* @return | ||
*/ | ||
static std::string findLowestKeyspace(KeySet* ks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be automatically done when you use cascading lookups. (lookup key starts with /
)
src/core/kconfigelektra.cpp
Outdated
const KEntryKey &entryKey = it.key(); | ||
KEntry entry = it.value(); | ||
|
||
if (entryKey.mKey.isEmpty()) { // ignore group attributes for the moment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this is (more or less) part of #10, to write the group attributes to the files again
src/core/kconfigelektra_p.h
Outdated
|
||
#include <kdb.hpp> | ||
|
||
using namespace kdb; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be done only in source files
// | ||
// Created by felix on 28.10.19. | ||
// | ||
#include "kconfigbackend_p.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why _p?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header files with the postfix _p are apparently removed from header files and not installed to the include directory. This way the user cannot use internals of the library.
|
||
#endif //KCONFIG_KCONFIGELEKTRA_P_H | ||
|
||
#endif //FEAT_ELEKTRA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avoid including the whole file via cmake
Co-Authored-By: markus2330 <[email protected]>
Can I merge this now? |
Done. |
New PR without the changes from upstream master.