check setting
diff --git a/demo/chatdialog.cpp b/demo/chatdialog.cpp
index 20ed372..c935c66 100644
--- a/demo/chatdialog.cpp
+++ b/demo/chatdialog.cpp
@@ -303,6 +303,16 @@
SettingDialog dialog(this, m_user.getNick(), m_user.getChatroom(), m_user.getPrefix());
connect(&dialog, SIGNAL(updated(QString, QString, QString)), this, SLOT(settingUpdated(QString, QString, QString)));
dialog.exec();
+ QTimer::singleShot(100, this, SLOT(checkSetting()));
+}
+
+void
+ChatDialog::checkSetting()
+{
+ if (m_user.getPrefix().isEmpty() || m_user.getNick().isEmpty() || m_user.getChatroom().isEmpty())
+ {
+ buttonPressed();
+ }
}
void
diff --git a/demo/chatdialog.h b/demo/chatdialog.h
index 452fc2e..312ebb0 100644
--- a/demo/chatdialog.h
+++ b/demo/chatdialog.h
@@ -41,6 +41,7 @@
private slots:
void returnPressed();
void buttonPressed();
+ void checkSetting();
void settingUpdated(QString, QString, QString);
signals: