diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-24 05:44:45 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-05-24 05:44:45 +0000 |
commit | 4e41babd0337473a1078d3a5f3367cc1fc5f2935 (patch) | |
tree | fc7a7ceecd529310fcd6a6a869034a8ea75388e1 /tools/configure/configureapp.cpp | |
parent | aa2a3102676a5608d7ad22b868895ec93681a5d9 (diff) | |
parent | 56d6e000f7487c59172330ebd23a718268c508f1 (diff) |
Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index c3b9e642eb..7328f00a65 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -256,6 +256,7 @@ Configure::Configure(int& argc, char** argv) : verbose(0) dictionary[ "LIBPNG" ] = "auto"; dictionary[ "DOUBLECONVERSION" ] = "auto"; dictionary[ "FREETYPE" ] = "yes"; + dictionary[ "FREETYPE_FROM" ] = "default"; dictionary[ "HARFBUZZ" ] = "qt"; dictionary[ "ACCESSIBILITY" ] = "yes"; @@ -606,12 +607,16 @@ void Configure::parseCmdLine() dictionary[ "DOUBLECONVERSION" ] = "system"; // 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"; @@ -2373,6 +2378,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["DOUBLECONVERSION"] == "auto") dictionary["DOUBLECONVERSION"] = checkAvailability("DOUBLECONVERSION") ? "system" : "qt"; @@ -2509,6 +2517,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(); |