mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
Connect from commandline (#3556)
* - Use Qt argument parser - Add --connect command line option. * Better version info
This commit is contained in:
parent
9118871afb
commit
073c531855
3 changed files with 29 additions and 4 deletions
|
|
@ -948,7 +948,10 @@ void MainWindow::changeEvent(QEvent *event)
|
|||
else if (event->type() == QEvent::ActivationChange) {
|
||||
if (isActiveWindow() && !bHasActivated) {
|
||||
bHasActivated = true;
|
||||
if (settingsCache->servers().getAutoConnect()) {
|
||||
if (!connectTo.isEmpty()) {
|
||||
qDebug() << "Command line connect to " << connectTo;
|
||||
client->connectToServer(connectTo.host(), connectTo.port(), connectTo.userName(), connectTo.password());
|
||||
} else if (settingsCache->servers().getAutoConnect()) {
|
||||
qDebug() << "Attempting auto-connect...";
|
||||
DlgConnect dlg(this);
|
||||
client->connectToServer(dlg.getHost(), static_cast<unsigned int>(dlg.getPort()), dlg.getPlayerName(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue