aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/welcome/welcomeplugin.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2016-08-03 22:54:19 +0300
committerOrgad Shaneh <orgads@gmail.com>2016-08-12 13:29:58 +0000
commita6c17fc5371451b792a709ca142d28b16d3e610f (patch)
tree442c8957f3e9b8b9bf816f0c8bcee2dd48c61fb0 /src/plugins/welcome/welcomeplugin.cpp
parent991498845ad3cc32dbbcc1396656c0c9262581ac (diff)
Remove all QT_VERSION_CHECK
We only support Qt 5.6 now. Change-Id: If94864400545b057623e3af0743c55ea1e84e33b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/welcome/welcomeplugin.cpp')
-rw-r--r--src/plugins/welcome/welcomeplugin.cpp32
1 files changed, 6 insertions, 26 deletions
diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp
index 76d50f4689..ac3d3a01fa 100644
--- a/src/plugins/welcome/welcomeplugin.cpp
+++ b/src/plugins/welcome/welcomeplugin.cpp
@@ -53,13 +53,7 @@
#include <QQmlPropertyMap>
#include <QQuickImageProvider>
-#ifdef USE_QUICK_WIDGET
- #include <QtQuickWidgets/QQuickWidget>
- typedef QQuickWidget QuickContainer;
-#else
- #include <QtQuick/QQuickView>
- typedef QQuickView QuickContainer;
-#endif
+#include <QtQuickWidgets/QQuickWidget>
#include <QtQml/QQmlContext>
#include <QtQml/QQmlEngine>
@@ -168,7 +162,7 @@ private:
void addKeyboardShortcuts();
QWidget *m_modeWidget;
- QuickContainer *m_welcomePage;
+ QQuickWidget *m_welcomePage;
QMap<Id, IWelcomePage *> m_idPageMap;
QList<IWelcomePage *> m_pluginList;
int m_activePlugin;
@@ -202,28 +196,21 @@ WelcomeMode::WelcomeMode()
layout->setMargin(0);
layout->setSpacing(0);
- m_welcomePage = new QuickContainer();
+ m_welcomePage = new QQuickWidget;
applyTheme(); // initialize background color and theme properties
- m_welcomePage->setResizeMode(QuickContainer::SizeRootObjectToView);
+ m_welcomePage->setResizeMode(QQuickWidget::SizeRootObjectToView);
m_welcomePage->setObjectName(QLatin1String("WelcomePage"));
- connect(m_welcomePage, &QuickContainer::sceneGraphError,
+ connect(m_welcomePage, &QQuickWidget::sceneGraphError,
this, &WelcomeMode::sceneGraphError);
StyledBar *styledBar = new StyledBar(m_modeWidget);
styledBar->setObjectName(QLatin1String("WelcomePageStyledBar"));
layout->addWidget(styledBar);
-#ifdef USE_QUICK_WIDGET
m_welcomePage->setParent(m_modeWidget);
layout->addWidget(m_welcomePage);
-#else
- QWidget *container = QWidget::createWindowContainer(m_welcomePage, m_modeWidget);
- container->setProperty("nativeAncestors", true);
- m_modeWidget->setLayout(layout);
- layout->addWidget(container);
-#endif // USE_QUICK_WIDGET
addKeyboardShortcuts();
@@ -307,15 +294,8 @@ void WelcomeMode::facilitateQml(QQmlEngine *engine)
QQmlContext *ctx = engine->rootContext();
ctx->setContextProperty(QLatin1String("welcomeMode"), this);
-
ctx->setContextProperty(QLatin1String("creatorTheme"), &m_themeProperties);
-
-#if defined(USE_QUICK_WIDGET) && (QT_VERSION < QT_VERSION_CHECK(5, 5, 0))
- bool useNativeText = !HostOsInfo::isMacHost();
-#else
- bool useNativeText = true;
-#endif
- ctx->setContextProperty(QLatin1String("useNativeText"), useNativeText);
+ ctx->setContextProperty(QLatin1String("useNativeText"), true);
}
void WelcomeMode::initPlugins()