Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #12699 QDir functions missing from qt.cfg #6374

Closed
wants to merge 2 commits into from

Conversation

chrchr-github
Copy link
Collaborator

Co-authored-by: Dominik Strasser [email protected]

chrchr-github and others added 2 commits May 2, 2024 17:12
Co-authored-by: Dominik Strasser <[email protected]>
@firewave
Copy link
Collaborator

firewave commented May 2, 2024

Having an unknown mail address is probably not good. So maybe we should not use that field.

<not-bool/>
</arg>
</function>
<!-- bool QDir::path() const -->
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this comment wrong it says that QDir::path returns bool?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest <use-retval/>

@dommldomml
Copy link

Yes, the comment is a copy-paste error. The failing regressions come from the fact that I fixed the function name of QDir::exists which used to be only "QDir".

@chrchr-github
Copy link
Collaborator Author

Yes, the comment is a copy-paste error. The failing regressions come from the fact that I fixed the function name of QDir::exists which used to be only "QDir".

Do you want to take this over?

@dommldomml
Copy link

dommldomml commented May 7, 2024

I can try. What I do not understand is the errors we are seeing. Maybe I have not yet understood the library config.
We now have in qt.cfg:

false

This - according to my understanding - specifies the two functions from the comments as they are like one function with a default parameter.

The regression tests fail with:
Checking /home/runner/work/cppcheck/cppcheck/test/cfg/qt.cpp ...
/home/runner/work/cppcheck/cppcheck/test/cfg/qt.cpp:584:16: information: --check-library: There is no matching configuration for function QFile::exists() [checkLibraryFunction]
if (QFile::exists("test")) {}
^
/home/runner/work/cppcheck/cppcheck/test/cfg/qt.cpp:622:12: information: --check-library: There is no matching configuration for function QFile::exists() [checkLibraryFunction]
QFile::exists("test");
^
/home/runner/work/cppcheck/cppcheck/test/cfg/qt.cpp:625:11: information: --check-library: There is no matching configuration for function QFile::exists() [checkLibraryFunction]
file1.exists();
^
/home/runner/work/cppcheck/cppcheck/test/cfg/qt.cpp:622:0: information: Unmatched suppression: ignoredReturnValue [unmatchedSuppression]
QFile::exists("test");
^
/home/runner/work/cppcheck/cppcheck/test/cfg/qt.cpp:625:0: information: Unmatched suppression: ignoredReturnValue [unmatchedSuppression]
file1.exists();
^

why are the function calls not regarded as matched ? And why is the use-retval ignored ? It is almost as if the whole entry is ignored whereas it seems to have worked before when the entry was bogus as it had

instead of

Ah, now I see it. The regressions are about QFile::exists

@chrchr-github
Copy link
Collaborator Author

I think we now have only QDir::exists() instead of both QFile::exists() and QDir::exists().

@dommldomml
Copy link

My bad. I misread it. I'll provide a new qt.cfg + qt.cpp

@chrchr-github
Copy link
Collaborator Author

My bad. I misread it. I'll provide a new qt.cfg + qt.cpp

Please feel free to open your own PR.

@chrchr-github chrchr-github deleted the chr_qdir branch May 16, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants