Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
KDebugSettings
Commits
581cd035
Commit
581cd035
authored
Dec 21, 2020
by
Laurent Montel
😁
Browse files
Add QListView here too
parent
e141ad3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
autotests/groupmanagementwidgettest.cpp
View file @
581cd035
...
...
@@ -20,6 +20,7 @@
#include "groupmanagementwidgettest.h"
#include "groupmanagementwidget.h"
#include <QListView>
#include <QTest>
#include <QVBoxLayout>
...
...
@@ -36,4 +37,7 @@ void GroupManagementWidgetTest::shouldHaveDefaultValues()
auto
mainLayout
=
w
.
findChild
<
QVBoxLayout
*>
(
QStringLiteral
(
"mainLayout"
));
QVERIFY
(
mainLayout
);
QCOMPARE
(
mainLayout
->
contentsMargins
(),
{});
auto
mListView
=
w
.
findChild
<
QListView
*>
(
QStringLiteral
(
"mListView"
));
QVERIFY
(
mListView
);
}
src/groupmanagementwidget.cpp
View file @
581cd035
...
...
@@ -20,16 +20,27 @@
#include "groupmanagementwidget.h"
#include <KLocalizedString>
#include <QListView>
#include <QVBoxLayout>
GroupManagementWidget
::
GroupManagementWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
mListView
(
new
QListView
(
this
))
{
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setContentsMargins
({});
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mListView
->
setObjectName
(
QStringLiteral
(
"mListView"
));
mainLayout
->
addWidget
(
mListView
);
init
();
}
GroupManagementWidget
::~
GroupManagementWidget
()
{
}
void
GroupManagementWidget
::
init
()
{
//TODO
}
src/groupmanagementwidget.h
View file @
581cd035
...
...
@@ -24,12 +24,16 @@
#include <QWidget>
#include "libkdebugsettings_private_export.h"
class
QListView
;
class
LIBKDEBUGSETTINGS_EXPORT_TEST_EXPORT
GroupManagementWidget
:
public
QWidget
{
Q_OBJECT
public:
explicit
GroupManagementWidget
(
QWidget
*
parent
=
nullptr
);
~
GroupManagementWidget
()
override
;
private:
void
init
();
QListView
*
const
mListView
;
};
#endif // GROUPMANAGEMENTWIDGET_H
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment