/***************************************************************************
- * Copyright (C) 2005-2018 by the Quassel Project *
+ * Copyright (C) 2005-2020 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
#include "resourcetreedlg.h"
#include "settingsdlg.h"
#include "settingspagedlg.h"
+#include "sslinfodlg.h"
#include "statusnotifieritem.h"
#include "toolbaractionprovider.h"
#include "topicwidget.h"
# include "snorenotificationbackend.h"
#endif
-#ifdef HAVE_SSL
-# include "sslinfodlg.h"
-#endif
-
#ifdef HAVE_NOTIFICATION_CENTER
# include "osxnotificationbackend.h"
#endif
# include "dockmanagernotificationbackend.h"
#endif
-#include <settingspages/corehighlightsettingspage.h>
-
#include "settingspages/aliasessettingspage.h"
#include "settingspages/appearancesettingspage.h"
#include "settingspages/backlogsettingspage.h"
#include "settingspages/connectionsettingspage.h"
#include "settingspages/coreaccountsettingspage.h"
#include "settingspages/coreconnectionsettingspage.h"
+#include "settingspages/corehighlightsettingspage.h"
#include "settingspages/dccsettingspage.h"
#include "settingspages/highlightsettingspage.h"
#include "settingspages/identitiessettingspage.h"
connect(Client::coreConnection(), &CoreConnection::userAuthenticationRequired, this, &MainWin::userAuthenticationRequired);
connect(Client::coreConnection(), &CoreConnection::handleNoSslInClient, this, &MainWin::handleNoSslInClient);
connect(Client::coreConnection(), &CoreConnection::handleNoSslInCore, this, &MainWin::handleNoSslInCore);
-#ifdef HAVE_SSL
connect(Client::coreConnection(), &CoreConnection::handleSslErrors, this, &MainWin::handleSslErrors);
-#endif
// Setup Dock Areas
setDockNestingEnabled(true);
// Help
coll->addAction("AboutQuassel", new Action(icon::get("quassel"), tr("&About Quassel"), coll, this, &MainWin::showAboutDlg))
->setMenuRole(QAction::AboutRole);
- coll->addAction("AboutQt", new Action(QIcon(":/pics/qt-logo.png"), tr("About &Qt"), coll, qApp, &QApplication::aboutQt))
+ coll->addAction("AboutQt", new Action(QIcon(":/pics/qt-logo-32.png"), tr("About &Qt"), coll, qApp, &QApplication::aboutQt))
->setMenuRole(QAction::AboutQtRole);
coll->addActions(
{{"DebugNetworkModel",
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();
}
QtUiSettings s;
int accountId = Client::currentCoreAccount().accountId().toInt();
QByteArray state = s.value(QString("MainWinState-%1").arg(accountId)).toByteArray();
+ _nickListWidget->setVisible(true);
if (state.isEmpty()) {
foreach (BufferViewDock* view, _bufferViews)
view->show();
_layoutLoaded = true;
return;
}
- _nickListWidget->setVisible(true);
restoreState(state, accountId);
int bufferViewId = s.value(QString("ActiveBufferView-%1").arg(accountId), -1).toInt();
if (bufferViewId >= 0)
*accepted = (box.exec() == QMessageBox::Ignore);
}
-#ifdef HAVE_SSL
-
void MainWin::handleSslErrors(const QSslSocket* socket, bool* accepted, bool* permanently)
{
QString errorString = "<ul>";
}
}
-#endif /* HAVE_SSL */
-
void MainWin::handleCoreConnectionError(const QString& error)
{
QMessageBox::critical(this, tr("Core Connection Error"), error, QMessageBox::Ok);
const Network* net = Client::network(id);
auto* act = new QAction(net->networkName(), this);
act->setObjectName(QString("NetworkAction-%1").arg(id.toInt()));
- act->setData(QVariant::fromValue<NetworkId>(id));
+ act->setData(QVariant::fromValue(id));
connect(net, &SyncableObject::updatedRemotely, this, &MainWin::clientNetworkUpdated);
connect(act, &QAction::triggered, this, &MainWin::connectOrDisconnectFromNet);