sc: loplugin:badstatics: remove pActiveEdWnd global variable

Just use a Link, or rather std::function to set a member in the tab
page.  Unfortunately loplugin:vclwidgets complains about the new member.

Change-Id: Ie2f9cb73c38292d02057d43b12694c6609fa0db8
This commit is contained in:
Michael Stahl
2015-11-12 23:37:12 +01:00
parent 613ef01748
commit 5fe6606901
5 changed files with 33 additions and 26 deletions

View File

@@ -299,7 +299,9 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) {
const CXXRecordDecl *pParentRecordDecl = isa<RecordDecl>(fieldDecl->getDeclContext()) ? dyn_cast<CXXRecordDecl>(fieldDecl->getParent()) : nullptr;
if (containsWindowSubclass(fieldDecl->getType())) {
// have to ignore this for now, nasty reverse dependency from tools->vcl
if (!(pParentRecordDecl != nullptr && pParentRecordDecl->getQualifiedNameAsString() == "ErrorContextImpl")) {
if (!(pParentRecordDecl != nullptr &&
(pParentRecordDecl->getQualifiedNameAsString() == "ErrorContextImpl" ||
pParentRecordDecl->getQualifiedNameAsString() == "ScHFEditPage"))) {
report(
DiagnosticsEngine::Warning,
"OutputDevice subclass %0 declared as a pointer member, should be wrapped in VclPtr",