Package Help dialog updated#3478
Conversation
|
looks good
|
src/texdocdialog.h
Outdated
| QString lastDocRequest; | ||
| Help *help; | ||
| QStringList m_packages; | ||
| QButtonGroup ButtonGroup; |
There was a problem hiding this comment.
to follow (implicit) naming strategy, the variable should start with a lower case letter (buttonGroup or even m_buttonGroup)
There was a problem hiding this comment.
Good point. I will review the code again to make these changes.
src/texdocdialog.ui
Outdated
| <number>0</number> | ||
| </property> | ||
| <item> | ||
| <layout class="QHBoxLayout" name="LanguagesLayout"> |
There was a problem hiding this comment.
the ususal naming strategy is something like lyLanguages or similar.
lower case first letter helps readability.
src/texdocdialog.ui
Outdated
| </layout> | ||
| </item> | ||
| <item> | ||
| <widget class="QTextBrowser" name="PackageDescriptions"/> |
|
The json database is drawn from CTAN but it has been edittted. |
|
The only thing I couldn't solve is to find a way to open the package documentation when the link is clicked inside the QTextBrowser. |
|
All changes are made. |
|
does not compile on OSX (LLVM) |
src/texdocdialog.cpp
Outdated
| delete bt; | ||
| } | ||
| for(CTANDescription description : package.descriptions){ | ||
| QPushButton * LangButton = new QPushButton(description.language,this); |
src/texdocdialog.cpp
Outdated
|
|
||
| while(buttonGroup.buttons().count()>0){ | ||
| QAbstractButton * bt = buttonGroup.buttons().first(); | ||
| ui->LanguagesLayout->removeWidget(bt); |
There was a problem hiding this comment.
LanguageLayout should start with lower case
There was a problem hiding this comment.
Missed that. I will fix it right away
|
I changed the variable names. But I can't see the reason that compilation fails on OSX. I looked at the compile log and if I'm not mistaken the errors are on other files than the ones I modified. |
|
thanks |
|
There are blank spaces before the colon. Also, it would be better if the windows could be maximized since it is too tall on my laptop screen and the Cancel button is almost out of screen. |
|
I was able to build with msys2 ucrt64 |
|
TeXstudio 4.7.3 (git 4.7.2-38-ga8c01995f) |
Looks like. But the doc says since 5.14. Since my txs shows Qt 5.12.8, I suppose I found the problem. |
|
Nice feature! But I don't understand the point of by default disabling the search text field: as long as the “all the packages” option is disabled (the corresponding checkbox is unchecked), nothing can be done. What I would expect would be that, by default:
|
|
@dbitouze this is impossible for you? and I would say that the option is always disabled when the dialog is started |
|
Including 5 extra developments and missing the latest 2 (reagarding cwls) I use this (msys2 build) on Win10: TeXstudio 4.7.3 (git 4.7.2-51-gbd8a0bd91) I wonder why you see no packages at all. In any case the packages list should not be empty at start. How do you get the packages into place? |
Sorry, I didn't follow the question. |
|
there's something wrong. |
Maybe this line: |
|
since search field is not enabled I would conclude that n equals 0. But then m_packages is empty & state<=0. Since I can't reproduce, can can you debug the the values of m_packages.count() and state immediately after line 48 (int n=0;)? |
|
btw: do you use packages in your latex document? |
You got it! I was opening the texdoc window with no opened document. Anyway, it would be good to have the feature available also for no documents. |
|
in this case the option should be checked |






Updated CTAN package database with more information for each package.
