summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials
diff options
context:
space:
mode:
authorAxel Waggershauser <awagger@gmail.com>2013-03-15 00:42:15 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-16 20:22:50 +0100
commitb11317a64339f5a4bcffc8234ecaf15c7fb416f2 (patch)
treef81e40ee49f5109b4100048d131d5bb922b448aa /examples/widgets/tutorials
parent72367a94a750355eb748793ce8c365373a332c9c (diff)
Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'examples/widgets/tutorials')
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part1/addressbook.cpp2
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part2/addressbook.cpp10
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part3/addressbook.cpp16
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part3/addressbook.h6
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part4/addressbook.cpp24
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part4/addressbook.h8
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part5/addressbook.cpp22
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part5/addressbook.h12
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part6/addressbook.cpp24
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part6/addressbook.h8
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part7/addressbook.cpp24
-rw-r--r--examples/widgets/tutorials/addressbook-fr/part7/addressbook.h6
-rw-r--r--examples/widgets/tutorials/addressbook/part1/addressbook.cpp2
-rw-r--r--examples/widgets/tutorials/addressbook/part2/addressbook.cpp10
-rw-r--r--examples/widgets/tutorials/addressbook/part3/addressbook.cpp16
-rw-r--r--examples/widgets/tutorials/addressbook/part3/addressbook.h6
-rw-r--r--examples/widgets/tutorials/addressbook/part4/addressbook.cpp24
-rw-r--r--examples/widgets/tutorials/addressbook/part4/addressbook.h8
-rw-r--r--examples/widgets/tutorials/addressbook/part5/addressbook.cpp22
-rw-r--r--examples/widgets/tutorials/addressbook/part5/addressbook.h12
-rw-r--r--examples/widgets/tutorials/addressbook/part6/addressbook.cpp24
-rw-r--r--examples/widgets/tutorials/addressbook/part6/addressbook.h8
-rw-r--r--examples/widgets/tutorials/addressbook/part7/addressbook.cpp24
-rw-r--r--examples/widgets/tutorials/addressbook/part7/addressbook.h6
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp4
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/mymodel.cpp2
-rw-r--r--examples/widgets/tutorials/modelview/7_selections/mainwindow.cpp2
27 files changed, 166 insertions, 166 deletions
diff --git a/examples/widgets/tutorials/addressbook-fr/part1/addressbook.cpp b/examples/widgets/tutorials/addressbook-fr/part1/addressbook.cpp
index 4e8c95635b..60acd6bb27 100644
--- a/examples/widgets/tutorials/addressbook-fr/part1/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook-fr/part1/addressbook.cpp
@@ -60,7 +60,7 @@ AddressBook::AddressBook(QWidget *parent)
mainLayout->addWidget(addressText, 1, 1);
//! [layout]
-//![setting the layout]
+//![setting the layout]
setLayout(mainLayout);
setWindowTitle(tr("Simple Address Book"));
}
diff --git a/examples/widgets/tutorials/addressbook-fr/part2/addressbook.cpp b/examples/widgets/tutorials/addressbook-fr/part2/addressbook.cpp
index bb221d2222..d88716a8c8 100644
--- a/examples/widgets/tutorials/addressbook-fr/part2/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook-fr/part2/addressbook.cpp
@@ -51,10 +51,10 @@ AddressBook::AddressBook(QWidget *parent)
//! [setting readonly 1]
QLabel *addressLabel = new QLabel(tr("Address:"));
addressText = new QTextEdit;
-//! [setting readonly 2]
+//! [setting readonly 2]
addressText->setReadOnly(true);
//! [setting readonly 2]
-
+
//! [pushbutton declaration]
addButton = new QPushButton(tr("&Add"));
addButton->show();
@@ -94,7 +94,7 @@ void AddressBook::addContact()
nameLine->clear();
addressText->clear();
-
+
nameLine->setReadOnly(false);
nameLine->setFocus(Qt::OtherFocusReason);
addressText->setReadOnly(false);
@@ -110,7 +110,7 @@ void AddressBook::submitContact()
{
QString name = nameLine->text();
QString address = addressText->toPlainText();
-
+
if ( name.isEmpty()|| address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
@@ -152,6 +152,6 @@ void AddressBook::cancel()
addButton->setEnabled(true);
submitButton->hide();
- cancelButton->hide();
+ cancelButton->hide();
}
//! [cancel]
diff --git a/examples/widgets/tutorials/addressbook-fr/part3/addressbook.cpp b/examples/widgets/tutorials/addressbook-fr/part3/addressbook.cpp
index 09b1e06bfe..86ff58d015 100644
--- a/examples/widgets/tutorials/addressbook-fr/part3/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook-fr/part3/addressbook.cpp
@@ -51,7 +51,7 @@ AddressBook::AddressBook(QWidget *parent)
QLabel *addressLabel = new QLabel(tr("Address:"));
addressText = new QTextEdit;
addressText->setReadOnly(true);
-
+
addButton = new QPushButton(tr("&Add"));
addButton->show();
submitButton = new QPushButton(tr("&Submit"));
@@ -68,7 +68,7 @@ AddressBook::AddressBook(QWidget *parent)
connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
-//! [connecting navigation signals]
+//! [connecting navigation signals]
connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
//! [connecting navigation signals]
@@ -107,7 +107,7 @@ void AddressBook::addContact()
nameLine->setReadOnly(false);
nameLine->setFocus(Qt::OtherFocusReason);
addressText->setReadOnly(false);
-
+
addButton->setEnabled(false);
//! [disabling navigation]
nextButton->setEnabled(false);
@@ -121,7 +121,7 @@ void AddressBook::submitContact()
{
QString name = nameLine->text();
QString address = addressText->toPlainText();
-
+
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
@@ -159,20 +159,20 @@ void AddressBook::cancel()
{
nameLine->setText(oldName);
addressText->setText(oldAddress);
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
}
-
+
nameLine->setReadOnly(true);
addressText->setReadOnly(true);
addButton->setEnabled(true);
-
+
int number = contacts.size();
nextButton->setEnabled(number > 1);
previousButton->setEnabled(number > 1);
-
+
submitButton->hide();
cancelButton->hide();
}
diff --git a/examples/widgets/tutorials/addressbook-fr/part3/addressbook.h b/examples/widgets/tutorials/addressbook-fr/part3/addressbook.h
index 2458645ab5..3613fedb34 100644
--- a/examples/widgets/tutorials/addressbook-fr/part3/addressbook.h
+++ b/examples/widgets/tutorials/addressbook-fr/part3/addressbook.h
@@ -65,16 +65,16 @@ public slots:
//! [navigation functions]
void next();
void previous();
-//! [navigation functions]
+//! [navigation functions]
private:
QPushButton *addButton;
QPushButton *submitButton;
QPushButton *cancelButton;
-//! [navigation pushbuttons]
+//! [navigation pushbuttons]
QPushButton *nextButton;
QPushButton *previousButton;
-//! [navigation pushbuttons]
+//! [navigation pushbuttons]
QLineEdit *nameLine;
QTextEdit *addressText;
diff --git a/examples/widgets/tutorials/addressbook-fr/part4/addressbook.cpp b/examples/widgets/tutorials/addressbook-fr/part4/addressbook.cpp
index 2d158f3f17..70f5d110db 100644
--- a/examples/widgets/tutorials/addressbook-fr/part4/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook-fr/part4/addressbook.cpp
@@ -53,17 +53,17 @@ AddressBook::AddressBook(QWidget *parent)
addressText->setReadOnly(true);
addButton = new QPushButton(tr("&Add"));
-//! [edit and remove buttons]
+//! [edit and remove buttons]
editButton = new QPushButton(tr("&Edit"));
editButton->setEnabled(false);
removeButton = new QPushButton(tr("&Remove"));
removeButton->setEnabled(false);
-//! [edit and remove buttons]
+//! [edit and remove buttons]
submitButton = new QPushButton(tr("&Submit"));
submitButton->hide();
cancelButton = new QPushButton(tr("&Cancel"));
cancelButton->hide();
-
+
nextButton = new QPushButton(tr("&Next"));
nextButton->setEnabled(false);
previousButton = new QPushButton(tr("&Previous"));
@@ -71,20 +71,20 @@ AddressBook::AddressBook(QWidget *parent)
connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
-//! [connecting edit and remove]
+//! [connecting edit and remove]
connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
-//! [connecting edit and remove]
+//! [connecting edit and remove]
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
-//! [adding edit and remove to the layout]
+//! [adding edit and remove to the layout]
buttonLayout1->addWidget(editButton);
buttonLayout1->addWidget(removeButton);
-//! [adding edit and remove to the layout]
+//! [adding edit and remove to the layout]
buttonLayout1->addWidget(submitButton);
buttonLayout1->addWidget(cancelButton);
buttonLayout1->addStretch();
@@ -138,7 +138,7 @@ void AddressBook::submitContact()
}
//! [submitContact() function part1]
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -150,7 +150,7 @@ void AddressBook::submitContact()
//! [submitContact() function part1]
//! [submitContact() function part2]
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -164,7 +164,7 @@ void AddressBook::submitContact()
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
tr("\"%1\" has been edited in your address book.").arg(name));
- contacts[name] = address;
+ contacts[name] = address;
}
}
@@ -192,7 +192,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -243,7 +243,7 @@ void AddressBook::updateInterface(Mode mode)
currentMode = mode;
switch (currentMode) {
-
+
case AddingMode:
case EditingMode:
diff --git a/examples/widgets/tutorials/addressbook-fr/part4/addressbook.h b/examples/widgets/tutorials/addressbook-fr/part4/addressbook.h
index ff8c4f0318..6430ac3413 100644
--- a/examples/widgets/tutorials/addressbook-fr/part4/addressbook.h
+++ b/examples/widgets/tutorials/addressbook-fr/part4/addressbook.h
@@ -77,10 +77,10 @@ private:
void updateInterface(Mode mode);
//! [updateInterface() declaration]
QPushButton *addButton;
-//! [buttons declaration]
+//! [buttons declaration]
QPushButton *editButton;
QPushButton *removeButton;
-//! [buttons declaration]
+//! [buttons declaration]
QPushButton *submitButton;
QPushButton *cancelButton;
QPushButton *nextButton;
@@ -91,9 +91,9 @@ private:
QMap<QString, QString> contacts;
QString oldName;
QString oldAddress;
-//! [mode declaration]
+//! [mode declaration]
Mode currentMode;
-//! [mode declaration]
+//! [mode declaration]
};
#endif
diff --git a/examples/widgets/tutorials/addressbook-fr/part5/addressbook.cpp b/examples/widgets/tutorials/addressbook-fr/part5/addressbook.cpp
index 02f4788537..33af5f1e4e 100644
--- a/examples/widgets/tutorials/addressbook-fr/part5/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook-fr/part5/addressbook.cpp
@@ -81,19 +81,19 @@ AddressBook::AddressBook(QWidget *parent)
connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
-//! [signals and slots for find]
+//! [signals and slots for find]
connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
-//! [signals and slots for find]
+//! [signals and slots for find]
connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
-
+
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
buttonLayout1->addWidget(editButton);
buttonLayout1->addWidget(removeButton);
-//! [adding findButton to layout]
+//! [adding findButton to layout]
buttonLayout1->addWidget(findButton);
-//! [adding findButton to layout]
+//! [adding findButton to layout]
buttonLayout1->addWidget(submitButton);
buttonLayout1->addWidget(cancelButton);
buttonLayout1->addStretch();
@@ -145,7 +145,7 @@ void AddressBook::submitContact()
}
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -155,7 +155,7 @@ void AddressBook::submitContact()
tr("Sorry, \"%1\" is already in your address book.").arg(name));
}
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -196,7 +196,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -241,7 +241,7 @@ void AddressBook::previous()
nameLine->setText(i.key());
addressText->setText(i.value());
}
-//! [findContact() function]
+//! [findContact() function]
void AddressBook::findContact()
{
dialog->show();
@@ -261,7 +261,7 @@ void AddressBook::findContact()
updateInterface(NavigationMode);
}
-//! [findContact() function]
+//! [findContact() function]
void AddressBook::updateInterface(Mode mode)
{
@@ -288,7 +288,7 @@ void AddressBook::updateInterface(Mode mode)
break;
case NavigationMode:
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
diff --git a/examples/widgets/tutorials/addressbook-fr/part5/addressbook.h b/examples/widgets/tutorials/addressbook-fr/part5/addressbook.h
index 5e2c18e91a..f8a53304ee 100644
--- a/examples/widgets/tutorials/addressbook-fr/part5/addressbook.h
+++ b/examples/widgets/tutorials/addressbook-fr/part5/addressbook.h
@@ -68,9 +68,9 @@ public slots:
void submitContact();
void cancel();
void removeContact();
-//! [findContact() declaration]
+//! [findContact() declaration]
void findContact();
-//! [findContact() declaration]
+//! [findContact() declaration]
void next();
void previous();
@@ -80,9 +80,9 @@ private:
QPushButton *addButton;
QPushButton *editButton;
QPushButton *removeButton;
-//! [findButton declaration]
+//! [findButton declaration]
QPushButton *findButton;
-//! [findButton declaration]
+//! [findButton declaration]
QPushButton *submitButton;
QPushButton *cancelButton;
QPushButton *nextButton;
@@ -91,9 +91,9 @@ private:
QTextEdit *addressText;
QMap<QString, QString> contacts;
-//! [FindDialog declaration]
+//! [FindDialog declaration]
FindDialog *dialog;
-//! [FindDialog declaration]
+//! [FindDialog declaration]
QString oldName;
QString oldAddress;
Mode currentMode;
diff --git a/examples/widgets/tutorials/addressbook-fr/part6/addressbook.cpp b/examples/widgets/tutorials/addressbook-fr/part6/addressbook.cpp
index e8caa628a5..e81c959c2c 100644
--- a/examples/widgets/tutorials/addressbook-fr/part6/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook-fr/part6/addressbook.cpp
@@ -71,9 +71,9 @@ AddressBook::AddressBook(QWidget *parent)
previousButton->setEnabled(false);
loadButton = new QPushButton(tr("&Load..."));
-//! [tooltip 1]
+//! [tooltip 1]
loadButton->setToolTip(tr("Load contacts from a file"));
-//! [tooltip 1]
+//! [tooltip 1]
saveButton = new QPushButton(tr("Sa&ve..."));
//! [tooltip 2]
saveButton->setToolTip(tr("Save contacts to a file"));
@@ -92,7 +92,7 @@ AddressBook::AddressBook(QWidget *parent)
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
-
+
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
buttonLayout1->addWidget(editButton);
@@ -151,7 +151,7 @@ void AddressBook::submitContact()
}
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -161,7 +161,7 @@ void AddressBook::submitContact()
tr("Sorry, \"%1\" is already in your address book.").arg(name));
}
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -202,7 +202,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -296,7 +296,7 @@ void AddressBook::updateInterface(Mode mode)
break;
case NavigationMode:
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
@@ -341,12 +341,12 @@ void AddressBook::saveToFile()
return;
}
-//! [saveToFile() function part2]
+//! [saveToFile() function part2]
//! [saveToFile() function part3]
QDataStream out(&file);
out.setVersion(QDataStream::Qt_4_5);
out << contacts;
- }
+ }
}
//! [saveToFile() function part3]
@@ -362,15 +362,15 @@ void AddressBook::loadFromFile()
if (fileName.isEmpty())
return;
else {
-
+
QFile file(fileName);
-
+
if (!file.open(QIODevice::ReadOnly)) {
QMessageBox::information(this, tr("Unable to open file"),
file.errorString());
return;
}
-
+
QDataStream in(&file);
in.setVersion(QDataStream::Qt_4_5);
contacts.empty(); // empty existing contacts
diff --git a/examples/widgets/tutorials/addressbook-fr/part6/addressbook.h b/examples/widgets/tutorials/addressbook-fr/part6/addressbook.h
index 99dfd1e404..ce2691ccad 100644
--- a/examples/widgets/tutorials/addressbook-fr/part6/addressbook.h
+++ b/examples/widgets/tutorials/addressbook-fr/part6/addressbook.h
@@ -70,10 +70,10 @@ public slots:
void findContact();
void next();
void previous();
-//! [save and load functions declaration]
+//! [save and load functions declaration]
void saveToFile();
void loadFromFile();
-//! [save and load functions declaration]
+//! [save and load functions declaration]
private:
void updateInterface(Mode mode);
@@ -86,10 +86,10 @@ private:
QPushButton *cancelButton;
QPushButton *nextButton;
QPushButton *previousButton;
-//! [save and load buttons declaration]
+//! [save and load buttons declaration]
QPushButton *loadButton;
QPushButton *saveButton;
-//! [save and load buttons declaration]
+//! [save and load buttons declaration]
QLineEdit *nameLine;
QTextEdit *addressText;
diff --git a/examples/widgets/tutorials/addressbook-fr/part7/addressbook.cpp b/examples/widgets/tutorials/addressbook-fr/part7/addressbook.cpp
index a91a3bbc12..a0780ae78a 100644
--- a/examples/widgets/tutorials/addressbook-fr/part7/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook-fr/part7/addressbook.cpp
@@ -93,7 +93,7 @@ AddressBook::AddressBook(QWidget *parent)
connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
connect(exportButton, SIGNAL(clicked()), this, SLOT(exportAsVCard()));
-
+
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
buttonLayout1->addWidget(editButton);
@@ -153,7 +153,7 @@ void AddressBook::submitContact()
}
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -163,7 +163,7 @@ void AddressBook::submitContact()
tr("Sorry, \"%1\" is already in your address book.").arg(name));
}
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -204,7 +204,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -298,7 +298,7 @@ void AddressBook::updateInterface(Mode mode)
break;
case NavigationMode:
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
@@ -331,7 +331,7 @@ void AddressBook::saveToFile()
QString fileName = QFileDialog::getSaveFileName(this,
tr("Save Address Book"), "",
tr("Address Book (*.abk);;All Files (*)"));
-
+
if (fileName.isEmpty())
return;
else {
@@ -404,14 +404,14 @@ void AddressBook::exportAsVCard()
QString fileName = QFileDialog::getSaveFileName(this,
tr("Export Contact"), "",
tr("vCard Files (*.vcf);;All Files (*)"));
-
+
if (fileName.isEmpty())
return;
QFile file(fileName);
//! [export function part1]
-
-//! [export function part2]
+
+//! [export function part2]
if (!file.open(QIODevice::WriteOnly)) {
QMessageBox::information(this, tr("Unable to open file"),
file.errorString());
@@ -425,12 +425,12 @@ void AddressBook::exportAsVCard()
out << "BEGIN:VCARD" << "\n";
out << "VERSION:2.1" << "\n";
out << "N:" << lastName << ";" << firstName << "\n";
-
- if (!nameList.isEmpty())
+
+ if (!nameList.isEmpty())
out << "FN:" << nameList.join(' ') << "\n";
else
out << "FN:" << firstName << "\n";
-//! [export function part3]
+//! [export function part3]
//! [export function part4]
address.replace(";", "\\;", Qt::CaseInsensitive);
diff --git a/examples/widgets/tutorials/addressbook-fr/part7/addressbook.h b/examples/widgets/tutorials/addressbook-fr/part7/addressbook.h
index a34cf24a23..d672c7a85b 100644
--- a/examples/widgets/tutorials/addressbook-fr/part7/addressbook.h
+++ b/examples/widgets/tutorials/addressbook-fr/part7/addressbook.h
@@ -74,7 +74,7 @@ public slots:
void loadFromFile();
//! [exportAsVCard() declaration]
void exportAsVCard();
-//! [exportAsVCard() declaration]
+//! [exportAsVCard() declaration]
private:
void updateInterface(Mode mode);
@@ -89,9 +89,9 @@ private:
QPushButton *previousButton;
QPushButton *loadButton;
QPushButton *saveButton;
-//! [exportButton declaration]
+//! [exportButton declaration]
QPushButton *exportButton;
-//! [exportButton declaration]
+//! [exportButton declaration]
QLineEdit *nameLine;
QTextEdit *addressText;
diff --git a/examples/widgets/tutorials/addressbook/part1/addressbook.cpp b/examples/widgets/tutorials/addressbook/part1/addressbook.cpp
index 4e8c95635b..60acd6bb27 100644
--- a/examples/widgets/tutorials/addressbook/part1/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part1/addressbook.cpp
@@ -60,7 +60,7 @@ AddressBook::AddressBook(QWidget *parent)
mainLayout->addWidget(addressText, 1, 1);
//! [layout]
-//![setting the layout]
+//![setting the layout]
setLayout(mainLayout);
setWindowTitle(tr("Simple Address Book"));
}
diff --git a/examples/widgets/tutorials/addressbook/part2/addressbook.cpp b/examples/widgets/tutorials/addressbook/part2/addressbook.cpp
index e6f3409efc..6fd5d03fea 100644
--- a/examples/widgets/tutorials/addressbook/part2/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part2/addressbook.cpp
@@ -51,10 +51,10 @@ AddressBook::AddressBook(QWidget *parent)
//! [setting readonly 1]
QLabel *addressLabel = new QLabel(tr("Address:"));
addressText = new QTextEdit;
-//! [setting readonly 2]
+//! [setting readonly 2]
addressText->setReadOnly(true);
//! [setting readonly 2]
-
+
//! [pushbutton declaration]
addButton = new QPushButton(tr("&Add"));
addButton->show();
@@ -94,7 +94,7 @@ void AddressBook::addContact()
nameLine->clear();
addressText->clear();
-
+
nameLine->setReadOnly(false);
nameLine->setFocus(Qt::OtherFocusReason);
addressText->setReadOnly(false);
@@ -110,7 +110,7 @@ void AddressBook::submitContact()
{
QString name = nameLine->text();
QString address = addressText->toPlainText();
-
+
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
@@ -152,6 +152,6 @@ void AddressBook::cancel()
addButton->setEnabled(true);
submitButton->hide();
- cancelButton->hide();
+ cancelButton->hide();
}
//! [cancel]
diff --git a/examples/widgets/tutorials/addressbook/part3/addressbook.cpp b/examples/widgets/tutorials/addressbook/part3/addressbook.cpp
index 61c331d1f5..bcf3f63430 100644
--- a/examples/widgets/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part3/addressbook.cpp
@@ -51,7 +51,7 @@ AddressBook::AddressBook(QWidget *parent)
QLabel *addressLabel = new QLabel(tr("Address:"));
addressText = new QTextEdit;
addressText->setReadOnly(true);
-
+
addButton = new QPushButton(tr("&Add"));
addButton->show();
submitButton = new QPushButton(tr("&Submit"));
@@ -68,7 +68,7 @@ AddressBook::AddressBook(QWidget *parent)
connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
-//! [connecting navigation signals]
+//! [connecting navigation signals]
connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
//! [connecting navigation signals]
@@ -107,7 +107,7 @@ void AddressBook::addContact()
nameLine->setReadOnly(false);
nameLine->setFocus(Qt::OtherFocusReason);
addressText->setReadOnly(false);
-
+
addButton->setEnabled(false);
//! [disabling navigation]
nextButton->setEnabled(false);
@@ -121,7 +121,7 @@ void AddressBook::submitContact()
{
QString name = nameLine->text();
QString address = addressText->toPlainText();
-
+
if (name.isEmpty() || address.isEmpty()) {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
@@ -159,20 +159,20 @@ void AddressBook::cancel()
{
nameLine->setText(oldName);
addressText->setText(oldAddress);
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
}
-
+
nameLine->setReadOnly(true);
addressText->setReadOnly(true);
addButton->setEnabled(true);
-
+
int number = contacts.size();
nextButton->setEnabled(number > 1);
previousButton->setEnabled(number > 1);
-
+
submitButton->hide();
cancelButton->hide();
}
diff --git a/examples/widgets/tutorials/addressbook/part3/addressbook.h b/examples/widgets/tutorials/addressbook/part3/addressbook.h
index 2458645ab5..3613fedb34 100644
--- a/examples/widgets/tutorials/addressbook/part3/addressbook.h
+++ b/examples/widgets/tutorials/addressbook/part3/addressbook.h
@@ -65,16 +65,16 @@ public slots:
//! [navigation functions]
void next();
void previous();
-//! [navigation functions]
+//! [navigation functions]
private:
QPushButton *addButton;
QPushButton *submitButton;
QPushButton *cancelButton;
-//! [navigation pushbuttons]
+//! [navigation pushbuttons]
QPushButton *nextButton;
QPushButton *previousButton;
-//! [navigation pushbuttons]
+//! [navigation pushbuttons]
QLineEdit *nameLine;
QTextEdit *addressText;
diff --git a/examples/widgets/tutorials/addressbook/part4/addressbook.cpp b/examples/widgets/tutorials/addressbook/part4/addressbook.cpp
index 6b3731b5f6..66764a2815 100644
--- a/examples/widgets/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part4/addressbook.cpp
@@ -53,17 +53,17 @@ AddressBook::AddressBook(QWidget *parent)
addressText->setReadOnly(true);
addButton = new QPushButton(tr("&Add"));
-//! [edit and remove buttons]
+//! [edit and remove buttons]
editButton = new QPushButton(tr("&Edit"));
editButton->setEnabled(false);
removeButton = new QPushButton(tr("&Remove"));
removeButton->setEnabled(false);
-//! [edit and remove buttons]
+//! [edit and remove buttons]
submitButton = new QPushButton(tr("&Submit"));
submitButton->hide();
cancelButton = new QPushButton(tr("&Cancel"));
cancelButton->hide();
-
+
nextButton = new QPushButton(tr("&Next"));
nextButton->setEnabled(false);
previousButton = new QPushButton(tr("&Previous"));
@@ -71,20 +71,20 @@ AddressBook::AddressBook(QWidget *parent)
connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
-//! [connecting edit and remove]
+//! [connecting edit and remove]
connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
-//! [connecting edit and remove]
+//! [connecting edit and remove]
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
-//! [adding edit and remove to the layout]
+//! [adding edit and remove to the layout]
buttonLayout1->addWidget(editButton);
buttonLayout1->addWidget(removeButton);
-//! [adding edit and remove to the layout]
+//! [adding edit and remove to the layout]
buttonLayout1->addWidget(submitButton);
buttonLayout1->addWidget(cancelButton);
buttonLayout1->addStretch();
@@ -138,7 +138,7 @@ void AddressBook::submitContact()
}
//! [submitContact() function part1]
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -150,7 +150,7 @@ void AddressBook::submitContact()
//! [submitContact() function part1]
//! [submitContact() function part2]
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -164,7 +164,7 @@ void AddressBook::submitContact()
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
tr("\"%1\" has been edited in your address book.").arg(name));
- contacts[name] = address;
+ contacts[name] = address;
}
}
@@ -192,7 +192,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -243,7 +243,7 @@ void AddressBook::updateInterface(Mode mode)
currentMode = mode;
switch (currentMode) {
-
+
case AddingMode:
case EditingMode:
diff --git a/examples/widgets/tutorials/addressbook/part4/addressbook.h b/examples/widgets/tutorials/addressbook/part4/addressbook.h
index ff8c4f0318..6430ac3413 100644
--- a/examples/widgets/tutorials/addressbook/part4/addressbook.h
+++ b/examples/widgets/tutorials/addressbook/part4/addressbook.h
@@ -77,10 +77,10 @@ private:
void updateInterface(Mode mode);
//! [updateInterface() declaration]
QPushButton *addButton;
-//! [buttons declaration]
+//! [buttons declaration]
QPushButton *editButton;
QPushButton *removeButton;
-//! [buttons declaration]
+//! [buttons declaration]
QPushButton *submitButton;
QPushButton *cancelButton;
QPushButton *nextButton;
@@ -91,9 +91,9 @@ private:
QMap<QString, QString> contacts;
QString oldName;
QString oldAddress;
-//! [mode declaration]
+//! [mode declaration]
Mode currentMode;
-//! [mode declaration]
+//! [mode declaration]
};
#endif
diff --git a/examples/widgets/tutorials/addressbook/part5/addressbook.cpp b/examples/widgets/tutorials/addressbook/part5/addressbook.cpp
index 90eb81986a..ca2f72e9e1 100644
--- a/examples/widgets/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part5/addressbook.cpp
@@ -81,19 +81,19 @@ AddressBook::AddressBook(QWidget *parent)
connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
-//! [signals and slots for find]
+//! [signals and slots for find]
connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
-//! [signals and slots for find]
+//! [signals and slots for find]
connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
-
+
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
buttonLayout1->addWidget(editButton);
buttonLayout1->addWidget(removeButton);
-//! [adding findButton to layout]
+//! [adding findButton to layout]
buttonLayout1->addWidget(findButton);
-//! [adding findButton to layout]
+//! [adding findButton to layout]
buttonLayout1->addWidget(submitButton);
buttonLayout1->addWidget(cancelButton);
buttonLayout1->addStretch();
@@ -145,7 +145,7 @@ void AddressBook::submitContact()
}
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -155,7 +155,7 @@ void AddressBook::submitContact()
tr("Sorry, \"%1\" is already in your address book.").arg(name));
}
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -196,7 +196,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -241,7 +241,7 @@ void AddressBook::previous()
nameLine->setText(i.key());
addressText->setText(i.value());
}
-//! [findContact() function]
+//! [findContact() function]
void AddressBook::findContact()
{
dialog->show();
@@ -261,7 +261,7 @@ void AddressBook::findContact()
updateInterface(NavigationMode);
}
-//! [findContact() function]
+//! [findContact() function]
void AddressBook::updateInterface(Mode mode)
{
@@ -288,7 +288,7 @@ void AddressBook::updateInterface(Mode mode)
break;
case NavigationMode:
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
diff --git a/examples/widgets/tutorials/addressbook/part5/addressbook.h b/examples/widgets/tutorials/addressbook/part5/addressbook.h
index 5e2c18e91a..f8a53304ee 100644
--- a/examples/widgets/tutorials/addressbook/part5/addressbook.h
+++ b/examples/widgets/tutorials/addressbook/part5/addressbook.h
@@ -68,9 +68,9 @@ public slots:
void submitContact();
void cancel();
void removeContact();
-//! [findContact() declaration]
+//! [findContact() declaration]
void findContact();
-//! [findContact() declaration]
+//! [findContact() declaration]
void next();
void previous();
@@ -80,9 +80,9 @@ private:
QPushButton *addButton;
QPushButton *editButton;
QPushButton *removeButton;
-//! [findButton declaration]
+//! [findButton declaration]
QPushButton *findButton;
-//! [findButton declaration]
+//! [findButton declaration]
QPushButton *submitButton;
QPushButton *cancelButton;
QPushButton *nextButton;
@@ -91,9 +91,9 @@ private:
QTextEdit *addressText;
QMap<QString, QString> contacts;
-//! [FindDialog declaration]
+//! [FindDialog declaration]
FindDialog *dialog;
-//! [FindDialog declaration]
+//! [FindDialog declaration]
QString oldName;
QString oldAddress;
Mode currentMode;
diff --git a/examples/widgets/tutorials/addressbook/part6/addressbook.cpp b/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
index a9bc2cc51c..2ced8e2404 100644
--- a/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
@@ -71,9 +71,9 @@ AddressBook::AddressBook(QWidget *parent)
previousButton->setEnabled(false);
loadButton = new QPushButton(tr("&Load..."));
-//! [tooltip 1]
+//! [tooltip 1]
loadButton->setToolTip(tr("Load contacts from a file"));
-//! [tooltip 1]
+//! [tooltip 1]
saveButton = new QPushButton(tr("&Save..."));
//! [tooltip 2]
saveButton->setToolTip(tr("Save contacts to a file"));
@@ -92,7 +92,7 @@ AddressBook::AddressBook(QWidget *parent)
connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
-
+
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
buttonLayout1->addWidget(editButton);
@@ -151,7 +151,7 @@ void AddressBook::submitContact()
}
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -161,7 +161,7 @@ void AddressBook::submitContact()
tr("Sorry, \"%1\" is already in your address book.").arg(name));
}
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -202,7 +202,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -296,7 +296,7 @@ void AddressBook::updateInterface(Mode mode)
break;
case NavigationMode:
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
@@ -341,12 +341,12 @@ void AddressBook::saveToFile()
return;
}
-//! [saveToFile() function part2]
+//! [saveToFile() function part2]
//! [saveToFile() function part3]
QDataStream out(&file);
out.setVersion(QDataStream::Qt_4_5);
out << contacts;
- }
+ }
}
//! [saveToFile() function part3]
@@ -362,15 +362,15 @@ void AddressBook::loadFromFile()
if (fileName.isEmpty())
return;
else {
-
+
QFile file(fileName);
-
+
if (!file.open(QIODevice::ReadOnly)) {
QMessageBox::information(this, tr("Unable to open file"),
file.errorString());
return;
}
-
+
QDataStream in(&file);
in.setVersion(QDataStream::Qt_4_5);
contacts.clear(); // clear existing contacts
diff --git a/examples/widgets/tutorials/addressbook/part6/addressbook.h b/examples/widgets/tutorials/addressbook/part6/addressbook.h
index 99dfd1e404..ce2691ccad 100644
--- a/examples/widgets/tutorials/addressbook/part6/addressbook.h
+++ b/examples/widgets/tutorials/addressbook/part6/addressbook.h
@@ -70,10 +70,10 @@ public slots:
void findContact();
void next();
void previous();
-//! [save and load functions declaration]
+//! [save and load functions declaration]
void saveToFile();
void loadFromFile();
-//! [save and load functions declaration]
+//! [save and load functions declaration]
private:
void updateInterface(Mode mode);
@@ -86,10 +86,10 @@ private:
QPushButton *cancelButton;
QPushButton *nextButton;
QPushButton *previousButton;
-//! [save and load buttons declaration]
+//! [save and load buttons declaration]
QPushButton *loadButton;
QPushButton *saveButton;
-//! [save and load buttons declaration]
+//! [save and load buttons declaration]
QLineEdit *nameLine;
QTextEdit *addressText;
diff --git a/examples/widgets/tutorials/addressbook/part7/addressbook.cpp b/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
index 6ad7630e8d..2060d97d2f 100644
--- a/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part7/addressbook.cpp
@@ -93,7 +93,7 @@ AddressBook::AddressBook(QWidget *parent)
connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
connect(exportButton, SIGNAL(clicked()), this, SLOT(exportAsVCard()));
-
+
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);
buttonLayout1->addWidget(editButton);
@@ -153,7 +153,7 @@ void AddressBook::submitContact()
}
if (currentMode == AddingMode) {
-
+
if (!contacts.contains(name)) {
contacts.insert(name, address);
QMessageBox::information(this, tr("Add Successful"),
@@ -163,7 +163,7 @@ void AddressBook::submitContact()
tr("Sorry, \"%1\" is already in your address book.").arg(name));
}
} else if (currentMode == EditingMode) {
-
+
if (oldName != name) {
if (!contacts.contains(name)) {
QMessageBox::information(this, tr("Edit Successful"),
@@ -204,7 +204,7 @@ void AddressBook::removeContact()
QMessageBox::Yes | QMessageBox::No);
if (button == QMessageBox::Yes) {
-
+
previous();
contacts.remove(name);
@@ -298,7 +298,7 @@ void AddressBook::updateInterface(Mode mode)
break;
case NavigationMode:
-
+
if (contacts.isEmpty()) {
nameLine->clear();
addressText->clear();
@@ -331,7 +331,7 @@ void AddressBook::saveToFile()
QString fileName = QFileDialog::getSaveFileName(this,
tr("Save Address Book"), "",
tr("Address Book (*.abk);;All Files (*)"));
-
+
if (fileName.isEmpty())
return;
else {
@@ -404,14 +404,14 @@ void AddressBook::exportAsVCard()
QString fileName = QFileDialog::getSaveFileName(this,
tr("Export Contact"), "",
tr("vCard Files (*.vcf);;All Files (*)"));
-
+
if (fileName.isEmpty())
return;
QFile file(fileName);
//! [export function part1]
-
-//! [export function part2]
+
+//! [export function part2]
if (!file.open(QIODevice::WriteOnly)) {
QMessageBox::information(this, tr("Unable to open file"),
file.errorString());
@@ -425,12 +425,12 @@ void AddressBook::exportAsVCard()
out << "BEGIN:VCARD" << "\n";
out << "VERSION:2.1" << "\n";
out << "N:" << lastName << ";" << firstName << "\n";
-
- if (!nameList.isEmpty())
+
+ if (!nameList.isEmpty())
out << "FN:" << nameList.join(' ') << "\n";
else
out << "FN:" << firstName << "\n";
-//! [export function part3]
+//! [export function part3]
//! [export function part4]
address.replace(";", "\\;", Qt::CaseInsensitive);
diff --git a/examples/widgets/tutorials/addressbook/part7/addressbook.h b/examples/widgets/tutorials/addressbook/part7/addressbook.h
index a34cf24a23..d672c7a85b 100644
--- a/examples/widgets/tutorials/addressbook/part7/addressbook.h
+++ b/examples/widgets/tutorials/addressbook/part7/addressbook.h
@@ -74,7 +74,7 @@ public slots:
void loadFromFile();
//! [exportAsVCard() declaration]
void exportAsVCard();
-//! [exportAsVCard() declaration]
+//! [exportAsVCard() declaration]
private:
void updateInterface(Mode mode);
@@ -89,9 +89,9 @@ private:
QPushButton *previousButton;
QPushButton *loadButton;
QPushButton *saveButton;
-//! [exportButton declaration]
+//! [exportButton declaration]
QPushButton *exportButton;
-//! [exportButton declaration]
+//! [exportButton declaration]
QLineEdit *nameLine;
QTextEdit *addressText;
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp b/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp
index e780986a53..bd0202c967 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/main.cpp
@@ -67,7 +67,7 @@ Notepad::Notepad()
layout->addWidget(textEdit);
layout->addWidget(quitButton);
- setLayout(layout);
+ setLayout(layout);
setWindowTitle(tr("Notepad"));
}
@@ -79,7 +79,7 @@ void Notepad::quit()
messageBox.setText(tr("Do you really want to quit?"));
messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
messageBox.setDefaultButton(QMessageBox::No);
- if (messageBox.exec() == QMessageBox::Yes)
+ if (messageBox.exec() == QMessageBox::Yes)
qApp->quit();
}
diff --git a/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp b/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp
index a3567a08ab..317c4760fb 100644
--- a/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp
+++ b/examples/widgets/tutorials/modelview/5_edit/mymodel.cpp
@@ -78,7 +78,7 @@ bool MyModel::setData(const QModelIndex & index, const QVariant & value, int rol
//save value from editor to member m_gridData
m_gridData[index.row()][index.column()] = value.toString();
//for presentation purposes only: build and emit a joined string
- QString result;
+ QString result;
for(int row= 0; row < ROWS; row++)
{
for(int col= 0; col < COLS; col++)
diff --git a/examples/widgets/tutorials/modelview/7_selections/mainwindow.cpp b/examples/widgets/tutorials/modelview/7_selections/mainwindow.cpp
index d969582928..0c1eb290fa 100644
--- a/examples/widgets/tutorials/modelview/7_selections/mainwindow.cpp
+++ b/examples/widgets/tutorials/modelview/7_selections/mainwindow.cpp
@@ -72,7 +72,7 @@ MainWindow::MainWindow(QWidget *parent)
europeItem-> appendRow(italyItem);
italyItem-> appendRow(romeItem);
italyItem-> appendRow(veronaItem);
-
+
//register the model
treeView->setModel(standardModel);
treeView->expandAll();