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
PIM
KDE PIM Add-ons
Commits
3c9a06c3
Commit
3c9a06c3
authored
Jan 20, 2022
by
Laurent Montel
😁
Browse files
Improve autotest
parent
fac9b818
Pipeline
#126198
passed with stage
in 11 minutes and 1 second
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/messageviewerconfigureplugins/openurlwith/autotests/openurlwithconfigurecreatedialogtest.cpp
View file @
3c9a06c3
...
...
@@ -6,7 +6,9 @@
#include "openurlwithconfigurecreatedialogtest.h"
#include "openurlwithconfigurecreatedialog.h"
#include <QDialogButtonBox>
#include <QTest>
#include <QVBoxLayout>
QTEST_MAIN
(
OpenUrlWithConfigureCreateDialogTest
)
OpenUrlWithConfigureCreateDialogTest
::
OpenUrlWithConfigureCreateDialogTest
(
QObject
*
parent
)
:
QObject
{
parent
}
...
...
@@ -15,6 +17,16 @@ OpenUrlWithConfigureCreateDialogTest::OpenUrlWithConfigureCreateDialogTest(QObje
void
OpenUrlWithConfigureCreateDialogTest
::
shouldHaveDefaultValues
()
{
OpenUrlWithConfigureCreateDialog
d
;
// TODO
OpenUrlWithConfigureCreateDialog
dlg
;
QVERIFY
(
!
dlg
.
windowTitle
().
isEmpty
());
auto
mainLayout
=
dlg
.
findChild
<
QVBoxLayout
*>
(
QStringLiteral
(
"mainlayout"
));
QVERIFY
(
mainLayout
);
auto
mOpenUrlWithCreateWidget
=
dlg
.
findChild
<
OpenUrlWithConfigureCreateWidget
*>
(
QStringLiteral
(
"mOpenUrlWithCreateWidget"
));
QVERIFY
(
mOpenUrlWithCreateWidget
);
auto
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonBox"
));
QVERIFY
(
buttonBox
);
QCOMPARE
(
buttonBox
->
standardButtons
(),
{
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
});
}
plugins/messageviewerconfigureplugins/openurlwith/openurlwithconfigurecreatedialog.cpp
View file @
3c9a06c3
...
...
@@ -16,7 +16,7 @@ OpenUrlWithConfigureCreateDialog::OpenUrlWithConfigureCreateDialog(QWidget *pare
auto
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainlayout"
));
mOpenUrlWithCreateWidget
->
setObjectName
(
QStringLiteral
(
"mOpenUrlWithWidget"
));
mOpenUrlWithCreateWidget
->
setObjectName
(
QStringLiteral
(
"mOpenUrlWith
Create
Widget"
));
mainLayout
->
addWidget
(
mOpenUrlWithCreateWidget
);
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
...
...
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