Spreadsheet: fix some warnings and issues reported by GH actions
This commit is contained in:
@@ -38,20 +38,22 @@
|
||||
namespace SpreadsheetGui {
|
||||
|
||||
SheetTableViewAccessibleInterface::SheetTableViewAccessibleInterface(
|
||||
SpreadsheetGui::SheetTableView* w)
|
||||
: QAccessibleWidget(w)
|
||||
SpreadsheetGui::SheetTableView* view)
|
||||
: QAccessibleWidget(view)
|
||||
{
|
||||
}
|
||||
|
||||
QString SheetTableViewAccessibleInterface::text(QAccessible::Text t) const
|
||||
QString SheetTableViewAccessibleInterface::text(QAccessible::Text txt) const
|
||||
{
|
||||
if (t == QAccessible::Help)
|
||||
if (txt == QAccessible::Help)
|
||||
return QString::fromLatin1("Implement me");
|
||||
return QAccessibleWidget::text(t);
|
||||
return QAccessibleWidget::text(txt);
|
||||
}
|
||||
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::childAt(int x, int y) const
|
||||
{
|
||||
Q_UNUSED(x)
|
||||
Q_UNUSED(y)
|
||||
return (QAccessibleInterface*)this;
|
||||
}
|
||||
|
||||
@@ -72,14 +74,15 @@ namespace SpreadsheetGui {
|
||||
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::child(int index) const
|
||||
{
|
||||
Q_UNUSED(index)
|
||||
return (QAccessibleInterface*)this;
|
||||
}
|
||||
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::ifactory(const QString& key, QObject* o)
|
||||
QAccessibleInterface* SheetTableViewAccessibleInterface::ifactory(const QString& key, QObject* obj)
|
||||
{
|
||||
if (key == QString::fromUtf8("SpreadsheetGui::SheetTableView"))
|
||||
return new SheetTableViewAccessibleInterface(
|
||||
static_cast<SpreadsheetGui::SheetTableView*>(o));
|
||||
return 0;
|
||||
static_cast<SpreadsheetGui::SheetTableView*>(obj));
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,29 +29,29 @@
|
||||
|
||||
namespace SpreadsheetGui {
|
||||
|
||||
// Currently SheetTableViewAccessibleInterface below deactivates the
|
||||
// built-in QAccessibleTable interface, and all the accessibility
|
||||
// Currently SheetTableViewAccessibleInterface below deactivates the
|
||||
// built-in QAccessibleTable interface, and all the accessibility
|
||||
// features.
|
||||
//
|
||||
//
|
||||
// For a proper implementation, start by extending that
|
||||
// and ensure you're not queue-ing empty cells, or counting empty cells
|
||||
//
|
||||
//
|
||||
// Otherwise it will hang - https://github.com/FreeCAD/FreeCAD/issues/8265
|
||||
|
||||
class SheetTableViewAccessibleInterface : public QAccessibleWidget
|
||||
{
|
||||
public:
|
||||
SheetTableViewAccessibleInterface(SpreadsheetGui::SheetTableView* w);
|
||||
explicit SheetTableViewAccessibleInterface(SpreadsheetGui::SheetTableView* view);
|
||||
|
||||
QString text(QAccessible::Text txt) const override;
|
||||
|
||||
QString text(QAccessible::Text t) const override;
|
||||
|
||||
QAccessibleInterface* childAt(int x, int y) const override;
|
||||
int indexOfChild(const QAccessibleInterface*) const override;
|
||||
int childCount() const override;
|
||||
QAccessibleInterface* focusChild() const override;
|
||||
QAccessibleInterface* child(int index) const override;
|
||||
|
||||
static QAccessibleInterface* ifactory(const QString& key, QObject* o);
|
||||
static QAccessibleInterface* ifactory(const QString& key, QObject* obj);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user