mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-03-21 12:39:59 +01:00
Remove several QT_VERSION_CHECK
Remove several QT_VERSION_CHECK related to Qt5 and Qt4.
This commit is contained in:
@@ -276,14 +276,7 @@ void ChangeZValueCommand::applyRaise(const QList<QGraphicsItem *> &items_list) {
|
||||
for (int i = my_items_list.count() - 2 ; i >= 0 ; -- i) {
|
||||
if (my_items_list[i] -> isSelected()) {
|
||||
if (!my_items_list[i +1] -> isSelected()) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove
|
||||
my_items_list.swap(i, i + 1);
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 5.13 or later")
|
||||
#endif
|
||||
my_items_list.swapItemsAt(i, i + 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -301,14 +294,7 @@ void ChangeZValueCommand::applyLower(const QList<QGraphicsItem *> &items_list) {
|
||||
for (int i = 1 ; i < my_items_list.count() ; ++ i) {
|
||||
if (my_items_list[i] -> isSelected()) {
|
||||
if (!my_items_list[i - 1] -> isSelected()) {
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) // ### Qt 6: remove
|
||||
my_items_list.swap(i, i - 1);
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 5.13 or later")
|
||||
#endif
|
||||
my_items_list.swapItemsAt(i, i - 1);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,14 +372,7 @@ ElementContent ElementView::pasteWithOffset(const QDomDocument &xml_document) {
|
||||
*/
|
||||
void ElementView::mousePressEvent(QMouseEvent* e)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
|
||||
if (e->button() == Qt::MidButton)
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 6 or later")
|
||||
#endif
|
||||
if (e->button() == Qt::MiddleButton)
|
||||
#endif
|
||||
{
|
||||
setCursor( (Qt::ClosedHandCursor));
|
||||
reference_view_ = e->pos();
|
||||
@@ -394,14 +387,7 @@ void ElementView::mousePressEvent(QMouseEvent* e)
|
||||
*/
|
||||
void ElementView::mouseMoveEvent(QMouseEvent* e)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
|
||||
if (e->buttons() == Qt::MidButton)
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 6 or later")
|
||||
#endif
|
||||
if (e->buttons() == Qt::MiddleButton)
|
||||
#endif
|
||||
{
|
||||
QScrollBar *h = horizontalScrollBar();
|
||||
QScrollBar *v = verticalScrollBar();
|
||||
@@ -420,14 +406,7 @@ void ElementView::mouseMoveEvent(QMouseEvent* e)
|
||||
*/
|
||||
void ElementView::mouseReleaseEvent(QMouseEvent* e)
|
||||
{
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 1) // ### Qt 6: remove
|
||||
if (e->button() == Qt::MidButton)
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 6 or later")
|
||||
#endif
|
||||
if (e->button() == Qt::MiddleButton)
|
||||
#endif
|
||||
{
|
||||
setCursor(Qt::ArrowCursor);
|
||||
adjustSceneRect();
|
||||
|
||||
@@ -519,14 +519,7 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde)
|
||||
resetStyles();
|
||||
|
||||
//Get the list of pair style/value
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) // ### Qt 6: remove
|
||||
QStringList styles = qde.attribute("style").split(";", QString::SkipEmptyParts);
|
||||
#else
|
||||
#if TODO_LIST
|
||||
#pragma message("@TODO remove code for QT 5.14 or later")
|
||||
#endif
|
||||
QStringList styles = qde.attribute("style").split(";", Qt::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
//Check each pair of style
|
||||
QRegularExpression rx("^\\s*([a-z-]+)\\s*:\\s*([a-zA-Z-]+)\\s*$");
|
||||
|
||||
@@ -267,11 +267,9 @@ void ElementPropertiesEditorWidget::on_m_base_type_cb_currentIndexChanged(int in
|
||||
ui->m_master_gb->setVisible(master);
|
||||
ui->m_terminal_gb->setVisible(terminal);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
|
||||
ui->tabWidget->setTabVisible(1,
|
||||
(type_ == ElementData::Simple ||
|
||||
type_ == ElementData::Master));
|
||||
#endif
|
||||
|
||||
updateTree();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user