- adds new --account option
- if an account id is specified, connects to that account instead of
asking or using any other defaults
{"icontheme", tr("Override the system icon theme ('breeze' is recommended)."), tr("theme")},
{"qss", tr("Load a custom application stylesheet."), tr("file.qss")},
{"hidewindow", tr("Start the client minimized to the system tray.")},
+ {"account", tr("Account id to connect to on startup."), tr("account"), "0"},
};
}
void MainWin::doAutoConnect()
{
- if (!Client::coreConnection()->connectToCore()) {
+ int accountId = Quassel::optionValue("account").toInt();
+ if (!Client::coreConnection()->connectToCore(accountId)) {
// No autoconnect selected (or no accounts)
showCoreConnectionDlg();
}