Commit ef43fbf5 authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

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.
parent 2841e875
......@@ -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
......
......@@ -2,7 +2,7 @@
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
#include <QtGui/QWidget>
#include <QWidget>
namespace Ui
{
......
//! [main function]
#include <QtGui/QApplication>
#include <QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
......
......@@ -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
......
//! [main function]
#include <QtGui/QApplication>
#include <QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
......
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
#include <QtGui/QWidget>
#include <QtGui/QMessageBox>
#include <QtCore/QMap>
#include <QWidget>
#include <QMessageBox>
#include <QMap>
namespace Ui
{
......
#include <QtGui/QApplication>
#include <QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
......
#ifndef ADDRESSBOOK_H
#define ADDRESSBOOK_H
#include <QtGui/QWidget>
#include <QtGui/QMessageBox>
#include <QtCore/QMap>
#include <QWidget>
#include <QMessageBox>
#include <QMap>
namespace Ui
......
#include <QtGui/QApplication>
#include <QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
......
#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]
......
#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;
......
#include <QtGui/QApplication>
#include <QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
......
#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
......
#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;
......
#include <QtGui/QApplication>
#include <QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
......
#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
......
#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;
......
#include <QtGui/QApplication>
#include <QApplication>
#include "addressbook.h"
int main(int argc, char *argv[])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment