D17626: Print preview for KmPlot

Tomaz Canabrava noreply at phabricator.kde.org
Mon Dec 24 12:56:44 GMT 2018


tcanabrava added inline comments.

INLINE COMMENTS

> maindlg.cpp:703-704
> +	prt.setResolution( 72 );
> +	QPointer<QPrintPreviewDialog> preview = new QPrintPreviewDialog( &prt );
> +	QPointer<KPrinterDlg> printdlg = new KPrinterDlg( m_parent );
> +	QList<QToolBar *> toolbarlist = preview->findChildren<QToolBar *>();

If you are creating them here to delete them in the end of the function, why don't you create them on the stack?

> maindlg.cpp:735-736
> +	preview->exec();
> +	delete printdlg;
> +	delete preview;
> +}

create them on the stack do you don't need to call delete.

REPOSITORY
  R334 KmPlot

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

To: yurchor, #kde_edu
Cc: tcanabrava, kde-doc-english, kde-edu, skadinna, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20181224/bb27eea5/attachment.html>


More information about the kde-edu mailing list