Diffstat (limited to 'noncore/net/opieirc/ircservereditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircservereditor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/net/opieirc/ircservereditor.cpp b/noncore/net/opieirc/ircservereditor.cpp index 2d11bf0..1fda868 100644 --- a/noncore/net/opieirc/ircservereditor.cpp +++ b/noncore/net/opieirc/ircservereditor.cpp @@ -37,54 +37,54 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char* layout->addWidget(label, 4, 0); layout->addWidget(m_realname, 4, 1); label = new QLabel(tr("Password :"), this); m_password = new QLineEdit(server.password(), this); m_password->setEchoMode( QLineEdit::Password ); QWhatsThis::add(m_password, tr("Password to connect to the server (if required)")); layout->addWidget(label, 5, 0); layout->addWidget(m_password, 5, 1); label = new QLabel(tr("Channels :"), this); m_channels = new QLineEdit(server.channels(), this); QWhatsThis::add(m_channels, tr("Comma-Separated list of all channels you would like to join automatically")); layout->addWidget(label, 6, 0); layout->addWidget(m_channels, 6, 1); setCaption(tr("Edit server information")); QPEApplication::showDialog( this ); } void IRCServerEditor::accept() { if (m_name->text().length()==0) QMessageBox::critical(this, tr("Error"), tr("Profile name required")); else if (m_hostname->text().length()==0) QMessageBox::critical(this, tr("Error"), tr("Host name required")); - else if (m_port->text().toInt()<=0) - QMessageBox::critical(this, tr("Error"), tr("Port required")); + //else if (m_port->text().toInt()<=0) + // QMessageBox::critical(this, tr("Error"), tr("Port required")); else if (m_nickname->text().length()==0) QMessageBox::critical(this, tr("Error"), tr("Nickname required")); - else if (m_realname->text().length()==0) - QMessageBox::critical(this, tr("Error"), tr("Realname required")); + //else if (m_realname->text().length()==0) + // QMessageBox::critical(this, tr("Error"), tr("Realname required")); else { /* Now verify whether the channel list has a valid format */ QStringList channels = QStringList::split(QChar(','), m_channels->text()); for (QStringList::Iterator it = channels.begin(); it != channels.end(); ++it) { QString channelName = (*it).stripWhiteSpace(); if (!channelName.startsWith("#") && !channelName.startsWith("+")) { QMessageBox::critical(this, tr("Error"), tr("The channel list needs to contain a\ncomma separated list of channel\n names which start with either '#' or '+'")); return; } } QDialog::accept(); } } IRCServer IRCServerEditor::getServer() { IRCServer server; server.setName(m_name->text()); server.setHostname(m_hostname->text()); server.setPort(m_port->text().toInt()); server.setNick(m_nickname->text()); server.setRealname(m_realname->text()); server.setUsername(m_nickname->text()); server.setPassword(m_password->text()); server.setChannels(m_channels->text()); |