| Summary: | Creates blank channel if nothing is entered | ||
|---|---|---|---|
| Product: | [Applications] konversation | Reporter: | Alex Somerset <dimitrirz> |
| Component: | general | Assignee: | Konversation Bugs <konversation-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Alex Somerset
2005-09-05 03:56:18 UTC
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;
|