[Development] If you are working on documentation...

Martin Smith Martin.Smith at digia.com
Thu Dec 13 08:51:17 CET 2012


On Dec 12, 2012, at 4:53 PM, Sze Howe Koh wrote:

> On 12 December 2012 19:22, Martin Smith <Martin.Smith at digia.com> wrote:
>> If you have trouble creating a link to something (usually title or subtitle) because the title or subtitle you are trying to link to exists in more than one document and your link goes to the wrong one, consider using the \target command. It didn't work across modules until today. The relevant qdoc change is integrating in stable as I write.
> 
> Hi Martin,
> 
> Does the change also allow \l to work across modules? I just tried
> writing "\l{Qt Concurrent}" for a page in Qt Core, to link to
> http://doc-snapshot.qt-project.org/5.0/qtconcurrent/qtconcurrent-index.html,
> but the compiled text was unlinked.
> 

Cross-module \l commands already work, but yours won't because it is going in the wrong direction. 

Each .qdocconf file contains a depends variable. In qtconcurrent.qdocconf the depends variable is:

depends                 += qtcore

...which means the documentation for qtconcurrent depends on the .index file generated in the -prepare phase of qdoc. That's what enables you to use \l to link FROM qtconcurrent TO qtcore. 

The depends for qtcore is:

depends                 += qtgui qtwidgets qtnetwork qtdoc qtquick

...which shows that qtcore does not depend on qtconcurrent, so you can't use \l to link FROM qtcore TO qtconcurrent.

I didn't think the dependencies could go both ways, but I see that qtcore depends on qtgui, and the depends for qtgui is:

depends += \
    qtcore \
    qtnetwork \
    qtopengl \
    qtsvg \
    qtqml \
    qtquick \
    qtwidgets \
    qtdoc

...so in that case it should be possible to use \l in both directions. Given that, you can try adding qtconcurrent to the depends for qtcore in qtcore.qdocconf and see if your link works then, but I don't know if we're allowed to change these module dependencies. It will certainly need approval from someone other than me.

martin




More information about the Development mailing list