ObjectTitle.h header
#include <ew/app/ObjectTitle.h>
Namespace ew::app
Functions
QString ew::app::content::objectTitle(const ew::core::content::ContentObject *object)
Returns the display title of object for any titled content type – a document's, source's, map's, spreadsheet's, chart's, timeline's, timeline event's, random table's, stat block's, task's or canvas's title, or an entity's or language's name. An empty string if object is null or is one of the two untitled types: media (named by its file) and a comment (named by its target).
Shared so every generic surface – Quick Open search, backlinks, pins – titles, and therefore FINDS, objects the same way whatever their type. An object this returns nothing for cannot be found by name anywhere, which is why the implementation switches over the content-type enum: adding a type and forgetting it is then a compile error rather than a silently nameless object.