Bug 374124 - Code Importing Wizard - broken file selection (doesn't let me import what I select)
Summary: Code Importing Wizard - broken file selection (doesn't let me import what I s...
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: importer (show other bugs)
Version: 2.21.0 (KDE Applications 16.12.0)
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-24 18:39 UTC by alexandru.chirita4192
Modified: 2020-01-12 10:59 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.30.2 (KDE Applications 19.12.2)


Attachments
You can see actual selected files vs. "Number of files" vs files which get imported. I cannot import what I select (but "Number of files" and the actual imported files are correlated) (69.74 KB, application/x-zip-compressed)
2016-12-24 18:39 UTC, alexandru.chirita4192
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexandru.chirita4192 2016-12-24 18:39:34 UTC
Created attachment 102981 [details]
You can see actual selected files vs. "Number of files" vs files which get imported. I cannot import what I select (but "Number of files" and the actual imported files are correlated)

Hello,

I have a bug regarding selecting files in "Code Importing Wizard" on Windows 10.

Operating System:
Windows 10 (latest update as far as I know at 24.10.2016)

Program:
Umbrello UML Modeller version 2.21.0 - windows 64 build (Windows 10) - latest build for Windows

Program downloaded from: http://mirror.klaus-uwe.me/kde/ftp/stable/umbrello/2.21.0/win64/umbrello-x86_64-w64-mingw32-2.21.0.ec4653c-31.1-1.1-setup.exe


KDE library:
KDE Development Platform 4.14.60 (packaged with Umbrello windows 64 bit setup).

Steps to reproduce the bug:
menu Code -> submenu "Code Importing Wizard" (with "C++" chosen from drop-down, with "Include Subdirectories" true, with List of file extensions "*.mqh, *.mt4")

Bugs regarding file/folder selection:
1. "Include Subdirectories." doesn't work on this version at all.
2. When I select the files for which I need code importing, the number of files in "Number of files" is wrong. If I might guess the bug, when I select a directory (with double click), the number of files gets decreased by the number of subdirectories in the directory and I lose code importing for as many files, as I had subdirectories (no idea which files get to import and which doesn't).
3. Because of the weird way selection works, when I press next, I only get the number of files counted (if I have "Number of files: 7", I get to import 7 files, even though I have many more other files selected - see attachment for this example).

So.. somehow, selecting directories with double click gets the number of files decreased and I cannot import properly (I don't even know which files gets excluded).

Thank you for solving the bug.
Comment 1 Oliver Kellogg 2020-01-11 05:03:30 UTC
Git commit 0459a7368321d69b8cb567142ad82601477575c1 by Oliver Kellogg.
Committed on 11/01/2020 at 05:02.
Pushed by okellogg into branch 'release/19.12'.

Fix broken file selection for PHP and SQL in code import wizard:

umbrello/codeimpwizard/codeimpselectpage.cpp
- In changeLanguage() handle all cases of Uml::ProgrammingLanguage enum.
Related: bug 335566

FIXED-IN:2.30.2 (KDE Applications 19.12.2)

M  +38   -3    umbrello/codeimpwizard/codeimpselectpage.cpp

https://invent.kde.org/kde/umbrello/commit/0459a7368321d69b8cb567142ad82601477575c1
Comment 2 Ralf Habacker 2020-01-11 10:27:23 UTC
(In reply to Oliver Kellogg from comment #1)
> Git commit 0459a7368321d69b8cb567142ad82601477575c1 by Oliver Kellogg.
> Committed on 11/01/2020 at 05:02.
> Pushed by okellogg into branch 'release/19.12'.
> 
> Fix broken file selection for PHP and SQL in code import wizard:

Just an info - you fixed the extensions in https://invent.kde.org/kde/umbrello/blob/0459a7368321d69b8cb567142ad82601477575c1/umbrello/codeimpwizard/codeimpselectpage.cpp#L332, which are a duplicate of Uml::ProgrammingLanguage::toExtensions(Enum item), see  https://invent.kde.org/kde/umbrello/blob/0459a7368321d69b8cb567142ad82601477575c1/umbrello/basictypes.cpp#L985
Comment 3 Oliver Kellogg 2020-01-11 13:07:40 UTC
Git commit 2a01d5346b7c118111105654fe560b049af64b77 by Oliver Kellogg.
Committed on 11/01/2020 at 13:07.
Pushed by okellogg into branch 'release/19.12'.

Followup to commit 0459a73 addresses comment #2 :

umbrello/basictypes.cpp
- In function toExtensions() handle all enum values.

umbrello/codeimpwizard/codeimpselectpage.cpp
- In function changeLanguage() use function
  Uml::ProgrammingLanguage::toExtensions().

M  +43   -12   umbrello/basictypes.cpp
M  +1    -62   umbrello/codeimpwizard/codeimpselectpage.cpp

https://invent.kde.org/kde/umbrello/commit/2a01d5346b7c118111105654fe560b049af64b77
Comment 4 Oliver Kellogg 2020-01-11 13:11:32 UTC
(In reply to Ralf Habacker from comment #2)
> Just an info - you fixed the extensions in
> https://invent.kde.org/kde/umbrello/blob/
> 0459a7368321d69b8cb567142ad82601477575c1/umbrello/codeimpwizard/
> codeimpselectpage.cpp#L332, which are a duplicate of
> Uml::ProgrammingLanguage::toExtensions(Enum item), see 
> https://invent.kde.org/kde/umbrello/blob/
> 0459a7368321d69b8cb567142ad82601477575c1/umbrello/basictypes.cpp#L985

Many thanks for noticing.