D18319: Improve LiveDataDock and import widget

Stefan Gerlach noreply at phabricator.kde.org
Sat Jan 19 11:19:45 GMT 2019


sgerlach added inline comments.

INLINE COMMENTS

> GuiObserver.cpp:588
>  
> -		QList<MQTTClient*> list;
>  		for (auto* aspect : selectedAspects) {
> +			if (auto subscription = qobject_cast<MQTTSubscription*>(aspect)) {

why not to simply (see above)

> GuiObserver.cpp:604
>  
> -		QList<MQTTClient*> list;
>  		for (auto* aspect : selectedAspects) {
> +			if (auto topic = qobject_cast<MQTTTopic*>(aspect)) {

why not to simply (see above)

> GuiObserver.cpp:622
>  
> -		QList<LiveDataSource*> list;
> -		for (auto* aspect : selectedAspects)
> -			list << qobject_cast<LiveDataSource*>(aspect);
> -		m_mainWindow->m_liveDataDock->setLiveDataSources(list);
> -
> -		m_mainWindow->stackedWidget->setCurrentWidget(m_mainWindow->m_liveDataDock);
> +		for (auto* aspect : selectedAspects) {
> +			if (auto source = qobject_cast<LiveDataSource*>(aspect)) {

why not to simply (see above)

REPOSITORY
  R262 LabPlot

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

To: croick, #labplot
Cc: sgerlach, asemke, kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20190119/954b79ff/attachment-0001.html>


More information about the kde-edu mailing list