Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
b0af6578
Commit
b0af6578
authored
Jan 21, 2022
by
Vlad Zahorodnii
Browse files
Silence -Wself-assign-overloaded with clang
parent
59b21a01
Pipeline
#126602
passed with stage
in 23 minutes and 33 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
autotests/test_xcb_wrapper.cpp
View file @
b0af6578
...
...
@@ -155,11 +155,15 @@ void TestXcbWrapper::assignementEmpty()
testEmpty
(
geometry
);
testEmpty
(
other
);
QVERIFY
(
!
other
.
isRetrieved
());
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG
(
"-Wself-assign-overloaded"
)
// test assignment to self
geometry
=
geometry
;
other
=
other
;
testEmpty
(
geometry
);
testEmpty
(
other
);
QT_WARNING_POP
}
void
TestXcbWrapper
::
assignmentBeforeRetrieve
()
...
...
@@ -177,10 +181,14 @@ void TestXcbWrapper::assignmentBeforeRetrieve()
QCOMPARE
(
other
.
window
(),
(
xcb_window_t
)
m_testWindow
);
other
=
WindowGeometry
();
testEmpty
(
geometry
);
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG
(
"-Wself-assign-overloaded"
)
// test assignment to self
geometry
=
geometry
;
other
=
other
;
testEmpty
(
geometry
);
QT_WARNING_POP
}
void
TestXcbWrapper
::
assignmentAfterRetrieve
()
...
...
@@ -194,11 +202,14 @@ void TestXcbWrapper::assignmentAfterRetrieve()
QVERIFY
(
other
.
isRetrieved
());
testGeometry
(
other
,
QRect
(
0
,
0
,
10
,
10
));
QT_WARNING_PUSH
QT_WARNING_DISABLE_CLANG
(
"-Wself-assign-overloaded"
)
// test assignment to self
geometry
=
geometry
;
other
=
other
;
testEmpty
(
geometry
);
testGeometry
(
other
,
QRect
(
0
,
0
,
10
,
10
));
QT_WARNING_POP
// set to empty again
other
=
WindowGeometry
();
...
...
Vlad Zahorodnii
@vladz
mentioned in commit
416eae41
·
Jan 21, 2022
mentioned in commit
416eae41
mentioned in commit 416eae41fd7e1a31e06370207d0c297a357caa38
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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