Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
4c5ce801
Commit
4c5ce801
authored
Mar 26, 2010
by
Tobias Hunger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add method to retreive valid Qt versions only
parent
74ae8314
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
7 deletions
+16
-7
src/plugins/qt4projectmanager/projectloadwizard.cpp
src/plugins/qt4projectmanager/projectloadwizard.cpp
+1
-6
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.cpp
+14
-1
src/plugins/qt4projectmanager/qtversionmanager.h
src/plugins/qt4projectmanager/qtversionmanager.h
+1
-0
No files found.
src/plugins/qt4projectmanager/projectloadwizard.cpp
View file @
4c5ce801
...
...
@@ -89,12 +89,7 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
// The default buildConfiguration depends on QmakeBuildConfig::DebugBuild
// Also if the qt version is not yet in the Tools Options dialog we offer to add it there
QList
<
QtVersion
*>
validVersions
;
foreach
(
QtVersion
*
v
,
vm
->
versions
())
{
if
(
v
->
isValid
())
validVersions
.
append
(
v
);
}
QList
<
QtVersion
*>
validVersions
=
vm
->
validVersions
();
if
(
m_importVersion
)
setupImportPage
(
m_importVersion
,
m_importBuildConfig
,
m_additionalArguments
);
else
if
(
validVersions
.
count
()
>
1
)
...
...
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
4c5ce801
...
...
@@ -159,6 +159,9 @@ QtVersionManager *QtVersionManager::instance()
void
QtVersionManager
::
addVersion
(
QtVersion
*
version
)
{
QTC_ASSERT
(
version
!=
0
,
return
);
if
(
m_versions
.
contains
(
version
))
return
;
m_versions
.
append
(
version
);
int
uniqueId
=
version
->
uniqueId
();
m_uniqueIdToIndex
.
insert
(
uniqueId
,
m_versions
.
count
()
-
1
);
...
...
@@ -278,11 +281,21 @@ void QtVersionManager::writeVersionsIntoSettings()
s
->
endArray
();
}
QList
<
QtVersion
*
>
QtVersionManager
::
versions
()
const
QList
<
QtVersion
*
>
QtVersionManager
::
versions
()
const
{
return
m_versions
;
}
QList
<
QtVersion
*>
QtVersionManager
::
validVersions
()
const
{
QList
<
QtVersion
*>
results
;
foreach
(
QtVersion
*
v
,
m_versions
)
{
if
(
v
->
isValid
())
results
.
append
(
v
);
}
return
results
;
}
bool
QtVersionManager
::
isValidId
(
int
id
)
const
{
int
pos
=
m_uniqueIdToIndex
.
value
(
id
,
-
1
);
...
...
src/plugins/qt4projectmanager/qtversionmanager.h
View file @
4c5ce801
...
...
@@ -199,6 +199,7 @@ public:
// This will *always* return at least one (Qt in Path), even if that is
// unconfigured.
QList
<
QtVersion
*>
versions
()
const
;
QList
<
QtVersion
*>
validVersions
()
const
;
// Note: DO NOT STORE THIS POINTER!
// The QtVersionManager will delete it at random times and you will
...
...
Write
Preview
Markdown
is supported
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