summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/tutorials/addressbook-fr/part1/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part2/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part3/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part4/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part5/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part6/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part7/main.cpp4
-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/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part4/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part5/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part6/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part7/main.cpp4
-rw-r--r--examples/tutorials/widgets/childwidget/main.cpp11
-rw-r--r--examples/tutorials/widgets/nestedlayouts/main.cpp16
-rw-r--r--examples/tutorials/widgets/toplevel/main.cpp9
-rw-r--r--examples/tutorials/widgets/windowlayout/main.cpp11
-rw-r--r--examples/xmlpatterns/trafficinfo/main.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.h2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.h2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.h2
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.h2
27 files changed, 64 insertions, 57 deletions
diff --git a/examples/tutorials/addressbook-fr/part1/main.cpp b/examples/tutorials/addressbook-fr/part1/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook-fr/part1/main.cpp
+++ b/examples/tutorials/addressbook-fr/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-fr/part2/main.cpp b/examples/tutorials/addressbook-fr/part2/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook-fr/part2/main.cpp
+++ b/examples/tutorials/addressbook-fr/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-fr/part3/main.cpp b/examples/tutorials/addressbook-fr/part3/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part3/main.cpp
+++ b/examples/tutorials/addressbook-fr/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-fr/part4/main.cpp b/examples/tutorials/addressbook-fr/part4/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part4/main.cpp
+++ b/examples/tutorials/addressbook-fr/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-fr/part5/main.cpp b/examples/tutorials/addressbook-fr/part5/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part5/main.cpp
+++ b/examples/tutorials/addressbook-fr/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-fr/part6/main.cpp b/examples/tutorials/addressbook-fr/part6/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part6/main.cpp
+++ b/examples/tutorials/addressbook-fr/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-fr/part7/main.cpp b/examples/tutorials/addressbook-fr/part7/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part7/main.cpp
+++ b/examples/tutorials/addressbook-fr/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();
}
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/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/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/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/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/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();
}
diff --git a/examples/tutorials/widgets/childwidget/main.cpp b/examples/tutorials/widgets/childwidget/main.cpp
index 99235bd..fd50b1d 100644
--- a/examples/tutorials/widgets/childwidget/main.cpp
+++ b/examples/tutorials/widgets/childwidget/main.cpp
@@ -45,13 +45,14 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QWidget *window = new QWidget();
- window->resize(320, 240);
- window->setWindowTitle(tr("Child widget"));
- window->show();
+ QWidget window;
+ window.resize(320, 240);
+ window.setWindowTitle(QApplication::translate("childwidget", "Child widget"));
+ window.show();
//! [create, position and show]
- QPushButton *button = new QPushButton(tr("Press me"), window);
+ QPushButton *button = new QPushButton(
+ QApplication::translate("childwidget", "Press me"), &window);
button->move(100, 100);
button->show();
//! [create, position and show]
diff --git a/examples/tutorials/widgets/nestedlayouts/main.cpp b/examples/tutorials/widgets/nestedlayouts/main.cpp
index 29996c6..226d0f9 100644
--- a/examples/tutorials/widgets/nestedlayouts/main.cpp
+++ b/examples/tutorials/widgets/nestedlayouts/main.cpp
@@ -46,9 +46,10 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QWidget *window = new QWidget();
+ QWidget window;
- QLabel *queryLabel = new QLabel(tr("Query:"));
+ QLabel *queryLabel = new QLabel(
+ QApplication::translate("nestedlayouts", "Query:"));
QLineEdit *queryEdit = new QLineEdit();
QTableView *resultView = new QTableView();
@@ -59,14 +60,16 @@ int main(int argc, char *argv[])
QVBoxLayout *mainLayout = new QVBoxLayout();
mainLayout->addLayout(queryLayout);
mainLayout->addWidget(resultView);
- window->setLayout(mainLayout);
+ window.setLayout(mainLayout);
// Set up the model and configure the view...
//! [first part]
//! [set up the model]
QStandardItemModel model;
- model.setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Office"));
+ model.setHorizontalHeaderLabels(
+ QStringList() << QApplication::translate("nestedlayouts", "Name")
+ << QApplication::translate("nestedlayouts", "Office"));
QList<QStringList> rows = QList<QStringList>()
<< (QStringList() << "Verne Nilsen" << "123")
@@ -92,8 +95,9 @@ int main(int argc, char *argv[])
resultView->horizontalHeader()->setStretchLastSection(true);
//! [set up the model]
//! [last part]
- window->setWindowTitle(tr("Nested layouts"));
- window->show();
+ window.setWindowTitle(
+ QApplication::translate("nestedlayouts", "Nested layouts"));
+ window.show();
return app.exec();
}
//! [last part]
diff --git a/examples/tutorials/widgets/toplevel/main.cpp b/examples/tutorials/widgets/toplevel/main.cpp
index c966037..f18fa6b 100644
--- a/examples/tutorials/widgets/toplevel/main.cpp
+++ b/examples/tutorials/widgets/toplevel/main.cpp
@@ -46,11 +46,12 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
//! [create, resize and show]
- QWidget *window = new QWidget();
- window->resize(320, 240);
- window->show();
+ QWidget window;
+ window.resize(320, 240);
+ window.show();
//! [create, resize and show]
- window->setWindowTitle(tr("Top-level widget"));
+ window.setWindowTitle(
+ QApplication::translate("toplevel", "Top-level widget"));
return app.exec();
}
//! [main program]
diff --git a/examples/tutorials/widgets/windowlayout/main.cpp b/examples/tutorials/widgets/windowlayout/main.cpp
index d7c75a3..c30d669 100644
--- a/examples/tutorials/widgets/windowlayout/main.cpp
+++ b/examples/tutorials/widgets/windowlayout/main.cpp
@@ -45,18 +45,19 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- QWidget *window = new QWidget();
+ QWidget window;
//! [create, lay out widgets and show]
- QLabel *label = new QLabel(tr("Name:"));
+ QLabel *label = new QLabel(QApplication::translate("windowlayout", "Name:"));
QLineEdit *lineEdit = new QLineEdit();
QHBoxLayout *layout = new QHBoxLayout();
layout->addWidget(label);
layout->addWidget(lineEdit);
- window->setLayout(layout);
+ window.setLayout(layout);
//! [create, lay out widgets and show]
- window->setWindowTitle(tr("Window layout"));
- window->show();
+ window.setWindowTitle(
+ QApplication::translate("windowlayout", "Window layout"));
+ window.show();
return app.exec();
}
//! [main program]
diff --git a/examples/xmlpatterns/trafficinfo/main.cpp b/examples/xmlpatterns/trafficinfo/main.cpp
index 97b2bf7..544260d 100644
--- a/examples/xmlpatterns/trafficinfo/main.cpp
+++ b/examples/xmlpatterns/trafficinfo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
index 393e33c..aeb7224 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.h b/examples/xmlpatterns/trafficinfo/mainwindow.h
index d48109d..5362bcd 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.h
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.cpp b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
index 9876bdb..54ed904 100644
--- a/examples/xmlpatterns/trafficinfo/stationdialog.cpp
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.h b/examples/xmlpatterns/trafficinfo/stationdialog.h
index 5ac1635..0e87f61 100644
--- a/examples/xmlpatterns/trafficinfo/stationdialog.h
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationquery.cpp b/examples/xmlpatterns/trafficinfo/stationquery.cpp
index ab42ad9..3db0fdb 100644
--- a/examples/xmlpatterns/trafficinfo/stationquery.cpp
+++ b/examples/xmlpatterns/trafficinfo/stationquery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationquery.h b/examples/xmlpatterns/trafficinfo/stationquery.h
index 5cbf28a..d1e4d2f 100644
--- a/examples/xmlpatterns/trafficinfo/stationquery.h
+++ b/examples/xmlpatterns/trafficinfo/stationquery.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/timequery.cpp b/examples/xmlpatterns/trafficinfo/timequery.cpp
index bd63560..d6bf695 100644
--- a/examples/xmlpatterns/trafficinfo/timequery.cpp
+++ b/examples/xmlpatterns/trafficinfo/timequery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/timequery.h b/examples/xmlpatterns/trafficinfo/timequery.h
index f88e62c..2435c71 100644
--- a/examples/xmlpatterns/trafficinfo/timequery.h
+++ b/examples/xmlpatterns/trafficinfo/timequery.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.