summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/addressbook
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-06-25 13:49:53 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-06-25 13:49:53 (GMT)
commitdb8f05e257019694f5e8076845626008f2adc3dd (patch)
tree05d3959403cf15ac5f702091439e028af01f343b /examples/tutorials/addressbook
parent8aafaa65a1d16f8b982279f5aceedf1e281ddb5a (diff)
parent796a5a2c7d8c91a46ac761dde18b7da2ec6c177b (diff)
downloadQt-db8f05e257019694f5e8076845626008f2adc3dd.zip
Qt-db8f05e257019694f5e8076845626008f2adc3dd.tar.gz
Qt-db8f05e257019694f5e8076845626008f2adc3dd.tar.bz2
Merge commit 'qt/master-stable' into 4.6-stable
Bring Qt 4.6 into the Qt-S60 repo. Conflicts: configure.exe mkspecs/features/qttest_p4.prf qmake/generators/makefile.cpp src/corelib/io/qdir.cpp src/corelib/io/qprocess.h src/corelib/kernel/qcoreevent.h src/corelib/kernel/qobject.cpp src/corelib/kernel/qsharedmemory_unix.cpp src/corelib/thread/qthread_p.h src/corelib/tools/qvector.h src/gui/dialogs/qdialog.cpp src/gui/dialogs/qfiledialog.cpp src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qmessagebox.cpp src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsview.cpp src/gui/image/qpixmapcache.cpp src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h src/gui/painting/qdrawhelper.cpp src/gui/painting/qpaintengine_raster.cpp src/gui/text/qfontengine_qpf.cpp src/gui/widgets/qmenubar.cpp src/network/socket/qlocalserver.cpp src/testlib/qtestcase.cpp src/testlib/testlib.pro tests/auto/qimagereader/tst_qimagereader.cpp tests/auto/qitemdelegate/tst_qitemdelegate.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp tests/auto/qpixmap/qpixmap.pro
Diffstat (limited to 'examples/tutorials/addressbook')
-rw-r--r--examples/tutorials/addressbook/part1/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part2/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp4
-rw-r--r--examples/tutorials/addressbook/part3/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook/part4/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook/part5/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook/part6/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp3
-rw-r--r--examples/tutorials/addressbook/part7/main.cpp4
12 files changed, 15 insertions, 29 deletions
diff --git a/examples/tutorials/addressbook/part1/main.cpp b/examples/tutorials/addressbook/part1/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook/part1/main.cpp
+++ b/examples/tutorials/addressbook/part1/main.cpp
@@ -47,8 +47,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part2/main.cpp b/examples/tutorials/addressbook/part2/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook/part2/main.cpp
+++ b/examples/tutorials/addressbook/part2/main.cpp
@@ -47,8 +47,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part3/addressbook.cpp b/examples/tutorials/addressbook/part3/addressbook.cpp
index 49c5206..332e808 100644
--- a/examples/tutorials/addressbook/part3/addressbook.cpp
+++ b/examples/tutorials/addressbook/part3/addressbook.cpp
@@ -125,8 +125,7 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
- tr("Please enter a name and adderss."));
- return;
+ tr("Please enter a name and address."));
}
if (!contacts.contains(name)) {
@@ -136,7 +135,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
if (contacts.isEmpty()) {
diff --git a/examples/tutorials/addressbook/part3/main.cpp b/examples/tutorials/addressbook/part3/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part3/main.cpp
+++ b/examples/tutorials/addressbook/part3/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part4/addressbook.cpp b/examples/tutorials/addressbook/part4/addressbook.cpp
index 95def9c..06f8a09 100644
--- a/examples/tutorials/addressbook/part4/addressbook.cpp
+++ b/examples/tutorials/addressbook/part4/addressbook.cpp
@@ -135,7 +135,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
//! [submitContact() function part1]
if (currentMode == AddingMode) {
@@ -147,7 +146,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
//! [submitContact() function part1]
//! [submitContact() function part2]
@@ -162,7 +160,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/tutorials/addressbook/part4/main.cpp b/examples/tutorials/addressbook/part4/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part4/main.cpp
+++ b/examples/tutorials/addressbook/part4/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part5/addressbook.cpp b/examples/tutorials/addressbook/part5/addressbook.cpp
index 5afb6b8..af3c2d0 100644
--- a/examples/tutorials/addressbook/part5/addressbook.cpp
+++ b/examples/tutorials/addressbook/part5/addressbook.cpp
@@ -142,7 +142,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
if (currentMode == AddingMode) {
@@ -154,7 +153,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (currentMode == EditingMode) {
@@ -167,7 +165,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/tutorials/addressbook/part5/main.cpp b/examples/tutorials/addressbook/part5/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part5/main.cpp
+++ b/examples/tutorials/addressbook/part5/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part6/addressbook.cpp b/examples/tutorials/addressbook/part6/addressbook.cpp
index b7cd446..5f31c99 100644
--- a/examples/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/tutorials/addressbook/part6/addressbook.cpp
@@ -148,7 +148,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
if (currentMode == AddingMode) {
@@ -160,7 +159,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (currentMode == EditingMode) {
@@ -173,7 +171,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/tutorials/addressbook/part6/main.cpp b/examples/tutorials/addressbook/part6/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part6/main.cpp
+++ b/examples/tutorials/addressbook/part6/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part7/addressbook.cpp b/examples/tutorials/addressbook/part7/addressbook.cpp
index 2f81d2b..8be4d2b 100644
--- a/examples/tutorials/addressbook/part7/addressbook.cpp
+++ b/examples/tutorials/addressbook/part7/addressbook.cpp
@@ -150,7 +150,6 @@ void AddressBook::submitContact()
if (name == "" || address == "") {
QMessageBox::information(this, tr("Empty Field"),
tr("Please enter a name and address."));
- return;
}
if (currentMode == AddingMode) {
@@ -162,7 +161,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Add Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (currentMode == EditingMode) {
@@ -175,7 +173,6 @@ void AddressBook::submitContact()
} else {
QMessageBox::information(this, tr("Edit Unsuccessful"),
tr("Sorry, \"%1\" is already in your address book.").arg(name));
- return;
}
} else if (oldAddress != address) {
QMessageBox::information(this, tr("Edit Successful"),
diff --git a/examples/tutorials/addressbook/part7/main.cpp b/examples/tutorials/addressbook/part7/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part7/main.cpp
+++ b/examples/tutorials/addressbook/part7/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}