Skip to content

Commit ca83f56

Browse files
authored
Fix #13970 cfg/qt.cfg - add definition for QDate::isValid() (danmar#7630)
Add the bool isValid() signature. bool isValid(int, int, int) is already there.
1 parent 61252d8 commit ca83f56

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cfg/qt.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2737,6 +2737,7 @@
27372737
<arg nr="1" direction="in" default=""/>
27382738
<arg nr="2" direction="in" default=""/>
27392739
<arg nr="3" direction="in" default=""/>
2740+
<const/>
27402741
</function>
27412742
<!-- int QDate::month() const -->
27422743
<function name="QDate::month">

test/cfg/qt.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,3 +847,10 @@ namespace {
847847
// cppcheck-suppress functionStatic
848848
void TestUnusedFunction::doStuff() {} // Should not warn here with unusedFunction
849849
}
850+
851+
int qdateIsValid()
852+
{
853+
QDate qd(1,1,2025);
854+
Q_ASSERT(qd.isValid()); // Should not warn here with assertWithSideEffect
855+
return qd.month();
856+
}

0 commit comments

Comments
 (0)