[Konversation-devel] [Bug 112058] Creates blank channel if nothing is entered
Eike Hein
sho at eikehein.com
Sat Jan 7 07:49:47 CET 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=112058
sho eikehein com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From sho eikehein com 2006-01-07 07:49 -------
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;
More information about the Konversation-devel
mailing list