From ef43fbf594d36dbe2d690455e26f82f3dfd9dc5b Mon Sep 17 00:00:00 2001 From: Daniel Molkentin <daniel.molkentin@nokia.com> Date: Fri, 7 Aug 2009 15:03:29 +0200 Subject: [PATCH] use module-less include file style for the sdk example. This was proposed by Kavindra and actually it is probably simpler for newbies. The documentation already talks about this style, so use it. --- doc/addressbook-sdk.qdoc | 3 --- doc/examples/addressbook-sdk/part1/addressbook.h | 2 +- doc/examples/addressbook-sdk/part1/main.cpp | 2 +- doc/examples/addressbook-sdk/part2/addressbook.h | 6 +++--- doc/examples/addressbook-sdk/part2/main.cpp | 2 +- doc/examples/addressbook-sdk/part3/addressbook.h | 6 +++--- doc/examples/addressbook-sdk/part3/main.cpp | 2 +- doc/examples/addressbook-sdk/part4/addressbook.h | 6 +++--- doc/examples/addressbook-sdk/part4/main.cpp | 2 +- doc/examples/addressbook-sdk/part5/addressbook.h | 6 +++--- doc/examples/addressbook-sdk/part5/finddialog.h | 6 +++--- doc/examples/addressbook-sdk/part5/main.cpp | 2 +- doc/examples/addressbook-sdk/part6/addressbook.h | 6 +++--- doc/examples/addressbook-sdk/part6/finddialog.h | 6 +++--- doc/examples/addressbook-sdk/part6/main.cpp | 2 +- doc/examples/addressbook-sdk/part7/addressbook.h | 6 +++--- doc/examples/addressbook-sdk/part7/finddialog.h | 6 +++--- doc/examples/addressbook-sdk/part7/main.cpp | 2 +- 18 files changed, 35 insertions(+), 38 deletions(-) diff --git a/doc/addressbook-sdk.qdoc b/doc/addressbook-sdk.qdoc index 1b77d98282d..579821bdd8b 100644 --- a/doc/addressbook-sdk.qdoc +++ b/doc/addressbook-sdk.qdoc @@ -338,9 +338,6 @@ Since the \c AddressBook class is a subclass of QWidget, Qt Creator includes QWidget in the header file. - ## this is a bit confusing, because QWidget is already included, but without QtGui/ - ## Also, how about ordering the includes by module? - \snippet examples/addressbook-sdk/part2/addressbook.h include We need a container to store our address book contacts, so that we can diff --git a/doc/examples/addressbook-sdk/part1/addressbook.h b/doc/examples/addressbook-sdk/part1/addressbook.h index c5937d435b8..787cbde184c 100644 --- a/doc/examples/addressbook-sdk/part1/addressbook.h +++ b/doc/examples/addressbook-sdk/part1/addressbook.h @@ -2,7 +2,7 @@ #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H -#include <QtGui/QWidget> +#include <QWidget> namespace Ui { diff --git a/doc/examples/addressbook-sdk/part1/main.cpp b/doc/examples/addressbook-sdk/part1/main.cpp index 3378b4adce4..7b8bc7babe7 100644 --- a/doc/examples/addressbook-sdk/part1/main.cpp +++ b/doc/examples/addressbook-sdk/part1/main.cpp @@ -1,5 +1,5 @@ //! [main function] -#include <QtGui/QApplication> +#include <QApplication> #include "addressbook.h" int main(int argc, char *argv[]) diff --git a/doc/examples/addressbook-sdk/part2/addressbook.h b/doc/examples/addressbook-sdk/part2/addressbook.h index 6bd34276907..3f4c7224c13 100644 --- a/doc/examples/addressbook-sdk/part2/addressbook.h +++ b/doc/examples/addressbook-sdk/part2/addressbook.h @@ -2,9 +2,9 @@ #define ADDRESSBOOK_H //! [include] -#include <QtGui/QWidget> -#include <QtCore/QMap> -#include <QtGui/QMessageBox> +#include <QWidget> +#include <QMap> +#include <QMessageBox> //! [include] namespace Ui diff --git a/doc/examples/addressbook-sdk/part2/main.cpp b/doc/examples/addressbook-sdk/part2/main.cpp index 3378b4adce4..7b8bc7babe7 100644 --- a/doc/examples/addressbook-sdk/part2/main.cpp +++ b/doc/examples/addressbook-sdk/part2/main.cpp @@ -1,5 +1,5 @@ //! [main function] -#include <QtGui/QApplication> +#include <QApplication> #include "addressbook.h" int main(int argc, char *argv[]) diff --git a/doc/examples/addressbook-sdk/part3/addressbook.h b/doc/examples/addressbook-sdk/part3/addressbook.h index 79b43b9c428..c9608d0c647 100644 --- a/doc/examples/addressbook-sdk/part3/addressbook.h +++ b/doc/examples/addressbook-sdk/part3/addressbook.h @@ -1,9 +1,9 @@ #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H -#include <QtGui/QWidget> -#include <QtGui/QMessageBox> -#include <QtCore/QMap> +#include <QWidget> +#include <QMessageBox> +#include <QMap> namespace Ui { diff --git a/doc/examples/addressbook-sdk/part3/main.cpp b/doc/examples/addressbook-sdk/part3/main.cpp index 437a1c8352a..e7f9a73348f 100644 --- a/doc/examples/addressbook-sdk/part3/main.cpp +++ b/doc/examples/addressbook-sdk/part3/main.cpp @@ -1,4 +1,4 @@ -#include <QtGui/QApplication> +#include <QApplication> #include "addressbook.h" int main(int argc, char *argv[]) diff --git a/doc/examples/addressbook-sdk/part4/addressbook.h b/doc/examples/addressbook-sdk/part4/addressbook.h index 088cc436ced..4c8b8c8c688 100644 --- a/doc/examples/addressbook-sdk/part4/addressbook.h +++ b/doc/examples/addressbook-sdk/part4/addressbook.h @@ -1,9 +1,9 @@ #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H -#include <QtGui/QWidget> -#include <QtGui/QMessageBox> -#include <QtCore/QMap> +#include <QWidget> +#include <QMessageBox> +#include <QMap> namespace Ui diff --git a/doc/examples/addressbook-sdk/part4/main.cpp b/doc/examples/addressbook-sdk/part4/main.cpp index 437a1c8352a..e7f9a73348f 100644 --- a/doc/examples/addressbook-sdk/part4/main.cpp +++ b/doc/examples/addressbook-sdk/part4/main.cpp @@ -1,4 +1,4 @@ -#include <QtGui/QApplication> +#include <QApplication> #include "addressbook.h" int main(int argc, char *argv[]) diff --git a/doc/examples/addressbook-sdk/part5/addressbook.h b/doc/examples/addressbook-sdk/part5/addressbook.h index c0cbf32599a..0bcf8402b11 100644 --- a/doc/examples/addressbook-sdk/part5/addressbook.h +++ b/doc/examples/addressbook-sdk/part5/addressbook.h @@ -1,9 +1,9 @@ #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H -#include <QtGui/QWidget> -#include <QtGui/QMessageBox> -#include <QtCore/QMap> +#include <QWidget> +#include <QMessageBox> +#include <QMap> //! [include] #include "finddialog.h" //! [include] diff --git a/doc/examples/addressbook-sdk/part5/finddialog.h b/doc/examples/addressbook-sdk/part5/finddialog.h index 9912dec8dfc..3e324731cbd 100644 --- a/doc/examples/addressbook-sdk/part5/finddialog.h +++ b/doc/examples/addressbook-sdk/part5/finddialog.h @@ -1,9 +1,9 @@ #ifndef FINDDIALOG_H #define FINDDIALOG_H -#include <QtGui/QDialog> -#include <QtGui/QLineEdit> -#include <QtGui/QPushButton> +#include <QDialog> +#include <QLineEdit> +#include <QPushButton> namespace Ui { class FindDialog; diff --git a/doc/examples/addressbook-sdk/part5/main.cpp b/doc/examples/addressbook-sdk/part5/main.cpp index 437a1c8352a..e7f9a73348f 100644 --- a/doc/examples/addressbook-sdk/part5/main.cpp +++ b/doc/examples/addressbook-sdk/part5/main.cpp @@ -1,4 +1,4 @@ -#include <QtGui/QApplication> +#include <QApplication> #include "addressbook.h" int main(int argc, char *argv[]) diff --git a/doc/examples/addressbook-sdk/part6/addressbook.h b/doc/examples/addressbook-sdk/part6/addressbook.h index 2dd06cb9aea..303c53a7aea 100644 --- a/doc/examples/addressbook-sdk/part6/addressbook.h +++ b/doc/examples/addressbook-sdk/part6/addressbook.h @@ -1,9 +1,9 @@ #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H -#include <QtGui/QWidget> -#include <QtGui/QMessageBox> -#include <QtCore/QMap> +#include <QWidget> +#include <QMessageBox> +#include <QMap> #include "finddialog.h" namespace Ui diff --git a/doc/examples/addressbook-sdk/part6/finddialog.h b/doc/examples/addressbook-sdk/part6/finddialog.h index 1166102537c..58884bf43aa 100644 --- a/doc/examples/addressbook-sdk/part6/finddialog.h +++ b/doc/examples/addressbook-sdk/part6/finddialog.h @@ -1,9 +1,9 @@ #ifndef FINDDIALOG_H #define FINDDIALOG_H -#include <QtGui/QDialog> -#include <QtGui/QLineEdit> -#include <QtGui/QPushButton> +#include <QDialog> +#include <QLineEdit> +#include <QPushButton> namespace Ui { class FindDialog; diff --git a/doc/examples/addressbook-sdk/part6/main.cpp b/doc/examples/addressbook-sdk/part6/main.cpp index 437a1c8352a..e7f9a73348f 100644 --- a/doc/examples/addressbook-sdk/part6/main.cpp +++ b/doc/examples/addressbook-sdk/part6/main.cpp @@ -1,4 +1,4 @@ -#include <QtGui/QApplication> +#include <QApplication> #include "addressbook.h" int main(int argc, char *argv[]) diff --git a/doc/examples/addressbook-sdk/part7/addressbook.h b/doc/examples/addressbook-sdk/part7/addressbook.h index 2c3b6d5e5d7..824d63d14d0 100644 --- a/doc/examples/addressbook-sdk/part7/addressbook.h +++ b/doc/examples/addressbook-sdk/part7/addressbook.h @@ -1,9 +1,9 @@ #ifndef ADDRESSBOOK_H #define ADDRESSBOOK_H -#include <QtGui/QWidget> -#include <QtGui/QMessageBox> -#include <QtCore/QMap> +#include <QWidget> +#include <QMessageBox> +#include <QMap> #include "finddialog.h" namespace Ui diff --git a/doc/examples/addressbook-sdk/part7/finddialog.h b/doc/examples/addressbook-sdk/part7/finddialog.h index 1166102537c..58884bf43aa 100644 --- a/doc/examples/addressbook-sdk/part7/finddialog.h +++ b/doc/examples/addressbook-sdk/part7/finddialog.h @@ -1,9 +1,9 @@ #ifndef FINDDIALOG_H #define FINDDIALOG_H -#include <QtGui/QDialog> -#include <QtGui/QLineEdit> -#include <QtGui/QPushButton> +#include <QDialog> +#include <QLineEdit> +#include <QPushButton> namespace Ui { class FindDialog; diff --git a/doc/examples/addressbook-sdk/part7/main.cpp b/doc/examples/addressbook-sdk/part7/main.cpp index 437a1c8352a..e7f9a73348f 100644 --- a/doc/examples/addressbook-sdk/part7/main.cpp +++ b/doc/examples/addressbook-sdk/part7/main.cpp @@ -1,4 +1,4 @@ -#include <QtGui/QApplication> +#include <QApplication> #include "addressbook.h" int main(int argc, char *argv[]) -- GitLab