mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-02 19:31:04 -05:00
* Added a function to not allow to create a Forum/Channel without a Name.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@848 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e03d808ad3
commit
2a6381db2d
@ -19,6 +19,7 @@
|
|||||||
* Boston, MA 02110-1301, USA.
|
* Boston, MA 02110-1301, USA.
|
||||||
****************************************************************/
|
****************************************************************/
|
||||||
|
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "CreateForum.h"
|
#include "CreateForum.h"
|
||||||
|
|
||||||
@ -40,6 +41,15 @@ CreateForum::CreateForum(QWidget *parent, bool isForum)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CreateForum::show()
|
||||||
|
{
|
||||||
|
//loadSettings();
|
||||||
|
if(!this->isVisible()) {
|
||||||
|
QWidget::show();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CreateForum::newForum()
|
void CreateForum::newForum()
|
||||||
{
|
{
|
||||||
@ -75,6 +85,16 @@ void CreateForum::createForum()
|
|||||||
QString desc = ui.forumDesc->toPlainText(); //toHtml();
|
QString desc = ui.forumDesc->toPlainText(); //toHtml();
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
|
|
||||||
|
if(name.isEmpty())
|
||||||
|
{ /* error message */
|
||||||
|
int ret = QMessageBox::warning(this, tr("RetroShare"),
|
||||||
|
tr("Please add a Name"),
|
||||||
|
QMessageBox::Ok, QMessageBox::Ok);
|
||||||
|
|
||||||
|
return; //Don't add a empty name!!
|
||||||
|
}
|
||||||
|
else
|
||||||
|
|
||||||
if (ui.typePublic->isChecked())
|
if (ui.typePublic->isChecked())
|
||||||
{
|
{
|
||||||
flags |= RS_DISTRIB_PUBLIC;
|
flags |= RS_DISTRIB_PUBLIC;
|
||||||
|
@ -36,6 +36,10 @@ public:
|
|||||||
|
|
||||||
void newForum(); /* cleanup */
|
void newForum(); /* cleanup */
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
/** Overloaded QWidget.show */
|
||||||
|
void show();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
||||||
/* actions to take.... */
|
/* actions to take.... */
|
||||||
|
Loading…
Reference in New Issue
Block a user