~ubuntu-branches/ubuntu/wily/psi/wily-proposed

« back to all changes in this revision

Viewing changes to src/registrationdlg.cpp

  • Committer: Package Import Robot
  • Author(s): Jan Niehusmann
  • Date: 2014-07-01 21:49:34 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20140701214934-gt4dkgm94byi4vnn
Tags: 0.15-1
* New upstream version
* set debhelper compat level to 9
* set Standards-Version to 3.9.5 (no further changes)
* add lintian override regarding license-problem-non-free-RFC
* use qconf to regenerate configure script
* implement hardening using buildflags instead of hardening-wrapper

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this library; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
18
 *
19
19
 */
20
20
 
273
273
/**
274
274
 * Returns true if the function was able to successfully process XData.
275
275
 */
276
 
bool RegistrationDlg::processXData(const QDomElement& iq)
 
276
void RegistrationDlg::processXData(const XData& form)
277
277
{
278
 
        if (!iq.isNull()) {
279
 
                XData form;
280
 
                form.fromXml(iq);
281
 
 
282
 
                if (!form.title().isEmpty())
283
 
                        setWindowTitle(form.title());
284
 
 
285
 
                setInstructions(d->jid.full(), form.instructions());
286
 
 
287
 
                if (d->xdata)
288
 
                        delete d->xdata;
289
 
 
290
 
                d->xdata = new XDataWidget(d->gr_form);
291
 
                d->gr_form_layout->addWidget(d->xdata); // FIXME
292
 
                d->xdata->setFields(form.fields());
293
 
 
294
 
                d->xdata->show();
295
 
                return true;
296
 
        }
297
 
 
298
 
        return false;
 
278
        if (!form.title().isEmpty())
 
279
                setWindowTitle(form.title());
 
280
 
 
281
        setInstructions(d->jid.full(), form.instructions());
 
282
 
 
283
        if (d->xdata)
 
284
                delete d->xdata;
 
285
 
 
286
        d->xdata = new XDataWidget(d->gr_form);
 
287
        d->gr_form_layout->addWidget(d->xdata); // FIXME
 
288
        d->xdata->setFields(form.fields());
 
289
 
 
290
        d->xdata->show();
299
291
}
300
292
 
301
293
/**
327
319
void RegistrationDlg::setData(JT_XRegister* jt)
328
320
{
329
321
        d->form = jt->form();
330
 
 
331
 
        if (!processXData(jt->xdataElement()))
 
322
        if (jt->hasXData()) {
 
323
                processXData(jt->xdata());
 
324
        } else {
332
325
                processLegacyForm(jt->form());
 
326
        }
333
327
}
334
328
 
335
329
void RegistrationDlg::updateData(JT_XRegister* jt)