From 98dcf1682eb869c0afe4fe430d3f56feecc7f1d1 Mon Sep 17 00:00:00 2001
From: Marco Christian Krenn <krenn@webconsulting.at>
Date: Fri, 31 Mar 2017 12:15:56 +0200
Subject: [PATCH] [TASK] Change duplicate icon identifiers to actions-close

The following icons which were previously used in the Install tool
were all replaced by "actions-close" which acts as a synonym.

* actions-document-close
* actions-message-error-close

Resolves: #80601
Releases: master
Change-Id: I95358aa6e34237f0fa27049aadf0ae788fef2172
Reviewed-on: https://review.typo3.org/52285
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benjamin Kott <benjamin.kott@outlook.com>
Tested-by: Benjamin Kott <benjamin.kott@outlook.com>
---
 .../Controller/EditDocumentController.php     |  2 +-
 .../Controller/File/EditFileController.php    |  2 +-
 .../Controller/Wizard/TableController.php     |  2 +-
 .../Private/Templates/Clipboard/Main.html     |  2 +-
 .../Controller/PermissionAjaxController.php   |  4 +--
 .../Controller/PermissionController.php       |  2 +-
 .../Partials/BackendUser/OnlineListRow.html   |  2 +-
 .../core/Classes/Imaging/IconRegistry.php     |  7 +++-
 ...eActions-document-closeToActions-close.rst | 32 +++++++++++++++++++
 .../Tests/Unit/Imaging/IconFactoryTest.php    |  6 ++--
 .../core/Tests/Unit/Imaging/IconTest.php      |  2 +-
 .../Controller/FormEditorController.php       |  2 +-
 .../Backend/FormEditor/InspectorComponent.js  |  2 +-
 .../Classes/Controller/LanguageController.php |  2 +-
 .../Controller/Wizard/RteController.php       |  2 +-
 .../Controller/SchedulerModuleController.php  |  4 +--
 .../TypoScriptTemplateModuleController.php    |  2 +-
 17 files changed, 57 insertions(+), 20 deletions(-)
 create mode 100644 typo3/sysext/core/Documentation/Changelog/master/Deprecation-80601-ChangeActions-document-closeToActions-close.rst

diff --git a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php
index 598989dcb8f0..61fa9d817c70 100644
--- a/typo3/sysext/backend/Classes/Controller/EditDocumentController.php
+++ b/typo3/sysext/backend/Classes/Controller/EditDocumentController.php
@@ -1271,7 +1271,7 @@ class EditDocumentController extends AbstractModule
             ->setClasses('t3js-editform-close')
             ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
             ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
-                'actions-document-close',
+                'actions-close',
                 Icon::SIZE_SMALL
             ));
         $buttonBar->addButton($closeButton);
diff --git a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php
index 1842e3f0f42e..53093d8fbcb8 100644
--- a/typo3/sysext/backend/Classes/Controller/File/EditFileController.php
+++ b/typo3/sysext/backend/Classes/Controller/File/EditFileController.php
@@ -274,7 +274,7 @@ class EditFileController extends AbstractModule
             ->setHref('#')
             ->setOnClick('backToList(); return false;')
             ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.cancel'))
-            ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+            ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
         $buttonBar->addButton($closeButton, ButtonBar::BUTTON_POSITION_LEFT, 10);
 
         // Make shortcut:
diff --git a/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php b/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
index 4d15127575ef..9fe0d137918e 100644
--- a/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
+++ b/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
@@ -184,7 +184,7 @@ class TableController extends AbstractWizardController
             $closeButton = $buttonBar->makeLinkButton()
                 ->setHref($this->P['returnUrl'])
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
             $buttonBar->addButton($closeButton);
             // Save
             $saveButton = $buttonBar->makeInputButton()
diff --git a/typo3/sysext/backend/Resources/Private/Templates/Clipboard/Main.html b/typo3/sysext/backend/Resources/Private/Templates/Clipboard/Main.html
index 8dc5c7338f37..62914f8711d5 100644
--- a/typo3/sysext/backend/Resources/Private/Templates/Clipboard/Main.html
+++ b/typo3/sysext/backend/Resources/Private/Templates/Clipboard/Main.html
@@ -18,7 +18,7 @@
 							<f:if condition="{elementCount}">
 								<a href="{removeAllUrl}#clip_head"
 									 title="{f:translate(key: 'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:buttons.clear')}" class="btn btn-danger">
-									<f:format.raw><core:icon identifier="actions-document-close" alternativeMarkupIdentifier="inline"></core:icon></f:format.raw>
+									<f:format.raw><core:icon identifier="actions-close" alternativeMarkupIdentifier="inline"></core:icon></f:format.raw>
 								</a>
 							</f:if>
 						</td>
diff --git a/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php b/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php
index ebd49262a504..696513e430df 100644
--- a/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php
+++ b/typo3/sysext/beuser/Classes/Controller/PermissionAjaxController.php
@@ -197,7 +197,7 @@ class PermissionAjaxController
         $options = '<option value="0"></option>' . $options;
         $selector = '<select name="new_page_owner" id="new_page_owner">' . $options . '</select>';
         $saveButton = '<a class="saveowner btn btn-default" data-page="' . $page . '" data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '" title="Change owner">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
-        $cancelButton = '<a class="restoreowner btn btn-default" data-page="' . $page . '"  data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '"' . (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+        $cancelButton = '<a class="restoreowner btn btn-default" data-page="' . $page . '"  data-owner="' . $ownerUid . '" data-element-id="' . $elementId . '"' . (!empty($username) ? ' data-username="' . htmlspecialchars($username) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-close', Icon::SIZE_SMALL)->render() . '</a>';
         return '<span id="' . $elementId . '">'
             . $selector
             . '<span class="btn-group">'
@@ -246,7 +246,7 @@ class PermissionAjaxController
         $options = '<option value="0"></option>' . $options;
         $selector = '<select name="new_page_group" id="new_page_group">' . $options . '</select>';
         $saveButton = '<a class="savegroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '" title="Change group">' . $this->iconFactory->getIcon('actions-document-save', Icon::SIZE_SMALL)->render() . '</a>';
-        $cancelButton = '<a class="restoregroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '"' . (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+        $cancelButton = '<a class="restoregroup btn btn-default" data-page="' . $page . '" data-group="' . $groupUid . '" data-element-id="' . $elementId . '"' . (!empty($groupname) ? ' data-groupname="' . htmlspecialchars($groupname) . '"' : '') . ' title="Cancel">' . $this->iconFactory->getIcon('actions-close', Icon::SIZE_SMALL)->render() . '</a>';
         return '<span id="' . $elementId . '">'
             . $selector
             . '<span class="btn-group">'
diff --git a/typo3/sysext/beuser/Classes/Controller/PermissionController.php b/typo3/sysext/beuser/Classes/Controller/PermissionController.php
index fae4de3ca3c8..8b2b66b6e91e 100644
--- a/typo3/sysext/beuser/Classes/Controller/PermissionController.php
+++ b/typo3/sysext/beuser/Classes/Controller/PermissionController.php
@@ -171,7 +171,7 @@ class PermissionController extends ActionController
                 ->setHref($closeUrl)
                 ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
                 ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon(
-                    'actions-document-close',
+                    'actions-close',
                     Icon::SIZE_SMALL
                 ));
             $buttonBar->addButton($closeButton);
diff --git a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html
index e4aff961d218..e97229eb4adc 100644
--- a/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html
+++ b/typo3/sysext/beuser/Resources/Private/Partials/BackendUser/OnlineListRow.html
@@ -35,7 +35,7 @@
 							arguments="{backendUser: onlineUser.backendUser, sessionId: session.id}"
 							data="{severity: 'warning', title: '{f:translate(key: \'endSession\')}', content: '{f:translate(key: \'reallyLogout\')} {onlineUser.backendUser.userName}?', button-close-text: '{f:translate(key: \'LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel\')}'}"
 						>
-							<core:icon identifier="actions-document-close" />
+							<core:icon identifier="actions-close" />
 							<f:translate key="endSession" />
 						</f:link.action>
 					</f:else>
diff --git a/typo3/sysext/core/Classes/Imaging/IconRegistry.php b/typo3/sysext/core/Classes/Imaging/IconRegistry.php
index 42ba7e450e86..ef5292d5d45f 100644
--- a/typo3/sysext/core/Classes/Imaging/IconRegistry.php
+++ b/typo3/sysext/core/Classes/Imaging/IconRegistry.php
@@ -2926,7 +2926,12 @@ class IconRegistry implements SingletonInterface
      *
      * @var array
      */
-    protected $deprecatedIcons = [];
+    protected $deprecatedIcons = [
+        'actions-document-close' => [
+            'message' => '%s is deprecated since TYPO3 CMS 8, this icon will be removed in TYPO3 CMS 9',
+            'replacement' => 'actions-close'
+        ]
+    ];
 
     /**
      * @var string
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80601-ChangeActions-document-closeToActions-close.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80601-ChangeActions-document-closeToActions-close.rst
new file mode 100644
index 000000000000..ef58f65da770
--- /dev/null
+++ b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-80601-ChangeActions-document-closeToActions-close.rst
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+========================================================================
+Deprecation: #80601 - Change duplicate icon identifiers to actions-close
+========================================================================
+
+See :issue:`80601`
+
+Description
+===========
+
+The icon :code:`actions-document-close` has been marked as deprecated.
+
+
+Impact
+======
+
+Using the icon identifier :code:`actions-document-close` will trigger a deprecation log entry.
+
+Affected Installations
+======================
+
+Any installation using the icon identifier.
+
+
+Migration
+=========
+
+Use the new icon identifier :code:`actions-close` instead.
+
+
+.. index:: Backend
diff --git a/typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php b/typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php
index ad9c041eebc2..f1d427c8be2d 100644
--- a/typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php
+++ b/typo3/sysext/core/Tests/Unit/Imaging/IconFactoryTest.php
@@ -38,7 +38,7 @@ class IconFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     /**
      * @var string
      */
-    protected $registeredIconIdentifier = 'actions-document-close';
+    protected $registeredIconIdentifier = 'actions-close';
 
     /**
      * @var string
@@ -128,7 +128,7 @@ class IconFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
      */
     public function getIconByIdentifierReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed()
     {
-        $this->assertContains('<span class="t3js-icon icon icon-size-default icon-state-default icon-actions-document-close" data-identifier="actions-document-close">',
+        $this->assertContains('<span class="t3js-icon icon icon-size-default icon-state-default icon-actions-close" data-identifier="actions-close">',
             $this->subject->getIcon($this->registeredIconIdentifier)->render());
     }
 
@@ -138,7 +138,7 @@ class IconFactoryTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
      */
     public function getIconByIdentifierAndSizeReturnsIconWithCorrectMarkupIfRegisteredIconIdentifierIsUsed($size)
     {
-        $this->assertContains('<span class="t3js-icon icon icon-size-' . $size['expected'] . ' icon-state-default icon-actions-document-close" data-identifier="actions-document-close">',
+        $this->assertContains('<span class="t3js-icon icon icon-size-' . $size['expected'] . ' icon-state-default icon-actions-close" data-identifier="actions-close">',
             $this->subject->getIcon($this->registeredIconIdentifier, $size['input'])->render());
     }
 
diff --git a/typo3/sysext/core/Tests/Unit/Imaging/IconTest.php b/typo3/sysext/core/Tests/Unit/Imaging/IconTest.php
index 1cc71689133d..e7fee44bbf4a 100644
--- a/typo3/sysext/core/Tests/Unit/Imaging/IconTest.php
+++ b/typo3/sysext/core/Tests/Unit/Imaging/IconTest.php
@@ -31,7 +31,7 @@ class IconTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     /**
      * @var string
      */
-    protected $iconIdentifier = 'actions-document-close';
+    protected $iconIdentifier = 'actions-close';
 
     /**
      * @var string
diff --git a/typo3/sysext/form/Classes/Controller/FormEditorController.php b/typo3/sysext/form/Classes/Controller/FormEditorController.php
index 3a15aa862d92..3820a5924ed0 100644
--- a/typo3/sysext/form/Classes/Controller/FormEditorController.php
+++ b/typo3/sysext/form/Classes/Controller/FormEditorController.php
@@ -304,7 +304,7 @@ class FormEditorController extends AbstractBackendController
                 ->setHref(BackendUtility::getModuleUrl('web_FormFormbuilder'))
                 ->setClasses('t3-form-element-close-form-button hidden')
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
-                ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+                ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
 
             $saveButton = $buttonBar->makeInputButton()
                 ->setDataAttributes(['identifier' => 'saveButton'])
diff --git a/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/InspectorComponent.js b/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/InspectorComponent.js
index 30a3176cfbae..e7fb281944f0 100644
--- a/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/InspectorComponent.js
+++ b/typo3/sysext/form/Resources/Public/JavaScript/Backend/FormEditor/InspectorComponent.js
@@ -66,7 +66,7 @@ define(['jquery',
                 formElementSelectorControlsWrapper: 'inspectorEditorFormElementSelectorControlsWrapper',
                 formElementSelectorSplitButtonContainer: 'inspectorEditorFormElementSelectorSplitButtonContainer',
                 formElementSelectorSplitButtonListContainer: 'inspectorEditorFormElementSelectorSplitButtonListContainer',
-                iconNotAvailable: 'actions-message-error-close',
+                iconNotAvailable: 'actions-close',
                 iconPage: 'apps-pagetree-page-default',
                 iconTtContent: 'mimetypes-x-content-text',
                 inspector: 'inspector',
diff --git a/typo3/sysext/lang/Classes/Controller/LanguageController.php b/typo3/sysext/lang/Classes/Controller/LanguageController.php
index 7e4353a11de6..aa26f5f8726b 100644
--- a/typo3/sysext/lang/Classes/Controller/LanguageController.php
+++ b/typo3/sysext/lang/Classes/Controller/LanguageController.php
@@ -336,7 +336,7 @@ class LanguageController extends ActionController
         $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar()->addButton($downloadAllButton, ButtonBar::BUTTON_POSITION_LEFT);
 
         $cancelButton = $this->view->getModuleTemplate()->getDocHeaderComponent()->getButtonBar()->makeLinkButton()
-            ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL))
+            ->setIcon($this->view->getModuleTemplate()->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL))
             ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang.xlf:button.cancel'))
             ->setClasses('menuItem cancelItem disabled t3js-button-cancel')
             ->setDataAttributes(['action' => 'cancelLanguageUpdate'])
diff --git a/typo3/sysext/rtehtmlarea/Classes/Controller/Wizard/RteController.php b/typo3/sysext/rtehtmlarea/Classes/Controller/Wizard/RteController.php
index 39c6d07d2f17..13e7fa532d08 100644
--- a/typo3/sysext/rtehtmlarea/Classes/Controller/Wizard/RteController.php
+++ b/typo3/sysext/rtehtmlarea/Classes/Controller/Wizard/RteController.php
@@ -270,7 +270,7 @@ class RteController extends AbstractWizardController
             $closeButton = $buttonBar->makeLinkButton()
                 ->setHref($closeUrl)
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL));
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
             $buttonBar->addButton($closeButton, ButtonBar::BUTTON_POSITION_LEFT, 10);
 
             // Save
diff --git a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
index 6e7d68d24e88..2195061214ee 100644
--- a/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
+++ b/typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
@@ -1014,7 +1014,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
                     . ' data-button-close-text="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel')) . '"'
                     . ' data-content="' . htmlspecialchars($this->getLanguageService()->getLL('msg.stop')) . '"'
                     . ' title="' . htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:stop')) . '" class="icon">' .
-                    $this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL)->render() . '</a>';
+                    $this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL)->render() . '</a>';
                 $runAction = '<a class="btn btn-default" data-toggle="tooltip" data-container="body" href="' . htmlspecialchars($this->moduleUri . '&tx_scheduler[execute][]=' . $schedulerRecord['uid']) . '" title="' . htmlspecialchars($this->getLanguageService()->getLL('action.run_task')) . '" class="icon">' .
                     $this->moduleTemplate->getIconFactory()->getIcon('extensions-scheduler-run-task', Icon::SIZE_SMALL)->render() . '</a>';
                 $runCronAction = '<a class="btn btn-default" data-toggle="tooltip" data-container="body" href="' . htmlspecialchars($this->moduleUri . '&CMD=setNextExecutionTime&tx_scheduler[uid]=' . $schedulerRecord['uid']) . '" title="' . $this->getLanguageService()->getLL('action.run_task_cron', true) . '" class="icon">' .
@@ -1534,7 +1534,7 @@ class SchedulerModuleController extends \TYPO3\CMS\Backend\Module\BaseScriptClas
             // Close
             $closeButton = $buttonBar->makeLinkButton()
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:lang/Resources/Private/Language/locallang_common.xlf:cancel'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-close', Icon::SIZE_SMALL))
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL))
                 ->setOnClick('document.location=' . GeneralUtility::quoteJSvalue($this->moduleUri))
                 ->setHref('#');
             $buttonBar->addButton($closeButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
diff --git a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
index af68eaab7645..411cfeebd1f7 100644
--- a/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
+++ b/typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
@@ -358,7 +358,7 @@ class TypoScriptTemplateModuleController extends BaseScriptClass
                         ->setHref(BackendUtility::getModuleUrl('web_ts', ['id' => $this->id]))
                         ->setTitle($lang->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
                         ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
-                            'actions-document-close',
+                            'actions-close',
                             Icon::SIZE_SMALL
                         ));
                     $buttonBar->addButton($closeButton);
-- 
GitLab