LCOV - code coverage report
Current view: top level - muse/framework/accessibility/internal - accessiblestub.cpp Coverage Total Hit
Test: filtered_coverage.info Lines: 0.0 % 37 0
Test Date: 2026-11-05 04:07:02

            Line data    Source code
       1              : /*
       2              :  * SPDX-License-Identifier: GPL-3.0-only
       3              :  * MuseScore-CLA-applies
       4              :  *
       5              :  * MuseScore Studio
       6              :  * Music Composition & Notation
       7              :  *
       8              :  * Copyright (C) 2021 MuseScore Limited and others
       9              :  *
      10              :  * This program is free software: you can redistribute it and/or modify
      11              :  * it under the terms of the GNU General Public License version 3 as
      12              :  * published by the Free Software Foundation.
      13              :  *
      14              :  * This program is distributed in the hope that it will be useful,
      15              :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      16              :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17              :  * GNU General Public License for more details.
      18              :  *
      19              :  * You should have received a copy of the GNU General Public License
      20              :  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
      21              :  */
      22              : #include "accessiblestub.h"
      23              : 
      24              : #include <QQuickItem>
      25              : 
      26              : using namespace muse::accessibility;
      27              : 
      28            0 : AccessibleStub::AccessibleStub(QObject* object)
      29            0 :     : m_object(object)
      30              : {
      31            0 : }
      32              : 
      33            0 : QAccessibleInterface* AccessibleStub::accessibleInterface(QObject* object)
      34              : {
      35            0 :     if (dynamic_cast<QQuickItem*>(object)) {
      36            0 :         return new AccessibleStub(object);
      37              :     }
      38              : 
      39            0 :     return nullptr;
      40              : }
      41              : 
      42            0 : bool AccessibleStub::isValid() const
      43              : {
      44            0 :     return false;
      45              : }
      46              : 
      47            0 : QObject* AccessibleStub::object() const
      48              : {
      49            0 :     return m_object;
      50              : }
      51              : 
      52            0 : QWindow* AccessibleStub::window() const
      53              : {
      54            0 :     return nullptr;
      55              : }
      56              : 
      57            0 : QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > AccessibleStub::relations(QAccessible::Relation) const
      58              : {
      59            0 :     return {};
      60              : }
      61              : 
      62            0 : QAccessibleInterface* AccessibleStub::childAt(int, int) const
      63              : {
      64            0 :     return nullptr;
      65              : }
      66              : 
      67            0 : QAccessibleInterface* AccessibleStub::parent() const
      68              : {
      69            0 :     return nullptr;
      70              : }
      71              : 
      72            0 : QAccessibleInterface* AccessibleStub::child(int) const
      73              : {
      74            0 :     return nullptr;
      75              : }
      76              : 
      77            0 : int AccessibleStub::childCount() const
      78              : {
      79            0 :     return 0;
      80              : }
      81              : 
      82            0 : int AccessibleStub::indexOfChild(const QAccessibleInterface*) const
      83              : {
      84            0 :     return -1;
      85              : }
      86              : 
      87            0 : QString AccessibleStub::text(QAccessible::Text) const
      88              : {
      89            0 :     return {};
      90              : }
      91              : 
      92            0 : void AccessibleStub::setText(QAccessible::Text, const QString&)
      93              : {
      94            0 : }
      95              : 
      96            0 : QRect AccessibleStub::rect() const
      97              : {
      98            0 :     return {};
      99              : }
     100              : 
     101            0 : QAccessible::Role AccessibleStub::role() const
     102              : {
     103            0 :     return QAccessible::Role::NoRole;
     104              : }
     105              : 
     106            0 : QAccessible::State AccessibleStub::state() const
     107              : {
     108            0 :     return {};
     109              : }
     110              : 
     111            0 : void* AccessibleStub::interface_cast(QAccessible::InterfaceType)
     112              : {
     113            0 :     return nullptr;
     114              : }
        

Generated by: LCOV version 2.0-1