summaryrefslogtreecommitdiff
path: root/test/source
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-11-12 10:56:54 +0100
committerLuboš Luňák <l.lunak@collabora.com>2021-11-12 13:02:08 +0100
commit309bffba603ae65e76148dff3add1a541a2b5d81 (patch)
tree42d839b28398ed3397ef20038d624f69db69e3a4 /test/source
parent39f231360013e944a8713248359662b9f282d902 (diff)
make it explicit whether to ignore the result of getLOKPayload()
Returning an empty string to signify 'ignore' was a poor design, as some messages types actually may have valid empty messages. Change-Id: Ia82d3d97d150bc5ef412a1bd4b1091d9b2d84385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124979 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'test/source')
-rw-r--r--test/source/lokcallback.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/source/lokcallback.cxx b/test/source/lokcallback.cxx
index 90ca5f2c9203..323ba4af1f10 100644
--- a/test/source/lokcallback.cxx
+++ b/test/source/lokcallback.cxx
@@ -151,8 +151,9 @@ void TestLokCallbackWrapper::flushLOKData()
for (int type : updatedTypes)
{
- OString payload = viewShell->getLOKPayload(type, m_viewId);
- if (!payload.isEmpty())
+ bool ignore = false;
+ OString payload = viewShell->getLOKPayload(type, m_viewId, &ignore);
+ if (!ignore)
libreOfficeKitViewCallback(type, payload.getStr());
}
for (const PerViewIdData& data : updatedTypesPerViewId)
@@ -161,8 +162,9 @@ void TestLokCallbackWrapper::flushLOKData()
return shell->GetViewShellId().get() == data.sourceViewId;
});
assert(viewShell != nullptr);
- OString payload = viewShell->getLOKPayload(data.type, data.viewId);
- if (!payload.isEmpty())
+ bool ignore = false;
+ OString payload = viewShell->getLOKPayload(data.type, data.viewId, &ignore);
+ if (!ignore)
libreOfficeKitViewCallbackWithViewId(data.type, payload.getStr(), data.viewId);
}
}