Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tobias Hunger
qt-creator
Commits
db9d1d42
Commit
db9d1d42
authored
May 28, 2009
by
con
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
isSystemVersion property to isAutodetected property
parent
2a101e53
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
15 deletions
+20
-15
src/plugins/qt4projectmanager/qtoptionspage.cpp
src/plugins/qt4projectmanager/qtoptionspage.cpp
+6
-6
src/plugins/qt4projectmanager/qtversionmanager.cpp
src/plugins/qt4projectmanager/qtversionmanager.cpp
+11
-6
src/plugins/qt4projectmanager/qtversionmanager.h
src/plugins/qt4projectmanager/qtversionmanager.h
+3
-3
No files found.
src/plugins/qt4projectmanager/qtoptionspage.cpp
View file @
db9d1d42
...
...
@@ -98,7 +98,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
for
(
int
i
=
0
;
i
<
m_versions
.
count
();
++
i
)
{
const
QtVersion
*
const
version
=
m_versions
.
at
(
i
);
QTreeWidgetItem
*
item
=
new
QTreeWidgetItem
(
version
->
is
SystemVersion
()
?
autoItem
:
manualItem
);
QTreeWidgetItem
*
item
=
new
QTreeWidgetItem
(
version
->
is
Autodetected
()
?
autoItem
:
manualItem
);
item
->
setText
(
0
,
version
->
name
());
item
->
setText
(
1
,
QDir
::
toNativeSeparators
(
version
->
path
()));
item
->
setData
(
0
,
Qt
::
UserRole
,
version
->
uniqueId
());
...
...
@@ -241,11 +241,11 @@ void QtOptionsPageWidget::updateState()
{
int
currentIndex
=
indexForTreeItem
(
m_ui
->
qtdirList
->
currentItem
());
bool
enabled
=
(
currentIndex
>=
0
);
bool
is
SystemVersion
=
(
enabled
&&
m_versions
.
at
(
currentIndex
)
->
is
SystemVersion
());
m_ui
->
delButton
->
setEnabled
(
enabled
&&
!
is
SystemVersion
);
m_ui
->
nameEdit
->
setEnabled
(
enabled
&&
!
is
SystemVersion
);
m_ui
->
qtPath
->
setEnabled
(
enabled
&&
!
is
SystemVersion
);
bool
is
Autodetected
=
(
enabled
&&
m_versions
.
at
(
currentIndex
)
->
is
Autodetected
());
m_ui
->
delButton
->
setEnabled
(
enabled
&&
!
is
Autodetected
);
m_ui
->
nameEdit
->
setEnabled
(
enabled
&&
!
is
Autodetected
);
m_ui
->
qtPath
->
setEnabled
(
enabled
&&
!
is
Autodetected
);
m_ui
->
mingwPath
->
setEnabled
(
enabled
);
bool
hasLog
=
enabled
&&
!
m_ui
->
qtdirList
->
currentItem
()
->
data
(
2
,
Qt
::
UserRole
).
toString
().
isEmpty
();
...
...
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
db9d1d42
...
...
@@ -85,10 +85,15 @@ QtVersionManager::QtVersionManager()
id
=
getUniqueId
();
else
if
(
id
>
m_idcount
)
m_idcount
=
id
;
bool
isAutodetected
;
if
(
s
->
contains
(
"isAutodetected"
))
isAutodetected
=
s
->
value
(
"isAutodetected"
,
false
).
toBool
();
else
// compatibility
isAutodetected
=
s
->
value
(
"IsSystemVersion"
,
false
).
toBool
();
QtVersion
*
version
=
new
QtVersion
(
s
->
value
(
"Name"
).
toString
(),
s
->
value
(
"Path"
).
toString
(),
id
,
s
->
value
(
"IsSystemVersion"
,
false
).
toBool
()
);
isAutodetected
);
version
->
setMingwDirectory
(
s
->
value
(
"MingwDirectory"
).
toString
());
version
->
setMsvcVersion
(
s
->
value
(
"msvcVersion"
).
toString
());
m_versions
.
append
(
version
);
...
...
@@ -193,7 +198,7 @@ void QtVersionManager::writeVersionsIntoSettings()
s
->
setValue
(
"Id"
,
m_versions
.
at
(
i
)
->
uniqueId
());
s
->
setValue
(
"MingwDirectory"
,
m_versions
.
at
(
i
)
->
mingwDirectory
());
s
->
setValue
(
"msvcVersion"
,
m_versions
.
at
(
i
)
->
msvcVersion
());
s
->
setValue
(
"
IsSystemVersion
"
,
m_versions
.
at
(
i
)
->
is
SystemVersion
());
s
->
setValue
(
"
isAutodetected
"
,
m_versions
.
at
(
i
)
->
is
Autodetected
());
}
s
->
endArray
();
}
...
...
@@ -283,7 +288,7 @@ void QtVersionManager::updateSystemVersion()
}
foreach
(
QtVersion
*
version
,
m_versions
)
{
if
(
version
->
is
SystemVersion
())
{
if
(
version
->
is
Autodetected
())
{
//TODO this needs to additionally check for the autodetectionsource
version
->
setPath
(
systemQtPath
);
version
->
setName
(
tr
(
"Qt in PATH"
));
haveSystemVersion
=
true
;
...
...
@@ -349,9 +354,9 @@ void QtVersionManager::setNewQtVersions(QList<QtVersion *> newVersions, int newD
/// QtVersion
///
QtVersion
::
QtVersion
(
const
QString
&
name
,
const
QString
&
path
,
int
id
,
bool
is
SystemVersion
)
QtVersion
::
QtVersion
(
const
QString
&
name
,
const
QString
&
path
,
int
id
,
bool
is
Autodetected
)
:
m_name
(
name
),
m_is
SystemVersion
(
isSystemVersion
),
m_is
Autodetected
(
isAutodetected
),
m_hasDebuggingHelper
(
false
),
m_notInstalled
(
false
),
m_defaultConfigIsDebug
(
true
),
...
...
@@ -370,7 +375,7 @@ QtVersion::QtVersion(const QString &name, const QString &path, int id, bool isSy
QtVersion
::
QtVersion
(
const
QString
&
name
,
const
QString
&
path
)
:
m_name
(
name
),
m_is
SystemVersion
(
false
),
m_is
Autodetected
(
false
),
m_hasDebuggingHelper
(
false
),
m_mkspecUpToDate
(
false
),
m_versionInfoUpToDate
(
false
),
...
...
src/plugins/qt4projectmanager/qtversionmanager.h
View file @
db9d1d42
...
...
@@ -50,7 +50,7 @@ class QtVersion
friend
class
QtVersionManager
;
public:
QtVersion
(
const
QString
&
name
,
const
QString
&
path
);
QtVersion
(
const
QString
&
name
,
const
QString
&
path
,
int
id
,
bool
is
SystemVersion
=
false
);
QtVersion
(
const
QString
&
name
,
const
QString
&
path
,
int
id
,
bool
is
Autodetected
=
false
);
QtVersion
()
:
m_name
(
QString
::
null
),
m_id
(
-
1
),
m_toolChain
(
0
)
{
setPath
(
QString
::
null
);
}
...
...
@@ -58,7 +58,7 @@ public:
bool
isValid
()
const
;
//TOOD check that the dir exists and the name is non empty
bool
isInstalled
()
const
;
bool
is
SystemVersion
()
const
{
return
m_is
SystemVersion
;
}
bool
is
Autodetected
()
const
{
return
m_is
Autodetected
;
}
QString
name
()
const
;
QString
path
()
const
;
...
...
@@ -129,7 +129,7 @@ private:
QString
m_mingwDirectory
;
QString
m_msvcVersion
;
int
m_id
;
bool
m_is
SystemVersion
;
bool
m_is
Autodetected
;
bool
m_hasDebuggingHelper
;
mutable
bool
m_mkspecUpToDate
;
...
...
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