| 103 | if (widget->property("ElaBaseClassName").toString() == "ElaWindow") |
| 104 | { |
| 105 | parent = widget; |
| 106 | } |
| 107 | } |
| 108 | if (!parent) |
| 109 | { |
| 110 | return; |
| 111 | } |
| 112 | } |
| 113 | ElaMessageBar* bar = new ElaMessageBar(policy, ElaMessageBarType::Information, title, text, displayMsec, parent); |
| 114 | Q_UNUSED(bar); |
| 115 | } |
| 116 | |
| 117 | void ElaMessageBar::error(ElaMessageBarType::PositionPolicy policy, QString title, QString text, int displayMsec, QWidget* parent) |
| 118 | { |
| 119 | if (!parent) |
| 120 | { |
| 121 | QList<QWidget*> widgetList = QApplication::topLevelWidgets(); |
| 122 | for (auto widget: widgetList) |
| 123 | { |
| 124 | if (widget->property("ElaBaseClassName").toString() == "ElaWindow") |
| 125 | { |
| 126 | parent = widget; |
| 127 | } |
nothing calls this directly
no outgoing calls
no test coverage detected