summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSze Howe Koh <szehowe.koh@gmail.com>2013-06-30 13:07:52 +0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-01 16:16:56 +0200
commitd6857381db7df50dd88a208ee37ac42cd3d1fa5a (patch)
tree3675c74ae00e583bc052fc65ae721a6d22959973
parentd318c26c0db0067101bbcfac0953f8cccd984653 (diff)
Doc: Hide license from "Getting Started" snippets
There's no point showing 5 copies of the license text on 1 page. It just adds noise with no benefit to the reader. Furthermore, a few of these snippets are described in the tutorial as being auto-generated by the Qt Creator wizard; the wizard would not generate the license text. Change-Id: Ifddd1238eb815ce86db7ebb0dabab08f5b547dbc Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
-rw-r--r--doc/src/getting-started/gettingstartedqt.qdoc10
-rw-r--r--doc/src/snippets/gs/notepad1.cpp2
-rw-r--r--doc/src/snippets/gs/notepad1.h2
-rw-r--r--doc/src/snippets/gs/notepad2.cpp2
-rw-r--r--doc/src/snippets/gs/notepad2.h2
-rw-r--r--doc/src/snippets/widgets-tutorial/notepad/main.cpp2
6 files changed, 15 insertions, 5 deletions
diff --git a/doc/src/getting-started/gettingstartedqt.qdoc b/doc/src/getting-started/gettingstartedqt.qdoc
index 7d9cdb9c3..844245678 100644
--- a/doc/src/getting-started/gettingstartedqt.qdoc
+++ b/doc/src/getting-started/gettingstartedqt.qdoc
@@ -105,7 +105,7 @@
The wizard generates the following code in the main.cpp file:
- \quotefile snippets/widgets-tutorial/notepad/main.cpp
+ \snippet snippets/widgets-tutorial/notepad/main.cpp all
Let us go through the code line by line. On the first two lines, we include
the header files for the Notepad widget and QApplication. All Qt classes
@@ -227,7 +227,7 @@
necessary #includes, a constructor, a destructor, and the Ui object. The
file looks as follows:
- \quotefile snippets/gs/notepad1.h
+ \snippet snippets/gs/notepad1.h all
Line 4 includes QMainWindow that provides a main application window.
@@ -262,7 +262,7 @@
The source file that the wizard generated for the Notepad class looks as
follows:
- \quotefile snippets/gs/notepad1.cpp
+ \snippet snippets/gs/notepad1.cpp all
The first two lines include the Notepad class header file that was generated
by the wizard and the UI header file that was generated by the \c uic tool.
@@ -357,7 +357,7 @@
Let us look at the modified code in the header file, notepad.h:
- \quotefile snippets/gs/notepad2.h
+ \snippet snippets/gs/notepad2.h all
Line 14 uses Qt's signals and slots mechanism to make the
application exit when the \b {Quit button} is pushed. Qt Designer uses
@@ -369,7 +369,7 @@
The corresponding code in the source file, notepad.cpp, looks as follows:
- \quotefile snippets/gs/notepad2.cpp
+ \snippet snippets/gs/notepad2.cpp all
The code defines the private function that is executed when QPushButton
emits the \l{QPushButton::}{clicked()} signal.
diff --git a/doc/src/snippets/gs/notepad1.cpp b/doc/src/snippets/gs/notepad1.cpp
index 37c9c41a3..b4ff493b5 100644
--- a/doc/src/snippets/gs/notepad1.cpp
+++ b/doc/src/snippets/gs/notepad1.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+//! [all]
#include "notepad.h"
#include "ui_notepad.h"
@@ -52,3 +53,4 @@ Notepad::~Notepad()
{
delete ui;
}
+//! [all]
diff --git a/doc/src/snippets/gs/notepad1.h b/doc/src/snippets/gs/notepad1.h
index 6148967bb..df043dd46 100644
--- a/doc/src/snippets/gs/notepad1.h
+++ b/doc/src/snippets/gs/notepad1.h
@@ -41,6 +41,7 @@
#ifndef NOTEPAD_H
#define NOTEPAD_H
+//! [all]
#include <QMainWindow>
namespace Ui {
@@ -58,5 +59,6 @@ public:
private:
Ui::Notepad *ui;
};
+//! [all]
#endif // NOTEPAD_H
diff --git a/doc/src/snippets/gs/notepad2.cpp b/doc/src/snippets/gs/notepad2.cpp
index 95d5d6069..f3d69973a 100644
--- a/doc/src/snippets/gs/notepad2.cpp
+++ b/doc/src/snippets/gs/notepad2.cpp
@@ -38,7 +38,9 @@
**
****************************************************************************/
+//! [all]
void Notepad::on_quitButton_clicked()
{
}
+//! [all]
diff --git a/doc/src/snippets/gs/notepad2.h b/doc/src/snippets/gs/notepad2.h
index 00d11544a..bac6d43fc 100644
--- a/doc/src/snippets/gs/notepad2.h
+++ b/doc/src/snippets/gs/notepad2.h
@@ -38,6 +38,7 @@
**
****************************************************************************/
+//! [all]
namespace Ui {
class Notepad;
}
@@ -56,3 +57,4 @@ private slots:
private:
Ui::Notepad *ui;
};
+//! [all]
diff --git a/doc/src/snippets/widgets-tutorial/notepad/main.cpp b/doc/src/snippets/widgets-tutorial/notepad/main.cpp
index ee0a65055..7fb83194c 100644
--- a/doc/src/snippets/widgets-tutorial/notepad/main.cpp
+++ b/doc/src/snippets/widgets-tutorial/notepad/main.cpp
@@ -38,6 +38,7 @@
**
****************************************************************************/
+//! [all]
#include "notepad.h"
#include <QApplication>
@@ -49,3 +50,4 @@ int main(int argc, char *argv[])
return a.exec();
}
+//! [all]