Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions src/robomongo/gui/widgets/workarea/WelcomeTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,41 @@
#include <QtWebEngineWidgets>
#include <QDesktopServices>

#include "robomongo/core/AppRegistry.h"
#include "robomongo/core/settings/SettingsManager.h"

namespace Robomongo {

// ------------------ WelcomeTab
WelcomeTab::WelcomeTab(QScrollArea *parent) :
QWidget(parent), _parent(parent)
{
auto mainLayout = new QHBoxLayout;
mainLayout->setContentsMargins(-10, -10, -1, -1);
mainLayout->setSizeConstraint(QLayout::SetMinimumSize);
setLayout(mainLayout);

// Respect "disableHttpsFeatures" on Windows/macOS as well (it already
// gates the Welcome Tab menu action and the Linux implementation).
// Creating any WebEngine object starts the embedded Chromium, which
// intermittently crashes the whole application shortly after startup
// on newer Windows builds (access violation in Qt5WebEngineCore.dll).
// With this setting enabled the web view is never created, so the
// embedded Chromium never initializes.
if (AppRegistry::instance().settingsManager()->disableHttpsFeatures())
return;

auto webView = new QWebEngineView(this);
QUrl const URL {
"http://files.studio3t.com/rm-feed_3t_io/1.4.3/index.html"
"http://files.studio3t.com/rm-feed_3t_io/1.4.3/index.html"
};
webView->setPage(new MyWebPage(this));
webView->page()->setUrl(URL);
webView->setContextMenuPolicy(Qt::NoContextMenu);
webView->page()->triggerAction(QWebEnginePage::WebAction::ReloadAndBypassCache);
webView->page()->profile()->setHttpCacheType(QWebEngineProfile::HttpCacheType::NoCache);

auto mainLayout = new QHBoxLayout;
mainLayout->setContentsMargins(-10, -10, -1, -1);
mainLayout->setSizeConstraint(QLayout::SetMinimumSize);
mainLayout->addWidget(webView);
setLayout(mainLayout);
}

// ------------------ MyWebPage
Expand Down