Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
3f4517f6
Commit
3f4517f6
authored
Feb 22, 2011
by
Tobias Hunger
Browse files
Qt: Detect Qt versions build with libinfix
parent
66896e19
Changes
1
Show whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
3f4517f6
...
@@ -1582,20 +1582,24 @@ QString QtVersion::resolveLink(const QString &path) const
...
@@ -1582,20 +1582,24 @@ QString QtVersion::resolveLink(const QString &path) const
QString
QtVersion
::
qtCorePath
()
const
QString
QtVersion
::
qtCorePath
()
const
{
{
QString
path
=
libraryInstallPath
();
QDir
libDir
(
libraryInstallPath
());
QFileInfoList
infoList
=
libDir
.
entryInfoList
();
QStringList
toTest
;
foreach
(
const
QFileInfo
&
info
,
infoList
)
{
toTest
<<
path
+
QLatin1String
(
"/libQtCore.so."
)
+
qtVersionString
();
const
QString
file
=
info
.
fileName
();
toTest
<<
path
+
QLatin1String
(
"/libQtCore.so"
);
if
(
info
.
isDir
()
toTest
<<
path
+
QLatin1String
(
"/QtCore.dll"
);
&&
file
.
startsWith
(
QLatin1String
(
"QtCore"
))
toTest
<<
path
+
QLatin1String
(
"/QtCored.dll"
);
&&
file
.
endsWith
(
QLatin1String
(
".framework"
)))
{
toTest
<<
path
+
QLatin1String
(
"/QtCore4.dll"
);
// handle Framework
toTest
<<
path
+
QLatin1String
(
"/QtCored4.dll"
);
const
QString
libName
=
file
.
left
(
file
.
lastIndexOf
(
'.'
));
toTest
<<
path
+
QLatin1String
(
"/QtCore.framework/QtCore"
);
return
libDir
.
absoluteFilePath
(
file
+
'/'
+
libName
);
}
foreach
(
const
QString
&
path
,
toTest
)
{
if
(
info
.
isReadable
()
if
(
QFileInfo
(
path
).
exists
())
&&
(
file
.
startsWith
(
QLatin1String
(
"libQtCore"
))
return
path
;
||
file
.
startsWith
(
QLatin1String
(
"QtCore"
)))
&&
(
file
.
endsWith
(
QLatin1String
(
".dll"
))
||
file
.
endsWith
(
QString
::
fromLatin1
(
".so."
)
+
qtVersionString
())))
{
return
info
.
absoluteFilePath
();
}
}
}
return
QString
();
return
QString
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment