D18319: Improve LiveDataDock and import widget

Alexander Semke noreply at phabricator.kde.org
Fri Jan 18 07:37:43 GMT 2019


asemke added inline comments.

INLINE COMMENTS

> GuiObserver.cpp:571
>  
> -		QList<MQTTClient*> list;
> -		for (auto* aspect : selectedAspects)
> -			list << qobject_cast<MQTTClient*>(aspect);
> -		m_mainWindow->m_liveDataDock->setMQTTClients(list);
> -
> -		m_mainWindow->stackedWidget->setCurrentWidget(m_mainWindow->m_liveDataDock);
> +		for (auto* aspect : selectedAspects) {
> +			if (auto client = qobject_cast<MQTTClient*>(aspect)) {

why not to simply

  auto* client = qobject_cast<MQTTClient*>(selectedAspects.first());
  m_mainWindow->m_liveDataDock->setMQTTClient(cleint)

?

REPOSITORY
  R262 LabPlot

REVISION DETAIL
  https://phabricator.kde.org/D18319

To: croick, #labplot
Cc: asemke, kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190118/2524da8e/attachment.html>


More information about the kde-edu mailing list