Revert r4900

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@4902 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2017-02-05 16:18:50 +00:00
parent e233d7ad77
commit 41659fa6fd
98 changed files with 606 additions and 606 deletions

View File

@@ -157,7 +157,7 @@ bool ElementInfoWidget::event(QEvent *event)
*/
void ElementInfoWidget::enableLiveEdit()
{
for (ElementInfoPartWidget *eipw: m_eipw_list)
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
{
connect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
connect(eipw, &ElementInfoPartWidget::showClicked, this, &ElementInfoWidget::apply);
@@ -170,7 +170,7 @@ void ElementInfoWidget::enableLiveEdit()
*/
void ElementInfoWidget::disableLiveEdit()
{
for (ElementInfoPartWidget *eipw: m_eipw_list)
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
{
disconnect(eipw, &ElementInfoPartWidget::textChanged, this, &ElementInfoWidget::apply);
disconnect(eipw, &ElementInfoPartWidget::showClicked, this, &ElementInfoWidget::apply);
@@ -183,7 +183,7 @@ void ElementInfoWidget::disableLiveEdit()
*/
void ElementInfoWidget::buildInterface()
{
for (QString str: QETApp::elementInfoKeys())
foreach (QString str, QETApp::elementInfoKeys())
{
ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETApp::elementTranslatedInfoKey(str), this);
ui->scroll_vlayout->addWidget(eipw);
@@ -199,7 +199,7 @@ void ElementInfoWidget::buildInterface()
*/
ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const
{
for (ElementInfoPartWidget *eipw: m_eipw_list)
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
{
if (eipw->key() == key)
return eipw;
@@ -219,7 +219,7 @@ void ElementInfoWidget::updateUi()
if (m_live_edit) disableLiveEdit();
DiagramContext element_info = m_element->elementInformations();
for (ElementInfoPartWidget *eipw: m_eipw_list)
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
{
eipw -> setText (element_info[eipw->key()].toString());
@@ -246,7 +246,7 @@ DiagramContext ElementInfoWidget::currentInfo() const
{
DiagramContext info_;
for (ElementInfoPartWidget *eipw: m_eipw_list)
foreach (ElementInfoPartWidget *eipw, m_eipw_list)
if (!eipw->text().isEmpty()) //add value only if they're something to store
info_.addValue(eipw->key(), eipw->text(), eipw->mustShow());