forked from qt-creator/qt-creator
Add the path to the installed Qt Frameworks on Mac.
Otherwise all the Qt headers might not be found at all. Task-number: QTCREATORBUG-1377 Reviewed-by: Tobias Hunger Reviewed-by: Erik Verbruggen
This commit is contained in:
@@ -426,6 +426,10 @@ void Qt4Project::updateCppCodeModel()
|
|||||||
QStringList predefinedFrameworkPaths;
|
QStringList predefinedFrameworkPaths;
|
||||||
QByteArray predefinedMacros;
|
QByteArray predefinedMacros;
|
||||||
|
|
||||||
|
QString qtFrameworkPath = activeBC->qtVersion()->frameworkInstallPath();
|
||||||
|
if (!qtFrameworkPath.isEmpty())
|
||||||
|
predefinedFrameworkPaths.append(qtFrameworkPath);
|
||||||
|
|
||||||
ToolChain *tc = activeBC->toolChain();
|
ToolChain *tc = activeBC->toolChain();
|
||||||
if (tc) {
|
if (tc) {
|
||||||
predefinedMacros = tc->predefinedMacros();
|
predefinedMacros = tc->predefinedMacros();
|
||||||
|
|||||||
@@ -1725,6 +1725,16 @@ QString QtVersion::headerInstallPath() const
|
|||||||
return m_versionInfo["QT_INSTALL_HEADERS"];
|
return m_versionInfo["QT_INSTALL_HEADERS"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString QtVersion::frameworkInstallPath() const
|
||||||
|
{
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
updateVersionInfo();
|
||||||
|
return m_versionInfo["QT_INSTALL_LIBS"];
|
||||||
|
#else
|
||||||
|
return QString();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
bool QtVersion::hasExamples() const
|
bool QtVersion::hasExamples() const
|
||||||
{
|
{
|
||||||
updateVersionInfo();
|
updateVersionInfo();
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ public:
|
|||||||
QString demosPath() const;
|
QString demosPath() const;
|
||||||
|
|
||||||
QString headerInstallPath() const;
|
QString headerInstallPath() const;
|
||||||
|
QString frameworkInstallPath() const;
|
||||||
|
|
||||||
// All valid Ids are >= 0
|
// All valid Ids are >= 0
|
||||||
int uniqueId() const;
|
int uniqueId() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user