chore: update static const declerations in AzQtComponent (#5826)
* chore: update static const declerations in AzQtComponent Signed-off-by: Michael Pollind <mpollind@gmail.com> * chore: update static const Signed-off-by: Michael Pollind <mpollind@gmail.com>
This commit is contained in:
@@ -53,14 +53,14 @@ static void OptimizedSetParent(QWidget* widget, QWidget* parent)
|
||||
|
||||
namespace AzQtComponents
|
||||
{
|
||||
static FancyDockingDropZoneConstants g_FancyDockingConstants;
|
||||
static const FancyDockingDropZoneConstants g_FancyDockingConstants;
|
||||
|
||||
// Constant for the threshold in pixels for snapping to edges while dragging for docking
|
||||
static const int g_snapThresholdInPixels = 15;
|
||||
|
||||
static QString g_minimizeButtonObjectName = "minimizeButton";
|
||||
static QString g_maximizeButtonObjectName = "maximizeButton";
|
||||
static QString g_closeButtonObjectName = "closeButton";
|
||||
static const QString MinimizeButtonObjectName = QStringLiteral("minimizeButton");
|
||||
static const QString MaximizeButtonObjectName = QStringLiteral("maximizeButton");
|
||||
static const QString CloseButtonObjectName = QStringLiteral("closeButton");
|
||||
|
||||
static Qt::Orientation orientation(Qt::DockWidgetArea area)
|
||||
{
|
||||
@@ -460,7 +460,7 @@ namespace AzQtComponents
|
||||
|
||||
// Minimize Icon
|
||||
QAction* minimizeAction = new QAction(tr("Minimize"));
|
||||
minimizeAction->setObjectName(g_minimizeButtonObjectName);
|
||||
minimizeAction->setObjectName(MinimizeButtonObjectName);
|
||||
|
||||
connect(minimizeAction, &QAction::triggered, this, [titleBar]() {
|
||||
titleBar->handleMinimize();
|
||||
@@ -470,7 +470,7 @@ namespace AzQtComponents
|
||||
|
||||
// Maximize Icon
|
||||
QAction* maximizeAction = new QAction(tr("Maximize"));
|
||||
maximizeAction->setObjectName(g_maximizeButtonObjectName);
|
||||
maximizeAction->setObjectName(MaximizeButtonObjectName);
|
||||
|
||||
connect(maximizeAction, &QAction::triggered, this, [titleBar]() {
|
||||
titleBar->handleMaximize();
|
||||
@@ -480,7 +480,7 @@ namespace AzQtComponents
|
||||
|
||||
// Close Icon
|
||||
QAction* closeAction = new QAction(tr("Close"));
|
||||
closeAction->setObjectName(g_closeButtonObjectName);
|
||||
closeAction->setObjectName(CloseButtonObjectName);
|
||||
|
||||
connect(closeAction, &QAction::triggered, this, [titleBar]() {
|
||||
titleBar->handleClose();
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace AzQtComponents
|
||||
{
|
||||
static FancyDockingDropZoneConstants g_Constants;
|
||||
static const FancyDockingDropZoneConstants g_Constants;
|
||||
|
||||
FancyDockingDropZoneConstants::FancyDockingDropZoneConstants()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
namespace AzQtComponents
|
||||
{
|
||||
static const char clearButtonActionNameC[] = "_q_qlineeditclearaction";
|
||||
static const QString ClearButtonActionNameC = QStringLiteral("_q_qlineeditclearaction");
|
||||
|
||||
struct BrowseEdit::InternalData
|
||||
{
|
||||
@@ -263,7 +263,7 @@ namespace AzQtComponents
|
||||
auto lineEdit = browseEdit->m_data->m_lineEdit;
|
||||
LineEdit::polish(style, lineEdit, lineEditConfig);
|
||||
|
||||
QAction* action = lineEdit->findChild<QAction*>(clearButtonActionNameC);
|
||||
QAction* action = lineEdit->findChild<QAction*>(ClearButtonActionNameC);
|
||||
if (action)
|
||||
{
|
||||
QStyleOptionFrame option;
|
||||
@@ -284,7 +284,7 @@ namespace AzQtComponents
|
||||
auto lineEdit = browseEdit->m_data->m_lineEdit;
|
||||
LineEdit::unpolish(style, lineEdit, lineEditConfig);
|
||||
|
||||
QAction* action = lineEdit->findChild<QAction*>(clearButtonActionNameC);
|
||||
QAction* action = lineEdit->findChild<QAction*>(ClearButtonActionNameC);
|
||||
if (action)
|
||||
{
|
||||
QStyleOptionFrame option;
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@ namespace AzQtComponents
|
||||
|
||||
namespace Internal
|
||||
{
|
||||
const char* OverlayWidgetLayer::s_layerStyle = "background-color:rgba(0, 0, 0, 179)";
|
||||
static const QString LayerStyle = QStringLiteral("background-color:rgba(0, 0, 0, 179)");
|
||||
|
||||
OverlayWidgetLayer::OverlayWidgetLayer(OverlayWidget* parent, QWidget* centerWidget, QWidget* breakoutWidget,
|
||||
const char* title, const OverlayWidgetButtonList& buttons)
|
||||
@@ -66,7 +66,7 @@ namespace AzQtComponents
|
||||
|
||||
if (breakoutWidget)
|
||||
{
|
||||
setStyleSheet(s_layerStyle);
|
||||
setStyleSheet(LayerStyle);
|
||||
setLayout(new QHBoxLayout());
|
||||
|
||||
// close the overlay if either dependent widget is destroyed
|
||||
@@ -100,7 +100,7 @@ namespace AzQtComponents
|
||||
}
|
||||
else
|
||||
{
|
||||
setStyleSheet(s_layerStyle);
|
||||
setStyleSheet(LayerStyle);
|
||||
}
|
||||
AddButtons(*m_ui.data(), buttons, parent == nullptr);
|
||||
}
|
||||
|
||||
-2
@@ -59,8 +59,6 @@ namespace AzQtComponents
|
||||
|
||||
bool eventFilter(QObject* object, QEvent* event) override;
|
||||
|
||||
static const char* s_layerStyle;
|
||||
|
||||
QVector<Button> m_buttons;
|
||||
QScopedPointer<Ui::OverlayWidgetLayer> m_ui;
|
||||
OverlayWidget* m_parent;
|
||||
|
||||
Reference in New Issue
Block a user