Skip to content

Commit

Permalink
fix: line edit not fully disabled
Browse files Browse the repository at this point in the history
Disable dTextEdit not textEdit;

Log: fix line edit not fully disabled
Issue: linuxdeepin/developer-center#5749
  • Loading branch information
asterwyx committed Apr 1, 2024
1 parent 54b939e commit d3e6941
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dcc-network-plugin/window/sections/genericsection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void GenericSection::setConnectionType(ConnectionSettings::ConnectionType connTy

bool GenericSection::connectionNameIsEditable()
{
return m_connIdItem->isEnabled();
return m_connIdItem->dTextEdit()->isEnabled();
}

const QString GenericSection::connectionName() const
Expand Down Expand Up @@ -96,8 +96,8 @@ bool GenericSection::autoConnectChecked() const

void GenericSection::setConnectionNameEditable(const bool editable)
{
m_connIdItem->textEdit()->setClearButtonEnabled(editable);
m_connIdItem->textEdit()->setEnabled(editable);
m_connIdItem->dTextEdit()->setClearButtonEnabled(editable);
m_connIdItem->dTextEdit()->setEnabled(editable);
}

void GenericSection::initUI()
Expand Down
8 changes: 4 additions & 4 deletions dcc-network-plugin/window/sections/wirelesssection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include "wirelesssection.h"

#include <DSpinBox>
#include <DLineEdit>

#include <QComboBox>
#include <QLineEdit>

#include <networkmanagerqt/manager.h>
#include <networkmanagerqt/wireddevice.h>
Expand Down Expand Up @@ -108,13 +108,13 @@ void WirelessSection::saveSettings()

void WirelessSection::setSsidEditable(const bool editable)
{
m_apSsid->textEdit()->setClearButtonEnabled(editable);
m_apSsid->textEdit()->setEnabled(editable);
m_apSsid->dTextEdit()->setClearButtonEnabled(editable);
m_apSsid->dTextEdit()->setEnabled(editable);
}

bool WirelessSection::ssidIsEditable() const
{
return m_apSsid->isEnabled();
return m_apSsid->dTextEdit()->isEnabled();
}

const QString WirelessSection::ssid() const
Expand Down

0 comments on commit d3e6941

Please sign in to comment.