<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Can you elaborate on the reasons that prevent any change of that kind in<br>
QDate? Maybe they can be worked around?<br>
<br></blockquote><div><br></div><div>According to <a href="https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B#The_Do.27s_and_Don.27ts">https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B#The_Do.27s_and_Don.27ts</a> Adding a member to struct or class is not possible without breaking ABI. On the other hand <a href="https://wiki.qt.io/Qt-Version-Compatibility">https://wiki.qt.io/Qt-Version-Compatibility</a> suggests that Qt minor releases are backwards binary and source compatible. So there is no chance of touching QDate in Qt5 series.</div><div><br></div><div>I'm working on a solution to provide calendar functionality without breaking ABI, while considering possibilities for Qt6 (keep minimum effort for converting current, temporary solution to futures Qt6 one). This may fail of course, There are too many details that need to be discussed. How we are supposed to change underlying calendar without adding information to QDate? Can we add arguments to all methods with a default value? Something like:</div><div><br></div><div><br></div><div>    QDate d;</div><div>    qDebug() << d.year();               // prints 2016</div><div>    qDebug() << d.year(QCalendar::Jalali); // prints 1395<br></div><div><br></div><div>And then force relevant widgets/views to show/edit date and time on a specific calendar system:</div><div><br></div><div>    QDateEdit de;</div><div>    de.setDate(d);</div><div>    de.setCalendarSystem(QCalendar::Hebrew); // Is this possible?</div><div><br></div></div></div></div>