Skip to content
Permalink
Browse files
Update constructor of QDateTimeEdit
  • Loading branch information
nyalldawson committed Jul 20, 2021
1 parent 8e508c2 commit 1621594e51115bc33c61edc9bc1cafca8b1aa244
Showing with 21 additions and 0 deletions.
  1. +17 −0 src/gui/editorwidgets/qgsdatetimeedit.cpp
  2. +4 −0 src/gui/editorwidgets/qgsdatetimeedit.h
@@ -29,14 +29,23 @@


QgsDateTimeEdit::QgsDateTimeEdit( QWidget *parent )
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
: QgsDateTimeEdit( QDateTime(), QVariant::DateTime, parent )
#else
: QgsDateTimeEdit( QDateTime(), QMetaType::QDateTime, parent )
#endif
{

}

///@cond PRIVATE
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QgsDateTimeEdit::QgsDateTimeEdit( const QVariant &var, QVariant::Type parserType, QWidget *parent )
: QDateTimeEdit( var, parserType, parent )
#else
QgsDateTimeEdit::QgsDateTimeEdit( const QVariant & var, QMetaType::Type parserType, QWidget * parent )
: QDateTimeEdit( var, parserType, parent )
#endif
, mNullRepresentation( QgsApplication::nullRepresentation() )
{
QIcon clearIcon = QgsApplication::getThemeIcon( "/mIconClearText.svg" );
@@ -369,7 +378,11 @@ QDate QgsDateTimeEdit::date() const
//

QgsTimeEdit::QgsTimeEdit( QWidget *parent )
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
: QgsDateTimeEdit( QTime(), QVariant::Time, parent )
#else
: QgsDateTimeEdit( QTime(), QMetaType::QTime, parent )
#endif
{

}
@@ -406,7 +419,11 @@ void QgsTimeEdit::emitValueChanged( const QVariant &value )
//

QgsDateEdit::QgsDateEdit( QWidget *parent )
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
: QgsDateTimeEdit( QDate(), QVariant::Date, parent )
#else
: QgsDateTimeEdit( QDate(), QMetaType::QDate, parent )
#endif
{

}
@@ -132,7 +132,11 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit

#ifndef SIP_RUN
///@cond PRIVATE
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QgsDateTimeEdit( const QVariant &var, QVariant::Type parserType, QWidget *parent );
#else
QgsDateTimeEdit( const QVariant &var, QMetaType::Type parserType, QWidget *parent );
#endif
///@endcond
#endif

0 comments on commit 1621594

Please sign in to comment.