summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJames McDonnell <jmcdonnell@qnx.com>2016-03-18 11:44:41 -0400
committerJames McDonnell <jmcdonnell@qnx.com>2016-05-12 18:58:09 +0000
commit678e427948e03119e7496192d26facc7d94e9d16 (patch)
treec23b9305bcd851d33c2ad7fbcb876112edc7f19e /tools
parentd179931ada9c9055eb7c86ee264fa5f2e1ec3453 (diff)
Adjust FreeType choice made by configureapp
FontConfig requires FreeType, so choosing the system FontConfig (there isn't a bundled FontConfig) means that the system FreeType must be used. QNX ended up configured to include the bundled FreeType and the system FontConfig which produced a fault when bundled FreeType structures got passed through FontConfig to the system FreeType. Task-number: QTBUG-52578 Task-number: QTBUG-51417 Change-Id: I56add73d34320c1d08f63b57cb0fef1ba06264e8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/configureapp.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 3be0ea2b7c..a03be4df0a 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -264,6 +264,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0)
dictionary[ "LIBJPEG" ] = "auto";
dictionary[ "LIBPNG" ] = "auto";
dictionary[ "FREETYPE" ] = "yes";
+ dictionary[ "FREETYPE_FROM" ] = "default";
dictionary[ "HARFBUZZ" ] = "qt";
dictionary[ "ACCESSIBILITY" ] = "yes";
@@ -634,12 +635,16 @@ void Configure::parseCmdLine()
}
// Text Rendering --------------------------------------------
- else if (configCmdLine.at(i) == "-no-freetype")
+ else if (configCmdLine.at(i) == "-no-freetype") {
dictionary[ "FREETYPE" ] = "no";
- else if (configCmdLine.at(i) == "-qt-freetype")
+ dictionary[ "FREETYPE_FROM" ] = "commandline";
+ } else if (configCmdLine.at(i) == "-qt-freetype") {
dictionary[ "FREETYPE" ] = "yes";
- else if (configCmdLine.at(i) == "-system-freetype")
+ dictionary[ "FREETYPE_FROM" ] = "commandline";
+ } else if (configCmdLine.at(i) == "-system-freetype") {
dictionary[ "FREETYPE" ] = "system";
+ dictionary[ "FREETYPE_FROM" ] = "commandline";
+ }
else if (configCmdLine.at(i) == "-no-harfbuzz")
dictionary[ "HARFBUZZ" ] = "no";
@@ -2588,6 +2593,9 @@ void Configure::autoDetection()
if (dictionary["FONT_CONFIG"] == "auto")
dictionary["FONT_CONFIG"] = checkAvailability("FONT_CONFIG") ? "yes" : "no";
+ if ((dictionary["FONT_CONFIG"] == "yes") && (dictionary["FREETYPE_FROM"] == "default"))
+ dictionary["FREETYPE"] = "system";
+
if (dictionary["DIRECTWRITE"] == "auto")
dictionary["DIRECTWRITE"] = checkAvailability("DIRECTWRITE") ? "yes" : "no";
@@ -2717,6 +2725,22 @@ bool Configure::verifyConfiguration()
}
}
+ if ((dictionary["FONT_CONFIG"] == "yes") && (dictionary["FREETYPE_FROM"] == "commandline")) {
+ if (dictionary["FREETYPE"] == "yes") {
+ cout << "WARNING: Bundled FreeType can't be used."
+ " FontConfig use requires system FreeType." << endl;
+ dictionary["FREETYPE"] = "system";
+ dictionary["FREETYPE_FROM"] = "override";
+ prompt = true;
+ } else if (dictionary["FREETYPE"] == "no") {
+ cout << "WARNING: FreeType can't be disabled."
+ " FontConfig use requires system FreeType." << endl;
+ dictionary["FREETYPE"] = "system";
+ dictionary["FREETYPE_FROM"] = "override";
+ prompt = true;
+ }
+ }
+
if (prompt)
promptKeyPress();