Small Code/Editor cleanup pass (#4909)

* Clean-up in ConfigGroup

Removed unused templated AddVar and related code.
Replaced legacy types with `AZ::` ones.
Cleaned up cpp file.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Add a few missing Q_OBJECT macros, remove some unused variables.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Apply some of clazy suggestions + simplifications

* removed `emit` from non-signal function calls.
* replaced `QStringLiteral("")` with a constexpr friendly
`QLatin1String()`

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix a CNewLevelDialog focus bug

Fixed an incorrect QTimer::singleShot invocation.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* match lambda to `messageChanged` signature

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* vs compilation fix + applied review

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* apply reviewer recommendation

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
Artur K
2021-10-29 10:59:18 +02:00
committed by GitHub
parent 37381489ee
commit a322d9e2b8
15 changed files with 169 additions and 221 deletions
+4 -3
View File
@@ -100,9 +100,10 @@ CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=nullptr*/)
m_level = "";
// First of all, keyboard focus is related to widget tab order, and the default tab order is based on the order in which
// widgets are constructed. Therefore, creating more widgets changes the keyboard focus. That is why setFocus() is called last.
// Secondly, using singleShot() allows setFocus() slot of the QLineEdit instance to be invoked right after the event system
// is ready to do so. Therefore, it is better to use singleShot() than directly call setFocus().
QTimer::singleShot(0, ui->LEVEL, SLOT(OnStartup()));
// in OnStartup()
// Secondly, using singleShot() allows OnStartup() slot of the QLineEdit instance to be invoked right after the event system
// is ready to do so. Therefore, it is better to use singleShot() than directly call OnStartup().
QTimer::singleShot(0, this, &CNewLevelDialog::OnStartup);
ReloadLevelFolder();
}