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
Marco Bubke
flatpak-qt-creator
Commits
95896519
Commit
95896519
authored
Aug 16, 2012
by
hjk
Browse files
toolchainoptionpage: make name editable next to other fields
Change-Id: I35bc69c9c26a0cf4a8ed4e1e6044428d24cdb003 Reviewed-by:
hjk
<
qthjk@ovi.com
>
parent
6f32b8e2
Changes
16
Hide whitespace changes
Inline
Side-by-side
src/libs/utils/detailswidget.cpp
View file @
95896519
...
...
@@ -339,6 +339,16 @@ QWidget *DetailsWidget::widget() const
return
d
->
m_widget
;
}
QWidget
*
DetailsWidget
::
takeWidget
()
{
QWidget
*
widget
=
d
->
m_widget
;
d
->
m_widget
=
0
;
d
->
m_grid
->
removeWidget
(
widget
);
if
(
widget
)
widget
->
setParent
(
0
);
return
widget
;
}
void
DetailsWidget
::
setWidget
(
QWidget
*
widget
)
{
if
(
d
->
m_widget
==
widget
)
...
...
src/libs/utils/detailswidget.h
View file @
95896519
...
...
@@ -72,6 +72,7 @@ public:
void
setWidget
(
QWidget
*
widget
);
QWidget
*
widget
()
const
;
QWidget
*
takeWidget
();
void
setToolWidget
(
Utils
::
FadingPanel
*
widget
);
QWidget
*
toolWidget
()
const
;
...
...
src/plugins/android/androidtoolchain.cpp
View file @
95896519
...
...
@@ -44,6 +44,7 @@
#include <utils/environment.h>
#include <QDir>
#include <QFormLayout>
#include <QLabel>
#include <QVBoxLayout>
...
...
@@ -204,25 +205,8 @@ QList<Abi> AndroidToolChain::detectSupportedAbis() const
AndroidToolChainConfigWidget
::
AndroidToolChainConfigWidget
(
AndroidToolChain
*
tc
)
:
ToolChainConfigWidget
(
tc
)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
QLabel
*
label
=
new
QLabel
;
label
->
setText
(
tr
(
"NDK Root: %1"
).
arg
(
AndroidConfigurations
::
instance
().
config
().
ndkLocation
.
toUserOutput
()));
layout
->
addWidget
(
label
);
}
void
AndroidToolChainConfigWidget
::
apply
()
{
// nothing to do!
}
void
AndroidToolChainConfigWidget
::
discard
()
{
// nothing to do!
}
bool
AndroidToolChainConfigWidget
::
isDirty
()
const
{
return
false
;
QLabel
*
label
=
new
QLabel
(
AndroidConfigurations
::
instance
().
config
().
ndkLocation
.
toUserOutput
());
m_mainLayout
->
addRow
(
tr
(
"NDK Root:"
),
label
);
}
// --------------------------------------------------------------------------
...
...
src/plugins/android/androidtoolchain.h
View file @
95896519
...
...
@@ -80,9 +80,11 @@ class AndroidToolChainConfigWidget : public ProjectExplorer::ToolChainConfigWidg
public:
AndroidToolChainConfigWidget
(
AndroidToolChain
*
);
void
apply
();
void
discard
();
bool
isDirty
()
const
;
private:
void
applyImpl
()
{}
void
discardImpl
()
{}
bool
isDirtyImpl
()
const
{
return
false
;
}
void
makeReadOnlyImpl
()
{}
};
...
...
src/plugins/projectexplorer/gcctoolchain.cpp
View file @
95896519
...
...
@@ -676,25 +676,13 @@ Internal::GccToolChainConfigWidget::GccToolChainConfigWidget(GccToolChain *tc) :
{
Q_ASSERT
(
tc
);
Utils
::
DetailsWidget
*
details
=
new
Utils
::
DetailsWidget
(
this
);
details
->
setState
(
Utils
::
DetailsWidget
::
NoSummary
);
QVBoxLayout
*
box
=
new
QVBoxLayout
(
this
);
box
->
setMargin
(
0
);
box
->
addWidget
(
details
);
QWidget
*
widget
=
new
QWidget
(
details
);
details
->
setWidget
(
widget
);
QFormLayout
*
layout
=
new
QFormLayout
(
widget
);
const
QStringList
gnuVersionArgs
=
QStringList
(
QLatin1String
(
"--version"
));
m_compilerCommand
->
setExpectedKind
(
Utils
::
PathChooser
::
ExistingCommand
);
m_compilerCommand
->
setCommandVersionArguments
(
gnuVersionArgs
);
l
ayout
->
addRow
(
tr
(
"&Compiler path:"
),
m_compilerCommand
);
l
ayout
->
addRow
(
tr
(
"&ABI:"
),
m_abiWidget
);
m_mainL
ayout
->
addRow
(
tr
(
"&Compiler path:"
),
m_compilerCommand
);
m_mainL
ayout
->
addRow
(
tr
(
"&ABI:"
),
m_abiWidget
);
m_abiWidget
->
setEnabled
(
false
);
addErrorLabel
(
layout
);
addErrorLabel
();
setFromToolchain
();
...
...
@@ -702,7 +690,7 @@ Internal::GccToolChainConfigWidget::GccToolChainConfigWidget(GccToolChain *tc) :
connect
(
m_abiWidget
,
SIGNAL
(
abiChanged
()),
this
,
SIGNAL
(
dirty
()));
}
void
Internal
::
GccToolChainConfigWidget
::
apply
()
void
Internal
::
GccToolChainConfigWidget
::
apply
Impl
()
{
if
(
toolChain
()
->
isAutoDetected
())
return
;
...
...
@@ -727,7 +715,7 @@ void Internal::GccToolChainConfigWidget::setFromToolchain()
blockSignals
(
blocked
);
}
bool
Internal
::
GccToolChainConfigWidget
::
isDirty
()
const
bool
Internal
::
GccToolChainConfigWidget
::
isDirty
Impl
()
const
{
GccToolChain
*
tc
=
static_cast
<
GccToolChain
*>
(
toolChain
());
Q_ASSERT
(
tc
);
...
...
@@ -735,12 +723,11 @@ bool Internal::GccToolChainConfigWidget::isDirty() const
||
m_abiWidget
->
currentAbi
()
!=
tc
->
targetAbi
();
}
void
Internal
::
GccToolChainConfigWidget
::
makeReadOnly
()
void
Internal
::
GccToolChainConfigWidget
::
makeReadOnly
Impl
()
{
m_compilerCommand
->
setEnabled
(
false
);
m_abiWidget
->
setEnabled
(
false
);
m_isReadOnly
=
true
;
ToolChainConfigWidget
::
makeReadOnly
();
}
void
Internal
::
GccToolChainConfigWidget
::
handleCompilerCommandChange
()
...
...
src/plugins/projectexplorer/gcctoolchainfactories.h
View file @
95896519
...
...
@@ -85,15 +85,16 @@ class GccToolChainConfigWidget : public ToolChainConfigWidget
public:
GccToolChainConfigWidget
(
GccToolChain
*
);
void
apply
();
void
discard
()
{
setFromToolchain
();
}
bool
isDirty
()
const
;
void
makeReadOnly
();
private
slots
:
void
handleCompilerCommandChange
();
private:
void
applyImpl
();
void
discardImpl
()
{
setFromToolchain
();
}
bool
isDirtyImpl
()
const
;
void
makeReadOnlyImpl
();
void
setFromToolchain
();
Utils
::
PathChooser
*
m_compilerCommand
;
...
...
src/plugins/projectexplorer/msvctoolchain.cpp
View file @
95896519
...
...
@@ -405,17 +405,13 @@ MsvcToolChainConfigWidget::MsvcToolChainConfigWidget(ToolChain *tc) :
ToolChainConfigWidget
(
tc
),
m_varsBatDisplayLabel
(
new
QLabel
(
this
))
{
QFormLayout
*
formLayout
=
new
QFormLayout
(
this
);
formLayout
->
addRow
(
new
QLabel
(
tc
->
displayName
()));
m_mainLayout
->
addRow
(
new
QLabel
(
tc
->
displayName
()));
m_varsBatDisplayLabel
->
setTextInteractionFlags
(
Qt
::
TextBrowserInteraction
);
form
Layout
->
addRow
(
tr
(
"Initialization:"
),
m_varsBatDisplayLabel
);
addErrorLabel
(
formLayout
);
m_main
Layout
->
addRow
(
tr
(
"Initialization:"
),
m_varsBatDisplayLabel
);
addErrorLabel
();
setFromToolChain
();
}
void
MsvcToolChainConfigWidget
::
apply
()
{
}
void
MsvcToolChainConfigWidget
::
setFromToolChain
()
{
MsvcToolChain
*
tc
=
static_cast
<
MsvcToolChain
*>
(
toolChain
());
...
...
@@ -428,11 +424,6 @@ void MsvcToolChainConfigWidget::setFromToolChain()
m_varsBatDisplayLabel
->
setText
(
varsBatDisplay
);
}
bool
MsvcToolChainConfigWidget
::
isDirty
()
const
{
return
false
;
}
// --------------------------------------------------------------------------
// MsvcToolChainFactory
// --------------------------------------------------------------------------
...
...
src/plugins/projectexplorer/msvctoolchain.h
View file @
95896519
...
...
@@ -115,11 +115,12 @@ class MsvcToolChainConfigWidget : public ToolChainConfigWidget
public:
MsvcToolChainConfigWidget
(
ToolChain
*
);
void
apply
();
void
discard
()
{
setFromToolChain
();
}
bool
isDirty
()
const
;
private:
void
applyImpl
()
{}
void
discardImpl
()
{
setFromToolChain
();
}
bool
isDirtyImpl
()
const
{
return
false
;
}
void
makeReadOnlyImpl
()
{}
void
setFromToolChain
();
QLabel
*
m_varsBatDisplayLabel
;
...
...
src/plugins/projectexplorer/toolchainconfigwidget.cpp
View file @
95896519
...
...
@@ -47,11 +47,29 @@ ToolChainConfigWidget::ToolChainConfigWidget(ToolChain *tc) :
m_toolChain
(
tc
),
m_errorLabel
(
0
)
{
QTC_CHECK
(
tc
);
m_nameLineEdit
=
new
QLineEdit
(
this
);
m_nameLineEdit
->
setText
(
tc
->
displayName
());
m_mainLayout
=
new
QFormLayout
(
this
);
m_mainLayout
->
addRow
(
tr
(
"Name:"
),
m_nameLineEdit
);
connect
(
m_nameLineEdit
,
SIGNAL
(
textChanged
(
QString
)),
SIGNAL
(
dirty
()));
}
void
ToolChainConfigWidget
::
apply
()
{
m_toolChain
->
setDisplayName
(
m_nameLineEdit
->
text
());
applyImpl
();
}
void
ToolChainConfigWidget
::
discard
()
{
m_nameLineEdit
->
setText
(
m_toolChain
->
displayName
());
discardImpl
();
}
void
ToolChainConfigWidget
::
setDisplayName
(
const
QString
&
name
)
bool
ToolChainConfigWidget
::
isDirty
()
const
{
m_toolChain
->
setD
isplayName
(
name
);
return
m_nameLineEdit
->
text
()
!=
m_toolChain
->
d
isplayName
(
)
||
isDirtyImpl
(
);
}
ToolChain
*
ToolChainConfigWidget
::
toolChain
()
const
...
...
@@ -60,24 +78,18 @@ ToolChain *ToolChainConfigWidget::toolChain() const
}
void
ToolChainConfigWidget
::
makeReadOnly
()
{
}
void
ToolChainConfigWidget
::
addErrorLabel
(
QFormLayout
*
lt
)
{
if
(
!
m_errorLabel
)
{
m_errorLabel
=
new
QLabel
;
m_errorLabel
->
setVisible
(
false
);
}
lt
->
addRow
(
m_errorLabel
);
m_nameLineEdit
->
setEnabled
(
false
);
makeReadOnlyImpl
();
}
void
ToolChainConfigWidget
::
addErrorLabel
(
QGridLayout
*
lt
,
int
row
,
int
column
,
int
colSpan
)
void
ToolChainConfigWidget
::
addErrorLabel
()
{
if
(
!
m_errorLabel
)
{
m_errorLabel
=
new
QLabel
;
m_errorLabel
->
setVisible
(
false
);
}
lt
->
addWidget
(
m_errorLabel
,
row
,
column
,
1
,
colSpan
);
m_mainLayout
->
addRow
(
m_errorLabel
);
}
void
ToolChainConfigWidget
::
setErrorMessage
(
const
QString
&
m
)
...
...
src/plugins/projectexplorer/toolchainconfigwidget.h
View file @
95896519
...
...
@@ -40,6 +40,7 @@
QT_BEGIN_NAMESPACE
class
QFormLayout
;
class
QGridLayout
;
class
QLineEdit
;
class
QLabel
;
QT_END_NAMESPACE
...
...
@@ -58,14 +59,12 @@ class PROJECTEXPLORER_EXPORT ToolChainConfigWidget : public QWidget
public:
ToolChainConfigWidget
(
ProjectExplorer
::
ToolChain
*
);
void
setDisplayName
(
const
QString
&
);
virtual
void
apply
()
=
0
;
virtual
void
discard
()
=
0
;
virtual
bool
isDirty
()
const
=
0
;
ProjectExplorer
::
ToolChain
*
toolChain
()
const
;
virtual
void
makeReadOnly
();
void
apply
();
void
discard
();
bool
isDirty
()
const
;
void
makeReadOnly
();
signals:
void
dirty
();
...
...
@@ -75,8 +74,14 @@ protected slots:
void
clearErrorMessage
();
protected:
void
addErrorLabel
(
QFormLayout
*
lt
);
void
addErrorLabel
(
QGridLayout
*
lt
,
int
row
=
0
,
int
column
=
0
,
int
colSpan
=
1
);
virtual
void
applyImpl
()
=
0
;
virtual
void
discardImpl
()
=
0
;
virtual
bool
isDirtyImpl
()
const
=
0
;
virtual
void
makeReadOnlyImpl
()
=
0
;
void
addErrorLabel
();
QFormLayout
*
m_mainLayout
;
QLineEdit
*
m_nameLineEdit
;
private:
ToolChain
*
m_toolChain
;
...
...
src/plugins/projectexplorer/toolchainoptionspage.cpp
View file @
95896519
...
...
@@ -38,6 +38,7 @@
#include <coreplugin/icore.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/detailswidget.h>
#include <utils/qtcassert.h>
#include <QAction>
...
...
@@ -67,11 +68,8 @@ public:
if
(
p
)
p
->
childNodes
.
append
(
this
);
widget
=
tc
?
tc
->
configurationWidget
()
:
0
;
if
(
widget
)
{
if
(
tc
&&
tc
->
isAutoDetected
())
widget
->
makeReadOnly
();
widget
->
setVisible
(
false
);
}
if
(
widget
&&
tc
->
isAutoDetected
())
widget
->
makeReadOnly
();
}
~
ToolChainNode
()
...
...
@@ -86,7 +84,6 @@ public:
}
ToolChainNode
*
parent
;
QString
newName
;
QList
<
ToolChainNode
*>
childNodes
;
ToolChain
*
toolChain
;
ToolChainConfigWidget
*
widget
;
...
...
@@ -97,12 +94,9 @@ public:
// ToolChainModel
// --------------------------------------------------------------------------
ToolChainModel
::
ToolChainModel
(
QBoxLayout
*
parentLayout
,
QObject
*
parent
)
:
QAbstractItemModel
(
parent
),
m_parentLayout
(
parentLayout
)
ToolChainModel
::
ToolChainModel
(
QObject
*
parent
)
:
QAbstractItemModel
(
parent
)
{
Q_ASSERT
(
m_parentLayout
);
connect
(
ToolChainManager
::
instance
(),
SIGNAL
(
toolChainAdded
(
ProjectExplorer
::
ToolChain
*
)),
this
,
SLOT
(
addToolChain
(
ProjectExplorer
::
ToolChain
*
)));
connect
(
ToolChainManager
::
instance
(),
SIGNAL
(
toolChainRemoved
(
ProjectExplorer
::
ToolChain
*
)),
...
...
@@ -189,16 +183,13 @@ QVariant ToolChainModel::data(const QModelIndex &index, int role) const
if
(
node
->
toolChain
)
{
if
(
role
==
Qt
::
FontRole
)
{
QFont
f
=
QApplication
::
font
();
if
(
node
->
changed
)
{
if
(
node
->
changed
)
f
.
setBold
(
true
);
}
return
f
;
}
if
(
role
==
Qt
::
DisplayRole
||
role
==
Qt
::
EditRole
)
{
if
(
index
.
column
()
==
0
)
{
return
node
->
newName
.
isEmpty
()
?
node
->
toolChain
->
displayName
()
:
node
->
newName
;
}
if
(
role
==
Qt
::
DisplayRole
)
{
if
(
index
.
column
()
==
0
)
return
node
->
toolChain
->
displayName
();
return
node
->
toolChain
->
typeDisplayName
();
}
if
(
role
==
Qt
::
ToolTipRole
)
{
...
...
@@ -209,21 +200,6 @@ QVariant ToolChainModel::data(const QModelIndex &index, int role) const
return
QVariant
();
}
bool
ToolChainModel
::
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
)
{
if
(
!
index
.
isValid
())
return
false
;
ToolChainNode
*
node
=
static_cast
<
ToolChainNode
*>
(
index
.
internalPointer
());
Q_ASSERT
(
node
);
if
(
index
.
column
()
!=
0
||
!
node
->
toolChain
||
role
!=
Qt
::
EditRole
)
return
false
;
node
->
newName
=
value
.
toString
();
if
(
!
node
->
newName
.
isEmpty
()
&&
node
->
newName
!=
node
->
toolChain
->
displayName
())
node
->
changed
=
true
;
return
true
;
}
Qt
::
ItemFlags
ToolChainModel
::
flags
(
const
QModelIndex
&
index
)
const
{
if
(
!
index
.
isValid
())
...
...
@@ -234,12 +210,7 @@ Qt::ItemFlags ToolChainModel::flags(const QModelIndex &index) const
if
(
!
node
->
toolChain
)
return
Qt
::
ItemIsEnabled
;
if
(
node
->
toolChain
->
isAutoDetected
())
return
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsSelectable
;
else
if
(
index
.
column
()
==
0
)
return
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsSelectable
|
Qt
::
ItemIsEditable
;
else
return
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsSelectable
;
return
Qt
::
ItemIsEnabled
|
Qt
::
ItemIsSelectable
;
}
QVariant
ToolChainModel
::
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
)
const
...
...
@@ -316,10 +287,6 @@ void ToolChainModel::apply()
Q_ASSERT
(
n
);
if
(
n
->
changed
)
{
Q_ASSERT
(
n
->
toolChain
);
if
(
!
n
->
newName
.
isEmpty
())
{
n
->
toolChain
->
setDisplayName
(
n
->
newName
);
n
->
newName
.
clear
();
}
if
(
n
->
widget
)
n
->
widget
->
apply
();
n
->
changed
=
false
;
...
...
@@ -408,10 +375,8 @@ QModelIndex ToolChainModel::index(ToolChainNode *node, int column) const
ToolChainNode
*
ToolChainModel
::
createNode
(
ToolChainNode
*
parent
,
ToolChain
*
tc
,
bool
changed
)
{
ToolChainNode
*
node
=
new
ToolChainNode
(
parent
,
tc
,
changed
);
if
(
node
->
widget
)
{
m_parentLayout
->
addWidget
(
node
->
widget
);
if
(
node
->
widget
)
connect
(
node
->
widget
,
SIGNAL
(
dirty
()),
this
,
SLOT
(
setDirty
()));
}
return
node
;
}
...
...
@@ -475,8 +440,8 @@ void ToolChainModel::removeToolChain(ToolChain *tc)
// --------------------------------------------------------------------------
ToolChainOptionsPage
::
ToolChainOptionsPage
()
:
m_model
(
0
),
m_selectionModel
(
0
),
m_
currentTcWidget
(
0
),
m_toolChainView
(
0
),
m_addButton
(
0
),
m_cloneButton
(
0
),
m_delButton
(
0
)
m_model
(
0
),
m_selectionModel
(
0
),
m_
toolChainView
(
0
),
m_container
(
0
),
m_addButton
(
0
),
m_cloneButton
(
0
),
m_delButton
(
0
)
{
setId
(
QLatin1String
(
Constants
::
TOOLCHAIN_SETTINGS_PAGE_ID
));
setDisplayName
(
tr
(
"Tool Chains"
));
...
...
@@ -491,8 +456,6 @@ QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
// Actual page setup:
m_configWidget
=
new
QWidget
(
parent
);
m_currentTcWidget
=
0
;
m_toolChainView
=
new
QTreeView
(
m_configWidget
);
m_toolChainView
->
setUniformRowHeights
(
true
);
m_toolChainView
->
header
()
->
setStretchLastSection
(
false
);
...
...
@@ -501,6 +464,10 @@ QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
m_cloneButton
=
new
QPushButton
(
tr
(
"Clone"
),
m_configWidget
);
m_delButton
=
new
QPushButton
(
tr
(
"Remove"
),
m_configWidget
);
m_container
=
new
Utils
::
DetailsWidget
(
m_configWidget
);
m_container
->
setState
(
Utils
::
DetailsWidget
::
NoSummary
);
m_container
->
setVisible
(
false
);
QVBoxLayout
*
buttonLayout
=
new
QVBoxLayout
();
buttonLayout
->
setSpacing
(
6
);
buttonLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
...
...
@@ -511,6 +478,7 @@ QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
QVBoxLayout
*
verticalLayout
=
new
QVBoxLayout
();
verticalLayout
->
addWidget
(
m_toolChainView
);
verticalLayout
->
addWidget
(
m_container
);
QHBoxLayout
*
horizontalLayout
=
new
QHBoxLayout
(
m_configWidget
);
horizontalLayout
->
addLayout
(
verticalLayout
);
...
...
@@ -587,7 +555,6 @@ void ToolChainOptionsPage::finish()
m_configWidget
=
0
;
// deleted by settingsdialog
m_selectionModel
=
0
;
// child of m_configWidget
m_currentTcWidget
=
0
;
// deleted by the model
// childs of m_configWidget
m_toolChainView
=
0
;
m_addButton
=
0
;
...
...
@@ -602,14 +569,11 @@ bool ToolChainOptionsPage::matches(const QString &s) const
void
ToolChainOptionsPage
::
toolChainSelectionChanged
()
{
if
(
m_currentTcWidget
)
m_currentTcWidget
->
setVisible
(
false
);
QModelIndex
current
=
currentIndex
();
m_currentTcWidget
=
current
.
isValid
()
?
m_model
->
widget
(
current
)
:
0
;
if
(
m_
currentTcWidget
)
m_c
urrentTcWidget
->
setVisible
(
true
);
(
void
)
m_container
->
takeWidget
();
// Prevent deletion.
QWidget
*
currentTcWidget
=
current
.
isValid
()
?
m_model
->
widget
(
current
)
:
0
;
m_container
->
setWidget
(
currentTcWidget
)
;
m_c
ontainer
->
setVisible
(
currentTcWidget
!=
0
);
updateState
();
}
...
...
src/plugins/projectexplorer/toolchainoptionspage.h
View file @
95896519
...
...
@@ -43,6 +43,8 @@ class QTreeView;
class
QTreeWidgetItem
;
QT_END_NAMESPACE
namespace
Utils
{
class
DetailsWidget
;
}
namespace
ProjectExplorer
{
class
ToolChain
;
...
...
@@ -62,7 +64,7 @@ class ToolChainModel : public QAbstractItemModel
Q_OBJECT
public:
explicit
ToolChainModel
(
QBoxLayout
*
parentLayout
,
QObject
*
parent
=
0
);
explicit
ToolChainModel
(
QObject
*
parent
=
0
);
~
ToolChainModel
();
QModelIndex
index
(
int
row
,
int
column
,
const
QModelIndex
&
parent
=
QModelIndex
())
const
;
...
...
@@ -72,7 +74,6 @@ public:
int
columnCount
(
const
QModelIndex
&
parent
=
QModelIndex
())
const
;
QVariant
data
(
const
QModelIndex
&
index
,
int
role
=
Qt
::
DisplayRole
)
const
;
bool
setData
(
const
QModelIndex
&
index
,
const
QVariant
&
value
,
int
role
=
Qt
::
EditRole
);
Qt
::
ItemFlags
flags
(
const
QModelIndex
&
index
)
const
;
QVariant
headerData
(
int
section
,
Qt
::
Orientation
orientation
,
int
role
=
Qt
::
DisplayRole
)
const
;
...
...
@@ -107,8 +108,6 @@ private:
QList
<
ToolChainNode
*>
m_toAddList
;
QList
<
ToolChainNode
*>
m_toRemoveList
;
QBoxLayout
*
m_parentLayout
;
};
// --------------------------------------------------------------------------
...
...
@@ -142,8 +141,8 @@ private:
ToolChainModel
*
m_model
;
QList
<
ToolChainFactory
*>
m_factories
;
QItemSelectionModel
*
m_selectionModel
;
ToolChainConfigWidget
*
m_currentTcWidget
;
QTreeView
*
m_toolChainView
;
Utils
::
DetailsWidget
*
m_container
;
QPushButton
*
m_addButton
;
QPushButton
*
m_cloneButton
;
QPushButton
*
m_delButton
;
...
...
src/plugins/projectexplorer/wincetoolchain.cpp
View file @
95896519
...
...
@@ -469,11 +469,10 @@ WinCEToolChainConfigWidget::WinCEToolChainConfigWidget(ToolChain *tc) :
WinCEToolChain
*
toolChain
=
static_cast
<
WinCEToolChain
*>
(
tc
);
QTC_ASSERT
(
tc
,
return
);
QFormLayout
*
formLayout
=
new
QFormLayout
(
this
);
formLayout
->
addRow
(
tr
(
"SDK:"
),
new
QLabel
(
toolChain
->
displayName
()));
formLayout
->
addRow
(
tr
(
"WinCE Version:"
),
new
QLabel
(
toolChain
->
ceVer
()));
formLayout
->
addRow
(
tr
(
"ABI:"
),
new
QLabel
(
toolChain
->
targetAbi
().
toString
()));
addErrorLabel
(
formLayout
);
m_mainLayout
->
addRow
(
tr
(
"SDK:"
),
new
QLabel
(
toolChain
->
displayName
()));
m_mainLayout
->
addRow
(
tr
(
"WinCE Version:"
),
new
QLabel
(
toolChain
->
ceVer
()));
m_mainLayout
->
addRow
(
tr
(
"ABI:"
),
new
QLabel
(
toolChain
->
targetAbi
().
toString
()));
addErrorLabel
();
}
}
// namespace Internal
...
...
src/plugins/projectexplorer/wincetoolchain.h
View file @
95896519
...
...
@@ -99,10 +99,11 @@ class WinCEToolChainConfigWidget : public ToolChainConfigWidget
public:
WinCEToolChainConfigWidget
(
ToolChain
*
);
void
apply
()
{}
void
discard
()
{
}
bool
isDirty
()
const
{
return
false
;}
private:
void
applyImpl
()
{}
void
discardImpl
()
{
}
bool
isDirtyImpl
()
const
{
return
false
;}
void
makeReadOnlyImpl
()
{}
};
class
WinCEToolChainFactory
:
public
ToolChainFactory
...
...
src/plugins/qt4projectmanager/qt-s60/rvcttoolchain.cpp
View file @
95896519
...
...
@@ -380,7 +380,7 @@ RvctToolChainConfigWidget::~RvctToolChainConfigWidget()
delete
m_ui
;
}
void
RvctToolChainConfigWidget
::
apply
()
void
RvctToolChainConfigWidget
::
apply
Impl
()
{
RvctToolChain
*
tc
=
static_cast
<
RvctToolChain
*>
(
toolChain
());
Q_ASSERT
(
tc
);
...
...
@@ -404,7 +404,7 @@ void RvctToolChainConfigWidget::setFromToolChain()
m_ui
->
versionComboBox
->
setCurrentIndex
(
static_cast
<
int
>
(
tc
->
armVersion
()));
}
bool
RvctToolChainConfigWidget
::
isDirty
()
const
bool
RvctToolChainConfigWidget
::
isDirty
Impl
()
const
{