代码拉取完成,页面将自动刷新
From 6b9597ff35170fa14ae333f6b2de73749353d3bc Mon Sep 17 00:00:00 2001
From: Mike Arthur <[email protected]>
Date: Mon, 15 Mar 2010 22:07:33 +0000
Subject: [PATCH 18/33] Fix framework detection on Mac where Qt is installed
outside /Library/Frameworks.
svn path=/trunk/kdesupport/automoc/; revision=1103798
---
kde4automoc.cpp | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/kde4automoc.cpp b/kde4automoc.cpp
index e85ec62..314ab96 100644
--- a/kde4automoc.cpp
+++ b/kde4automoc.cpp
@@ -179,16 +179,22 @@ void AutoMoc::lazyInit()
dotFilesCheck(line == "MOC_INCLUDES:\n");
line = dotFiles.readLine().trimmed();
const QStringList &incPaths = QString::fromUtf8(line).split(';', QString::SkipEmptyParts);
+ QSet<QString> frameworkPaths;
foreach (const QString &path, incPaths) {
Q_ASSERT(!path.isEmpty());
mocIncludes << "-I" + path;
+ if (path.endsWith(".framework/Headers")) {
+ QDir framework(path);
+ // Go up twice to get to the framework root
+ framework.cdUp();
+ framework.cdUp();
+ frameworkPaths << framework.path();
+ }
}
- // on the Mac, add -F always, otherwise headers in the frameworks won't be found
- // is it necessary to do this only optionally ? Alex
-#if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)
- mocIncludes << "-F/Library/Frameworks";
-#endif
+ foreach (const QString &path, frameworkPaths) {
+ mocIncludes << "-F" << path;
+ }
line = dotFiles.readLine();
dotFilesCheck(line == "CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE:\n");
--
2.4.3
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。