Commit 4b0f5d970bc0b7f8de34acd99bc1bc281494b362

  • avatar
  • con <qtc-committer @no…a.com> (Committer)
  • Mon Oct 12 16:34:39 CEST 2009
  • avatar
  • Daniel Molkentin (Author)
  • Mon Oct 12 13:44:09 CEST 2009
docs: Compile Fixes, Fixups in addressbook example

Reviewed-By: TrustMe
(cherry picked from commit cbee229700a794ee1f445d06dd93058232bd891c)
  
1#include <QFileDialog>
2
13#include "addressbook.h"
24#include "ui_addressbook.h"
35
3333 SLOT(removeContact()));
3434 connect(ui->findButton, SIGNAL(clicked()), this,
3535 SLOT(findContact()));
36 //! [connectSlots]
37 connect(ui->loadButton, SIGNAL(clicked()), this,
38 SLOT(loadFromFile()));
39 connect(ui->saveButton, SIGNAL(clicked()), this,
40 SLOT(saveToFile()));
41 //! [connectSlots]
3642
3743 setWindowTitle(tr("Simple Address Book"));
3844}
300300
301301//! [loadFromFile part3]
302302 if (contacts.isEmpty()) {
303 QMessagebox::information(this, tr("No contacts in file"),
303 QMessageBox::information(this, tr("No contacts in file"),
304304 tr("The file you are attempting to open contains no contacts."));
305305 } else {
306306 QMap<QString, QString>::iterator i = contacts.begin();
  
1#include <QFileDialog>
2#include <QTextStream>
3
14#include "addressbook.h"
25#include "ui_addressbook.h"
36
351351 out << "END;VCARD" << "\n";
352352
353353 QMessageBox::information(this, tr("Export Successful"),
354 tr("\%1\" has been exported as a vCard.").arg(name));
354 tr("\"%1\" has been exported as a vCard.").arg(name));
355355}