diff --git a/src/libs/advanceddockingsystem/elidinglabel.cpp b/src/libs/advanceddockingsystem/elidinglabel.cpp index 47ada904610..f5c02502f76 100644 --- a/src/libs/advanceddockingsystem/elidinglabel.cpp +++ b/src/libs/advanceddockingsystem/elidinglabel.cpp @@ -151,11 +151,7 @@ namespace ADS { return QLabel::minimumSizeHint(); const QFontMetrics &fm = fontMetrics(); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) QSize size(fm.horizontalAdvance(d->m_text.left(2) + "…"), fm.height()); -#else - QSize size(fm.width(d->m_text.left(2) + "…"), fm.height()); -#endif return size; } @@ -165,11 +161,7 @@ namespace ADS { return QLabel::sizeHint(); const QFontMetrics &fm = fontMetrics(); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) QSize size(fm.horizontalAdvance(d->m_text), QLabel::sizeHint().height()); -#else - QSize size(fm.width(d->m_text), QLabel::sizeHint().height()); -#endif return size; } diff --git a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp index d0b8766c7b2..59575ab20ad 100644 --- a/src/libs/advanceddockingsystem/floatingdockcontainer.cpp +++ b/src/libs/advanceddockingsystem/floatingdockcontainer.cpp @@ -878,13 +878,8 @@ bool FloatingDockContainer::event(QEvent *event) // is clicked. // It is really great to work around the whole NonClientMouseArea // bugs -#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 2)) if (event->type() == QEvent::NonClientAreaMouseButtonPress /*&& QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)*/) -#else - if (event->type() == QEvent::NonClientAreaMouseButtonPress - && QGuiApplication::mouseButtons().testFlag(Qt::LeftButton)) -#endif { qCInfo(adsLog) << Q_FUNC_INFO << "QEvent::NonClientAreaMouseButtonPress" << event->type(); diff --git a/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp b/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp index 91886cf49ed..711b71a4572 100644 --- a/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp +++ b/src/libs/modelinglib/qmt/infrastructure/geometryutilities.cpp @@ -64,11 +64,7 @@ bool GeometryUtilities::intersect(const QPolygonF &polygon, const QLineF &line, for (int i = 0; i <= polygon.size() - 2; ++i) { QLineF polygonLine(polygon.at(i), polygon.at(i+1)); QPointF point; -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QLineF::IntersectType intersectionType = polygonLine.intersect(line, &point); -#else QLineF::IntersectType intersectionType = polygonLine.intersects(line, &point); -#endif if (intersectionType == QLineF::BoundedIntersection) { qreal dist = QLineF(point, nearestPoint <= 0 ? line.p1() : line.p2()).length(); if (!found || dist < mindist) { @@ -102,11 +98,7 @@ bool GeometryUtilities::intersect(const QList &polygons, const QLineF for (int i = 0; i <= polygon.size() - 2; ++i) { const QLineF polygonLine(polygon.at(i), polygon.at(i + 1)); QPointF point; -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QLineF::IntersectType intersectionType = polygonLine.intersect(line, &point); -#else QLineF::IntersectType intersectionType = polygonLine.intersects(line, &point); -#endif if (intersectionType == QLineF::BoundedIntersection) { qreal dist = QLineF(point, nearestPoint <= 0 ? line.p1() : line.p2()).length(); if (!found || dist < mindist) { diff --git a/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp b/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp index fbb0f2520db..199422cb316 100644 --- a/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp +++ b/src/libs/modelinglib/qmt/model_widgets_ui/propertiesviewmview.cpp @@ -352,13 +352,8 @@ void PropertiesView::MView::visitMElement(const MElement *element) m_stereotypeComboBox->addItems(m_propertiesView->stereotypeController()->knownStereotypes(m_stereotypeElement)); connect(m_stereotypeComboBox->lineEdit(), &QLineEdit::textEdited, this, &PropertiesView::MView::onStereotypesChanged); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - connect(m_stereotypeComboBox, QOverload::of(&QComboBox::activated), - this, &PropertiesView::MView::onStereotypesChanged); -#else connect(m_stereotypeComboBox, &QComboBox::textActivated, this, &PropertiesView::MView::onStereotypesChanged); -#endif } if (!m_stereotypeComboBox->hasFocus()) { QList stereotypeList; diff --git a/src/libs/tracing/timelinerenderer.cpp b/src/libs/tracing/timelinerenderer.cpp index 2abd234e01a..195e08edc9b 100644 --- a/src/libs/tracing/timelinerenderer.cpp +++ b/src/libs/tracing/timelinerenderer.cpp @@ -209,13 +209,8 @@ void TimelineRenderer::wheelEvent(QWheelEvent *event) int degrees = (event->angleDelta().x() + event->angleDelta().y()) / 8; const qint64 circle = 360; -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - qint64 mouseTime = event->pos().x() * zoom->windowDuration() / width() + - zoom->windowStart(); -#else qint64 mouseTime = event->position().toPoint().x() * zoom->windowDuration() / width() + zoom->windowStart(); -#endif qint64 beforeMouse = (mouseTime - zoom->rangeStart()) * (circle - degrees) / circle; qint64 afterMouse = (zoom->rangeEnd() - mouseTime) * (circle - degrees) / circle; diff --git a/src/libs/utils/algorithm.h b/src/libs/utils/algorithm.h index 772c6b1c918..62bcace8ef9 100644 --- a/src/libs/utils/algorithm.h +++ b/src/libs/utils/algorithm.h @@ -1283,37 +1283,21 @@ OutputIterator set_union(InputIterator1 first1, template QSet toSet(const QList &list) { -#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) - return list.toSet(); -#else return QSet(list.begin(), list.end()); -#endif } #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) template QSet toSet(const QVector &vec) { -#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) - QSet result; - for (const T &p : vec) { - result.insert(p); - } - return result; -#else return QSet(vec.begin(), vec.end()); -#endif } #endif template QList toList(const QSet &set) { -#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) - return set.toList(); -#else return QList(set.begin(), set.end()); -#endif } template diff --git a/src/libs/utils/porting.h b/src/libs/utils/porting.h index 1b5fa07be89..f8d945a0c41 100644 --- a/src/libs/utils/porting.h +++ b/src/libs/utils/porting.h @@ -35,6 +35,7 @@ namespace Utils { #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) +// Keep the support code for lower Qt versions for sdktool constexpr QString::SplitBehavior SkipEmptyParts = QString::SkipEmptyParts; #else constexpr Qt::SplitBehaviorFlags SkipEmptyParts = Qt::SkipEmptyParts; diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index d04dd5e5699..8cab624ca38 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -94,9 +94,6 @@ GeneralSettingsWidget::GeneralSettingsWidget(GeneralSettings *q) tr("Show keyboard shortcuts in context menus (default: %1)") .arg(q->m_defaultShowShortcutsInContextMenu ? tr("on") : tr("off"))); m_ui.showShortcutsInContextMenus->setChecked(GeneralSettings::showShortcutsInContextMenu()); -#if (QT_VERSION < QT_VERSION_CHECK(5, 13, 0)) - m_ui.showShortcutsInContextMenus->setVisible(false); -#endif if (Utils::HostOsInfo::isMacHost()) { m_ui.dpiCheckbox->setVisible(false); @@ -250,9 +247,7 @@ void GeneralSettings::setShowShortcutsInContextMenu(bool show) ICore::settings()->setValueWithDefault(settingsKeyShortcutsInContextMenu, show, m_defaultShowShortcutsInContextMenu); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)) QGuiApplication::styleHints()->setShowShortcutsInContextMenus(show); -#endif } GeneralSettings::GeneralSettings() diff --git a/src/plugins/coreplugin/jsexpander.cpp b/src/plugins/coreplugin/jsexpander.cpp index 22a45626851..25411ca5093 100644 --- a/src/plugins/coreplugin/jsexpander.cpp +++ b/src/plugins/coreplugin/jsexpander.cpp @@ -36,20 +36,6 @@ #include -#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) -namespace std { -template<> struct hash -{ - using argument_type = QString; - using result_type = size_t; - result_type operator()(const argument_type &v) const - { - return hash()(v.toStdString()); - } -}; -} // namespace std -#endif - using ExtensionMap = std::unordered_map; Q_GLOBAL_STATIC(ExtensionMap, globalJsExtensions); diff --git a/src/plugins/help/localhelpmanager.cpp b/src/plugins/help/localhelpmanager.cpp index 4615e9716e6..49d09d28855 100644 --- a/src/plugins/help/localhelpmanager.cpp +++ b/src/plugins/help/localhelpmanager.cpp @@ -33,10 +33,8 @@ #ifdef QTC_WEBENGINE_HELPVIEWER #include "webenginehelpviewer.h" -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) #include #endif -#endif #ifdef QTC_LITEHTML_HELPVIEWER #include "litehtmlhelpviewer.h" #endif diff --git a/src/plugins/help/webenginehelpviewer.cpp b/src/plugins/help/webenginehelpviewer.cpp index 32c780113c3..65d80c4d30c 100644 --- a/src/plugins/help/webenginehelpviewer.cpp +++ b/src/plugins/help/webenginehelpviewer.cpp @@ -152,11 +152,7 @@ WebEngineHelpViewer::WebEngineHelpViewer(QWidget *parent) : QTC_ASSERT(viewProfile, return); if (!viewProfile->urlSchemeHandler("qthelp")) viewProfile->installUrlSchemeHandler("qthelp", helpUrlSchemeHandler()); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)) viewProfile->setUrlRequestInterceptor(helpurlRequestInterceptor()); -#else - viewProfile->setRequestInterceptor(helpurlRequestInterceptor()); -#endif } void WebEngineHelpViewer::setViewerFont(const QFont &font) diff --git a/src/plugins/modeleditor/editordiagramview.cpp b/src/plugins/modeleditor/editordiagramview.cpp index f2c074b25cd..7b25a964ff5 100644 --- a/src/plugins/modeleditor/editordiagramview.cpp +++ b/src/plugins/modeleditor/editordiagramview.cpp @@ -72,11 +72,7 @@ void EditorDiagramView::wheelEvent(QWheelEvent *wheelEvent) { if (wheelEvent->modifiers() == Qt::ControlModifier) { int degree = wheelEvent->angleDelta().y() / 8; -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QPoint zoomOrigin = wheelEvent->pos(); -#else QPoint zoomOrigin = wheelEvent->position().toPoint(); -#endif if (degree > 0) emit zoomIn(zoomOrigin); else if (degree < 0) diff --git a/src/plugins/projectexplorer/buildsteplist.cpp b/src/plugins/projectexplorer/buildsteplist.cpp index 759deeceadc..0a60422dbb1 100644 --- a/src/plugins/projectexplorer/buildsteplist.cpp +++ b/src/plugins/projectexplorer/buildsteplist.cpp @@ -192,11 +192,7 @@ bool BuildStepList::removeStep(int position) void BuildStepList::moveStepUp(int position) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) m_steps.swapItemsAt(position - 1, position); -#else - m_steps.swap(position - 1, position); -#endif emit stepMoved(position, position - 1); } diff --git a/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp b/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp index 1c1eba4944e..4d6cdf216f9 100644 --- a/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp +++ b/src/plugins/qmldesigner/components/componentcore/changestyleaction.cpp @@ -91,11 +91,7 @@ QWidget *ChangeStyleWidgetAction::createWidget(QWidget *parent) }); connect(comboBox, - #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QOverload::of(&QComboBox::activated), - #else &QComboBox::textActivated, - #endif this, [this](const QString &style) { diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.cpp b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.cpp index fbead98717d..6afa715f4df 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.cpp @@ -167,12 +167,7 @@ QString GradientPresetItem::getNameByPreset(Preset value) QGradient GradientPresetItem::createGradientFromPreset(Preset value) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) return QGradient(value); -#else - Q_UNUSED(value) - return {}; -#endif } QDebug &operator<<(QDebug &stream, const GradientPresetItem &gradient) diff --git a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h index cec45bb4af0..ba5f2903e51 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h +++ b/src/plugins/qmldesigner/components/propertyeditor/gradientpresetitem.h @@ -39,17 +39,8 @@ class GradientPresetItem Q_PROPERTY(int presetID READ presetID FINAL) public: -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) using Preset = QGradient::Preset; -#else - enum Preset {}; -#endif - -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) static const int numPresets = Preset::NumPresets; -#else - static const int numPresets = 181; -#endif explicit GradientPresetItem(); explicit GradientPresetItem(const QGradient &value, const QString &name = QString()); diff --git a/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp b/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp index c58bed2995a..9690ea1c68f 100644 --- a/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp +++ b/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp @@ -579,11 +579,7 @@ void RichTextEditor::setupTableActions() tableFormat.setCellSpacing(2.0); tableFormat.setCellPadding(2.0); tableFormat.setBorder(1.0); - -#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) tableFormat.setBorderCollapse(true); -#endif - cursor.insertTable(1, 1, tableFormat); //move cursor into the first cell of the table: diff --git a/src/plugins/qmldesigner/components/timelineeditor/timelinecontrols.cpp b/src/plugins/qmldesigner/components/timelineeditor/timelinecontrols.cpp index 21f5af9eff4..185b12ea422 100644 --- a/src/plugins/qmldesigner/components/timelineeditor/timelinecontrols.cpp +++ b/src/plugins/qmldesigner/components/timelineeditor/timelinecontrols.cpp @@ -56,9 +56,7 @@ FloatControl::FloatControl() setValue(0.0); setButtonSymbols(QAbstractSpinBox::NoButtons); setFrame(false); -#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0) setStepType(QAbstractSpinBox::AdaptiveDecimalStepType); -#endif setMinimum(std::numeric_limits::lowest()); setMaximum(std::numeric_limits::max()); diff --git a/src/plugins/qmldesigner/designermcumanager.cpp b/src/plugins/qmldesigner/designermcumanager.cpp index d173ab6766c..45bdde3b510 100644 --- a/src/plugins/qmldesigner/designermcumanager.cpp +++ b/src/plugins/qmldesigner/designermcumanager.cpp @@ -186,22 +186,12 @@ void DesignerMcuManager::readVersionData(const DesignerMcuManager::Version &vers //handling banned properties: const QStringList bannedProperties = readPropertyList("bannedProperties", child); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) m_bannedProperties.unite(QSet(bannedProperties.begin(), bannedProperties.end())); -#elif - m_bannedProperties.unite(QSet::fromList(bannedProperties)); -#endif - } const QList bannedItems = readPropertyList("bannedItems", versionData); -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) - m_bannedItems = QSet(bannedItems.begin(), bannedItems.end()); -#elif - m_bannedItems = QSet::fromList(bannedItems); -#endif - + m_bannedItems = QSet(bannedItems.begin(), bannedItems.end()); m_allowedImports = readPropertyList("allowedImports", versionData); m_bannedImports = readPropertyList("bannedImports", versionData); m_currentVersion = version; diff --git a/src/plugins/qmldesigner/designersettings.cpp b/src/plugins/qmldesigner/designersettings.cpp index ed12230ff93..a08f5cae62f 100644 --- a/src/plugins/qmldesigner/designersettings.cpp +++ b/src/plugins/qmldesigner/designersettings.cpp @@ -76,13 +76,7 @@ void DesignerSettings::fromSettings(QSettings *settings) restoreValue(settings, DesignerSettingsKey::NAVIGATOR_SHOW_ONLY_VISIBLE_ITEMS, true); restoreValue(settings, DesignerSettingsKey::NAVIGATOR_REVERSE_ITEM_ORDER, false); restoreValue(settings, DesignerSettingsKey::STANDALONE_MODE, false); - restoreValue(settings, DesignerSettingsKey::ENABLE_TIMELINEVIEW, -#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0)) - false -#else - true -#endif - ); + restoreValue(settings, DesignerSettingsKey::ENABLE_TIMELINEVIEW, true); restoreValue(settings, DesignerSettingsKey::SIMPLE_COLOR_PALETTE_CONTENT, QStringList()); restoreValue(settings, DesignerSettingsKey::ALWAYS_DESIGN_MODE, true); restoreValue(settings, DesignerSettingsKey::DISABLE_ITEM_LIBRARY_UPDATE_TIMER, true); diff --git a/src/plugins/scxmleditor/common/navigatorgraphicsview.cpp b/src/plugins/scxmleditor/common/navigatorgraphicsview.cpp index e49aaaefca6..654d6695d94 100644 --- a/src/plugins/scxmleditor/common/navigatorgraphicsview.cpp +++ b/src/plugins/scxmleditor/common/navigatorgraphicsview.cpp @@ -80,11 +80,7 @@ void NavigatorGraphicsView::wheelEvent(QWheelEvent *event) else emit zoomOut(); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - emit moveMainViewTo(mapToScene(event->pos())); -#else emit moveMainViewTo(mapToScene(event->position().toPoint())); -#endif } else QGraphicsView::wheelEvent(event); } diff --git a/src/plugins/scxmleditor/plugin_interface/sceneutils.cpp b/src/plugins/scxmleditor/plugin_interface/sceneutils.cpp index d90dbabe951..97fd56c7f6e 100644 --- a/src/plugins/scxmleditor/plugin_interface/sceneutils.cpp +++ b/src/plugins/scxmleditor/plugin_interface/sceneutils.cpp @@ -225,11 +225,7 @@ void layout(const QList &items) firstItem = initialItem->outputTransitions().constFirst()->connectedItem(initialItem); int index = childItems.indexOf(firstItem); if (index > 0) -#if QT_VERSION < QT_VERSION_CHECK(5, 13, 0) - childItems.swap(index, 0); -#else childItems.swapItemsAt(index, 0); -#endif } // Search final-item diff --git a/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp b/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp index 307af62f6f9..84c3d66683d 100644 --- a/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp +++ b/src/plugins/scxmleditor/plugin_interface/transitionitem.cpp @@ -306,19 +306,11 @@ void TransitionItem::mousePressEvent(QGraphicsSceneMouseEvent *event) QPointF intersPoint; QLineF line2(p, p + QPointF(SELECTION_DISTANCE, SELECTION_DISTANCE)); line2.setAngle(line.angle() + 90); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - if (line.intersect(line2, &intersPoint) == QLineF::BoundedIntersection) -#else - if (line.intersects(line2, &intersPoint) == QLineF::BoundedIntersection) -#endif + if (line.intersects(line2, &intersPoint) == QLineF::BoundedIntersection) { sel = true; - else { + } else { line2.setAngle(line.angle() - 90); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - sel = line.intersect(line2, &intersPoint) == QLineF::BoundedIntersection; -#else sel = line.intersects(line2, &intersPoint) == QLineF::BoundedIntersection; -#endif } if (sel) @@ -805,11 +797,7 @@ QPointF TransitionItem::findIntersectionPoint(ConnectableItem *item, const QLine for (int i = 1; i < itemPolygon.count(); ++i) { p2 = itemPolygon.at(i) + item->scenePos(); checkLine = QLineF(p1, p2); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - if (checkLine.intersect(line, &intersectPoint) == QLineF::BoundedIntersection) -#else if (checkLine.intersects(line, &intersectPoint) == QLineF::BoundedIntersection) -#endif return intersectPoint; p1 = p2; } @@ -1096,19 +1084,11 @@ bool TransitionItem::containsScenePoint(const QPointF &p) const QPointF intersPoint; QLineF line2(pp, pp + QPointF(SELECTION_DISTANCE, SELECTION_DISTANCE)); line2.setAngle(line.angle() + 90); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - if (line.intersect(line2, &intersPoint) == QLineF::BoundedIntersection) { -#else if (line.intersects(line2, &intersPoint) == QLineF::BoundedIntersection) { -#endif return true; } else { line2.setAngle(line.angle() - 90); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - if (line.intersect(line2, &intersPoint) == QLineF::BoundedIntersection) -#else if (line.intersects(line2, &intersPoint) == QLineF::BoundedIntersection) -#endif return true; } } diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index 8b4d0bd8529..520305d1aa2 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -1214,11 +1214,7 @@ void TextEditorWidgetPrivate::print(QPrinter *printer) QAbstractTextDocumentLayout *layout = doc->documentLayout(); layout->setPaintDevice(p.device()); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - int dpiy = p.device()->logicalDpiY(); -#else int dpiy = qRound(QGuiApplication::primaryScreen()->logicalDotsPerInchY()); -#endif int margin = int((2/2.54)*dpiy); // 2 cm margins QTextFrameFormat fmt = doc->rootFrame()->frameFormat(); diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index dd528efa71c..95fb9612f15 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -4709,7 +4709,6 @@ void tst_TestCore::testImplicitComponents() void tst_TestCore::testRevisionedProperties() { -#if QT_VERSION > QT_VERSION_CHECK(5, 11, 0) const char* qmlString = "import QtQuick 2.12\n" "import QtQuick.Controls 2.0\n" @@ -4761,8 +4760,6 @@ void tst_TestCore::testRevisionedProperties() QVERIFY(metaInfo12.hasProperty("orientation")); QVERIFY(metaInfoU.hasProperty("orientation")); - -#endif } void tst_TestCore::testStatesRewriter()