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
db248dda
Commit
db248dda
authored
Dec 17, 2020
by
Laurent Montel
😁
Browse files
"auto *" => "auto "
parent
dedaa32a
Changes
6
Hide whitespace changes
Inline
Side-by-side
autotests/configurecustomsettingdialogtest.cpp
View file @
db248dda
...
...
@@ -36,10 +36,10 @@ ConfigureCustomSettingDialogTest::~ConfigureCustomSettingDialogTest()
void
ConfigureCustomSettingDialogTest
::
shouldHaveDefaultValue
()
{
ConfigureCustomSettingDialog
dlg
;
auto
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
auto
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
QVERIFY
(
!
buttonBox
->
button
(
QDialogButtonBox
::
Ok
)
->
isEnabled
());
auto
*
widget
=
dlg
.
findChild
<
ConfigureCustomSettingWidget
*>
(
QStringLiteral
(
"customsettingwidget"
));
auto
widget
=
dlg
.
findChild
<
ConfigureCustomSettingWidget
*>
(
QStringLiteral
(
"customsettingwidget"
));
QVERIFY
(
widget
);
}
...
...
autotests/configurecustomsettingwidgettest.cpp
View file @
db248dda
...
...
@@ -39,20 +39,20 @@ ConfigureCustomSettingWidgetTest::~ConfigureCustomSettingWidgetTest()
void
ConfigureCustomSettingWidgetTest
::
shouldHaveDefaultValue
()
{
ConfigureCustomSettingWidget
w
;
auto
*
lab
=
w
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"category_label"
));
auto
lab
=
w
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"category_label"
));
QVERIFY
(
lab
);
auto
*
categoryLineEdit
=
w
.
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"category_lineedit"
));
auto
categoryLineEdit
=
w
.
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"category_lineedit"
));
QVERIFY
(
categoryLineEdit
);
QVERIFY
(
categoryLineEdit
->
trapReturnKey
());
QVERIFY
(
categoryLineEdit
->
isClearButtonEnabled
());
auto
*
enableCategory
=
w
.
findChild
<
QCheckBox
*>
(
QStringLiteral
(
"enable_category"
));
auto
enableCategory
=
w
.
findChild
<
QCheckBox
*>
(
QStringLiteral
(
"enable_category"
));
QVERIFY
(
enableCategory
);
lab
=
w
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"categorytype_label"
));
QVERIFY
(
lab
);
auto
*
categoryType
=
w
.
findChild
<
QComboBox
*>
(
QStringLiteral
(
"categorytype_combobox"
));
auto
categoryType
=
w
.
findChild
<
QComboBox
*>
(
QStringLiteral
(
"categorytype_combobox"
));
QVERIFY
(
categoryType
);
QCOMPARE
(
categoryType
->
count
(),
4
);
}
...
...
@@ -79,7 +79,7 @@ void ConfigureCustomSettingWidgetTest::shouldRestoreRules()
void
ConfigureCustomSettingWidgetTest
::
shouldEmitSignalWhenWeChangeLogName
()
{
ConfigureCustomSettingWidget
w
;
auto
*
categoryLineEdit
=
w
.
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"category_lineedit"
));
auto
categoryLineEdit
=
w
.
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"category_lineedit"
));
QVERIFY
(
categoryLineEdit
);
QSignalSpy
spy
(
&
w
,
&
ConfigureCustomSettingWidget
::
enableButton
);
categoryLineEdit
->
setText
(
QStringLiteral
(
"bla"
));
...
...
autotests/customdebugsettingspagetest.cpp
View file @
db248dda
...
...
@@ -39,28 +39,28 @@ void CustomDebugSettingsPageTest::shouldHaveDefaultValue()
{
CustomDebugSettingsPage
page
;
auto
*
lab
=
page
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"custom_label"
));
auto
lab
=
page
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"custom_label"
));
QVERIFY
(
lab
);
auto
*
listWidget
=
page
.
findChild
<
QListWidget
*>
(
QStringLiteral
(
"custom_listwidget"
));
auto
listWidget
=
page
.
findChild
<
QListWidget
*>
(
QStringLiteral
(
"custom_listwidget"
));
QVERIFY
(
listWidget
);
QCOMPARE
(
listWidget
->
selectionMode
(),
QAbstractItemView
::
MultiSelection
);
QCOMPARE
(
listWidget
->
count
(),
0
);
auto
*
searchLine
=
page
.
findChild
<
KListWidgetSearchLine
*>
(
QStringLiteral
(
"searchline"
));
auto
searchLine
=
page
.
findChild
<
KListWidgetSearchLine
*>
(
QStringLiteral
(
"searchline"
));
QVERIFY
(
searchLine
);
QVERIFY
(
!
searchLine
->
placeholderText
().
isEmpty
());
QCOMPARE
(
searchLine
->
listWidget
(),
listWidget
);
auto
*
addButton
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"add_rule"
));
auto
addButton
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"add_rule"
));
QVERIFY
(
addButton
);
QVERIFY
(
addButton
->
isEnabled
());
auto
*
editButton
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"edit_rule"
));
auto
editButton
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"edit_rule"
));
QVERIFY
(
editButton
);
QVERIFY
(
!
editButton
->
isEnabled
());
auto
*
removeButton
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"remove_rule"
));
auto
removeButton
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"remove_rule"
));
QVERIFY
(
removeButton
);
QVERIFY
(
!
removeButton
->
isEnabled
());
}
...
...
autotests/environmentsettingsrulespagetest.cpp
View file @
db248dda
...
...
@@ -36,9 +36,9 @@ void EnvironmentSettingsRulesPageTest::shouldHaveDefaultValue()
{
EnvironmentSettingsRulesPage
w
;
auto
*
lab
=
w
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
auto
lab
=
w
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
QVERIFY
(
lab
);
auto
*
plainText
=
w
.
findChild
<
EnvironmentPlainTextEdit
*>
(
QStringLiteral
(
"richtext"
));
auto
plainText
=
w
.
findChild
<
EnvironmentPlainTextEdit
*>
(
QStringLiteral
(
"richtext"
));
QVERIFY
(
plainText
);
QVERIFY
(
plainText
->
toPlainText
().
isEmpty
());
QVERIFY
(
plainText
->
isReadOnly
());
...
...
@@ -47,7 +47,7 @@ void EnvironmentSettingsRulesPageTest::shouldHaveDefaultValue()
void
EnvironmentSettingsRulesPageTest
::
shouldSetRules
()
{
EnvironmentSettingsRulesPage
w
;
auto
*
plainText
=
w
.
findChild
<
EnvironmentPlainTextEdit
*>
(
QStringLiteral
(
"richtext"
));
auto
plainText
=
w
.
findChild
<
EnvironmentPlainTextEdit
*>
(
QStringLiteral
(
"richtext"
));
QString
rules
=
QStringLiteral
(
"Rules for qt
\n
test"
);
w
.
setRules
(
rules
);
QVERIFY
(
plainText
->
toPlainText
().
endsWith
(
rules
));
...
...
autotests/kdeapplicationdebugsettingpagetest.cpp
View file @
db248dda
...
...
@@ -38,26 +38,26 @@ KDEApplicationDebugSettingPageTest::~KDEApplicationDebugSettingPageTest()
void
KDEApplicationDebugSettingPageTest
::
shouldHaveDefaultValue
()
{
KDEApplicationDebugSettingPage
page
;
auto
*
listWidget
=
page
.
findChild
<
KDEApplicationTreeListWidget
*>
(
QStringLiteral
(
"listwidget"
));
auto
listWidget
=
page
.
findChild
<
KDEApplicationTreeListWidget
*>
(
QStringLiteral
(
"listwidget"
));
QVERIFY
(
listWidget
);
QVERIFY
(
!
listWidget
->
rootIsDecorated
());
QVERIFY
(
listWidget
->
header
()
->
isHidden
());
QVERIFY
(
listWidget
->
isColumnHidden
(
2
));
QCOMPARE
(
listWidget
->
columnCount
(),
4
);
auto
*
selectAll
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"selectall"
));
auto
selectAll
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"selectall"
));
QVERIFY
(
selectAll
);
QVERIFY
(
selectAll
->
isEnabled
());
auto
*
deselectAll
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"deselectall"
));
auto
deselectAll
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"deselectall"
));
QVERIFY
(
deselectAll
);
QVERIFY
(
deselectAll
->
isEnabled
());
auto
*
mTurnOffAllMessages
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"deselectallmessage"
));
auto
mTurnOffAllMessages
=
page
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"deselectallmessage"
));
QVERIFY
(
mTurnOffAllMessages
);
QVERIFY
(
mTurnOffAllMessages
->
isEnabled
());
auto
*
searchLine
=
page
.
findChild
<
KTreeWidgetSearchLine
*>
(
QStringLiteral
(
"searchline"
));
auto
searchLine
=
page
.
findChild
<
KTreeWidgetSearchLine
*>
(
QStringLiteral
(
"searchline"
));
QVERIFY
(
searchLine
);
QVERIFY
(
searchLine
->
text
().
isEmpty
());
}
...
...
autotests/kdebugsettingsdialogtest.cpp
View file @
db248dda
...
...
@@ -41,10 +41,10 @@ KDebugSettingsDialogTest::~KDebugSettingsDialogTest()
void
KDebugSettingsDialogTest
::
shouldHaveDefaultValue
()
{
KDebugSettingsDialog
dlg
;
auto
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
auto
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
QCOMPARE
(
buttonBox
->
standardButtons
(),
QDialogButtonBox
::
RestoreDefaults
|
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
|
QDialogButtonBox
::
Apply
);
auto
*
tab
=
dlg
.
findChild
<
QTabWidget
*>
(
QStringLiteral
(
"tabwidget"
));
auto
tab
=
dlg
.
findChild
<
QTabWidget
*>
(
QStringLiteral
(
"tabwidget"
));
QVERIFY
(
tab
);
for
(
int
i
=
0
;
i
<
tab
->
count
();
++
i
)
{
const
QString
objName
=
tab
->
widget
(
i
)
->
objectName
();
...
...
@@ -53,14 +53,14 @@ void KDebugSettingsDialogTest::shouldHaveDefaultValue()
||
(
objName
==
QLatin1String
(
"environmentsettingsrulespage"
));
QVERIFY
(
hasCorrectName
);
}
auto
*
saveAs
=
buttonBox
->
findChild
<
QPushButton
*>
(
QStringLiteral
(
"saveas_button"
));
auto
saveAs
=
buttonBox
->
findChild
<
QPushButton
*>
(
QStringLiteral
(
"saveas_button"
));
QVERIFY
(
saveAs
);
auto
*
load
=
buttonBox
->
findChild
<
QToolButton
*>
(
QStringLiteral
(
"load_button"
));
auto
load
=
buttonBox
->
findChild
<
QToolButton
*>
(
QStringLiteral
(
"load_button"
));
QVERIFY
(
load
);
QVERIFY
(
load
->
menu
());
auto
*
insertCategories
=
buttonBox
->
findChild
<
QPushButton
*>
(
QStringLiteral
(
"insert_button"
));
auto
insertCategories
=
buttonBox
->
findChild
<
QPushButton
*>
(
QStringLiteral
(
"insert_button"
));
QVERIFY
(
insertCategories
);
auto
*
categoryWarning
=
dlg
.
findChild
<
CategoryWarning
*>
(
QStringLiteral
(
"categorywarning"
));
auto
categoryWarning
=
dlg
.
findChild
<
CategoryWarning
*>
(
QStringLiteral
(
"categorywarning"
));
QVERIFY
(
categoryWarning
);
QVERIFY
(
!
categoryWarning
->
isVisible
());
}
...
...
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