Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
56a1e109
Commit
56a1e109
authored
Jan 17, 2011
by
dt
Browse files
Options
Downloads
Patches
Plain Diff
Qt4ProjectManager: Do not loop endless if the defaöt mkspec is broken
Reported on irc.
parent
8108bb0c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/qt4projectmanager/qtversionmanager.cpp
+17
-11
17 additions, 11 deletions
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.h
+1
-0
1 addition, 0 deletions
src/plugins/qt4projectmanager/qtversionmanager.h
with
18 additions
and
11 deletions
src/plugins/qt4projectmanager/qtversionmanager.cpp
+
17
−
11
View file @
56a1e109
...
...
@@ -1381,11 +1381,7 @@ void QtVersion::updateToolChainAndMkspec() const
mkspecFullPath
=
baseMkspecDir
+
"/macx-g++"
;
}
//resolve mkspec link
QFileInfo
f3
(
mkspecFullPath
);
while
(
f3
.
isSymLink
())
{
mkspecFullPath
=
f3
.
symLinkTarget
();
f3
.
setFile
(
mkspecFullPath
);
}
mkspecFullPath
=
resolveLink
(
mkspecFullPath
);
}
break
;
}
...
...
@@ -1393,11 +1389,7 @@ void QtVersion::updateToolChainAndMkspec() const
f2
.
close
();
}
#else
QFileInfo
f2
(
mkspecFullPath
);
while
(
f2
.
isSymLink
())
{
mkspecFullPath
=
f2
.
symLinkTarget
();
f2
.
setFile
(
mkspecFullPath
);
}
mkspecFullPath
=
resolveLink
(
mkspecFullPath
);
#endif
#ifdef Q_OS_WIN
...
...
@@ -1526,6 +1518,17 @@ void QtVersion::updateToolChainAndMkspec() const
m_toolChainUpToDate
=
true
;
}
QString
QtVersion
::
resolveLink
(
const
QString
&
path
)
const
{
QFileInfo
f
(
path
);
int
links
=
16
;
while
(
links
--
&&
f
.
isSymLink
())
f
.
setFile
(
f
.
symLinkTarget
());
if
(
links
<=
0
)
return
QString
();
return
f
.
path
();
}
QString
QtVersion
::
mwcDirectory
()
const
{
return
m_mwcDirectory
;
...
...
@@ -1622,7 +1625,8 @@ bool QtVersion::isValid() const
&&
!
qmakeCommand
().
isEmpty
()
&&
!
displayName
().
isEmpty
()
&&
!
m_notInstalled
&&
m_versionInfo
.
contains
(
"QT_INSTALL_BINS"
);
&&
m_versionInfo
.
contains
(
"QT_INSTALL_BINS"
)
&&
!
m_mkspecFullPath
.
isEmpty
();
}
QString
QtVersion
::
invalidReason
()
const
...
...
@@ -1638,6 +1642,8 @@ QString QtVersion::invalidReason() const
if
(
!
m_versionInfo
.
contains
(
"QT_INSTALL_BINS"
))
return
QCoreApplication
::
translate
(
"QtVersion"
,
"Could not determine the path to the binaries of the Qt installation, maybe the qmake path is wrong?"
);
if
(
m_mkspecFullPath
.
isEmpty
())
return
QCoreApplication
::
translate
(
"QtVersion"
,
"The default mkspec symlink is broken."
);
return
QString
();
}
...
...
This diff is collapsed.
Click to expand it.
src/plugins/qt4projectmanager/qtversionmanager.h
+
1
−
0
View file @
56a1e109
...
...
@@ -189,6 +189,7 @@ private:
void
updateVersionInfo
()
const
;
QString
findQtBinary
(
const
QStringList
&
possibleName
)
const
;
void
updateToolChainAndMkspec
()
const
;
QString
resolveLink
(
const
QString
&
path
)
const
;
QString
m_displayName
;
QString
m_sourcePath
;
QString
m_mingwDirectory
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment