mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:37:34 +00:00
NetworkSettings: Convert NetworkSettingsWidget
to a failable factory
This commit is contained in:
parent
956a932a87
commit
754a5bda7a
2 changed files with 20 additions and 9 deletions
|
@ -13,14 +13,17 @@
|
|||
namespace NetworkSettings {
|
||||
|
||||
class NetworkSettingsWidget : public GUI::SettingsWindow::Tab {
|
||||
C_OBJECT(NetworkSettingsWidget)
|
||||
C_OBJECT_ABSTRACT(NetworkSettingsWidget)
|
||||
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<NetworkSettingsWidget>> try_create();
|
||||
|
||||
virtual void apply_settings() override;
|
||||
void switch_adapter(DeprecatedString const& adapter);
|
||||
|
||||
private:
|
||||
NetworkSettingsWidget();
|
||||
NetworkSettingsWidget() = default;
|
||||
ErrorOr<void> setup();
|
||||
|
||||
struct NetworkAdapterData {
|
||||
bool enabled = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue