QCommandLineParser --help and --help-all options are not translated - c++

I have got this result when using https://doc.qt.io/qt-5/qcommandlineparser.html#addHelpOption:
Использование: ./build/Debug/client/myapp [параметры]
Параметры:
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
-v, --version Отобразить информацию о версии.
As one can see, the help entries are not traslated.
I tried to find a more full qt_ru.qm file or a qt_ru.ts file, but failed. How can be this fixed? Any ideas, please?
UPDATE (THE SOLUTION)
For those who are interested. I was inspired by the answer of user HiFile.app - best file manager below. I have not found qt_ru.ts. Instead, in my OWN myapp_ru.ts file I added the text below, and suddenly it turned out to be enough to translate the --help and --help-all entries:
<context>
<name>QCommandLineParser</name>
<message>
<source>Displays help on commandline options.</source>
<translation>Вывод справки по параметрам командной строки.</translation>
</message>
<message>
<source>Displays help including Qt specific options.</source>
<translation>Вывод справки с особыми параметрами Qt.</translation>
</message>
</context>

The translation files (*.ts) are in Qt sources, so you need to install Qt framework with source files. The text you are referring to can be found in Src/qttranslations/translations/qtbase_ru.ts. It depends on the Qt version which you are using, but AFAIK it seems to be translated in the latest Qt 6.4. If it is not translated in your Qt version, you can update the *.ts file yourself and convert it to *.qm using Qt Linguist application.

Related

I can't knit my rmarkdown files - pandoc error

My university provided laptop was recently replaced and now when I try to knit my Rmd files if get the following error:
pandoc.exe: \\: openBinaryFile: invalid argument (Invalid argument)
Error: pandoc document conversion failed with error 1
Execution halted
These files used to knit perfectly on my old laptop and all of the code blocks within the file still run without errors.
The pandoc_available() function returns TRUE
The answers to similar questions that I have searched suggest it is something to do with the file paths but I am not familiar enough with this to make sense of what I should do. I tried mapping a network drive (Z:) to the folder where the Rmd file is stored and then changing the working directory in RStudio to that drive but it hasn't helped (and now I don't know how to change it back to ~ or what that referred to in the first place)
I have also tried downloading the latest version of Pandoc and a search on Windows Explorer shows that has installed in my user directory but I also have a version in C:\Program Files\RStudio\bin. That has also not helped.
I'm not sure if this is relevant but here is the information on the R version that I am running:
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
Can you tell me what other information is required to diagnose the problem and I will edit to include.
I am sorry this question is so poorly specified and would appreciate any help to improve it.
**** UPDATE ****
I have found that if I
(i) specify that I want a .md file in the YAML header,
(ii) create an .md file by knitting the markdown file,
(iii) copy that .md file manually to the Pandoc directory
(iv) run pandoc.exe -s -o test.knit.md test.html from the MSDOS command prompt within the Pandoc directory,
then I can create the html output file.
However, changing the working directory for RStudio to the Pandoc directory and running
x <- rmarkdown::render("test.Rmd", run_pandoc = FALSE, clean = FALSE)
knit_meta <- attr(x, "knit_meta")
rmarkdown::render( input = 'test.knit.md' , knit_meta = knit_meta )
as per https://stackoverflow.com/questions/38908766/how-to-generate-an-md-file-from-a-rmarkdown-file-containing-an-htmlwidget gives the same error as shown in my original post.
Does this prompt any thoughts that might lead to a solution to my problem?
The university IT people were able to solve my problem by uninstalling R and RStudio from the network drive and installing it on the C: drive and I am now able to knit successfully.

Qt creator could not parse stddef.h --> incorrect code completion and highlighting

I am developing a QT GUI for my application using QT Creator (4.11.0).
Recently, our IT updated my OS to Ubuntu 20.04 (from 18.04) - maybe the error is related to that.
I have not touched to project in some month but yesterday wanted to continue developing it.
However, within the IDE there are now thousands of errors highlighted at almost every line of my code. (with highlighted I mean that there is this red background and a red dot beside the line number)
On the very top, it says:
Warning: The code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example.
cstddef:50:10: fatal error: 'stddef.h' file not found
...
The errors that are listed in the IDE are very wired like:
type `QMainWindow`is not a direct or virtual base of `MainWindow` (my class is called `MainWindow`)
I'm pretty sure it is not related to my code:
the code compiles and works fine - it is really just the IDE that is highlighting errors at every line of my code.
I have the same code on a Windows Computer and there no errors are listed in the IDE.
even if I start a brand new QT Widget project the errors appear within the template code provided by the QT Creator.
Since the GCC version changed with the update of the OS, I thought maybe I have to define a new KIT but this also did not help.
Is there anything I can do to fix the issue?
Do I have to reinstall the QT Creator?
I know, pictures are not very well-liked but here I think it might help to understand what I mean with "IDE is highlighting errors":
1. First
~/.profile :
CPATH="/usr/include/clang/10/include:$CPATH"
C_INCLUDE_PATH="/usr/include/clang/10/include:$C_INCLUDE_PATH"
CPLUS_INCLUDE_PATH="/usr/include/clang/10/include:$CPLUS_INCLUDE_PATH"
export CPATH
export C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH
maybe /usr/include/clang/10/include see in you file system.
2. Second
Logout / login.
3. Third
Specifying Build Settings (Projects -> Build -> in every config build) in Build Environment section: [unset] CPATH, C_INCLUDE_PATH and CPLUS_INCLUDE_PATH
or [edit] replace this variable with the necessary values
I fixed this issue by sudo apt install clang-8.
Source: https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/1890434

how I can figure out where the output of my software is printed?

I just installed Sympol in my Ubuntu. Sympol is an open source software in the mathematics. My problem is that when I run sympol on some input data, I don't know where the output is printed. here in page 6 of this pdf (http://www.math.uni-rostock.de/~rehn/software/sympol-manual-0.1.pdf), it says the output is in .ine or .ext format but I don't know where is these output files!!!!!! please help me if you understand how it works. and it is the website of sympol for installation. http://www.math.uni-rostock.de/~rehn/software/sympol.html
I should add that when it says: Segmentation fault
Ubuntu: Assuming your app is actually running properly and you have root permissions, open another terminal, install and run fatrace, and watch for file output. When running, fatrace prints all files touched in real-time, so you should be able to see your output file's location if it's getting output.
Reading the docs again and again is almost always the correct answer, but if in this case the documentation is that bad, then watching for the file getting written is another good way to figure it out.
Windows: Sysinternals procmon (you can get it from Microsoft) can achieve the same result.

Launch x86 or x64 MSI from MSBuild bootstrapper - newb

I don't have much of a programming background, but I have been using Wix to build very basic installations for several years, usually consisting of a browser shortcut with an icon file (The desktop shortcut simply opens 32-bit Internet Explorer to a specific URL). The clientele that use my installers don't usually know about their system and it appears the time has come where I can create a bootstrapper that will run 1 of the 2 .msi files, one for x86 & one for x64. The problem is that the Wix help documentation out there assumes a certain level of knowledge about programming and/or Wix and I need "for dummies" level of help. Using code snippets from Rob's answers to an earlier post here (similarly titled) and a post on another site, I have this in my .wxs:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Intermountain SecureAccess Desktop Icon Installer" Version="1.0.0.0" Manufacturer="Intermountain Healthcare" UpgradeCode="61b75a8f-67f6-43a1-beb9-1a0be426b5a6">
<BootstrapperApplicationRef Id='WixStandardBootstrapperApplication.HyperlinkLicense' />
<Payload SourceFile="86IHCSAHCO.msi"/>
<Payload SourceFile="64IHCSAHCO.msi"/>
<Payload SourceFile="C:\Program Files (x86)\WiX Toolset v3.7\SDK\Microsoft.Deployment.WindowsInstaller.dll"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id='Netfx4Full' />
<MsiPackage SourceFile="IHCSAHCO.msi" Id="InstallationPackageId" Cache="yes" Visible="no"/>
<MsiPackage InstallCondition='NOT VersionNT64' SourceFile='86IHCSAHCO.msi' />
<MsiPackage InstallCondition='VersionNT64' SourceFile='64IHCSAHCO.msi' />
</Chain>
</Bundle>
</Wix>
The goal is to create a single .msi (or .exe) called IHCSAHCO.msi which contains the 2 msi packages 86IHCSAHCO.msi & 64IHCSAHCO.msi and then simply runs one or the other depending on the environment. When I run the batch file (called Burn.wxs) with this in it...
set WIX_ROOT=%programfiles(x86)%\WiX Toolset v3.7\bin
del /q /f *.wixobj *.msi
call "%WIX_ROOT%\candle.exe" Burn.wxs
call "%WIX_ROOT%\light.exe" Burn.wixobj -sice:ICE38
pause
...here is the error:
Burn.wxs
C:\PATH\Burn.wxs(8) : error CNDL0104 : Not a valid source file; detail: The 'Bundle' start tag on line 3 position 4 does not match the end tag of 'BootstrapperApplicationRef'. Line 8, position 7.
I feel as though I am close and am hoping one of you could take a quick peek at the code and give suggestions. It would be much appreciated...
Thanks!
RHH
Your opening BootstrapperApplicationRef element on line 4 is an empty element - it shouldn't end in />.
What are you using to edit your files? Pasting your file into Notepad++ and turning on XML highlighting identified the problem pretty quickly.

Qt 4.8.0 - MySQL Driver not listed

After reading this tutorial http://www.pikopong.com/blog/2011/07/11/how-to-enable-mysql-support-in-qt-sdk-for-windows-part-2/ I was able to successfully built the mysql lib for Qt. But somehow it is not listed in the available drivers list, although I copied the files in the right directory.
This is how my Qt-plugins\sqldrivers directory looks like now :
C:\QtSDK\Desktop\Qt\4.8.0\mingw\plugins\sqldrivers
libqsqlite4.a
libqsqlited4.a
libqsqlmysql4.a
libqsqlmysqld4.a
libqsqlodbc4.a
libqsqlodbcd4.a
qsqlite4.dll
qsqlited4.dll
qsqlmysql4.dll
qsqlmysqld4.dll
qsqlodbc4.dll
qsqlodbcd4.dll
And this is what QSqlDatabase::drivers() say :
("QSQLITE", "QODBC3", "QODBC")
Is there something essential missing?
Thank you for your help in advance and happy holidays!
I solved the problem by following the instructions in this guide:
http://christopher.rasch-olsen.no/2009/04/14/qt-45-and-mysql-plugin-with-mingw-on-windows-xp/
This was posted as a solution to the same problem (See Karlson's comment)