D14523: [import] Update file content overview after file type change

Fabian Kristof noreply at phabricator.kde.org
Tue Jul 31 22:17:49 BST 2018


fkristof added inline comments.

INLINE COMMENTS

> ImportFileWidget.cpp:612
> +	// make absolute path // FIXME
> +	if ( !fileName.isEmpty() && fileName.at(0) != QDir::separator())
> +		return QDir::homePath() + QDir::separator() + fileName;

Remove space

  ( !fileName.isEmpty()

> ImportFileWidget.cpp:612
> +	// make absolute path // FIXME
> +	if ( !fileName.isEmpty() && fileName.at(0) != QDir::separator())
> +		return QDir::homePath() + QDir::separator() + fileName;

I'd say it would be safer to have 2 separate ifs, even if we know that the order is left to right, if somebody changes/adds here something and the fileName.at(0) will be before the isEmpty() then there will be a crash.

  if (!fileName.isEmpty()) {
         if (fileName.at(0) != QDir::separator()) {

> ImportFileWidget.cpp:1106
>  
> +void ImportFileWidget::updateContent(const QString& fileName, int fileType)
> +{

AbstractFileFilter::FileType fileType

REPOSITORY
  R262 LabPlot

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

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


More information about the kde-edu mailing list