mirror of
https://github.com/python-LimeReport/LimeReport.git
synced 2025-10-01 11:40:02 +03:00
Fixed some deprecation warnings
This commit is contained in:
@@ -56,7 +56,12 @@ ComboBoxEditor::ComboBoxEditor(QWidget *parent, bool clearable) :
|
||||
connect(m_buttonClear,SIGNAL(clicked()),this,SLOT(slotClearButtonClicked()));
|
||||
}
|
||||
|
||||
connect(m_comboBox,SIGNAL(currentIndexChanged(QString)),this,SLOT(slotCurrentIndexChanged(QString)));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
|
||||
connect(m_comboBox, SIGNAL(currentTextChanged(QString)), this, SLOT(slotCurrentIndexChanged(QString)));
|
||||
#else
|
||||
connect(m_comboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotCurrentIndexChanged(QString)));
|
||||
#endif
|
||||
|
||||
m_comboBox->installEventFilter(this);
|
||||
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||
layout->addWidget(m_comboBox);
|
||||
|
@@ -85,6 +85,17 @@ LimeReport::RectPropItem::RectPropItem(QObject *object, ObjectsList* objects, co
|
||||
|
||||
QString LimeReport::RectPropItem::displayValue() const
|
||||
{
|
||||
//TODO: Migrate to QMetaType
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
switch(propertyValue().typeId()){
|
||||
case QMetaType::QRect:
|
||||
return rectToString(propertyValue().toRect());
|
||||
case QMetaType::QRectF:
|
||||
return rectToString(propertyValue().toRect());
|
||||
default :
|
||||
return ObjectPropItem::displayValue();
|
||||
}
|
||||
#else
|
||||
switch(propertyValue().type()){
|
||||
case QVariant::Rect:
|
||||
return rectToString(propertyValue().toRect());
|
||||
@@ -93,6 +104,7 @@ QString LimeReport::RectPropItem::displayValue() const
|
||||
default :
|
||||
return ObjectPropItem::displayValue();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
LimeReport::RectUnitPropItem::RectUnitPropItem(QObject *object, ObjectsList* objects, const QString &name, const QString &displayName, const QVariant &value, ObjectPropItem *parent, bool /*readonly*/):
|
||||
|
Reference in New Issue
Block a user