mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-30 17:58:37 +08:00
UI: Initialize max length of LineEditAutoResize in constructor
LineEditAutoResize didn't have its maxLength initialized in the constructor, leaving it to be a random value until set via setMaxLength. The one place where LineEditAutoResize was used immediately set this after calling the constructor, but if we use this anywhere else in the future it makes sense to have this initialized. As it is meant to mostly behave like a QLineEdit, lets use the same default value of 32767. Detected by PVS-Studio.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "lineedit-autoresize.hpp"
|
||||
|
||||
LineEditAutoResize::LineEditAutoResize()
|
||||
LineEditAutoResize::LineEditAutoResize() : m_maxLength(32767)
|
||||
{
|
||||
connect(this, &LineEditAutoResize::textChanged, this,
|
||||
&LineEditAutoResize::checkTextLength);
|
||||
|
||||
Reference in New Issue
Block a user