aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/modules/protobufcpp-module.qdoc19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/reference/modules/protobufcpp-module.qdoc b/doc/reference/modules/protobufcpp-module.qdoc
index 688f1d9e2..63c56c6ca 100644
--- a/doc/reference/modules/protobufcpp-module.qdoc
+++ b/doc/reference/modules/protobufcpp-module.qdoc
@@ -36,6 +36,25 @@
The \c protobuf.cpp module provides support for generating C++ headers
and sources from proto definition files using the \l protoc tool.
+ A simple qbs file that uses protobuf can be written as follows:
+ \code
+ CppApplication {
+ Depends { name: "protobuf.cpp" }
+ files: ["foo.proto", "main.cpp"]
+ }
+ \endcode
+ A generated header now can be included in the C++ sources:
+ \code
+ #include <foo.pb.h>
+
+ int main(int argc, char* argv[]) {
+ Foo bar;
+ bar.set_answer(42);
+ google::protobuf::ShutdownProtobufLibrary();
+ return 0;
+ }
+ \endcode
+
\section2 Relevant File Tags
\table