Search function in the parts view does not work


#63

I’ll check that too.
For the next few days I won’t be able to work in this since it’s almost Christmas and, you know, I have other things to do :wink:

Merry Christmas!

Giovanni


#64

Hi all and happy new year.

Finally I’ve tracked down (is that correct english :sweat: ?) the issue, I think it could be merged into git.
first of all take a look at the following (closed) QT issue

https://bugreports.qt.io/browse/QTBUG-58632

even if the issue has been closed, you can clearly see that in some cases under windows there can be inconsistencies is the drive name to be upper/lowercase.

To “happily” solve the issue I’ve changed a coupèle of lines in folderutils.cpp from:

QString FolderUtils::getUserBinsPath() {
    QDir dir(getTopLevelDocumentsPath());
    return dir.absoluteFilePath("bins");
}

to

QString FolderUtils::getUserBinsPath() {
    QDir dir(getTopLevelDocumentsPath() + "/bins");
    return QFileInfo(dir, "").absoluteFilePath();
}

and it works!

Let me know if you agree and how to proceed.

Many thanks,
Giovanni Romeo


#65

I take it something about the order of the calls does the necessary changing the case of the drive letter so the compare works? An alternative would perhaps be to use the toupper() or tolower() calls before the compare to make the strings all the same case, but that may have other undesirable outcomes. You can always make a pull request on github because if this fixes the problem even some of the time that would be an improvement I expect, but I still wonder why more of us haven’t seen it.

Peter


#66

Hi,

An alternative would perhaps be to use the toupper() or tolower() calls before the compare to make the strings all the same case, but that may have other undesirable outcomes

yes, I’ve tried that, but strange things happened :smile:
The (most probable) reason why most people did not see the issue is perhaps the way the OS is configured or the way the application in installed/started (https://bugreports.qt.io/browse/QTBUG-58632?focusedCommentId=347449&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-347449).

Regarding the pull request, I cannot do it, I cannot even do a git push since I have no permission to do that. Do you know who can I ask to to be granted the permission to push?

Many thanks,
Giovanni


#67

To do a pull request you fork the Fritzing app repo on Github. Then you create a branch called something like “drive_case_sensitivity” and commit the change to that branch of your fork. Then you can go to github and click the “new pull request” button while in the Fritzing repo and select your new branch and the main fritzing repo and explain why you are creating it.


#68

done.

Thanks,
Giovanni