2017-07-28 29 views
0

所有問題我提供了一個簡單的qdoc​​conf文件以及我的項目,但是當qdocconf位於項目的files屬性中時,qbs不會調用qdoc。qbs不會調用qdoc

Project.qbs

import qbs 

Project { 
    name: "LoggingMessageHandler" 

    Product { 
     files: [ 
      "config.qdocconf", 
      "messagehandler.cpp", 
     ] 
     name: "LoggingMessageHandler" 
     type: project.staticBuild ? "staticlibrary" : "dynamiclibrary" 

     Depends { name: "cpp" } 
     Depends { name: "Qt.core" } 

     cpp.cxxLanguageVersion: "c++11" 
     cpp.defines: [ 
      "QT_DEPRECATED_WARNINGS", 
      "QT_DISABLE_DEPRECATED_BEFORE=0x060000" 
     ] 

     Export { 
      Depends { name: "cpp" } 
      Depends { name: "Qt.core" } 
      cpp.includePaths: [product.sourceDirectory] 
     } 

     Group { 
      overrideTags: false 
      files: "*.qdocconf" 
      fileTags: "qdocconf-main" 
     } 

     Group { 
      name: "install include" 
      overrideTags: false 
      files: [ 
       "messagehandler.h", 
       "LoggingMessageHandler" 
      ] 
      qbs.install: project.installInclude 
      qbs.installDir: "/include" 
     } 

    } 

} 

config.qdocconf:

project = LoggingMessageHandler 
description = A set of QMessageHandler function to be used with the Qt Logging framework. 

depends += qtcore 

outputdir = ./doc 
headerdirs = . 
sourcedirs = . 
exampledirs = . 

項目目錄層次結構: enter image description here

PS:所述project.installInclude是從較高項目中設置的開關文件。

回答

1

你沒有告訴qbs你想要建立文檔。爲產品類型添加相關標籤,例如「qch」。有關與qdoc相關的文件標記,請參閱https://doc.qt.io/qbs/qt-modules.html#core-file-tags。有關產品類型的一般作用,請參閱https://doc.qt.io/qbs/rule-item.html#rules-and-product-types

+0

好的,我會看看,但我認爲qbs會在有qdocconf-main文件標籤時觸發doc規則。 –

+0

我明白你的意思,事實上生成庫不需要生成文檔這就是爲什麼qbs不調用qdoc。 –