forked from qt-creator/qt-creator
WelcomeScreen: Remove unneeded QQmlNetworkAccessManagerFactory
That was for rss support which had been removed ages ago. Change-Id: I98eec132489713d208ac20d9744fec2e5570ee2b Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
QT += network quick
|
QT += quick
|
||||||
|
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
|
|
||||||
|
|||||||
@@ -35,34 +35,20 @@
|
|||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <coreplugin/imode.h>
|
#include <coreplugin/imode.h>
|
||||||
#include <coreplugin/modemanager.h>
|
#include <coreplugin/modemanager.h>
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
|
||||||
#include <coreplugin/dialogs/iwizard.h>
|
|
||||||
|
|
||||||
#include <projectexplorer/projectexplorer.h>
|
|
||||||
|
|
||||||
#include <utils/fileutils.h>
|
#include <utils/fileutils.h>
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
#include <utils/styledbar.h>
|
#include <utils/styledbar.h>
|
||||||
#include <utils/iwelcomepage.h>
|
#include <utils/iwelcomepage.h>
|
||||||
#include <utils/networkaccessmanager.h>
|
|
||||||
|
|
||||||
#include <QScrollArea>
|
|
||||||
#include <QDesktopServices>
|
|
||||||
#include <QPainter>
|
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include <QCoreApplication>
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QSettings>
|
|
||||||
#include <QDebug>
|
|
||||||
#include <QUrl>
|
|
||||||
#include <QtPlugin>
|
|
||||||
|
|
||||||
#include <QtQuick/QQuickView>
|
#include <QtQuick/QQuickView>
|
||||||
#include <QtQml/QQmlContext>
|
#include <QtQml/QQmlContext>
|
||||||
#include <QtQml/QQmlEngine>
|
#include <QtQml/QQmlEngine>
|
||||||
#include <QtQml/QQmlNetworkAccessManagerFactory>
|
|
||||||
|
|
||||||
enum { debug = 0 };
|
enum { debug = 0 };
|
||||||
|
|
||||||
@@ -74,14 +60,6 @@ static const char currentPageSettingsKeyC[] = "WelcomeTab";
|
|||||||
namespace Welcome {
|
namespace Welcome {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class NetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NetworkAccessManagerFactory(): QQmlNetworkAccessManagerFactory() {}
|
|
||||||
QNetworkAccessManager* create(QObject *parent) { return new Utils::NetworkAccessManager(parent); }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct WelcomeModePrivate
|
struct WelcomeModePrivate
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -128,13 +106,11 @@ private:
|
|||||||
QQuickView *m_welcomePage;
|
QQuickView *m_welcomePage;
|
||||||
QList<QObject*> m_pluginList;
|
QList<QObject*> m_pluginList;
|
||||||
int m_activePlugin;
|
int m_activePlugin;
|
||||||
NetworkAccessManagerFactory *m_networkAccessManagerFactory;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- WelcomeMode
|
// --- WelcomeMode
|
||||||
WelcomeMode::WelcomeMode() :
|
WelcomeMode::WelcomeMode() :
|
||||||
m_activePlugin(0)
|
m_activePlugin(0)
|
||||||
, m_networkAccessManagerFactory(new NetworkAccessManagerFactory)
|
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Welcome"));
|
setDisplayName(tr("Welcome"));
|
||||||
QIcon qtLogo;
|
QIcon qtLogo;
|
||||||
@@ -192,7 +168,6 @@ WelcomeMode::~WelcomeMode()
|
|||||||
QSettings *settings = Core::ICore::settings();
|
QSettings *settings = Core::ICore::settings();
|
||||||
settings->setValue(QLatin1String(currentPageSettingsKeyC), activePlugin());
|
settings->setValue(QLatin1String(currentPageSettingsKeyC), activePlugin());
|
||||||
delete m_modeWidget;
|
delete m_modeWidget;
|
||||||
delete m_networkAccessManagerFactory;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= 0x050300
|
#if QT_VERSION >= 0x050300
|
||||||
@@ -268,7 +243,6 @@ void WelcomeMode::initPlugins()
|
|||||||
engine->setImportPathList(importPathList);
|
engine->setImportPathList(importPathList);
|
||||||
if (!debug)
|
if (!debug)
|
||||||
engine->setOutputWarningsToStandardError(false);
|
engine->setOutputWarningsToStandardError(false);
|
||||||
engine->setNetworkAccessManagerFactory(m_networkAccessManagerFactory);
|
|
||||||
QString pluginPath = applicationDirPath();
|
QString pluginPath = applicationDirPath();
|
||||||
if (HostOsInfo::isMacHost())
|
if (HostOsInfo::isMacHost())
|
||||||
pluginPath += QLatin1String("/../PlugIns");
|
pluginPath += QLatin1String("/../PlugIns");
|
||||||
|
|||||||
Reference in New Issue
Block a user