* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include "ircconnectionwizard.h"
***************************************************************************/
#include "ircconnectionwizard.h"
-#include <QVBoxLayout>
-
-IrcConnectionWizard::IrcConnectionWizard(QWidget *parent, Qt::WindowFlags flags)
- : QWizard(parent, flags),
- _introductionPage(0),
- _identityPage(0),
- _networkPage(0)
+IrcConnectionWizard::IrcConnectionWizard(QWidget* parent, Qt::WindowFlags flags)
+ : QWizard(parent, flags)
setOptions(options() | (QWizard::WizardOptions)(QWizard::NoDefaultButton | QWizard::CancelButtonOnLeft));
setOption(QWizard::NoCancelButton, false);
setOptions(options() | (QWizard::WizardOptions)(QWizard::NoDefaultButton | QWizard::CancelButtonOnLeft));
setOption(QWizard::NoCancelButton, false);
- connect(button(QWizard::FinishButton), SIGNAL(clicked()), this, SLOT(finishClicked()));
+ connect(button(QWizard::FinishButton), &QAbstractButton::clicked, this, &IrcConnectionWizard::finishClicked);
- QLabel *label = new QLabel(QObject::tr("This wizard will help you to set up your default identity and your IRC network connection.<br>"
- "This only covers basic settings. You can cancel this wizard any time and use the settings dialog for more detailed changes."), page);
+ QLabel* label = new QLabel(
+ QObject::tr(
+ "This wizard will help you to set up your default identity and your IRC network connection.<br>"
+ "This only covers basic settings. You can cancel this wizard any time and use the settings dialog for more detailed changes."),
+ page);
if (identity->id().isValid()) {
Client::updateIdentity(identity->id(), identity->toVariantMap());
identityReady(identity->id());
}
else {
if (identity->id().isValid()) {
Client::updateIdentity(identity->id(), identity->toVariantMap());
identityReady(identity->id());
}
else {
- connect(Client::instance(), SIGNAL(identityCreated(IdentityId)), this, SLOT(identityReady(IdentityId)));
+ connect(Client::instance(), &Client::identityCreated, this, &IrcConnectionWizard::identityReady);
- disconnect(Client::instance(), SIGNAL(identityCreated(IdentityId)), this, SLOT(identityReady(IdentityId)));
- NetworkPage *networkPage = static_cast<NetworkPage *>(_networkPage);
+ disconnect(Client::instance(), &Client::identityCreated, this, &IrcConnectionWizard::identityReady);
+ auto* networkPage = static_cast<NetworkPage*>(_networkPage);
NetworkInfo networkInfo = networkPage->networkInfo();
QStringList channels = networkPage->channelList();
networkInfo.identity = id;
NetworkInfo networkInfo = networkPage->networkInfo();
QStringList channels = networkPage->channelList();
networkInfo.identity = id;
- connect(Client::instance(), SIGNAL(networkCreated(NetworkId)), this, SLOT(networkReady(NetworkId)));
+ connect(Client::instance(), &Client::networkCreated, this, &IrcConnectionWizard::networkReady);
- disconnect(Client::instance(), SIGNAL(networkCreated(NetworkId)), this, SLOT(networkReady(NetworkId)));
- const Network *net = Client::network(id);
+ disconnect(Client::instance(), &Client::networkCreated, this, &IrcConnectionWizard::networkReady);
+ const Network* net = Client::network(id);
-IdentityPage::IdentityPage(QWidget *parent)
- : QWizardPage(parent),
- _identityEditWidget(new IdentityEditWidget(this)),
- _identity(0)
+IdentityPage::IdentityPage(QWidget* parent)
+ : QWizardPage(parent)
+ , _identityEditWidget(new IdentityEditWidget(this))
-NetworkPage::NetworkPage(QWidget *parent)
- : QWizardPage(parent),
- _networkEditor(new SimpleNetworkEditor(this))
+NetworkPage::NetworkPage(QWidget* parent)
+ : QWizardPage(parent)
+ , _networkEditor(new SimpleNetworkEditor(this))