From 4ef8f47fc55197fc8b90a1f43f87d8aba5c66ffa Mon Sep 17 00:00:00 2001
From: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Date: Tue, 11 Jun 2013 16:45:53 +0200
Subject: [PATCH] Rename remaining references of blinq to QtWebEngine.

---
 build/build.pro                                | 4 ++--
 build/{gyp_blinq => gyp_qtwebengine}           | 4 ++--
 build/qmake/mkspecs/features/default_pre.prf   | 4 ++--
 build/qmake/mkspecs/features/functions.prf     | 6 +++---
 build/qmake/mkspecs/features/gyp_generator.prf | 4 ++--
 example/example.pro                            | 2 +-
 lib/lib.pro                                    | 6 +++---
 lib/web_engine_context.cpp                     | 8 ++++----
 process/process.pro                            | 4 ++--
 blinq.gyp => qtwebengine.gyp                   | 2 +-
 blinq.gypi => qtwebengine.gypi                 | 0
 blinq.pro => qtwebengine.pro                   | 0
 shared/shared.pro                              | 6 +++---
 13 files changed, 25 insertions(+), 25 deletions(-)
 rename build/{gyp_blinq => gyp_qtwebengine} (97%)
 rename blinq.gyp => qtwebengine.gyp (82%)
 rename blinq.gypi => qtwebengine.gypi (100%)
 rename blinq.pro => qtwebengine.pro (100%)

diff --git a/build/build.pro b/build/build.pro
index 0c3c87ba3..a2fa634e6 100644
--- a/build/build.pro
+++ b/build/build.pro
@@ -1,11 +1,11 @@
 # This .pro file serves a dual purpose:
-# 1) invoking gyp through the gyp_blinq script, which in turn makes use of the generated gypi include files
+# 1) invoking gyp through the gyp_qtwebengine script, which in turn makes use of the generated gypi include files
 # 2) produce a Makefile that will run ninja, and take care of actually building everything.
 
 TEMPLATE = aux
 
 message(Running Gyp...)
-GYP_OUTPUT = $$system(./gyp_blinq)
+GYP_OUTPUT = $$system(./gyp_qtwebengine)
 message($$GYP_OUTPUT)
 
 ninja.target = ninja
diff --git a/build/gyp_blinq b/build/gyp_qtwebengine
similarity index 97%
rename from build/gyp_blinq
rename to build/gyp_qtwebengine
index 51d2f4cdc..89d0cfcd3 100755
--- a/build/gyp_blinq
+++ b/build/gyp_qtwebengine
@@ -80,7 +80,7 @@ if __name__ == '__main__':
       break
 
   if not gyp_file_specified:
-      args.append(os.path.join(root_dir, 'blinq.gyp'))
+      args.append(os.path.join(root_dir, 'qtwebengine.gyp'))
 
   args.extend(['-I' + i for i in additional_include_files(args)])
 
@@ -111,7 +111,7 @@ if __name__ == '__main__':
   args.extend(['--generator-output', os.path.abspath(get_output_dir())])
   args.extend(['-Goutput_dir='+ os.path.abspath(get_output_dir())])
   args.extend(['--format=ninja'])
-  if "BLINQ_GYP_DEBUG" in os.environ:
+  if "QTWEBENGINE_GYP_DEBUG" in os.environ:
     args.append("--check")
     args.append("-d all")
     print args
diff --git a/build/qmake/mkspecs/features/default_pre.prf b/build/qmake/mkspecs/features/default_pre.prf
index 07ec22750..a49ab6bbf 100644
--- a/build/qmake/mkspecs/features/default_pre.prf
+++ b/build/qmake/mkspecs/features/default_pre.prf
@@ -1,7 +1,7 @@
 # Resolve root directories for sources
-BLINQ_ROOT = $$replace(PWD, /build/qmake/mkspecs/features$,)
+QTWEBENGINE_ROOT = $$replace(PWD, /build/qmake/mkspecs/features$,)
 
-BLINQ_PROCESS_NAME = blinq_process
+QTWEBENGINEPROCESS_NAME = QtWebEngineProcess
 
 # Fetched from environment for now
 CHROMIUM_SRC_DIR = $$(CHROMIUM_SRC_DIR)
diff --git a/build/qmake/mkspecs/features/functions.prf b/build/qmake/mkspecs/features/functions.prf
index bb1e152a2..0f65c77ae 100644
--- a/build/qmake/mkspecs/features/functions.prf
+++ b/build/qmake/mkspecs/features/functions.prf
@@ -9,8 +9,8 @@ defineReplace(toGypTargetType) {
 }
 
 defineReplace(getOutDir) {
-  # FIXME: rely on env variable in here and in the gyp_blinq script, à la WEBKITOUTPUTDIR
-  return("$$BLINQ_ROOT/out")
+  # FIXME: rely on env variable in here and in the gyp_qtwebengine script, à la WEBKITOUTPUTDIR
+  return("$$QTWEBENGINE_ROOT/out")
 }
 
 defineReplace(getConfigDir) {
@@ -22,7 +22,7 @@ defineReplace(findMocables) {
   input = $$1
   for (file, input): \
       infiles += $$absolute_path($$file, $$_PRO_FILE_PWD_)
-  mocables = $$system("$$BLINQ_ROOT/build/scripts/find-mocables $$infiles")
+  mocables = $$system("$$QTWEBENGINE_ROOT/build/scripts/find-mocables $$infiles")
   mocables = $$replace(mocables, $$_PRO_FILE_PWD_$${QMAKE_DIR_SEP}, '')
   return($$mocables)
 }
diff --git a/build/qmake/mkspecs/features/gyp_generator.prf b/build/qmake/mkspecs/features/gyp_generator.prf
index 5cf0e3eb5..2cb652331 100644
--- a/build/qmake/mkspecs/features/gyp_generator.prf
+++ b/build/qmake/mkspecs/features/gyp_generator.prf
@@ -42,7 +42,7 @@ GYPI_CONTENTS =  "{" \
                  "    'target_name': '$$TARGET'," \
                  "    'type': '$$TARGET_TYPE'," \
                  "    'includes': [" \
-                 "      '../blinq.gypi'," \
+                 "      '../qtwebengine.gypi'," \
                  "    ]," \
                  "    'ldflags': ["
 for (lib, LIBS): GYPI_CONTENTS += "      '$$lib',"
@@ -100,7 +100,7 @@ GYPI_CONTENTS += "  }," \
 write_file($$GYPI_FILE, GYPI_CONTENTS)
 
 # Overwriting the generated gyp file seems like a good reason to re-gyp
-unix: phony_variable_name_for_qmake_to_be_happy=$$system("touch $$BLINQ_ROOT/build/build.pro")
+unix: phony_variable_name_for_qmake_to_be_happy=$$system("touch $$QTWEBENGINE_ROOT/build/build.pro")
 
 # The generated Makefile shouldn't build anything by itself, just re-run qmake if necessary
 TEMPLATE = aux
diff --git a/example/example.pro b/example/example.pro
index 393ec6a4d..dda3c5cf4 100644
--- a/example/example.pro
+++ b/example/example.pro
@@ -10,7 +10,7 @@ INCLUDEPATH += ../lib
 
 LIBPATH = $$getOutDir()/$$getConfigDir()/lib
 
-LIBS += -L$$LIBPATH -lblinq
+LIBS += -L$$LIBPATH -lQt5WebEngine
 QMAKE_RPATHDIR += $$LIBPATH
 
 QT += widgets quick
diff --git a/lib/lib.pro b/lib/lib.pro
index 4db81a6f8..f86bf8ac6 100644
--- a/lib/lib.pro
+++ b/lib/lib.pro
@@ -2,17 +2,17 @@
 # We want the gyp generation step to happen after all the other config steps. For that we need to prepend
 # our gyp_generator.prf feature to the CONFIG variable since it is processed backwards
 CONFIG = gyp_generator $$CONFIG
-GYPDEPENDENCIES += ../shared/shared.gyp:blinq_shared
+GYPDEPENDENCIES += ../shared/shared.gyp:qtwebengine_shared
 
 TEMPLATE = lib
 
-TARGET = blinq
+TARGET = Qt5WebEngine
 
 # Defining keywords such as 'signal' clashes with the chromium code base.
 DEFINES += QT_NO_KEYWORDS
 
 # We need a way to tap into gyp´s Debug vs. Release configuration
-PER_CONFIG_DEFINES = BLINQ_PROCESS_PATH=\\\"$$getOutDir()/%config/$$BLINQ_PROCESS_NAME\\\"
+PER_CONFIG_DEFINES = QTWEBENGINEPROCESS_PATH=\\\"$$getOutDir()/%config/$$QTWEBENGINEPROCESS_NAME\\\"
 
 # Keep Skia happy
 CONFIG(release, debug|release): DEFINES += NDEBUG
diff --git a/lib/web_engine_context.cpp b/lib/web_engine_context.cpp
index 5b9855a27..2f34c24b4 100644
--- a/lib/web_engine_context.cpp
+++ b/lib/web_engine_context.cpp
@@ -75,19 +75,19 @@ static inline base::FilePath::StringType qStringToStringType(const QString &str)
 
 static QByteArray subProcessPath() {
     static bool initialized = false;
-#ifdef BLINQ_PROCESS_PATH
-    static QByteArray processPath(BLINQ_PROCESS_PATH);
+#ifdef QTWEBENGINEPROCESS_PATH
+    static QByteArray processPath(QTWEBENGINEPROCESS_PATH);
 #else
     static QByteArray processPath;
 #endif
     if (initialized)
         return processPath;
     // Allow overriding at runtime for the time being.
-    const QByteArray fromEnv = qgetenv("BLINQ_PROCESS_PATH");
+    const QByteArray fromEnv = qgetenv("QTWEBENGINEPROCESS_PATH");
     if (!fromEnv.isEmpty())
         processPath = fromEnv;
     if (processPath.isEmpty())
-        qFatal("BLINQ_PROCESS_PATH environment variable not set or empty.");
+        qFatal("QTWEBENGINEPROCESS_PATH environment variable not set or empty.");
     initialized = true;
     return processPath;
 }
diff --git a/process/process.pro b/process/process.pro
index a49813c89..131fad9e6 100644
--- a/process/process.pro
+++ b/process/process.pro
@@ -2,9 +2,9 @@
 # We want the gyp generation step to happen after all the other config steps. For that we need to prepend
 # our gyp_generator.prf feature to the CONFIG variable since it is processed backwards
 CONFIG = gyp_generator $$CONFIG
-GYPDEPENDENCIES += ../shared/shared.gyp:blinq_shared
+GYPDEPENDENCIES += ../shared/shared.gyp:qtwebengine_shared
 
-TARGET = $$BLINQ_PROCESS_NAME
+TARGET = $$QTWEBENGINEPROCESS_NAME
 TEMPLATE = app
 
 QT += widgets quick
diff --git a/blinq.gyp b/qtwebengine.gyp
similarity index 82%
rename from blinq.gyp
rename to qtwebengine.gyp
index 46fb87191..a511da461 100644
--- a/blinq.gyp
+++ b/qtwebengine.gyp
@@ -1,7 +1,7 @@
 {
   'targets': [
   {
-    'target_name': 'blinq',
+    'target_name': 'qtwebengine',
     'type': 'none',
     'dependencies': [
       'shared/shared.gyp:*',
diff --git a/blinq.gypi b/qtwebengine.gypi
similarity index 100%
rename from blinq.gypi
rename to qtwebengine.gypi
diff --git a/blinq.pro b/qtwebengine.pro
similarity index 100%
rename from blinq.pro
rename to qtwebengine.pro
diff --git a/shared/shared.pro b/shared/shared.pro
index 0fb50e94c..33c5d4051 100644
--- a/shared/shared.pro
+++ b/shared/shared.pro
@@ -2,18 +2,18 @@
 # We want the gyp generation step to happen after all the other config steps. For that we need to prepend
 # our gyp_generator.prf feature to the CONFIG variable since it is processed backwards
 CONFIG = gyp_generator $$CONFIG
-GYPINCLUDES += ../blinq.gypi
+GYPINCLUDES += ../qtwebengine.gypi
 
 TEMPLATE = lib
 CONFIG += static
 
-TARGET = blinq_shared
+TARGET = qtwebengine_shared
 
 # Defining keywords such as 'signal' clashes with the chromium code base.
 DEFINES += QT_NO_KEYWORDS
 
 # We need a way to tap into gyp´s Debug vs. Release configuration
-PER_CONFIG_DEFINES = BLINQ_PROCESS_PATH=\\\"$$getOutDir()/%config/$$BLINQ_PROCESS_NAME\\\"
+PER_CONFIG_DEFINES = QTWEBENGINEPROCESS_PATH=\\\"$$getOutDir()/%config/$$QTWEBENGINEPROCESS_NAME\\\"
 
 # Keep Skia happy
 CONFIG(release, debug|release): DEFINES += NDEBUG
-- 
GitLab