Skip to content

Commit

Permalink
Remove redundant checks
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 15, 2020
1 parent 2d96dd6 commit 6d836a7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/gui/editorwidgets/qgsdatetimeedit.cpp
Expand Up @@ -62,11 +62,7 @@ void QgsDateTimeEdit::clear()
{
displayCurrentDate();

// Check if it's really changed or crash, see GH #29937
if ( ! dateTime().isNull() )
{
changed( QDateTime() );
}
changed( QDateTime() );

// emit signal of QDateTime::dateTimeChanged with an invalid date
// anyway, using parent's signal should be avoided
Expand Down Expand Up @@ -279,8 +275,7 @@ void QgsDateTimeEdit::setDateTime( const QDateTime &dateTime )
clear();
displayNull();
}
// Check if it's really changed or crash, see GH #29937
else if ( dateTime != QgsDateTimeEdit::dateTime() )
else
{
QDateTimeEdit::setDateTime( dateTime );
changed( dateTime );
Expand Down

0 comments on commit 6d836a7

Please sign in to comment.