Version: 0.18 #3016 (using KDE 3.4.2, Kubuntu Package 4:3.4.2-0ubuntu4 ) Compiler: Target: i486-linux-gnu OS: Linux (i686) release 2.6.12-8-k7 This is a pretty minor bug, but i still thought i should report it anyway. when you are adding a channel to a network to autoconnect to and you leave it blank and hit OK, it creates a blank entry in the channel list and it attempts to connect to it.
SVN commit 495122 by hein: Prevent addition of nameless channels and hostless servers in ServerGroupDialog. BUG:112058 M +12 -0 channeldialog.cpp M +5 -1 channeldialog.h M +12 -0 serverdialog.cpp M +5 -1 serverdialog.h --- trunk/extragear/network/konversation/src/channeldialog.cpp #495121:495122 @@ -14,6 +14,7 @@ #include <qlineedit.h> #include <klocale.h> +#include <kmessagebox.h> #include "channeldialog.h" #include "servergroupsettings.h" @@ -64,6 +65,17 @@ return channel; } + void ChannelDialog::slotOk() + { + if (m_channelEdit->text().isEmpty()) + { + KMessageBox::error(this, i18n("The channel name is required.")); + } + else + { + accept(); + } + } } #include "channeldialog.moc" --- trunk/extragear/network/konversation/src/channeldialog.h #495121:495122 @@ -24,13 +24,17 @@ class ChannelDialog : public KDialogBase { Q_OBJECT - public: + + public: ChannelDialog(const QString& title, QWidget *parent = 0, const char *name = 0); ~ChannelDialog(); void setChannelSettings(const ChannelSettings& channel); ChannelSettings channelSettings(); + protected slots: + void slotOk(); + private: QLineEdit* m_channelEdit; QLineEdit* m_passwordEdit; --- trunk/extragear/network/konversation/src/serverdialog.cpp #495121:495122 @@ -20,6 +20,7 @@ #include <qwhatsthis.h> #include <klocale.h> +#include <kmessagebox.h> #include "serversettings.h" @@ -86,6 +87,17 @@ return server; } + void ServerDialog::slotOk() + { + if (m_serverEdit->text().isEmpty()) + { + KMessageBox::error(this, i18n("The server address is required.")); + } + else + { + accept(); + } + } } #include "serverdialog.moc" --- trunk/extragear/network/konversation/src/serverdialog.h #495121:495122 @@ -26,13 +26,17 @@ class ServerDialog : public KDialogBase { Q_OBJECT - public: + + public: ServerDialog(const QString& title, QWidget *parent = 0, const char *name = 0); ~ServerDialog(); void setServerSettings(const ServerSettings& server); ServerSettings serverSettings(); + protected slots: + void slotOk(); + private: QLineEdit* m_serverEdit; QSpinBox* m_portSBox;