diff --git a/src/core/web_engine_error.cpp b/src/core/web_engine_error.cpp
index f53346995a6152303688597a5fc723c5583d7f95..1cf39fdadf1678a54cdaa5845aa7c3f915c26039 100644
--- a/src/core/web_engine_error.cpp
+++ b/src/core/web_engine_error.cpp
@@ -40,6 +40,9 @@
 ****************************************************************************/
 
 #include "web_engine_error.h"
+#include "net/base/net_errors.h"
+
+const int WebEngineError::UserAbortedError = net::ERR_ABORTED;
 
 namespace {
 const int noError = 0;
diff --git a/src/core/web_engine_error.h b/src/core/web_engine_error.h
index 9fd7eb265c647085dd09a190f687a96a67975570..5dbc4cd99f7939fa75bb8c45d58d6a157d9a1336 100644
--- a/src/core/web_engine_error.h
+++ b/src/core/web_engine_error.h
@@ -58,6 +58,8 @@ public:
          DnsErrorDomain
     };
 
+    static const int UserAbortedError;
+
     static ErrorDomain toQtErrorDomain(int error_code);
 
 };
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index b8cc98a3ca69c6220420c59a6eac70b5109995b4..a997077300d0b072774e6572e8712a8e94562377 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -42,7 +42,6 @@
 #include "qquickwebengineview_p.h"
 #include "qquickwebengineview_p_p.h"
 
-#include "net/base/net_errors.h"
 #include "javascript_dialog_controller.h"
 #include "qquickwebengineloadrequest_p.h"
 #include "render_widget_host_view_qt_delegate_quick.h"
@@ -236,7 +235,7 @@ qreal QQuickWebEngineViewPrivate::dpiScale() const
 void QQuickWebEngineViewPrivate::loadFinished(bool success, int error_code, const QString &error_description)
 {
     Q_Q(QQuickWebEngineView);
-    if (error_code == net::ERR_ABORTED) {
+    if (error_code == WebEngineError::UserAbortedError) {
         QQuickWebEngineLoadRequest loadRequest(q->url(), QQuickWebEngineView::LoadStoppedStatus);
         Q_EMIT q->loadingStateChanged(&loadRequest);
         return;
diff --git a/tools/qmake/mkspecs/features/default_pre.prf b/tools/qmake/mkspecs/features/default_pre.prf
index 6a02a6bbdeceec546e6211da0538af29ef5de3ce..4de44951172c8e53c9c765aa15cf295c9a9e9603 100644
--- a/tools/qmake/mkspecs/features/default_pre.prf
+++ b/tools/qmake/mkspecs/features/default_pre.prf
@@ -3,15 +3,6 @@ QTWEBENGINE_ROOT = $$replace(PWD, /tools/qmake/mkspecs/features$,)
 
 QTWEBENGINEPROCESS_NAME = QtWebEngineProcess
 
-git_chromium_src_dir = $$system("git config qtwebengine.chromiumsrcdir")
-
-# Fall back to the snapshot path if git does not know about chromium sources (i.e. init-repository.py has not been used)
-isEmpty(git_chromium_src_dir): git_chromium_src_dir = "src/3rdparty/chromium"
-
-CHROMIUM_SRC_DIR = $$absolute_path("$$git_chromium_src_dir", "$$QTWEBENGINE_ROOT")
-
-INCLUDEPATH += $$CHROMIUM_SRC_DIR
-
 # Tweaks that shouldn't affect our examples
 !contains(_PRO_FILE_PWD_, $$QTWEBENGINE_ROOT/examples) {
     # Used for our export macros