refactor: Simplify Mainwindow, autoAddScreen also Removes warning
This commit is contained in:
parent
a8eb772b68
commit
8ce6a07d18
1 changed files with 6 additions and 15 deletions
|
|
@ -1016,22 +1016,13 @@ void MainWindow::updateLocalFingerprint()
|
||||||
|
|
||||||
void MainWindow::autoAddScreen(const QString &name)
|
void MainWindow::autoAddScreen(const QString &name)
|
||||||
{
|
{
|
||||||
|
if (name.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
int r = m_serverConfig.autoAddScreen(name);
|
if (m_serverConfig.autoAddScreen(name) == kAutoAddScreenManualClient) {
|
||||||
if (r != kAutoAddScreenOk) {
|
showConfigureServer(
|
||||||
switch (r) {
|
tr("Please add the client (%1) to the grid.").arg(Settings::value(Settings::Core::ScreenName).toString())
|
||||||
case kAutoAddScreenManualServer:
|
);
|
||||||
showConfigureServer(
|
|
||||||
tr("Please add the server (%1) to the grid.").arg(Settings::value(Settings::Core::ScreenName).toString())
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case kAutoAddScreenManualClient:
|
|
||||||
showConfigureServer(
|
|
||||||
tr("Please add the server (%1) to the grid.").arg(Settings::value(Settings::Core::ScreenName).toString())
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue