Skip to content
Permalink
Browse files

Remove redundant checks

  • Loading branch information
m-kuhn committed Jun 15, 2020
1 parent 2d96dd6 commit 6d836a7bb44206f386cf152ad3c527d64d665acd
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/gui/editorwidgets/qgsdatetimeedit.cpp
@@ -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
@@ -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 );

0 comments on commit 6d836a7

Please sign in to comment.
You can’t perform that action at this time.